3 ms·
Pandoc is excellent, but I'd recommend coverting Markdown to LaTeX instead of the other way around. I've tried several LaTeX to X converters (for any value of X
by eslaught 9y ago
Pandoc is excellent, but I'd recommend coverting Markdown to LaTeX instead of the other way around. I've tried several LaTeX to X converters (for any value of X other than PS/PDF) and frankly none of them are very good. The advantage of starting with Markdown is that you know that the format is a good match for the tool's internal AST, which makes the results much more predictable.
Pandoc has the advantage that you can still write LaTeX directly inline when you need to. You can also write in terms of divs and spans (which Pandoc understands natively) and convert these to whatever you want via filters. The latter approach has the advantage that different filters can generate the appropriate code for the format you're generating, so that you don't just lose the elements when you convert to an incompatible format.
Shameless plug: I've built a tool that helps manage the conversion: https://bitbucket.org/elliottslaughter/bookmd https://bitbucket.org/elliottslaughter/bookmd