6 ms·
Show HN: LaTeX Boilerplates – Plain-Text Document Production System
- JosephRedfern 11y agoShareLaTeX also maintain a pretty handy database of LaTeX Templates/Boilerplates: https://www.sharelatex.com/templates https://www.sharelatex.com/templates
- physPop 11y agoYes but the difference here is that you write in markdown, and it does the TeX-ing for you.
- JosephRedfern 11y agoOh! I had entirely missed that.
- passwordis 11y agoIs there a good CSS for good looking print-ready html letters, resume, ... etc?
- wodenokoto 11y agoIt would be nice if the website had the corrospinding markdown for comparison.
- jamessb 11y agoThey're in the Github repository: https://raw.githubusercontent.com/mrzool/letter-boilerplate/master/letter.md https://raw.githubusercontent.com/mrzool/letter-boilerplate/... https://raw.githubusercontent.com/mrzool/cv-boilerplate/master/details.yml https://raw.githubusercontent.com/mrzool/cv-boilerplate/mast... https://raw.githubusercontent.com/mrzool/invoice-boilerplate/master/details.yml https://raw.githubusercontent.com/mrzool/invoice-boilerplate...
- jahewson 11y agoUsing templates with low-level formatting commands defeats the point in LaTeX being about high-level semantic macros. Why not define an \author macro? The YAML input and the input using a well-crafted set of macros would be very similar, to the point where I feel like the OP is really misunderstanding what LaTeX is about.
- leni536 11y agoI think for the invoice YAML makes sense. I would rather use an existing YAML library to generate invoice input files for the pandoc template than generating latex source files directly while sanitizing input for latex special characters.
- zokier 11y agoI think what parent comment was getting at is that you shouldn't be generating LaTeX in the first place. Instead use LaTeX macros to pull the data from the source files. Probably easier said than done.
- rhinoceraptor 11y agoI just use a Makefile[1] for this, I just type 'make', and it builds it and uses xdg-open to open it in my PDF viewer. Much faster than waiting for ShareLaTeX or similar web apps to re-render. Gummi[2] is also nice for instant feedback, and you don't need to get the whole toolchain working by hand. 1: https://gist.github.com/rhinoceraptor/8b7e9bf650db6396e27e https://gist.github.com/rhinoceraptor/8b7e9bf650db6396e27e 2: https://github.com/alexandervdm/gummi https://github.com/alexandervdm/gummi
- gjulianm 11y agoYou can try latexmk, it does almost all of the work when building LaTeX (including getting cross-references right) and can even watch for changes and rebuild the document when necessary, updating your PDF reader too. Just calling _latexmk -pdf -silent -xelatex -pvc mydoc.tex_ should suffice (the -pvc option is for the continuous build and preview mode).
- zzleeper 11y agoI couldn't get it to work on Windows previously.. is it any better now? :O
- sleepychu 11y agoevince reload the pdf when I recompile it. So you might be able to get rid of the xdg-open call.
- ksk 11y agoI sometimes wonder why nobody ever attaches real world success data for different styles of resumes. Like most(?) people, my resume has also undergone an evolution in style and layout. I would gladly trade whatever I find aesthetically pleasing about mine, if that meant a greater success rate in having my resume read/chosen.
- Retra 11y agoI don't think that kind of data would be useful. It's kind of like asking "what do I have to do to make my song a #1 hit?" It depends entirely on what the mood is of the people who happen to be looking at your resume, and the culture that guides the judgements they make about it. I had spent a good deal of effort building a very simple and pleasing resume using LaTeX, and I ended up having a professional career counselor look at it, and she said "Did you use a template? It looks too much like a template." So what? Templates are templates because they look good. If it didn't look like a template, it wouldn't look professional. And something that should've elicited a complement was instead peddled as disappointment. Instead, I'll just figure that I wouldn't want to work for anybody that trusts people who are too petty or too clueless to make good hiring decisions.
- ksk 11y ago>It's kind of like asking "what do I have to do to make my song a #1 hit?" Sure, but it's also kind of like asking - Given the fact that all these songs are number one, could we extract some common features? Maybe you'll find out that songs have to be shorter than 3 minutes or nobody plays them on the radio, or that they have to be dynamically compressed within a certain frequency range because most people listen to music on hardware that does not reproduce certain frequencies very well, or that having a weird time signature makes a song unpopular, etc. >I wouldn't want to work for anybody that trusts people who are too petty or too clueless to make good hiring decisions. Hah, that would exclude a large portion of the professional software industry !
- Retra 11y agoMy point is that those features are transient. A #1 song today probably can't be #1 in ten years. If Beethoven were born today, he would not be topping pop charts, even if you have plenty of data showing that his style of music is good. Resume writing either comes down to presenting the fact that you are clearly the most qualified for the position, or because you caught the fad of resume attention-grabbing design in the right way. The later will only really help you if you're competing against many similarly-qualified yet boring candidates. It's better to have more valuable content on your resume than to apply statistics to its paint job. >Hah, that would exclude a large portion of the professional software industry ! It probably does, but I don't actually want to work for a large portion of the professional software industry. I want to work for people that value me and share my vision. And in turn, I want companies that make those kinds of hiring decisions to not have access to people like me.
- baldfat 11y agoRStudio (IDE for R) has a great MarkDown to PDF, Word or HTML using Pandoc. http://rmarkdown.rstudio.com/pdf_document_format.html http://rmarkdown.rstudio.com/pdf_document_format.html Might help you to see their process. You can do the whole thing with CLI but easy in their IDE.
- aorth 11y agoThey look great. Installing pandoc is a pain, though. My CV is LaTeX as well—using the moderncv template—and I build it regularly on both GNU/Linux and Mac OS X: https://github.com/alanorth/cv https://github.com/alanorth/cv
- bachmeier 11y ago> Installing pandoc is a pain, though. I'm genuinely curious about this statement. I thought you must be using Windows, but the latter part of your comment contradicts that.
- mrzool 11y agoThanks for all the feedback! Make sure to check out this article where I talk in depth about a typical workflow and the rationale behind this project: http://mrzool.cc/writing/typesetting-automation/ http://mrzool.cc/writing/typesetting-automation/
- omaranto 11y agoOne thing I didn't really see in that post is why not just LaTeX directly. Is it just that you prefer Markdown syntax? (Which I guess is a valid reason.)
- mrzool 11y agoLaTeX is complicated and verbose. Markdown and YAML are terse and readable. Also, separation of form from content makes life amazingly simple.
- omaranto 11y agoI agree that separation of form from content makes life amazingly simple, that's one the main virtues of LaTeX. :) As I said before, preferring Markdown and YAML solely on account of syntax seems fair to me.
- mrzool 11y agoIf both content and form live in the same file, like in the standard LaTeX approach, they're not separated. My approach is to abstract all style-related concerns in a template and keep the content in dedicated files: YAML for structured content (CVs and invoices) and markdown for prose-like content (letters). Beside making life easier by using formats more suited, syntax-wise, for the particular type of content I'm dealing with, this opens up new possibilities for automation (e.g. I can iterate on repetitive data structures, for example for building an invoice table) and ultimately results in DRYer LaTeX code in the template.
- 11y ago
- swah 11y agoOh, needs Make. Probably not easy on Windows..
- nanolith 11y agoI 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.
- 11y ago
- charlieegan3 11y agoBeen collecting a few links on this topic: https://www.rpi.edu/dept/arc/training/latex/resumes/ https://www.rpi.edu/dept/arc/training/latex/resumes/ https://github.com/mrzool/cv-boilerplate https://github.com/mrzool/cv-boilerplate https://github.com/posquit0/Awesome-CV https://github.com/posquit0/Awesome-CV
- rhythmvs 11y agoAt the time of writing my article cited above, I didn’t yet came across this one: [Sustainable Authorship in Plain Text using Pandoc and Markdown](http://programminghistorian.org/lessons/sustainable-authorship-in-plain-text-using-pandoc-and-markdown http://programminghistorian.org/lessons/sustainable-authorsh...)
- wyldfire 11y agoThanks for sharing. "Awesome-CV" looks particularly interesting.
- codingthebeach 11y agoAlso: http://jsonresume.org http://jsonresume.org https://github.com/jsonresume/resume-cli https://github.com/jsonresume/resume-cli https://github.com/fluentdesk/fluentcv https://github.com/fluentdesk/fluentcv
- rhythmvs 11y agoKudos for this great, yet simple and lean toolchain! Anyone familiar with command line tools and a corresponding aversion for bloated WYSIWYG apps will second the underlying idea that MS Word (and the likes) “should die” in favor of plain text workflows. Yet, with the help of Pandoc (which does the heavy lifting in these boilerplates), nothing prevents you to keep using Word as a front-end and plug it in this exact same workflow. Word may not be the best-of-bread typesetting engine or layouting tool, but to many it still is useful as a quite decent word processor. For those interested, I did a (long-read) write-up on how one could go from Word over Markdown to even InDesign (as an alternative templating/typesetting engine, instead of LaTeX/XeTeX): http://rhythmus.be/md2indd/ http://rhythmus.be/md2indd/
- RankingMember 11y agoMan, that example CV is beautifully simple. It's so weird to see a CV that's not peppered with acronyms.
- boromi 11y agoIt sounds like a good idea, until you need to write advanced mathematical documents, in which case it all breaks down. Any tips to make a latex pandoc workflow viable for advanced math documents with custom commands and such. I.e. using the mathtools package and various advanced latex math commands?
- JohnHammersley 11y agoWe've been taking a similar approach at overleaf[1], where our rich text mode let's non-LaTeX users write papers without needing to code. We've also had success in working with publishers to simplify the submission process for research articles, with direct one-click submission links where we pass the files plus meta data. See e.g. https://www.overleaf.com/blog/269 https://www.overleaf.com/blog/269 for a recent example. [1] https://www.overleaf.com https://www.overleaf.com