This summer was my second summer spent living not-at-home and without a meal plan, which meant a quite a bit of time spent cooking for myself. Over the last two years, I have started to amass a fair number of recipes in the form of screenshots and images. I thought it would be nice to store these recipes in an organized, consistent format.
My first thought was using Pandoc (a document format converter) and Markdown to generate recipe cards as PDFs. Pandoc has an option to use the Latex PDF engine and take in a Latex template. This technique was almost effective, but I ran into difficulties trying to create a Latex template that would put my bulleted ingredient list into two columns. It was at this point that I recognized what I needed to do: I needed to write the cards in pure Latex.
I reworked the template with a pure-Latex technique in mind, using a template I found on Github (I have unfortunately been unable to find the original source - if anyone knows, please email me about it). I then set up a small script that will iterate through a series of folders, each with a [recipename].latex file, and generate matching PDFs. At the time, I was not aware of Latex’s ability to “include” template files. Consequently, my script concatenates the .latex on the end of the template before processing. This is somewhat tacky, and I may clean this up some point in the future.
The result is something like this:
I placed the resulting script and the recipes on my Gitlab instance, where I then set up a pipeline that would automatically generate and archive the PDFs after every commit. Generated PDFs can be downloaded by clicking the little cloud button below the blue “Clone” button. You can also download using this link: Zip file of PDFs
Image files on this page are licensed under a Creative Commons Attribution 4.0 International License.