Skip to content
A LaTeX template with some interesting stuff I found over the years. Might be overkill for small projects though.
TeX Shell
Branch: master
Clone or download
AndiH Greek letters are now always non-italic, thanks to a (previously over…
…seen) mathdesign option.

I also got rid of the particle name command redefinitions subsequently.
Latest commit bbdd693 Jan 12, 2015
Type Name Latest commit message Commit time
Failed to load latest commit information.
1_Showcase Bibliography style, also from Andi's thesis. Oct 13, 2014
2_Unicorns Disclaimer about chapter two. Jul 2, 2014
exampleimages Added new pictures Sep 24, 2014
font Added some descriptions how to get custom fonts into the project. Aug 4, 2013
.gitignore Updated with new temp files to ignore Jul 2, 2014
.latexmkrc Styling the BibLaTeX stuff with biblatex.cfg Sep 24, 2014
LICENSE Initial commit Aug 3, 2013 Added scripts. Jan 6, 2015 Reworked the notes a bit (and stripped mentioning of ST 2 out) Jul 2, 2014
_newcommands.tex New xcal command (for original mathcal) - and orderof command Nov 4, 2014
_packages.tex Greek letters are now always non-italic, thanks to a (previously over… Jan 11, 2015
_settings.tex Greek letters are now always non-italic, thanks to a (previously over… Jan 11, 2015
_titlepage.tex A linebreak for more structure. Oct 17, 2014
biblatex.cfg Styling the BibLaTeX stuff with biblatex.cfg Sep 24, 2014 Added scripts. Jan 6, 2015
custom.bst Greatly changed structure and added lots of packages and options and … Jul 2, 2014
glossaries.tex Added new glossaries examples Sep 23, 2014 Forgot lowest option. Jan 6, 2015
references.bib Added files for glossaries and references Jul 2, 2014
template.pdf Bibliography style, also from Andi's thesis. Oct 13, 2014
template.sublime-project Updated with new temp files to ignore Jul 2, 2014
template.tex First BibLaTex integration Sep 23, 2014

LaTeX Template

Pre-configured LaTeX template with some useful features. The basis for our PhD theses (in High Energy Physics, you will notice). Quickstart: Look at the PDF.

A previous version of this document used XeTeX with custom fonts. We decided to discontinue custom fonts (and, with this, XeTeX) and switch back to pdflatex. You still can find the custom font files in the xetex branch of this repo and some more info in Andrés blogpost.

This project is the combined result of year-long LaTeX stuff gathering and nitpicky preparations.

The most important features are shortly outlined below in this, are explained in the template's Showcase chapter (chapter 1) -- and documented inside the .tex code (as good as possible).

Why you should use LaTeX, you ask? Because it's beautiful! And, once set up (you're welcome!), easy to use.

Basic TeX Setup

MacTex & Sublime Text

This project is run on and tested with MacTeX-2014.

We typeset it out of Sublime Text (3) with the great LaTeXTools plugin. It should work with any tool, including the command line, though. (Best, if it involes latexmk for typesetting.)

Files in This Project

The notation is as follows: Files, starting with a underscore, are considered steering files. Files with proper file names contain actual information.

Folder structure

  • ./: Basic files, project configuration, final PDF.
  • ./1_Chapter/: Each chapter gets its own directory, but feel free to use a different approach for structuring.

./, root folder

  • template.sublime-project: The project file for Sublime Text. Adjust the path inside, otherwise you can't use it.
  • template.tex: The master LaTeX file.
  • _packages.tex: Loading packages and styles, the basic stuff.
  • _settings.tex: Settings for the document.
  • _newcommands.tex: New defined commands.
  • glossaries.tex: A place to define your acronyms (and other glossary entries).
  • _titlepage.tex: The title page, who would have suspected it.

Editing LaTeX

We use Sublime Text 3 with its LaTeXTools plugin for editing LaTeX. If you do so as well, you might want to check out SublimeLinter with the chktex linter to check your code on the fly.

Cmd+B (B as in build) typesets your document (using latexmk per default).

LaTeXTools offers some great shortcuts and snippets. Because we always forget them when not using LaTeX for an extended period of time, we noted them down in the file.
Handy for making a multi file project in Sublime Text is the meta command %!TEX root = template.tex to be put at the first line in your LaTeX file. Do that. And you can build from everywhere.

Spell checking can be enabled as explained in the Sublime Text documentation.

Helpful Shellscripts

There are some shell scripts with frequently used shell commands.

  • This template, per default, uses Biber with BibLaTeX to create the bibliography. Sometimes, though, Biber gets confused and puts its binary into a strange temp folder, resulting in references being not found. This shell script cleans the cache and you should be done with another compilation (or two).
  • You might end up with a quite big PDF file. While this might be useful for printing, some external limitations impose smaller file sizes. The script will convert your PDF into smaller-sized PDF by means of Ghostscript and Bitmap resolution reduction. Based on this StackExchange comment. Check ./ -h for help with invoking.

LaTeX Feature List

Basic Look

The document class is memoir. It has some built-in functionality for which you normally would need special classes.

The typeface used is the serif typeface of Bitstream Charter, as made available through the mathdesignpackage. If you have Charter Pro font versions, you might want to modify the included mathdesign option.

Type Setting with microtype

The microtype package enhances the already excellent type setting features of LaTeX by adjusting spacing between characters to improve greyness or margin kerning (protrusion). And some other stuff, of course.

Units with siunitx

The siunitx package provides great ways to print numbers (num{}) and numbers with units (\SI{}{}).

High Energy Physics Stuff

  • feynmf is included for creating Feynman graphs
  • Different small packages for writing in Feynman notation and Bra-Ket are included
  • hepparticles is used for basic particle writing infrastructure, heppennames and hepnicenames provides easy-access shorthands for this. Note that greek letter particles have been redefined in _settings.text to their upright symbols (because particles should be printed upright).

References & Acronyms

BibTeX is used, or BibLaTeX depending on what we currently consider giving the best look. There's a custom, unfinished design for the former.
(Un)Commented lines are there for both BibTeX and BibLaTeX.

The great glossaries package is used for generating glossaries, in general, and acronym glossaries, specifically. Glossary entries are defined in glossaries.tex, can be used with gls{id} and will, for the acronym case, be printed in the long version at their first use and as the shorted version for subsequent uses.
As latexmk takes care for LaTeXTools to typeset the document, there's a .latexmkrc file included in this template to add the automatic generation of the glossaries to the latex make chain.


Titelpage Content 1 Content 2 Content 3

You can’t perform that action at this time.