The best Latex editor

LaTeX Tutorial — Lesson 5

Using Packages and Templates in LaTeX

Lesson 5: Using Packages and Templates in LaTeX

You’ve made it to the final lesson! 🎉
At this point, you’ve mastered the basics of LaTeX — writing structured content, typesetting math, styling text, and even adding images and tables. Now it’s time to unlock the full potential of LaTeX by learning how to extend its features with packages and streamline your workflow with templates.

Extending LaTeX with Packages

LaTeX has a powerful ecosystem of packages — like plugins — that add new features and simplify common tasks. There are thousands of free packages available, and chances are, if you want LaTeX to do something specific, there’s a package for it.

How to Use a Package

To include a package, add this line to your preamble (before \begin{document}):

Some packages also accept options:

\usepackage[option1, option2]

For example:

\usepackage{graphicx}   % Enables \includegraphics for images
\usepackage[x11names]

Useful Packages for Intermediate Users

Package

What it Does

graphicx

Adds image handling commands (\includegraphics

xcolor

Adds support for colored text and backgrounds 

amsmath

Enhanced math features (e.g., multi-line equations) 

geometry

Easy control over margins and page size 

hyperref

Makes links and references clickable in the PDF 

fancyhdr

Customize headers and footers 

babel

Internationalization (hyphenation and language support) 

setspace

Adjust line spacing (\doublespacing, etc.) 

listings

Code listings with syntax highlighting (for programming) 

For pdfLaTeX, all of these packages are fully supported and widely used.

Multi-line Equation with amsmath
\usepackage{amsmath} % In the preamble
...
\begin{align}
  a^2 + b^2 &= c^2 \\

The align environment aligns equations at the & and numbers them automatically.

Add Clickable Links with hyperref
latexCopy code\usepackage[colorlinks=true, linkcolor=blue]

The hyperref package enhances your documents by making references and links clickable in the final PDF — very useful for navigation.

Tip: Load hyperref after most other packages to avoid conflicts.

Using Templates and Custom Document Classes

A template is a pre-built LaTeX setup — often including a specific document class, packages, and structure — designed for a particular type of document (e.g., academic paper, thesis, resume, presentation).

What’s in a Template?
  • A .tex file with a basic structure

  • Possibly a .cls file (custom document class)

  • Required packages already set up

  • Placeholder content to replace

Templates can save you hours of setup time, especially for documents like:

  • Academic papers (e.g., IEEE, ACM)

  • Theses and dissertations

  • Resumes and CVs

  • Beamer presentations (for slides)

Example: Beamer for Presentations

Beamer replaces pages with frames, giving you an elegant way to make slide decks directly in LaTeX.

Recap: What You Now Know

You can now:

  • Structure a LaTeX document with sections, lists, and content

  • Typeset math and tables

  • Format and style text

  • Include figures and images

  • Use packages to add new features

  • Apply templates to jumpstart your documents

What’s Next?

Your LaTeX journey doesn’t end here. Some next steps to explore:

  • Citations and bibliographies with biblatex

  • Drawing diagrams with TikZ

  • Presentations with Beamer

  • Modular documents using \input and \include

  • Advanced styling with custom commands and environments

Everything you’ve learned builds a foundation for these topics. With practice and curiosity, you’ll be able to produce professional, clean, and beautiful documents — all within LaTeX and Crixet.

🎉 Thank You and Happy TeXing!

You're now ready to confidently write with LaTeX. Keep this series as a reference, and revisit lessons as needed. And remember — the more you write in LaTeX, the easier it becomes.

Ready to start your own project?
Head to
app.crixet.com and begin writing beautifully today.

More Articles