LaTeX templates - quick‑start guide
Guide to LaTeX templates
What is a LaTeX template?
A LaTeX template bundles a class (.cls), style (.sty), example .tex files and supporting assets (logos, bibliography files, etc.) that define the layout, typography, and structure for a specific document type—journal article, thesis, CV, poster, slide deck, and more.
How to use LaTeX templates
- Download the zip or clone the repository.
- Open the main
.texfile (often calledmain.texorarticle.tex). - Load the class or style supplied by the template and follow the README’s “structure” (title page, abstract, sections, bibliography).
1\documentclass[options]{mytemplate} % class supplied by the template
2\usepackage{mytemplate} % sometimes a .sty instead of .cls
3\begin{document}
4 \title{My Title}
5 \author{Me}
6 \maketitle
7 % <content>
8\end{document}Compile with pdflatex, latexmk -pdf, or the Overleaf “Recompile” button.
How to create your own template
| Goal | Recommended file | Minimal skeleton |
|---|---|---|
| Full control over document structure | Class (.cls) | See code block below |
| Only extra macros or formatting | Style (.sty) | – |
| Distribution | Zip archive or GitHub repo (include class/style, optional .bib, logos, README) | – |
Minimal class skeleton (mytemplate.cls)
1% mytemplate.cls – a very simple article‑style class
2\NeedsTeXFormat{LaTeX2e}
3\ProvidesClass{mytemplate}[2025/12/03 v1.0 My custom class]
4\LoadClass[12pt]{article} % inherit from article
5
6% ---- custom settings ----
7\RequirePackage{geometry}
8\geometry{margin=2cm}
9\RequirePackage{fontspec}
10\setmainfont{Latin Modern Roman}
11
12% ---- user‑level commands ----
13\newcommand\mytitle[1]{\centerline{\LARGE\bfseries #1}}
14\endinputUse it with \documentclass{mytemplate} in your document.
Where to download LaTeX templates
- Overleaf Gallery – the biggest public collection (≈ 4 000 free templates).
https://www.overleaf.com/gallery - CTAN (Comprehensive TeX Archive Network) – official repository for journal‑specific classes.
https://ctan.org/ - GitHub / GitLab – many authors publish open‑source thesis or conference templates.
- University/Institute web pages – most schools host an “official” thesis/dissertation template.
Most‑used / highly‑rated templates
| # | Template | Typical use |
|---|---|---|
| 1 | IEEEtran (ieeetran.cls) | IEEE conference & journal papers |
| 2 | Springer LNCS (llncs.cls) | Lecture Notes in Computer Science |
| 3 | Elsevier article (elsarticle.cls) | Elsevier journals |
| 4 | Modern Simple CV | One‑page résumé |
| 5 | Classic Thesis (classicthesis.sty) | Book / thesis with elegant typography |
| 6 | Beamer (beamer.cls) | Slide presentations |
| 7 | a0poster / tikzposter | Large scientific posters |
| 8 | University‑specific thesis (e.g., cambridgephd.cls) | Institutional PhD/MSc theses |
| 9 | Astronomy & Astrophysics (aa.cls) | A&A journal articles |
| 10 | Basic Academic Journal Article | Simple starter for articles (Overleaf) |
Quick workflow for first‑time users
- Pick a template → click “Open in Overleaf” or download the ZIP.
- Edit placeholder fields (
\title{},\author{}, etc.). - Compile → PDF appears.
- If you work locally: unzip → run
latexmk -pdf main.tex(orpdflatex+biberas required). - Export the PDF or push the source to a Git repository for version control.
Common pitfalls and tips
- Missing packages – install with your distribution’s manager (
tlmgr install <pkg>or MiKTeX console). - Out‑of‑date classes – Overleaf uses the latest TeX Live; update your local TeX installation regularly.
- Bibliography engine – many modern templates expect
biber. Runbiber <basename>after the first LaTeX pass. - Branding assets – replace logos, colour PDFs, or
.styfiles that define institutional colours. - Custom commands – keep them in a separate
.styfile; you can then reuse the same layout across multiple papers.
What about Aspose?
When you need to manipulate the PDFs generated from LaTeX (merge, watermark, or convert to other formats) in a .NET, Java, or Python application, libraries such as Aspose.TeX provide a language‑agnostic API for working with PDF files without requiring a full LaTeX toolchain.
TL;DR heat sheet
1What? → Pre‑built layout (class+style+assets)
2Use? → \documentclass{mytemplate} + follow README
3Create? → Write .cls or .sty → pack assets → zip/GitHub
4Get? → Overleaf Gallery, CTAN, GitHub, university sites
5Hot 10 → IEEEtran, llncs, elsarticle, modern‑simple‑cv,
6 classicthesis, beamer, a0poster, UNICAMP thesis,
7 aa.cls, Basic Academic Journal ArticleHappy typesetting!