Compare commits
No commits in common. "53c14a344db69902bb4f1fb35e02b5857f8414a0" and "d54277ede87645938fa490028dd4594526b6535e" have entirely different histories.
53c14a344d
...
d54277ede8
|
@ -1 +0,0 @@
|
||||||
handbook
|
|
|
@ -1447,8 +1447,8 @@ Pretty nearly all image marriages fall into three categories:
|
||||||
|
|
||||||
****
|
****
|
||||||
|
|
||||||
I. One region takes its shape from the things pictured within it.
|
I. One region takee ita shape from the things pictured within it.
|
||||||
II. One region takes its shape from the things pictured around it
|
II. One region takes ite 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>
|
||||||
|
|
|
@ -1,45 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
|
|
||||||
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)"
|
|
||||||
HTML="html/index.html"
|
|
||||||
LAYOUT_PDF="handbook/layout.pdf"
|
|
||||||
|
|
||||||
BODY_VAR="{{BODY_HTML}}"
|
|
||||||
TMPL_HTML=`cat tmpl/layout.html.tmpl`
|
|
||||||
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="${ALL_HTML/REPLACEFONT/$FONT}"
|
|
||||||
echo "${ALL_HTML}" > "${TMP_HTML}"
|
|
||||||
|
|
||||||
chromium-browser \
|
|
||||||
--headless \
|
|
||||||
--no-sandbox \
|
|
||||||
--disable-gpu \
|
|
||||||
--run-all-compositor-stages-before-draw \
|
|
||||||
--print-to-pdf-no-header \
|
|
||||||
--no-margins \
|
|
||||||
--print-to-pdf="${LAYOUT_PDF}" \
|
|
||||||
"${TMP_HTML}"
|
|
||||||
|
|
||||||
cd handbook
|
|
||||||
|
|
||||||
#convert -density 600 "../${LAYOUT_PDF}" -quality 90 page-%3d.jpg
|
|
||||||
#pdftoppm "../${LAYOUT_PDF}" page -jpeg -rx 600 -ry 600
|
|
||||||
|
|
||||||
cd ..
|
|
||||||
#rm -f "${TMP_HTML}"
|
|
||||||
#rm -f "${LAYOUT_PDF}"
|
|
|
@ -1,38 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title></title>
|
|
||||||
<style>
|
|
||||||
@font-face {
|
|
||||||
font-family : "cmu";
|
|
||||||
src: url(data:font/opentype;charset=utf-8;base64,REPLACEFONT) format("opentype");
|
|
||||||
}
|
|
||||||
*{
|
|
||||||
font-family: "cmu";
|
|
||||||
}
|
|
||||||
@media print {
|
|
||||||
*{
|
|
||||||
font-family: "cmu";
|
|
||||||
}
|
|
||||||
@page { padding: 0.5cm 0.5cm 1cm 0.5cm; }
|
|
||||||
img {
|
|
||||||
width: 90vw;
|
|
||||||
height: auto;
|
|
||||||
margin: 10px auto;
|
|
||||||
}
|
|
||||||
body {
|
|
||||||
font-size: 32px;
|
|
||||||
font-family: monospace;
|
|
||||||
}
|
|
||||||
pre{
|
|
||||||
size: 18.45cm 21cm;
|
|
||||||
margin: 0;
|
|
||||||
background: rgb(225, 225, 225);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
{{BODY_HTML}}
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Loading…
Reference in New Issue