Please explain the grammar topic " relative clause s" in super easy way,along with that please write trick sentences to help conversation part and in last write meaning of all words from article.Please create a handbook colorful pdf
~/
relative clauses English grammar defining non-defining clauses official educational resource
~/attachments/84c0a9ac-b7b8-45a9-aacd-58c94644b9a6
mkdir -p "/tmp/workspace/relative-clauses-handbook/src" "/tmp/workspace/relative-clauses-handbook/output" && python - <<'PY' from pypdf import PdfReader p='/tmp/workspace/attachments/84c0a9ac-b7b8-45a9-aacd-58c94644b9a6/DOC-20260915-WA0006.pdf' r=PdfReader(p) print('PAGES',len(r.pages)) for i,page in enumerate(r.pages): text=page.extract_text() or '' print(f'\n--- PAGE {i+1} ---\n{text[:9000]}') PY
python - <<'PY' from reportlab.lib.pagesizes import A4 from reportlab.lib import colors from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.enums import TA_CENTER, TA_LEFT from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, PageBreak, KeepTogether from reportlab.lib.units import cm from reportlab.pdfbase.pdfmetrics import stringWidth from reportlab.lib.colors import HexColor from reportlab.pdfbase.ttfonts import TTFont from reportlab.pdfbase import pdfmetrics from reportlab.pdfgen import canvas from pathlib import Path out=Path('/tmp/workspace/relative-clauses-handbook/output/Relative_Clauses_Conversation_Handbook.pdf') # Palette NAVY=HexColor('#173B5A'); TEAL=HexColor('#00A6A6'); MINT=HexColor('#E6FAF8'); YELLOW=HexColor('#FFD166'); CORAL=HexColor('#FF6B6B'); LAV=HexColor('#F1EDFF'); PURPLE=HexColor('#6C4AB6'); INK=HexColor('#23313F'); GREY=HexColor('#5C6870'); PALE=HexColor('#F7FAFC'); GREEN=HexColor('#2A9D8F') styles=getSampleStyleSheet() styles.add(ParagraphStyle(name='TitleBig', parent=styles['Title'], fontName='Helvetica-Bold', fontSize=27, leading=32, alignment=TA_CENTER, textColor=NAVY, spaceAfter=10)) styles.add(ParagraphStyle(name='Sub', parent=styles['Normal'], fontName='Helvetica', fontSize=11.5, leading=16, alignment=TA_CENTER, textColor=GREY)) styles.add(ParagraphStyle(name='H1x', parent=styles['Heading1'], fontName='Helvetica-Bold', fontSize=20, leading=25, textColor=NAVY, spaceBefore=4, spaceAfter=9)) styles.add(ParagraphStyle(name='H2x', parent=styles['Heading2'], fontName='Helvetica-Bold', fontSize=13.5, leading=17, textColor=PURPLE, spaceBefore=7, spaceAfter=5)) styles.add(ParagraphStyle(name='Bodyx', parent=styles['BodyText'], fontName='Helvetica', fontSize=10.2, leading=14.1, textColor=INK, spaceAfter=5)) styles.add(ParagraphStyle(name='Smallx', parent=styles['BodyText'], fontName='Helvetica', fontSize=8.7, leading=11.4, textColor=INK)) styles.add(ParagraphStyle(name='Tinyx', parent=styles['BodyText'], fontName='Helvetica', fontSize=7.7, leading=9.6, textColor=INK)) styles.add(ParagraphStyle(name='Callout', parent=styles['BodyText'], fontName='Helvetica-Bold', fontSize=12, leading=16, textColor=NAVY, alignment=TA_CENTER)) def P(text, style='Bodyx'): return Paragraph(text, styles[style]) def box(content, bg=MINT, border=TEAL, pad=8): t=Table([[content]], colWidths=[17.0*cm]) t.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),bg),('BOX',(0,0),(-1,-1),0.8,border),('LEFTPADDING',(0,0),(-1,-1),pad),('RIGHTPADDING',(0,0),(-1,-1),pad),('TOPPADDING',(0,0),(-1,-1),pad),('BOTTOMPADDING',(0,0),(-1,-1),pad)])) return t def footer(c, doc): c.saveState(); c.setStrokeColor(TEAL); c.setLineWidth(1); c.line(1.7*cm, 1.2*cm, 19.3*cm, 1.2*cm) c.setFont('Helvetica',8); c.setFillColor(GREY); c.drawString(1.7*cm,.75*cm,'Relative Clauses - Easy Conversation Handbook') c.drawRightString(19.3*cm,.75*cm,f'Page {doc.page}') c.restoreState() doc=SimpleDocTemplate(str(out),pagesize=A4,rightMargin=1.7*cm,leftMargin=1.7*cm,topMargin=1.45*cm,bottomMargin=1.65*cm) story=[] # Cover story += [Spacer(1,1.2*cm), P('RELATIVE CLAUSES', 'TitleBig'), P('A super-easy, colourful handbook for speaking and writing', 'Sub'), Spacer(1,.55*cm)] story.append(box(P('<b>Big idea:</b> A relative clause gives extra information about a person, place, thing, time, or idea.', 'Callout'), YELLOW, CORAL, 12)) story += [Spacer(1,.45*cm), P('Think of it as a small “information train” attached to a noun:', 'H2x')] t=Table([[P('<b>The woman</b>', 'Callout'),P('<b>who lives next door</b>', 'Callout'),P('<b>works in a bank.</b>', 'Callout')]],colWidths=[5.5*cm,6.2*cm,5.3*cm]) t.setStyle(TableStyle([('BACKGROUND',(0,0),(0,0),LAV),('BACKGROUND',(1,0),(1,0),MINT),('BACKGROUND',(2,0),(2,0),HexColor('#FFF4D6')),('BOX',(0,0),(-1,-1),.8,NAVY),('INNERGRID',(0,0),(-1,-1),.6,NAVY),('VALIGN',(0,0),(-1,-1),'MIDDLE'),('TOPPADDING',(0,0),(-1,-1),13),('BOTTOMPADDING',(0,0),(-1,-1),13)])) story += [t, Spacer(1,.6*cm)] story.append(box(P('<b>Use this handbook to:</b><br/>• choose <b>who, which, that, where, when, whose</b><br/>• understand commas and “essential” information<br/>• make sightseeing conversations sound natural<br/>• learn the meanings of the key words in your supplied pages', 'Bodyx'), PALE, NAVY, 12)) story += [Spacer(1,.7*cm), P('Quick example', 'H2x'), P('The Arena, <b>where big concerts are held</b>, is one of the biggest venues in Europe.', 'Bodyx'), P('The coloured part tells us more about <b>the Arena</b>.', 'Bodyx'), Spacer(1,.3*cm), P('Based on the supplied lesson pages: “Relative clauses” and “A carnival atmosphere”.', 'Smallx'), PageBreak()] # Page 2 story += [P('1. What is a relative clause?', 'H1x'), P('It is a group of words that tells us more about a noun (a person, place, thing, time, or possession).', 'Bodyx')] story.append(box(P('<b>Formula:</b> noun + relative word + extra information<br/><br/><b>Person:</b> The guide <b>who showed us the city</b> was friendly.<br/><b>Thing:</b> The bridge <b>which crosses the river</b> is beautiful.<br/><b>Place:</b> This is the hotel <b>where I stayed</b>.', 'Bodyx'), MINT, TEAL)) story += [P('2. The easy word map', 'H1x')] data=[[P('<b>Word</b>','Smallx'),P('<b>Use it for</b>','Smallx'),P('<b>Easy example</b>','Smallx')], [P('<b>who</b>','Smallx'),P('people','Smallx'),P('The singer <b>who won</b> is famous.','Smallx')], [P('<b>which</b>','Smallx'),P('things / ideas','Smallx'),P('The film, <b>which was new</b>, was great.','Smallx')], [P('<b>that</b>','Smallx'),P('people or things, usually no commas','Smallx'),P('The café <b>that we like</b> is open.','Smallx')], [P('<b>where</b>','Smallx'),P('places','Smallx'),P('That is the park <b>where we met</b>.','Smallx')], [P('<b>when</b>','Smallx'),P('times / days / years','Smallx'),P('2017 was the year <b>when I started work</b>.','Smallx')], [P('<b>whose</b>','Smallx'),P('possession: “his/her/their”','Smallx'),P('Zora, <b>whose son plays football</b>, owns the shop.','Smallx')]] t=Table(data,colWidths=[2.25*cm,4.4*cm,10.35*cm],repeatRows=1) t.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,0),NAVY),('TEXTCOLOR',(0,0),(-1,0),colors.white),('BACKGROUND',(0,1),(-1,-1),PALE),('ROWBACKGROUNDS',(0,1),(-1,-1),[PALE,HexColor('#EFF8FF')]),('GRID',(0,0),(-1,-1),.4,HexColor('#BDD1DD')),('VALIGN',(0,0),(-1,-1),'TOP'),('LEFTPADDING',(0,0),(-1,-1),7),('RIGHTPADDING',(0,0),(-1,-1),7),('TOPPADDING',(0,0),(-1,-1),6),('BOTTOMPADDING',(0,0),(-1,-1),6)])) story += [t, Spacer(1,.25*cm), P('Memory trick: <b>WHO = human</b>, <b>WHERE = place</b>, <b>WHEN = time</b>, <b>WHOSE = owner</b>. Use <b>WHICH</b> for a thing; use <b>THAT</b> for a person or thing in a defining clause.', 'Bodyx')] story += [P('3. Two types: essential or extra?', 'H1x')] compare=[[P('<b>DEFINING = essential</b>','Smallx'),P('<b>NON-DEFINING = extra</b>','Smallx')],[P('It identifies exactly who/what you mean.<br/><br/><b>No commas.</b><br/><br/>The building <b>that has blue windows</b> is the hotel. <br/><i>Which building? The blue-window building.</i>','Smallx'),P('It gives bonus information. We already know who/what you mean.<br/><br/><b>Use commas.</b><br/><br/>The Grand Central Hotel, <b>where I got married</b>, is behind us. <br/><i>We already know the hotel.</i>','Smallx')]] t=Table(compare,colWidths=[8.5*cm,8.5*cm]) t.setStyle(TableStyle([('BACKGROUND',(0,0),(0,0),YELLOW),('BACKGROUND',(1,0),(1,0),LAV),('BOX',(0,0),(-1,-1),.7,NAVY),('INNERGRID',(0,0),(-1,-1),.5,NAVY),('VALIGN',(0,0),(-1,-1),'TOP'),('LEFTPADDING',(0,0),(-1,-1),9),('RIGHTPADDING',(0,0),(-1,-1),9),('TOPPADDING',(0,0),(-1,-1),8),('BOTTOMPADDING',(0,0),(-1,-1),8)])) story += [t, PageBreak()] # Page 3 story += [P('4. Commas and the “that” rule', 'H1x')] story.append(box(P('<b>Comma test:</b> Remove the relative clause. Does the main message still identify the person/thing clearly? If yes, it is probably extra information. Put commas around it.<br/><br/><b>Use:</b> Vaclav Havel, <b>who was also a famous writer</b>, was our first president.<br/><b>No commas:</b> The writer <b>who won the prize</b> is speaking today.', 'Bodyx'), HexColor('#FFF4D6'), YELLOW)) story += [P('Important: do not use <i>that</i> after a comma.', 'H2x'), P('Correct: The Victor Monument, <b>which was put up after the First World War</b>, is up there.<br/>Not standard: The Victor Monument, <b>that was put up ...</b>, is up there.', 'Bodyx')] story += [P('5. Can I leave out the relative word?', 'H1x'), P('Sometimes, in a defining clause, you can remove <b>who / which / that</b> when it is the <b>object</b> (another subject comes after it).', 'Bodyx')] examples=[[P('<b>Can omit</b>','Smallx'),P('The place <b>(that)</b> <b>they held</b> the finals in was crowded.<br/>“They” is the subject, so <i>that</i> can disappear.','Smallx')],[P('<b>Cannot omit</b>','Smallx'),P('The place <b>that held</b> the finals was crowded.<br/>“That” is followed by the verb <i>held</i>, so keep it.','Smallx')]] t=Table(examples,colWidths=[3.3*cm,13.7*cm]);t.setStyle(TableStyle([('BACKGROUND',(0,0),(0,0),MINT),('BACKGROUND',(0,1),(0,1),HexColor('#FFE7E7')),('GRID',(0,0),(-1,-1),.5,TEAL),('VALIGN',(0,0),(-1,-1),'TOP'),('LEFTPADDING',(0,0),(-1,-1),8),('RIGHTPADDING',(0,0),(-1,-1),8),('TOPPADDING',(0,0),(-1,-1),7),('BOTTOMPADDING',(0,0),(-1,-1),7)])) story += [t, P('6. Build it in 3 steps', 'H1x')] story.append(box(P('<b>Step 1:</b> Find the noun. <b>Step 2:</b> Choose the word. <b>Step 3:</b> add the information.<br/><br/><b>Two sentences:</b> Polanco is wealthy. We are coming up to Polanco.<br/><b>One sentence:</b> We are coming up to Polanco, <b>which is one of the wealthier parts of the city</b>.', 'Bodyx'), LAV, PURPLE)) story += [P('Try these answers', 'H2x')] answers=['The Grand Central Hotel, <b>where I got married</b>, is just behind us.','The Courts of Justice are the building <b>where I got divorced</b>.','This shop is run by my friend Zora, <b>whose son plays professional football in Turkey</b>.','I started working there in 2017, <b>when the area was already trendy</b>.','In that factory they make trainers, <b>which they export to Europe</b>.'] for a in answers: story.append(P('• '+a,'Bodyx')) story.append(PageBreak()) # Page 4 conversations story += [P('7. Conversation trick sentences', 'H1x'), P('Learn these short patterns. Change the bold words to talk about your own town.', 'Bodyx')] conv=[ ('Pointing out a place','This is the <b>museum where I learned</b> a lot about local history.'), ('Recommending','You should visit the <b>market that sells</b> fresh street food.'), ('Giving a reason','I like the <b>park which has</b> a lake and a playground.'), ('Talking about people','She is the <b>guide who knows</b> every story about this area.'), ('Talking about ownership','That is the <b>café whose owner</b> makes excellent coffee.'), ('Talking about time','Summer is the <b>season when</b> the carnival begins.'), ('Adding a fact','The bridge, <b>which was built in 2018</b>, is a city landmark.'), ('Making friendly talk','Do you see that building <b>where they hold</b> concerts?'), ] data=[[P('<b>Situation</b>','Smallx'),P('<b>Say this</b>','Smallx')]]+[[P(x,'Smallx'),P(y,'Smallx')] for x,y in conv] t=Table(data,colWidths=[4.3*cm,12.7*cm],repeatRows=1);t.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,0),NAVY),('TEXTCOLOR',(0,0),(-1,0),colors.white),('ROWBACKGROUNDS',(0,1),(-1,-1),[HexColor('#F8F5FF'),PALE]),('GRID',(0,0),(-1,-1),.35,HexColor('#C9C6E5')),('VALIGN',(0,0),(-1,-1),'TOP'),('LEFTPADDING',(0,0),(-1,-1),7),('RIGHTPADDING',(0,0),(-1,-1),7),('TOPPADDING',(0,0),(-1,-1),6),('BOTTOMPADDING',(0,0),(-1,-1),6)]));story += [t] story += [P('Agreeing with synonyms', 'H1x'), P('The supplied lesson shows a natural way to agree: repeat the idea with a similar word.', 'Bodyx')] agree=[['A says ...','You can agree ...'],['The houses are <b>lovely</b>.','Yes, they are <b>amazing</b>.'],['That castle is <b>incredible</b>!','I know. It is <b>fantastic</b>.'],['The river looks <b>wonderful</b>.','Yes, it is <b>beautiful</b>.'],['That area is not very <b>safe</b>.','Right. It seems quite <b>dangerous</b>.'],['This is a <b>rich</b> part of town.','Yes, it looks very <b>wealthy</b>.']] t=Table([[P(f'<b>{a}</b>','Smallx'),P(f'<b>{b}</b>','Smallx')] if i==0 else [P(a,'Smallx'),P(b,'Smallx')] for i,(a,b) in enumerate(agree)],colWidths=[8.5*cm,8.5*cm]);t.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,0),TEAL),('TEXTCOLOR',(0,0),(-1,0),colors.white),('ROWBACKGROUNDS',(0,1),(-1,-1),[MINT,HexColor('#F6FFFE')]),('GRID',(0,0),(-1,-1),.35,HexColor('#98D9D5')),('VALIGN',(0,0),(-1,-1),'TOP'),('LEFTPADDING',(0,0),(-1,-1),7),('RIGHTPADDING',(0,0),(-1,-1),7),('TOPPADDING',(0,0),(-1,-1),5),('BOTTOMPADDING',(0,0),(-1,-1),5)])); story += [t, Spacer(1,.2*cm)] story.append(box(P('<b>Mini dialogue:</b><br/>A: This is the bridge <b>where people take photos</b>.<br/>B: Wow, it is <b>beautiful</b>.<br/>A: Yes. It is the landmark <b>that visitors remember</b> most.', 'Bodyx'), HexColor('#FFF4D6'), CORAL)) story.append(PageBreak()) # Vocabulary story += [P('8. Word meanings from your lesson pages', 'H1x'), P('Simple meanings for the grammar examples, sightseeing lesson, and visible carnival vocabulary. These are the key usable words, not small grammar words such as <i>the, a, in</i>.', 'Smallx')] vocab=[ ('relative clause','a group of words that gives more information about a noun'),('noun','a naming word: person, place, thing, or idea'),('essential','necessary to identify exactly who or what we mean'),('non-essential','extra information that can be removed'),('relative pronoun','a joining word such as who, which, that, whose'),('landmark','a famous or easy-to-recognise place'),('venue','a place where an event happens'),('arena','a large building for sports or concerts'),('held','organised or happened in a particular place'),('tomb','a place where a dead person is buried'),('emperor','a male ruler of an empire'),('fortress','a strong building made for defence'),('monument','a statue or structure made to remember a person/event'),('put up','built or erected'),('wealthier','having more money; richer'),('trendy','fashionable and popular'),('trainers','sports shoes'),('export','send goods to another country to sell'), ('carnival','a public festival with music, costumes, and parades'),('atmosphere','the feeling or mood of a place'),('bonfire','a large outdoor fire'),('celebration','an event to show happiness about something'),('costume','special clothes worn to look like someone/something else'),('fireworks','bright exploding lights used in celebrations'),('float','a decorated vehicle in a parade'),('mask','something that covers part or all of the face'),('parade','a public group moving through streets, often with music'),('sound system','equipment used to play sound loudly'),('wear','have clothes or an item on your body'),('hide behind','keep yourself out of sight by standing behind something'),('take part in','join an activity'),('ride on','travel sitting or standing on something'),('decorate','make something look more attractive'),('set up','prepare or arrange equipment'),('fancy dress','costume clothes worn for a party'),('adopt','start using an idea, custom, or way of doing something'),('set off','cause something, such as fireworks, to begin'),('display','a public show'),('appeals to','seems attractive or interesting to'),('local','connected with a particular area'),('protest','an action showing disagreement'),('commonly','usually; often'),('lasts','continues for a length of time'),('reach the end','finish'),('lines of rocks in the sea','rows of rocks in the water'),('passers-by','people walking past a place'),('made fun of','laughed at in an unkind way'),('playful','not serious; done for fun'),('begins','starts'),('lounge','sit, stand, or lie in a relaxed way'),('blaring','playing very loudly')] # split two columns half=(len(vocab)+1)//2 cols=[] for group in (vocab[:half],vocab[half:]): col=[] for term,meaning in group: col.append(P(f'<b>{term}</b> - {meaning}','Tinyx')) cols.append(col) # build parallel by row rows=[] maxn=max(len(cols[0]),len(cols[1])) for i in range(maxn): rows.append([cols[0][i] if i<len(cols[0]) else '',cols[1][i] if i<len(cols[1]) else '']) t=Table(rows,colWidths=[8.5*cm,8.5*cm]);t.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),PALE),('ROWBACKGROUNDS',(0,0),(-1,-1),[PALE,HexColor('#F5FFFE')]),('GRID',(0,0),(-1,-1),.25,HexColor('#D0DFE6')),('VALIGN',(0,0),(-1,-1),'TOP'),('LEFTPADDING',(0,0),(-1,-1),6),('RIGHTPADDING',(0,0),(-1,-1),6),('TOPPADDING',(0,0),(-1,-1),3.7),('BOTTOMPADDING',(0,0),(-1,-1),3.7)]));story += [t, Spacer(1,.2*cm), box(P('<b>Final speaking challenge:</b> Describe four places in your town. Use <b>who/which/that/where/when/whose</b> at least once each. Then agree with your partner using a synonym: lovely → amazing; rich → wealthy; wonderful → beautiful.', 'Smallx'), LAV, PURPLE, 8)] doc.build(story,onFirstPage=footer,onLaterPages=footer) print(out, out.stat().st_size) PY python - <<'PY' from pypdf import PdfReader p='/tmp/workspace/relative-clauses-handbook/output/Relative_Clauses_Conversation_Handbook.pdf' r=PdfReader(p) print('PAGES',len(r.pages)) for i,pg in enumerate(r.pages): print(i+1, len(pg.extract_text() or ''), (pg.extract_text() or '')[:60].replace('\n',' | ')) PY
~/relative-clauses-handbook/output
Relative Clauses Conversation Handbook
PDF Document · PDF
Also add 20 conversation questions along with answers on relative clauses
~/
relative clauses conversation questions examples English grammar
mkdir -p "/tmp/workspace/relative-clauses-handbook/src" && python - <<'PY' from reportlab.lib.pagesizes import A4 from reportlab.lib import colors from reportlab.lib.colors import HexColor from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.enums import TA_CENTER from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, PageBreak from reportlab.lib.units import cm from pypdf import PdfReader, PdfWriter base='/tmp/workspace/relative-clauses-handbook/output/Relative_Clauses_Conversation_Handbook.pdf' supp='/tmp/workspace/relative-clauses-handbook/src/conversation_practice_pages.pdf' out='/tmp/workspace/relative-clauses-handbook/output/Relative_Clauses_Conversation_Handbook_with_20_Questions.pdf' NAVY=HexColor('#173B5A'); TEAL=HexColor('#00A6A6'); MINT=HexColor('#E6FAF8'); YELLOW=HexColor('#FFD166'); CORAL=HexColor('#FF6B6B'); LAV=HexColor('#F1EDFF'); PURPLE=HexColor('#6C4AB6'); INK=HexColor('#23313F'); GREY=HexColor('#5C6870'); PALE=HexColor('#F7FAFC') styles=getSampleStyleSheet() styles.add(ParagraphStyle(name='H1x',parent=styles['Heading1'],fontName='Helvetica-Bold',fontSize=20,leading=25,textColor=NAVY,spaceAfter=8)) styles.add(ParagraphStyle(name='Lead',parent=styles['BodyText'],fontName='Helvetica',fontSize=10.2,leading=14,textColor=INK,spaceAfter=6)) styles.add(ParagraphStyle(name='Smallx',parent=styles['BodyText'],fontName='Helvetica',fontSize=8.3,leading=10.3,textColor=INK)) styles.add(ParagraphStyle(name='Titlex',parent=styles['Title'],fontName='Helvetica-Bold',fontSize=23,leading=28,textColor=NAVY,alignment=TA_CENTER,spaceAfter=10)) def P(x,s='Smallx'): return Paragraph(x,styles[s]) def footer(c,doc): c.saveState();c.setStrokeColor(TEAL);c.line(1.7*cm,1.2*cm,19.3*cm,1.2*cm);c.setFillColor(GREY);c.setFont('Helvetica',8);c.drawString(1.7*cm,.75*cm,'Relative Clauses - Easy Conversation Handbook');c.drawRightString(19.3*cm,.75*cm,f'Practice page {doc.page}');c.restoreState() questions=[ ('Who is a person <b>who inspires you</b>? Why?','My mother is a person <b>who inspires me</b> because she works hard and helps everyone.'), ('What is a place <b>where you feel relaxed</b>?','My room is a place <b>where I feel relaxed</b> because it is quiet.'), ('What is a film <b>that you would recommend</b>?','I would recommend a film <b>that makes people laugh</b>, such as <i>Paddington</i>.'), ('Who is someone <b>whose advice you trust</b>?','My teacher is someone <b>whose advice I trust</b>.'), ('What is a food <b>which you can cook well</b>?','Pasta is a food <b>which I can cook well</b>.'), ('What was a year <b>when something important happened</b> to you?','2024 was the year <b>when I finished school</b>.'), ('What is a shop <b>where you like to go</b>?','There is a bookshop <b>where I like to go</b> at the weekend.'), ('Who is a famous person <b>that you would like to meet</b>?','I would like to meet a scientist <b>who has helped many people</b>.'), ('What is an object <b>which is important to you</b>?','My phone is an object <b>which is important to me</b> because I use it to speak to my family.'), ('What is a city <b>that you want to visit</b>?','Kyoto is a city <b>that I want to visit</b> because it has beautiful temples.'), ('Tell me about a teacher <b>who helped you</b>.','I had a teacher <b>who helped me improve my English</b>.'), ('What is a celebration <b>which people enjoy</b> in your town?','We have a festival <b>which people enjoy</b> because there is music and food.'), ('Is there a building <b>where people can watch sports</b> near you?','Yes, there is an arena <b>where people can watch sports</b> near my home.'), ('What is something <b>that your family makes</b> very well?','My family makes a dessert <b>that everyone loves</b>.'), ('What is a day <b>when you are usually busy</b>?','Monday is a day <b>when I am usually busy</b> with work or school.'), ('Describe a friend <b>whose hobby is interesting</b>.','I have a friend <b>whose hobby is photography</b>. She takes wonderful pictures.'), ('What is a place in your town <b>which tourists should see</b>?','The old market, <b>which is near the river</b>, is a place tourists should see.'), ('What is a rule <b>that you think is useful</b>?','A rule <b>that I think is useful</b> is “be on time”.'), ('What is an app <b>which you use every day</b>?','I use an app <b>which helps me organise my day</b> every day.'), ('What is one memory <b>that makes you smile</b>?','A family picnic <b>that we had last summer</b> is a memory that makes me smile.')] doc=SimpleDocTemplate(supp,pagesize=A4,rightMargin=1.7*cm,leftMargin=1.7*cm,topMargin=1.45*cm,bottomMargin=1.65*cm) story=[P('20 Conversation Questions', 'Titlex'),P('Speak first. Then compare your answer with the model answer. The answers are examples, so make them true for you.', 'Lead'),Spacer(1,.1*cm)] for page,qs in enumerate([questions[:10],questions[10:]],1): if page==2: story.append(PageBreak()); story += [P('20 Conversation Questions', 'H1x'),P('Questions 11-20: use your own ideas too.', 'Lead')] data=[[P('<b>No.</b>'),P('<b>Conversation question</b>'),P('<b>Sample answer</b>')]] for i,(q,a) in enumerate(qs,start=1 if page==1 else 11): data.append([P(str(i)),P(q),P(a)]) t=Table(data,colWidths=[.8*cm,7.6*cm,8.6*cm],repeatRows=1) t.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,0),NAVY),('TEXTCOLOR',(0,0),(-1,0),colors.white),('ROWBACKGROUNDS',(0,1),(-1,-1),[PALE,HexColor('#F4FFFE')]),('GRID',(0,0),(-1,-1),.35,HexColor('#B8D6D5')),('VALIGN',(0,0),(-1,-1),'TOP'),('LEFTPADDING',(0,0),(-1,-1),5),('RIGHTPADDING',(0,0),(-1,-1),5),('TOPPADDING',(0,0),(-1,-1),5),('BOTTOMPADDING',(0,0),(-1,-1),5)])) story += [t,Spacer(1,.2*cm)] if page==2: note=Table([[P('<b>Speaking tip:</b> Ask one follow-up question: “Why?”, “When did that happen?”, or “Who did you go with?” This makes your conversation longer and more natural.','Lead')]],colWidths=[17*cm]) note.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),YELLOW),('BOX',(0,0),(-1,-1),.6,CORAL),('LEFTPADDING',(0,0),(-1,-1),8),('RIGHTPADDING',(0,0),(-1,-1),8),('TOPPADDING',(0,0),(-1,-1),8),('BOTTOMPADDING',(0,0),(-1,-1),8)]));story.append(note) doc.build(story,onFirstPage=footer,onLaterPages=footer) writer=PdfWriter() for f in (base,supp): r=PdfReader(f) for pg in r.pages: writer.add_page(pg) with open(out,'wb') as fh: writer.write(fh) r=PdfReader(out) print('Created',out,'pages=',len(r.pages),'bytes=',__import__('os').path.getsize(out)) PY
~/relative-clauses-handbook/output
python - <<'PY' from pypdf import PdfReader p='/tmp/workspace/relative-clauses-handbook/output/Relative_Clauses_Conversation_Handbook_with_20_Questions.pdf' r=PdfReader(p) print('pages',len(r.pages)) for n in (6,7): t=r.pages[n-1].extract_text() or '' print('PAGE',n,'chars',len(t),'contains',('20 Conversation Questions' in t), 'Qcount markers', sum((str(i)+'.') in t for i in range(1,21))) print(t[:300].replace('\n',' | ')) PY
Relative Clauses Conversation Handbook with 20 Questions
PDF Document · PDF