Please make the following changes in the colorful handbook pdf which I am attaching.Firstly ,attach and add the active voice also in the table given in colorful handbook pdf on passive voice with formulas and uses. Secondly please add meaning also under of every extra high frequency structure for plan and predictions.
~/
~/attachments/fe1b5543-789c-4beb-a677-7a490c640140
active passive voice formulas English grammar plan prediction structures meaning
python - <<'PY' from pypdf import PdfReader from pathlib import Path p=Path('/tmp/workspace/attachments/fe1b5543-789c-4beb-a677-7a490c640140/DOC-20260903-WA0024.pdf') r=PdfReader(str(p)) print('pages',len(r.pages)) for i,page in enumerate(r.pages): t=page.extract_text() or '' print('\n=== PAGE',i+1,'===\n',t[:5000]) PY
mkdir -p "/tmp/workspace/colorful-handbook-revision/output" cat > "/tmp/workspace/colorful-handbook-revision/create_handbook.py" <<'PY' from reportlab.lib import colors from reportlab.lib.colors import HexColor from reportlab.lib.enums import TA_CENTER, TA_LEFT from reportlab.lib.pagesizes import A4 from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.units import mm from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, PageBreak, KeepTogether from reportlab.pdfbase.pdfmetrics import stringWidth from reportlab.pdfbase.ttfonts import TTFont from reportlab.pdfbase import pdfmetrics from reportlab.lib import fonts from pathlib import Path out=Path('/tmp/workspace/colorful-handbook-revision/output/Colorful_Handbook_Plans_and_Predictions_Revised.pdf') try: pdfmetrics.registerFont(TTFont('DejaVu','/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf')) pdfmetrics.registerFont(TTFont('DejaVu-Bold','/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf')) REG,BOLD='DejaVu','DejaVu-Bold' except: REG,BOLD='Helvetica','Helvetica-Bold' NAVY=HexColor('#17365D'); TEAL=HexColor('#007C83'); SKY=HexColor('#E6F7F7'); GOLD=HexColor('#F4B942'); CORAL=HexColor('#F36B5B'); PINK=HexColor('#FFF0EC'); INK=HexColor('#25354A'); GREY=HexColor('#5B6673'); PALE=HexColor('#F5F8FC'); GREEN=HexColor('#E9F7EE') styles=getSampleStyleSheet() styles.add(ParagraphStyle(name='TitleX', fontName=BOLD, fontSize=24, leading=29, textColor=NAVY, spaceAfter=7)) styles.add(ParagraphStyle(name='SubX', fontName=REG, fontSize=10.2, leading=14, textColor=GREY, spaceAfter=10)) styles.add(ParagraphStyle(name='H1X', fontName=BOLD, fontSize=15, leading=19, textColor=NAVY, spaceBefore=8, spaceAfter=6)) styles.add(ParagraphStyle(name='H2X', fontName=BOLD, fontSize=11.2, leading=14, textColor=TEAL, spaceBefore=7, spaceAfter=4)) styles.add(ParagraphStyle(name='BodyX', fontName=REG, fontSize=8.8, leading=12.2, textColor=INK, spaceAfter=5)) styles.add(ParagraphStyle(name='SmallX', fontName=REG, fontSize=7.7, leading=10, textColor=INK)) styles.add(ParagraphStyle(name='CellX', fontName=REG, fontSize=7.35, leading=9.3, textColor=INK)) styles.add(ParagraphStyle(name='CellBoldX', fontName=BOLD, fontSize=7.4, leading=9.3, textColor=NAVY)) styles.add(ParagraphStyle(name='NoteX', fontName=REG, fontSize=8.4, leading=11.4, textColor=INK, leftIndent=7, rightIndent=7, spaceBefore=5, spaceAfter=7)) P=lambda text,style='BodyX': Paragraph(text,styles[style]) def tbl(rows,widths, header=True, font=7.4): conv=[] for r, row in enumerate(rows): conv.append([x if hasattr(x,'wrap') else P(str(x),'CellBoldX' if r==0 and header else 'CellX') for x in row]) t=Table(conv,colWidths=widths,repeatRows=1 if header else 0,hAlign='LEFT') ts=[('VALIGN',(0,0),(-1,-1),'TOP'),('GRID',(0,0),(-1,-1),0.35,HexColor('#B9CBD9')),('LEFTPADDING',(0,0),(-1,-1),5),('RIGHTPADDING',(0,0),(-1,-1),5),('TOPPADDING',(0,0),(-1,-1),4),('BOTTOMPADDING',(0,0),(-1,-1),4),('BACKGROUND',(0,0),(-1,0),NAVY),('TEXTCOLOR',(0,0),(-1,0),colors.white)] for i in range(1,len(rows)): if i%2==0: ts.append(('BACKGROUND',(0,i),(-1,i),PALE)) t.setStyle(TableStyle(ts)); return t def box(text, color=SKY, label=None): items=[] if label: items.append(P(label,'H2X')) items.append(P(text,'NoteX')) t=Table([[items]], colWidths=[174*mm]); t.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),color),('BOX',(0,0),(-1,-1),0.5,TEAL),('LEFTPADDING',(0,0),(-1,-1),7),('RIGHTPADDING',(0,0),(-1,-1),7),('TOPPADDING',(0,0),(-1,-1),3),('BOTTOMPADDING',(0,0),(-1,-1),3)])); return t def header_footer(canv,doc): canv.saveState(); w,h=A4 canv.setFillColor(NAVY); canv.rect(0,h-11*mm,w,11*mm,stroke=0,fill=1) canv.setFillColor(colors.white); canv.setFont(BOLD,7.5); canv.drawString(18*mm,h-7.2*mm,'C1 GRAMMAR | PLANS AND PREDICTIONS') canv.setFillColor(GREY); canv.setFont(REG,7.2); canv.drawRightString(w-18*mm,10*mm,f'Colourful Handbook • Page {doc.page}') canv.restoreState() doc=SimpleDocTemplate(str(out),pagesize=A4,rightMargin=18*mm,leftMargin=18*mm,topMargin=18*mm,bottomMargin=16*mm) story=[] story += [P('PASSIVE AND ACTIVE STRUCTURES<br/>FOR PLANS AND PREDICTIONS','TitleX'), P('A colourful C1 grammar handbook: forms, tenses, formulas, meanings, and practical examples','SubX')] story.append(box('<b>Core passive principle:</b> object of an active verb + correct form of <i>be</i> + past participle (V3). The agent can be omitted when it is unknown, obvious, or unimportant.<br/><br/><b>Core active principle:</b> subject + verb + object. The subject performs the action. Active voice usually makes the doer clear and direct.',SKY,'THE KEY IDEA')) story.append(box('<b>Passive:</b> <i>The bridge is projected to be completed by 2030.</i> Here, <i>is projected</i> is passive and <i>to be completed</i> is a passive infinitive.<br/><br/><b>Passive-looking but active:</b> <i>The budget is set to rise.</i> <i>Set</i> describes an expected future development. <i>Rise</i> is active because the budget rises itself, not because someone raises it.',PINK,'IMPORTANT DISTINCTION')) story.append(P('1. Structures from the source handbook','H1X')) rows=[['Structure','Formula','Meaning and practical example'], ['is projected to be completed','S + be + projected + to be + V3','Formal forecast about a process:<br/><i>The rail link is projected to be completed by 2030.</i>'], ['is intended to be','S + be + intended + to be + complement','Official purpose:<br/><i>The centre is intended to be a beacon for local businesses.</i>'], ['is set to rise','S + be + set + to + base verb','Strong expectation:<br/><i>Energy prices are set to rise next winter.</i>'], ['is expected to have reached','S + be + expected + to have + V3','Forecast completed by a future point:<br/><i>The population is expected to have reached nine million by 2045.</i>'], ['were expected to provide','S + was/were + expected + to + base verb','Past expectation, often not fulfilled:<br/><i>The firms were expected to provide jobs, but they are failing.</i>']] story += [tbl(rows,[38*mm,51*mm,85*mm]),Spacer(1,5)] story.append(P('HOW TO CHOOSE THE INFINITIVE AFTER THE REPORTING VERB','H2X')) story.append(P('<b>to + base verb</b> shows an action or state expected in the future: <i>The scheme is expected to reduce traffic.</i><br/><b>to be + V3</b> shows a future action done to the subject: <i>The scheme is expected to be approved in June.</i><br/><b>to have + V3</b> shows an action completed before a stated future time: <i>Passenger numbers are expected to have doubled by 2040.</i><br/><b>to have been + V3</b> shows a passive action completed before that future point: <i>The stations are expected to have been renovated by 2040.</i>')) story.append(PageBreak()) story.append(P('2. Passive and active tenses: formula and use','H1X')) story.append(P('V3 means the past participle, for example <i>built, approved, completed</i>. The passive column focuses on the receiver of the action; the active column focuses on the person or thing doing it.')) rows=[['Tense','Passive formula and example','Active formula and example','Use'], ['Present simple','am / is / are + V3<br/><i>The final design is approved each year.</i>','S + base verb / verb-s<br/><i>The board approves the final design each year.</i>','Routine, rule, or regular process'], ['Past simple','was / were + V3<br/><i>The proposal was rejected.</i>','S + V2<br/><i>The committee rejected the proposal.</i>','Completed past decision or event'], ['Present continuous','am / is / are being + V3<br/><i>New homes are being built.</i>','S + am / is / are + V-ing<br/><i>Developers are building new homes.</i>','Action in progress now'], ['Past continuous','was / were being + V3<br/><i>The road was being repaired.</i>','S + was / were + V-ing<br/><i>Workers were repairing the road.</i>','Action in progress at a past time'], ['Present perfect','has / have been + V3<br/><i>The first phase has been completed.</i>','S + has / have + V3<br/><i>The team has completed the first phase.</i>','Completed action relevant now'], ['Past perfect','had been + V3<br/><i>The old site had been cleared.</i>','S + had + V3<br/><i>Workers had cleared the old site.</i>','Earlier completed past action'], ['Future simple','will be + V3<br/><i>The findings will be published.</i>','S + will + base verb<br/><i>The team will publish the findings.</i>','Future plan or prediction'], ['Future perfect','will have been + V3<br/><i>The stadium will have been completed by July 2030.</i>','S + will have + V3<br/><i>Builders will have completed the stadium by July 2030.</i>','Result completed by a deadline'], ['Modal passive','modal + be + V3<br/><i>The plan may be revised.</i>','S + modal + base verb<br/><i>The board may revise the plan.</i>','Possibility, advice, necessity, etc.'], ['Modal perfect passive','modal + have been + V3<br/><i>The signs should have been installed.</i>','S + modal + have + V3<br/><i>Workers should have installed the signs.</i>','Comment on an earlier action']] story.append(tbl(rows,[24*mm,52*mm,59*mm,39*mm])) story.append(box('<b>Future shortcut:</b> Use <i>will be + V3</i> for a scheduled future action: <i>The results will be announced tomorrow.</i> Use <i>will have been + V3</i> for a result completed by a deadline: <i>All applications will have been processed by Friday.</i>',GREEN,'TENSE SHORTCUT')) story.append(PageBreak()) story.append(P('3. Extra high-frequency structures for plans and predictions','H1X')) story.append(P('Each structure below now includes its direct meaning, as well as its use.')) rows=[['Structure and formula','Meaning','Use','Example'], ['BE SCHEDULED TO<br/>S + be + scheduled + to + base verb','arranged for a stated time','a fixed official arrangement','<i>The museum is scheduled to reopen in September.</i>'], ['BE DUE TO<br/>S + be + due + to + base verb','expected or planned to happen at a particular time','expected at a particular time','<i>The report is due to be released this afternoon.</i>'], ['BE FORECAST TO<br/>S + be + forecast + to + base verb','predicted from data, models, or expert analysis','prediction based on data','<i>Inflation is forecast to fall next year.</i>'], ['BE ANTICIPATED TO<br/>S + be + anticipated + to + base verb','expected in advance','formal expectation','<i>Demand is anticipated to increase during the holiday season.</i>'], ['BE ESTIMATED TO<br/>S + be + estimated + to + base verb','calculated approximately, not exactly','approximate prediction or calculation','<i>The repairs are estimated to cost £2 million.</i>'], ['BE LIKELY TO<br/>S + be + likely + to + base verb','probably going to happen','probable future development','<i>The proposal is likely to attract criticism.</i>'], ['BE UNLIKELY TO<br/>S + be + unlikely + to + base verb','probably not going to happen','improbable future development','<i>The changes are unlikely to affect current staff.</i>'], ['BE ON COURSE TO<br/>S + be + on course + to + base verb','progressing successfully towards an expected result','progress towards a target','<i>The project is on course to finish before winter.</i>'], ['BE EARMARKED FOR<br/>S + be + earmarked + for + noun / -ing','officially set aside for a specific purpose','officially reserved for a purpose','<i>The land is earmarked for affordable housing.</i>'], ['BE SLATED FOR<br/>S + be + slated + for + noun / -ing','officially planned or expected, especially in news reports','planned, often in news reporting','<i>The building is slated for demolition next spring.</i>'], ['BE EXPECTED TO BE<br/>S + be + expected + to be + V3','predicted to receive an action in the future','future passive result','<i>The new policy is expected to be approved in May.</i>'], ['BE INTENDED TO<br/>S + be + intended + to + base verb','designed or planned to achieve a purpose','purpose or design','<i>The campaign is intended to encourage recycling.</i>']] story.append(tbl(rows,[43*mm,37*mm,42*mm,52*mm])) story.append(PageBreak()) story.append(P('4. Practical writing patterns','H1X')) story.append(P('FORMAL REPORT','H2X')); story.append(box('<i>It is anticipated that the new policy will be introduced in stages. The first phase is scheduled to be launched in April.</i><br/><br/>This pattern avoids naming a decision-maker and fits reports, proposals, and policy updates.',SKY)) story.append(P('NEWS AND FORECASTING','H2X')); story.append(box('<i>Passenger numbers are forecast to have reached 20 million by 2035. Two additional platforms are expected to have been built by then.</i><br/><br/>Use the perfect infinitive when you measure a completed outcome at a future deadline.',PINK)) story.append(P('CAUTIOUS PREDICTION','H2X')); story.append(box('<i>The scheme is likely to be delayed if funding is not secured. However, the main works may be completed before the end of the year.</i><br/><br/><i>Likely, unlikely, may, might,</i> and <i>could</i> make predictions less absolute and more appropriately cautious.',GREEN)) story.append(P('A USEFUL ACTIVE-TO-PASSIVE CONVERSION','H2X')) story.append(box('<b>Active:</b> The council will publish the timetable next week.<br/><b>Passive:</b> The timetable will be published next week (by the council).<br/><br/><b>Steps:</b> 1. Move the object to subject position. 2. Choose the tense of <i>be</i>. 3. Use V3. 4. Add <i>by + agent</i> only if the agent matters.',HexColor('#FFF9E5'))) story.append(P('5. Accuracy checklist','H1X')) rows=[['Check','Correct choice'],['Keep the original time reference','will publish → will be published; had completed → had been completed.'],['Use V3 after be','<i>is projected to be completed</i>, not “is projected to be complete” when the meaning is an action.'],['Do not make intransitive verbs passive','Say <i>prices are set to rise</i>, not “prices are set to be risen”.'],['Use the agent only when useful','<i>The policy was approved by the board.</i> Omit it if the actor is irrelevant.'],['Match singular/plural','<i>The plan is expected; the plans are expected.</i>']] story.append(tbl(rows,[63*mm,111*mm])) story.append(P('MINI PRACTICE: MODEL ANSWERS','H2X')) story.append(P('1. Active: Experts predict that the bridge will be completed by 2032. Formal passive: <i>The bridge is projected to be completed by 2032.</i><br/>2. Active: The council will reserve the site for a school. Passive: <i>The site will be earmarked for a school.</i><br/>3. Active: Analysts think passenger numbers will double by 2040. Passive reporting structure: <i>Passenger numbers are expected to have doubled by 2040.</i>')) story.append(box('These structures are common in formal communication because they foreground evidence, plans, processes, and predicted outcomes. Use active voice when identifying the doer improves clarity; use passive voice when the action or result deserves the focus.',SKY,'GRAMMAR NOTE')) doc.build(story,onFirstPage=header_footer,onLaterPages=header_footer) print(out) PY python "/tmp/workspace/colorful-handbook-revision/create_handbook.py" && ls -lh "/tmp/workspace/colorful-handbook-revision/output/Colorful_Handbook_Plans_and_Predictions_Revised.pdf"
python - <<'PY' from pypdf import PdfReader p='/tmp/workspace/colorful-handbook-revision/output/Colorful_Handbook_Plans_and_Predictions_Revised.pdf' r=PdfReader(p) print('pages',len(r.pages)) t='\n'.join(x.extract_text() or '' for x in r.pages) for s in ['Passive and active tenses', 'The board approves', 'Meaning', 'arranged for a stated time', 'BE SLATED FOR']: print(s, s.lower() in t.lower()) print(t[:1000]) PY
Colorful Handbook Plans and Predictions Revised
PDF Document · PDF