cleanup the markdown doc build, still not usable without manual tweaking...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2023-09-19 21:27:41 +03:00
parent be6bc7ba4d
commit 949cd945b0

View File

@ -85,8 +85,7 @@ endif
# markdown dialect...
#
# XXX still needs some tweaking...
MD_FORMAT ?= markdown_github
MD_FORMAT ?= gfm
# debug output...
@ -173,26 +172,11 @@ LN := cp -l
# - |..| - verbatim does not work...
# - || - parts of doc omitted...
# - verbatim blocks get merged sometimes...
# - does not resolve \jobname in include...
# - ...
# ...not sure if this can be tweaked...
#%.md: %.tex
# pandoc -t $(MD_FORMAT) -s $< -o $@
# XXX EXPERIMENTAL...
# XXX revise:
# ...for this to work we need to replace:
# \documentclass{ltxdoc}
# to:
# \documentclass[markdownextra]{internet}
# XXX install the internet class...
# https://github.com/loopspace/latex-to-internet
# ...needs testing...
%.md: %.tex
cat $< \
| sed 's/documentclass{ltxdoc}/documentclass[markdownextra]{internet}/' \
> $<.tmp
mv $<{.tmp,}
$(TEX) $< $(STDERR)
pandoc -t $(MD_FORMAT) -s $< -o $@
# meta-section...