add support for ####-paragraphs and dark mode

This commit is contained in:
relikd
2021-09-10 12:02:08 +02:00
parent 63fdf7535a
commit bcb2b662a5
20 changed files with 330 additions and 160 deletions

View File

@@ -8,22 +8,24 @@ help:
%.html: %.markdown src/template-*.html src/rules-html-pre.sed src/rules-html-post.sed
@echo
@echo "Build HTML: $*.html"
n="$*"; python3 src/temp_prepare.py src/template-$${n%%-*}.html $*.markdown $*.html.1.tmp
sed -f src/rules-html-pre.sed $*.markdown.tmp | pandoc -t html -o $*.html.2.tmp
sed -f src/rules-html-pre.sed $*.markdown > $*.sed.md
n="$*"; python3 src/temp_prepare.py src/template-$${n%%-*}.html $*.sed.md > $*.html.1.tmp
pandoc -t html -o $*.html.2.tmp -f markdown $*.sed.md.tmp
sed -f src/rules-html-post.sed $*.html.2.tmp > $*.html
python3 src/temp_combine.py $*.html.1.tmp $*.html
rm -f $*.markdown.tmp $*.html.1.tmp $*.html.2.tmp
rm -f $*.sed.md $*.sed.md.tmp $*.html.1.tmp $*.html.2.tmp
cp $*.html bin/
%.tex: %.markdown src/template-*.tex src/rules-tex-pre.sed src/rules-tex-post.sed
@echo
@echo "Build TEX: $*.tex"
n="$*"; python3 src/temp_prepare.py src/template-$${n%%-*}.tex $*.markdown $*.tex.1.tmp
sed -f src/rules-tex-pre.sed $*.markdown > $*.sed.md
n="$*"; python3 src/temp_prepare.py src/template-$${n%%-*}.tex $*.sed.md > $*.tex.1.tmp
# heading shift needed because tufte doesnt have subsubsection
sed -f src/rules-tex-pre.sed $*.markdown.tmp | pandoc --shift-heading-level-by=-1 -t latex -o $*.tex.2.tmp
pandoc --shift-heading-level-by=-1 -t latex -o $*.tex.2.tmp -f markdown $*.sed.md.tmp
sed -f src/rules-tex-post.sed $*.tex.2.tmp > $*.tex
python3 src/temp_combine.py $*.tex.1.tmp $*.tex
rm -f $*.markdown.tmp $*.tex.1.tmp $*.tex.2.tmp
rm -f $*.sed.md $*.sed.md.tmp $*.tex.1.tmp $*.tex.2.tmp
%.pdf: %.tex
@echo