Re:Show HN: TeXMe – Self-Rendering Markdown and LaTeX Documents
by chrisweekly on Friday October 26, 2018 @07:57AM
(#18308420)
Huh? How do you use CSS to convert MD to PDF?
Re:Show HN: TeXMe – Self-Rendering Markdown and LaTeX Documents
by arendtio on Friday October 26, 2018 @08:43AM
(#18308658)
Well, not directly.
I have a script which converts Markdown to HTML (using Discount; referencing my CSS file and highlight.js for syntax highlighting in code sections) and starts a headless chromium which in turn converts the rendered HTML to a PDF file.
Re:Show HN: TeXMe – Self-Rendering Markdown and LaTeX Documents
by chrisweekly on Friday October 26, 2018 @08:56AM
(#18308737)
That sounds a lot more like it. :)
Care to share your script?
Re:Show HN: TeXMe – Self-Rendering Markdown and LaTeX Documents
by arendtio on Friday October 26, 2018 @09:36AM
(#18309042)
https://www.filedropper.com/markdown2pdf
$ sha256sum markdown2pdf.zip
97b9df1091cb29e15b699fe1b87d0de20929abfe5357d9e4db920fb24a76406b markdown2pdf.zip
It consists of multiple files (entry point is markdown2pdf.sh) and also supports a flag '-w' to watch the markdown file so you can use an editor to modify it while your PDF viewer (in my case okular) keeps updating the changes.I built it solely for my purpose, so it might not fit your needs (or taste). ;-)
Legal: I have no special requirements, so think of it as MIT license, but I included some other files (everything in the directory 'Markdown-Styling' except 'css/app.css' which is my CSS theme) which are available free of charge somewhere on the internet but might have their own licenses and terms of use.
The one thing I would wish for is a build tool where I could insert my CSS (or a choose from available themes) and build my version of TeXMe (I have a CSS file already which I use to convert Markdown files to PDF).
I mean, yes it is not that complicated, and I might just do it manually, but for wider adoption, it would be cool to have themed versions which do not clutter the Markdown files.