r500/build.sh
2025-10-23 13:27:37 -05:00

29 lines
880 B
Bash

set -eux
rm -f verbatim/output/*.svg
make4ht --shell-escape index.tex "pic-m,pic-equation,svg"
echo 'img[alt="PIC"] { width: 100%; }' >> index.css
echo '.cmtt-10 { font-size: 0.9em; }' >> index.css
echo 'img[src="index3x.svg"] { height: 2.5em; }' >> index.css
sed -i '/prefers-color-scheme/d' index.css
sed -i 's| </span>|</span> |g' index.html
sed -i '/figure.figure/d' index.css
echo 'figure.figure { margin-left: 20px; margin-right: 20px; }' >> index.css
echo 'pre.verbatim { font-size: 0.9em; }' >> index.css
sed -i 's|color-scheme: light dark;||g' index.css
echo 'figcaption.caption { margin-bottom: 1.3em; margin-top: 0.3em; }' >> index.css
sed -i 's/index.css/index2.css/g' index.html
mv index.css index2.css
python replace_video.py index.html
for file in verbatim/output/*.svg; do
sed -i 's|rgb(0%, 0%, 100%)||g' "$file"
python resize_svg.py "$file"
done