5 ms·
Just on a formatting note, it would be great to have a static generator that takes markdown input and generates this kind of html book with footnotes and refere
by bnj 10y ago
Just on a formatting note, it would be great to have a static generator that takes markdown input and generates this kind of html book with footnotes and references. Similar to [spec-md](http://leebyron.com/spec-md/ http://leebyron.com/spec-md/). Anyone know of interesting projects along those lines?
- AdieuToLogic 10y agoOne option is to translate markdown to DocBook[0] (such as this tool[1]) and then generate an HTML book from there. 0 - http://wiki.docbook.org/WhyDocBook http://wiki.docbook.org/WhyDocBook 1 - https://github.com/MSmid/markdown2docbook https://github.com/MSmid/markdown2docbook
- 0xmohit 10y agoThe only thing that comes to mind is Pandoc [0], [1]. It is worth adding that it was originally created by John MacFarlane, a philosophy professor at the University of California, Berkeley. It's written in Haskell. [0] http://pandoc.org/ http://pandoc.org/ [1] https://github.com/jgm/pandoc https://github.com/jgm/pandoc
- jimhefferon 10y agoMore heavyweight than markdown, but MathBookXML does a lot. https://mathbook.pugetsound.edu/ https://mathbook.pugetsound.edu/
- arnsholt 10y agoI've been having similar thoughts recently, and decided that the best option is probably too use Sphinx. It's reStructuredText rather than Markdown, but that that turns out to be an advantage as RST has a much cleaner extension story than Markdown. And the syntax is pretty similar to Markdown anyways.
- dredmorbius 10y agoAs noted, pandoc. Using pandoc-markdown(5), you have footnotes/endnotes, and can export directly to latex and PDF: pandoc -f markdown -t latex -o foo.pdf foo.txt A footnote is indicated in text as [^tag], say [^1]. [^tag]: Is the footnote denoted by the corresponding tag. [^1]: Is the footnote '1' above. Multi-line footnotes may be designated by indenting subsequent paragraphs 1 or more spaces. I've created long (70+ page) documents using only these elements. At other times, exporting to LaTeX and adding additional structure or elements may prove useful. https://en.m.wikipedia.org/wiki/Pandoc https://en.m.wikipedia.org/wiki/Pandoc Example: a markup of Dugald Stewart's "Account of the Life and Times of Adam Smith, LLD" I did a few days ago: http://pastebin.com/LdKXpHdR http://pastebin.com/LdKXpHdR
- dredmorbius 10y agoIncidentally, the document here smells very stongly of latex2html or a similar generator.
- gnufx 10y agoIt's not that grotty. It looks more like TeX2page, from the navigation style in particular (like the online SICP and How to Design Programs).
- dredmorbius 10y agoI didn't mean to imply grotty at all, and apologise if I'd left that impression. I was just noting that this had the hallmarks of LaTeX to HTML translation. Also the index.