A comprehensive LaTeX template for bachelor's and master's theses with extensive examples of commonly used LaTeX features.
- Complete thesis structure with all standard sections
- Extensive LaTeX examples organized from basic to advanced
- Modern LaTeX setup using XeLaTeX/LuaLaTeX with polyglossia
- Professional typography with microtype and fontspec
- Code highlighting with minted package
- Smart references using cleveref
- Bibliography management with biblatex/biber
- Data visualization with PGFPlots
- Algorithm pseudocode support
- Acronym and glossary management
- LaTeX distribution (TeX Live, MiKTeX, or MacTeX)
- XeLaTeX or LuaLaTeX compiler
- Python with Pygments installed (for code highlighting)
- Biber (usually included with LaTeX distribution)
# Recommended: Using latexmk with XeLaTeX
latexmk -xelatex -shell-escape thesis.tex
# Alternative: Using LuaLaTeX
latexmk -lualatex -shell-escape thesis.tex
# Clean auxiliary files
latexmk -cNote: The -shell-escape flag is required for the minted package to work properly.
thesis-template/
├── thesis.tex # Main document
├── literature.bib # Bibliography
├── sections/
│ ├── 01_introduction.tex # Introduction template
│ └── 02_examples.tex # Comprehensive LaTeX examples
├── content/
│ ├── abstract.tex # Abstract
│ ├── acknowledgements.tex
│ ├── images/ # Image files
│ ├── scripts/ # Code examples
│ └── figures/ # PGFPlots definitions
├── metadata/
│ ├── cover_page.tex # Title page
│ ├── declaration.tex # Declaration
│ ├── acronyms.tex # Acronym definitions
│ ├── glossary.tex # Glossary terms
│ ├── meta.tex # Document metadata
│ └── packages.tex # Package imports
└── appendix/
└── 01_dummy.tex # Example appendix
The template includes practical examples of:
- Lists and Enumerations - Nested lists, custom styles, inline lists
- Cross-References - Smart references with cleveref
- Images - Including, scaling, and transforming images
- Tables - Professional tables with booktabs
- Mathematical Equations - Inline and display math
- Subfigures - Side-by-side image comparisons
- Data Visualization - Charts with PGFPlots
- Code Listings - Syntax-highlighted code with minted
- Algorithm Pseudocode - Formatted algorithms
- Bibliography Citations - Reference management
- Footnotes - Various footnote styles
- Acronyms - Automatic acronym expansion
Edit metadata/meta.tex to update:
- Author name
- Thesis title
- University/department
- Submission date
- Supervisor information
- Replace content in
sections/01_introduction.texwith your introduction - Use examples from
sections/02_examples.texas templates - Add your bibliography entries to
literature.bib - Update
content/abstract.texwith your abstract
The template supports both English and German. To switch languages, modify the polyglossia settings in metadata/packages.tex:
\setdefaultlanguage{english} % or {german}If you get OpenSans font errors, the font requirement is already commented out in metadata/packages.tex.
Ensure you're using the -shell-escape flag when compiling.
Run the compilation twice or use latexmk for automatic dependency handling.
- XeLaTeX or LuaLaTeX (required for fontspec/polyglossia)
- Python with Pygments (for minted code highlighting)
- Biber (for bibliography processing)
- latexmk (recommended for automated compilation)
- Start with the examples - Review
sections/02_examples.texto learn LaTeX features - Use the logical order - Examples progress from basic to advanced
- Copy and adapt - Use example code as templates for your content
- Compile frequently - Check your changes compile correctly
- Use version control - Track your thesis with Git
This template is provided as-is for academic use. Feel free to modify and adapt it for your thesis.
Improvements and bug fixes are welcome. Please submit issues or pull requests on the project repository.