Be a deTeXtive

Self-handicapping can be quite productive on those non-urgent things. Recently, I noticed a LaTeX template, Awesome CV, so I was thinking trying it to replace Modern CV, which has accompanied me for around three years.

I soon realized that I am pretty bad at LaTeX, and customization requires certain level of fluency on that language. As a result, I struggled quite a bit with it.

Support for a publication list

Awesome CV has a louder design than Modern CV. It caught my attention but at the same time makes it harder to add content that was beyond its original design and to make it blend in. The vanilla version looks quite designed for programmers and publication list seems not to be a major concern of the design.

Nonetheless, people like me who tie their lives with publications have nothing to worry about, because in the amazing and vast open source community, there is almost always someone who is way better than you who sufferred and fixed your issue years ago. Indeed, I soon found a fork that formats publications beautifully.

Compiling the examples with tinytex

I clone the repository, and start to have some fun with it. I used tinytex and stay in my comfort zone with R. Though tinytex::xelatex("cv.tex", bib_engine = "biber") failed due to some issue with FontAwesome, lualatex("cv.tex", bib_engine = "biber") succeeded in giving a pdf after a few tweaks:

  • In awesome-cv.cls: \newfontfamily\FA[Path=\@fontdir]{FontAwesome} needs to be edited to \setfontfamily\FA[Path=\@fontdir]{FontAwesome}, because \FA is already defined in fontawesome.sty.

  • biblatex complained that Package biblatex Warning: 'sorting' option to '\printbibliography' is no longer supported., so those were removed from publications.tex

Though there was a good looking PDF waiting for me after this, a warning message refused to go away after several re-run:

Warning message:
LaTeX Warning: There were undefined references.
Package biblatex Warning: Please rerun LaTeX.
(biblatex)                Page breaks have changed. 

Different behavior in tinytex and latexmk

According to the documentation, lualatex() is a wrapper for latexmk(), which emulates the command latexmk in command line, so I tried to use latexmk directly to see if my LaTeX environment was alright. Suprisingly, latexmk -lualatex cv.tex ran sucessfully without warning, and a thing that was even more weird happened: when I ran lualatex("cv.tex", bib_engine = "biber") again, even in R, there was no more warning.

I checked the directory to find the cause of the difference. latexmk left several auxillary file in the folder (cv.aux, cv.bbl, cv.bcf, cv.blg, cv.fls, cv.fdb_latexmk, cv.out, and Guessing one of them might prevent tinytex::lualatex() from triggering the warning, I removed these files one by one and ran tinytex::lualatex() to see if the warning would come back (All hail reverse genetics!)

Indeed, if cv.bbl was in the folder, both latexmk and tinytex::lualatex() ran smoothly, but if cv.bbl was renamed or removed, tinytex::lualatex() began to give warning again.

I wondered what is the difference between tinytex generated .bbl and the one generated by latexmk, so I tried lualatex("cv.tex", bib_engine = "biber", clean = FALSE) to keep the auxillary files. Surprisingly, diff said the two .bbl files were exactly the same, and keeping the .bbl generated by lualatex("cv.tex", bib_engine = "biber", clean = FALSE) also prevented the warning.


It seemed that sometimes LaTeX needs to run more than 4 times (the lualatex - biber - lualatex - lualatex run by latexmk or tinytex) to make sure that bibtex works properly, and the error message is in fact informative. Because tinytex::lualatex() is very considerate to remove all the intermediate files, the suggestion from the warning, Please rerun LaTeX, is no longer effective because everything is cleaned, and every run is like the first run.

I still don’t know why does bibtex need .bbl file and why pagebreak mysteriously changed in the example file, but it was quite fun.

PhD Student

A graduate student interested in developmental biology, neurobiology and bioinformatics.