# Makefile # For latex-doc-ptr. # 2020-Dec-31 Jim Hefferon latex-doc-ptr.pdf: latex-doc-ptr.tex latex-doc-ptr.sty dash.sty pdflatex --file-line-error --interaction=nonstopmode $< latex-doc-ptr.html: latex-doc-ptr.tex latex-doc-ptr.sty dash.sty make4ht latex-doc-ptr.tex cp latex-doc-ptr.css.replacement latex-doc-ptr.css # Get subsections headers awk -f massage_html.awk latex-doc-ptr-massaged.html # Correct lost ligatures (all very fragile, but I can't grok tex4ht) sed -e 's/>\Wname\WnameIf you have trouble finding something/' \ -e 's/any document containing signi\W*cant amounts of mathematics/any document containing significant amounts of mathematics/' \ -e 's/control \W*oating environments/control floating environments/' \ -e 's/override automatic \W*oat placement/override automatic float placement/' \ -e 's/cause issues \W what if/cause issues\ \— what if/' \ -e 's/left? \W but it/left?\ \— but it/' \ -e 's/and \W*le paths that can break/and file paths that can break/' \ -e 's/The \W*rst/The first/' \ -e 's/which lets you de\W*ne your own/which lets you define your own/' \ -e 's/scienti\W*c units,/scientific units,/' \ -e 's/often want to generate \W*ller text./often want to generate filler text./' \ -e 's/give the \W*le name without/give the file name without/' \ -e 's/lists of \W*gures/lists of figures/' \ -e 's/to an external \W*le/to an external file/' \ -e 's/via a completely di\W*erent/via a completely different/' \ -e 's/as \W*la-tech\W* or \W*lay-tech,\W*/as \'la-tech\' or \'lay-tech\', /' \ -e 's/as as \Wla-tech\W or \Wlay-tech,\W apos;la-techas \Wla-tech\W or \Wlay-tech,\W apos; or as \Wla-tech\W or \Wlay-tech,\W apos;lay-techas \Wla-tech\W or \Wlay-tech,\W apos;,/as \'la-tech' or \'lay-tech\', /' \ -e 's/We prefer the \Wrst,/We prefer the first,/' \ -e 's/the \Wrst syllable./the first syllable./' \ < latex-doc-ptr-massaged.html > latex-doc-ptr-massaged-ligs.html # Correct lost paragraphs inside subsections sed -e 's/Many people use/

&/' \ -e 's/If you have trouble/

&/' \ -e 's/As referred to above,/

&/' \ -e 's/Also, include/

&/' \ -e 's/Enhance captions/

&/' \ -e 's/Get hyperlinks/

&/' \ -e 's/Inside verbatim/

&/' \ -e 's/If you use Python,/

&/' \ -e 's/Make boxes that/

&/' \ -e 's/Use &/' \ -e 's/Finally, when/

&/' \ -e 's/To include/

&/' \ -e 's/In your plots/

&/' \ -e 's/For footnotes,/

&/' \ -e 's/Bibliographies are/

&/' \ -e 's/There are many/

&/' \ -e 's/To make presentations,/

&/' < latex-doc-ptr-massaged-ligs.html > latex-doc-ptr-massaged-pars.html # Correct misc sed -e 's/X E

/Books <\/span>/' \ -e 's/filler text.

/filler text. /' \ < latex-doc-ptr-massaged-pars.html > latex-doc-ptr-massaged-misc.html # Bring it back to latex-doc-ptr.html cp latex-doc-ptr-massaged-misc.html latex-doc-ptr.html rm latex-doc-ptr-massaged-ligs.html \ latex-doc-ptr-massaged-pars.html \ latex-doc-ptr-massaged-misc.html all: latex-doc-ptr.pdf latex-doc-ptr.html