Ceci est une ancienne révision du document !
The last month has been spent once again updating my CV. I do this quite frequently in order to keep it as up-to-date as possible when it comes to my skills and experiences. That way, if someone asks for my CV, I’ll have something to send them quickly. The problem with this is that the CV I update is massive (to contain all the possible information), and I always need to copy-and-paste sections into a tailored CV for whichever position I want to apply to. This is tedious and error-prone - I’d much prefer a DRY (don’t repeat yourself) method so I need to update my information in only one spot. Enter LaTeX.
What is LaTeX?
LaTeX is a markup language that is very popular with the math and science fields, due to its ability to easily represent mathematical equations. For the use case we’re covering in this article, however, we’re mainly focused on the ability to define your own reusable snippets.
Example?
I decided on this approach while looking at various CV templates in LaTeX. In the Further Reading section, you’ll find a link to the selection of templates I ultimately chose (specifically, the sidebar one). As such, instead of creating a placeholder CV for this article, I will instead refer to the examples in that repository.
Getting Started
What you’ll need to do is install LaTeX. My recommendation is to install Texmaker (an editor for LaTeX) and let it pull down the dependencies. This will take a while, as the files are quite large.
Next, you’ll want to create a nice folder to place your files in. This is the folder that will contain your .tex file, as well as the resulting PDF files and any temporary or supplementary files you may need (i.e. pictures). I therefore recommend that you use a new, empty folder for this.
Once you’re done with the preliminaries, I’d also recommend finding a nice template that appeals to you, and download an example into this new folder to work with. Since everyone may be working with a different template, I will try to keep the instructions generalized so anyone can follow along.
Housekeeping
Once you’ve downloaded your template, you may discover that there are multiple files, or that there is one single large file. If there is only one file, you’ll want to split it up as I outline below. If the template is already segmented in a similar manner, jump onto the next section.
• Check for the start of the file (defined with \begin{document}). Everything before this should be moved into a separate file (called, for example, preamble.tex)
• Once the preamble.tex file is created, you’ll want to import it back into the original file. To do this, place \input{preamble} at the start of the file (before \begin{document}). The reason for this is simple - now you can guarantee a shared library of functions and styling that you can re-use in multiple CVs.
• If you want to clean up preamble.tex by inserting or removing comments for better legibility (or perhaps to make space for your future additions), do that now.
• I’d also recommend setting the correct paper type (such as a4 [a4paper] or letter [letterpaper]) in the \documentclass definition.
Creating custom commands
Once you’ve created your preamble.tex file, you should compile the main template file. This is to make sure that it still works correctly, and to get an idea of how your information will be styled/placed on the page. Typically, there will be a few guaranteed sections to a CV: Skills, Experience, Education, and contact information. If you need another section (or your template has an area for something else), then the approach will be the same.
Skills
The template I used indicates the skills using some sort of icon and label in a list in the sidebar. Depending on your template, you may need to adjust the actual code. I recommend copying the existing example data while creating your new command.
The snippet below can now be called anywhere that imports preamble.tex with \webSkills. If I need to make a change, I can simply make the changes in the preamble and then recompile the actual CV I need updated. Depending on how finely you need to divide the information up, you could create commands for common groups or even for individual skills so you can mix and match in the CV file. Be careful you don’t slice it up so much that you’re essentially still writing an entire CV every time.
Education
This is the last specific code I’ll be sharing. The other areas can be done in the exact same method. The reason I cover education as well is because I call more complicated custom commands within \myEducation. The details have been fictionalized for the sake of this article (why they ended up so sci-fi, I don’t know!).
You can also include formatting in these custom commands, though I would only do so if you’re pretty certain they won’t change. Otherwise, you’ll want to style them in the individual CVs.
Calling custom commands
Calling these commands are pretty simple. A barebones example would be:
\input{preamble}
\begin{document}
\myEducation
\webSkills
\end{document}
Naturally, you’ll want to format and place the information in the relevant sections of the template. The upside to the template is that you will be given styling information you can tweak, instead of creating all of this from scratch.
Conclusion
Hopefully this article will help others who, like me, want to keep a running database of skills for their CV that they can reuse. If you know of templates for LaTex that you enjoy using (or have created), feel free to send me a link. If you have questions, comments, or suggestions, I can be reached at lswest34+fcm@gmail.com.
Further Reading
https://github.com/jankapunkt/latexcv - Collection of LaTeX templates for CVs.
https://wch.github.io/latexsheet/ - Cheatsheet for LaTeX syntax.