3 ms·
I use a similar workflow using Pandoc at work. I painstakingly re-created our corporate Word documentation templates using LaTeX and then set up Pandoc to gene
by nanolith 11y ago
I use a similar workflow using Pandoc at work. I painstakingly re-created our corporate Word documentation templates using LaTeX and then set up Pandoc to generate documents from Markdown using these templates.
In addition to this, I used Haskell and Diagrams to produce DSLs for rendering various UML documents from text based descriptions. These can be rendered in both vector graphics formats (SVG and Encapsulated Postscript) as well as a written description of the diagram that can be provided for accessibility reasons.
The big take-away I got out of this process was that I could write human-readable documents that were also machine-readable while also providing a higher level of accessibility for this documentation than would be possible using traditional WYSIWYG tools.
I highly recommend this style of documentation workflow.
- lstamour 11y agoI found LaTeX to be an enjoyable way to create non-traditional PDFs with better control over styling than you would get from something that rendered HTML to PDF directly, like Prince or WebkitToPdf. The downside was all the Googling and troubleshooting when things didn't behave as expected -- LaTeX is pretty much the opposite of WYSIWYG and doesn't have Chrome Developer Tools ;-) In my case, I was actually stuck with creating a template for Invoice/Order PDFs based on a CRM that was written in PHP, so I made a PHP script that output LaTeX, then rendered that in a folder. The trick was to use a temporary folder for each document render, and to manage the process hands-free using latex-mk: http://tex.stackexchange.com/questions/210500/why-is-something-like-latexmk-needed-or-why-do-we-sometimes-need-to-compile-a-fi http://tex.stackexchange.com/questions/210500/why-is-somethi... The resulting PDFs then didn't break lines in the wrong places, had the correct margins on the first page vs other pages, were very graphically rich with vector graphics, and could be produced quickly on demand through their web-based CRM, all thanks to LaTeX and a few days' time debugging.
- sokoloff 11y agoIs your Haskell -> tex -> SVG/EPS open source by any chance? I'd love to both study the .hs (to further my learning), but I also have a need to make some documents.
- nanolith 11y agoIt is my goal to open source the tool at some point in the near future. I have a few IP related things to work out with my employer first, as a courtesy.