Correct minor typos found during handbook creation

This commit is contained in:
Matt McWilliams 2022-08-29 16:56:32 -04:00
parent 31fd9ae459
commit 9a8af72b68
2 changed files with 17 additions and 7 deletions

View File

@ -1447,8 +1447,8 @@ Pretty nearly all image marriages fall into three categories:
**![Graphic depicting three examples of travelling matte marriages, I, II, and III](img/image_10.jpg)** **![Graphic depicting three examples of travelling matte marriages, I, II, and III](img/image_10.jpg)**
I. One region takee ita shape from the things pictured within it. I. One region takes its shape from the things pictured within it.
II. One region takes ite shape from the things pictured around it II. One region takes its shape from the things pictured around it
III. One region takes its shape from some not-pictured thing. III. One region takes its shape from some not-pictured thing.
<a name="mask-blackness"></a> <a name="mask-blackness"></a>

View File

@ -2,16 +2,27 @@
mkdir -p handbook mkdir -p handbook
touch ./handbook/index.html
if [ ! -f ./handbook/cmunrm.otf ]; then
cd handbook
wget http://mirrors.concertpass.com/tex-archive/fonts/cm-unicode/fonts/otf/cmunrm.otf
base64 cmunrm.otf > cmunrm.txt
cd ..
fi
TMP_HTML="$(realpath ./handbook/index.html)" TMP_HTML="$(realpath ./handbook/index.html)"
HTML="html/index.html" HTML="html/index.html"
LAYOUT_PDF="pdf/handbook.pdf" LAYOUT_PDF="handbook/layout.pdf"
BODY_VAR="{{BODY_HTML}}" BODY_VAR="{{BODY_HTML}}"
TMPL_HTML=`cat tmpl/layout.html.tmpl` TMPL_HTML=`cat tmpl/layout.html.tmpl`
BODY_CONTENT=`cat "${HTML}"` BODY_CONTENT=`cat "${HTML}"`
FONT=`cat handbook/cmunrm.txt | tr -d '\n'`
BODY_CONTENT="${BODY_CONTENT//.svg/.jpg}"
ALL_HTML="${TMPL_HTML/$BODY_VAR/$BODY_CONTENT}" ALL_HTML="${TMPL_HTML/$BODY_VAR/$BODY_CONTENT}"
ALL_HTML="${ALL_HTML/REPLACEFONT/$FONT}"
echo "${ALL_HTML}" > "${TMP_HTML}" echo "${ALL_HTML}" > "${TMP_HTML}"
chromium-browser \ chromium-browser \
@ -24,12 +35,11 @@ chromium-browser \
--print-to-pdf="${LAYOUT_PDF}" \ --print-to-pdf="${LAYOUT_PDF}" \
"${TMP_HTML}" "${TMP_HTML}"
mkdir -p handbook
cd handbook cd handbook
#convert -density 600 "../${LAYOUT_PDF}" -quality 90 page-%3d.jpg #convert -density 600 "../${LAYOUT_PDF}" -quality 90 page-%3d.jpg
pdftoppm "../${LAYOUT_PDF}" page -jpeg -rx 600 -ry 600 #pdftoppm "../${LAYOUT_PDF}" page -jpeg -rx 600 -ry 600
cd .. cd ..
rm -f "${TMP_HTML}" #rm -f "${TMP_HTML}"
rm -f "${LAYOUT_PDF}" #rm -f "${LAYOUT_PDF}"