LaTeX Research Journal and Dissertation Template
In this post I talk about the LaTeX journal/large document template that I use. It follows a relatively simple structure using the subfiles
package. I use this system for any big multi-file document like my research journal, dissertation, and software documentation. It allows separate compilation of subfiles, which makes it easy to quickly work on components in isolation.
Code and Example Output
You can clone the git repository or download a zip of the template here.
Example compiled final document and subfiles: Main file, First subfile, Second subfile
Structure
The project is separated into folders, usually one folder per subfile (you can have multiple subfiles in a folder if you want). For example, in the template, I have provided three folders: a main
folder that contains the main LaTeX file, a stylesheet, and bibliography, then two folders for two subfiles, one called math
and one called physics
.
- main
- journal_template.tex
- journal_template_bib.bib
- journal_template_style.sty
- math
- figures
- riemann.png
- math.tex
- physics
- figures
- LIGO.png
- physics.tex
Note that the folders for the subfiles are at the same level as the main folder. Within each subfolder, you can have as many additional subfolders as you like to organize files. The only caveat is you have to provide links relative to the base folder. This is explained in more detail in each subfile (math.tex
and physics.tex
).
Compilation
If set up correctly, you should be able to compile any of the .tex
files as you normally would, either separately (i.e. only math.tex
) or the main file (main.tex
). This is the main advantage of the system - it allows you to work on smaller parts of a big document without needing to compile the whole file. You can also compile bibliographies in the subfiles (using the standard routine) and they will show in the subfiles. When you compile the main file with bibliography, it will only put a bibliography at the end, not after each subfile. This is explained in the comments in math.tex
and physics.tex