A universal, modern LaTeX thesis template for bachelor's, master's, or PhD theses.
Writing a thesis is hard enough without fighting LaTeX errors. This template provides a production-ready, modern LaTeX environment out of the box. It uses a current package stack (LuaLaTeX, biblatex, pgfplots, cleveref) and comes with a fully configured Docker build system and VS Code Dev Container.
You don't need to install a 4GB TeX Live distribution on your machine. Just open the project, write your content, and let the automation handle the rest.
- Modern Engine: Uses
LuaLaTeXfor native UTF-8 support, system fonts, and advanced microtypography (microtype). - Professional Typography: Times New Roman (14pt, 1.5 spacing), XITS Math for formulas, and FreeMono for code.
- Data Visualization: High-quality plots with
pgfplotsand programmatic diagrams withTikZ. - Smart Referencing: Modern bibliography with
biblatex/biberand intelligent cross-referencing withcleveref. - Developer Experience: Zero-setup environment using VS Code Dev Containers and a fast multi-stage Docker build.
- Code Quality: Built-in
chktexlinting andpre-commithooks to keep your LaTeX source clean. - Reproducible Automation: Pinned Docker and CI dependencies with automated updates through Dependabot.
- Defense Ready: Includes a matching Beamer presentation template for your final defense.
You can use this template instantly in your browser/editor, or locally with Docker.
The easiest way to get started without installing LaTeX locally:
- Install VS Code and Docker.
- Install the Dev Containers extension.
- Clone and open this repository in VS Code.
- Click Reopen in Container when prompted.
- Open
main.texand save it — the PDF will build automatically!
If you prefer using the terminal:
# 1. Clone the repository
git clone https://github.com/Amet13/tex-thesis.git
cd tex-thesis/
# 2. Build the PDFs (thesis.pdf and slides/slides.pdf)
make build
# 3. Watch for changes and rebuild automatically
make watchAvailable Commands:
make build— Build thesis and slides.make build-thesis— Build thesis only.make build-slides— Build slides only.make watch/make watch-thesis— Rebuild thesis on file changes.make watch-slides— Rebuild slides on file changes.make lint— Runchktexlinter.make fmt— Format.texfiles withlatexindent.make fmt-check— Check formatting without changing files.make clean— Remove generated PDFs and auxiliary files.
| Component | Supported / Recommended |
|---|---|
| Build mode | Docker (recommended), Dev Container |
| TeX engine | LuaLaTeX (latexmk + biber) |
| OS | macOS, Linux, Windows (via Docker/WSL) |
| Editor | VS Code + LaTeX Workshop |
| Symptom | Action |
|---|---|
| Build fails with missing package/font | Run make build (Docker build includes required dependencies) |
| Lint fails only locally | Run make lint in Dev Container or rely on Docker fallback |
| Formatting differs between contributors | Run make fmt and commit changes |
| CI fails but local succeeds | Check pinned dependency updates in Dependabot PRs and rerun |
- Changelog: CHANGELOG.md
tex-thesis/
├── main.tex # Main thesis document (includes chapters)
├── preamble.tex # LaTeX packages, fonts, and styling config
├── references.bib # Bibliography database (BibTeX)
├── chapters/ # Thesis content (Introduction, Literature, etc.)
├── images/ # Figures and diagrams
├── slides/ # Beamer presentation for defense
│ ├── main.tex # Main slides document
│ └── slides.tex # Slides content
├── Makefile # Build automation commands
└── .devcontainer/ # VS Code container configuration
- Configure: Edit
preamble.texto adjust formatting (margins, fonts, spacing) and PDF metadata. - Write: Replace the
.texfiles in thechapters/directory with your own content. - Cite: Update
references.bibwith your bibliography entries. - Present: Modify
slides/main.tex(author, title) andslides/slides.tex(content) for your defense.
The template includes working examples of almost every LaTeX feature you might need. Look for the % === EXAMPLE: ... === comments in the source code!
- Math: Inline math, numbered equations, aligned multi-line equations, matrices, integrals, piecewise functions.
- Plots & Diagrams: Architecture diagrams, flowcharts, Gantt timelines, bar charts, and line plots (
pgfplots). - Tables: Professional academic tables (
booktabs), decimal alignment (siunitx), and multi-row cells. - Code: Syntax-highlighted listings for Python, SQL, JSON, and Dockerfiles (
listings,xcolor). - Images: Single figures, side-by-side subfigures (
subcaption), and custom image insertion commands.
Contributions are welcome! Whether it's a new TikZ example, a bug fix, or a documentation improvement.
- Fork the repository.
- Make your changes.
- Run
make pre-commitandmake lintto ensure code quality. - Open a Pull Request.
See CONTRIBUTING.md for detailed guidelines.
This template follows semantic versioning for tagged releases.
- Patch: bug fixes and non-breaking docs/tooling updates
- Minor: backward-compatible template features and examples
- Major: breaking template or workflow changes
- Source Code: GNU GPLv3
Ищете оригинальную версию шаблона для магистерского диплома? Смотрите старую версию проекта (1.1.1).