Preparing the LaTeX environment for my undergrad thesis[3]


I am a big fan of LaTeX since high school (thanks, OBMEP, for the gentle introduction and serendipity of this great tool[1]!). Since about ~9 years ago, I am constantly learning something new about it every day, saw its evolution over the years (thanks, TeX.SE, LuaTeX, and friends!), tried it in all major platforms (MikTeX on Windows, TeXLive on Linux and MacOS) and typeset it with almost all available text editors (Kile, TeXMaker, TeXStudio, TeXShop, Notepad++, Vim + latexsuite, Emacs + AUCTeX…)…

That was just to exemplify how much enthusiast I am about it and, as a side effect, how much opinionated I am.

I am about to write the biggest LaTeX project I’ve ever come across: my undergrad thesis[3]. This is big enough in my “LaTeX career” that made me completely rethink about how I usually interact with it:


Before going on…

  • This is not a tutorial. It is just the documentation of the ideas / conceptions and a proof-of-concept arrangement of the steps I did to set up a comfortable writing environment for myself. It may or may not work for you. You have been warned.
  • Microsoft Word is completely out of question.
  • Google Docs might be interesting as a temporary document for the purpose of “code reviews” (how do you call that in the writing world? “Document review”?).

Goals / Design Doc

  • A decent, off-line, LaTeX environment (sharelatex and overleaf are out of question).
  • Spell-checking.
  • Version control.
  • A cross-platform environment (it should work at least on Windows, Linux and MacOS). Honestly I don’t really care about Windows support, but it would be nice to be compatible with it too, at least a little bit.
    • Corollary: it should contain a Makefile (or support a similar build tool).
  • It should use a template specifically intended for an undergrad thesis.
  • Integration with an on-line CI server that automatically builds every commit, yielding the thesis PDF as its output.
  • Builds should be fast, preferably under 5 seconds.
  • LuaTeX support would be welcome.
  • It should use only macros and packages in an standard and typical LaTeX installation. Third-party packages should not be welcome, unless strictly necessary.
  • Bibliography management tool.
    • Bonus: graphical
  • No “typesetting hell” ==> I don’t want to run pdflatex 3 times manually.
  • Synctex support.
  • TODO support from within LaTeX.


  • Git for version control.
  • Bitbucket for private git hosting
  • TeXShop or VSCode as text editor. No vim in this context.
  • latexmk + make as build tool
  • BibTeX as bibliography management tool.
    • Plus JabRef as its GUI editor
  • Bitbucket Pipelines as CI tool.
  • LuaTeX (lualatex) as LaTeX typesetting engine (see this)
  • ChkTeX as linter / semantic checker
  • Docker for container isolation (whoa, a full ‘texlive-full’ installation (Ubuntu) takes a long time to complete!)
  • VSCode with the LaTeX Workshop extension does have synctex support
  • For TODO support, todonotes seems to be really nice.
  • Coppetex as the base template for my document.


As you see, I decided to completely renew my environment and to use everything I learned over these years to make it “on steroids”.

This is by no means required in my college; its expectation bar is kinda low for this task, with lots of people just using Microsoft Word [citation needed]. Here is my opinionated vision: big mistake. We are in 2017, LaTeX is not as hard to use as in the <2000s.

However, I also realize that the {Sys,Dev}Ops approach I am taking to write my LaTeX thesis is way too unnecessary and it contains lots of “bells and whistles” and idiosyncrasies related to the thinks I currently like to do. That said, I strived to keep it KISS and I’m really proud of its result.

I will probably release my [environment] / [template repo] publicly on GitHub once I am done. Now I should focus on writing, actually writing.

I might also create a tutorial (as a complement to this post) once I am done, conditionally to the number of people interested on this. Let me know if you’re interested. Something such as “What do you need to know to write your undergrad thesis in LaTeX – KISS version”.



  • [1]: LaTeX is not just a tool. It is a thought and writing philosophy. It is almost a religion, just like Unix / Linux, and…systemd[2], of course.
  • [2]: I should probably start a new article in Wikipedia. Just like Godwin’s Law, there should also be a “Perrotta’s Law”:

“As an online discussion or article grows longer, the probability of a paragraph mentioning systemd approaches.”

  • [3]: I really don’t care how people call each of the documents, depending on its level. Whether it is “monografia” (monograph?), dissertation or thesis, whatever. I call everything “thesis”. Therefore, despite not being a doctor, I will write a thesis, period.
Preparing the LaTeX environment for my undergrad thesis[3]