Skip to main content
Master LaTeX package management to extend your documents with powerful features. This guide covers package discovery, installation, usage, and troubleshooting.
Good news: LaTeX Cloud Studio includes all major packages pre-installed. You can focus on using packages rather than installing them!

Understanding LaTeX Packages

What Are Packages?

Packages extend LaTeX’s core functionality by providing:
  • Additional commands and environments
  • New document classes
  • Enhanced formatting options
  • Specialized symbols and fonts
  • Integration with external tools
package-basics.tex

Package Categories

Core Extensions

amsmath, amssymb, graphicx, geometry Essential packages that most documents need

Specialized Tools

tikz, minted, algorithm2e, chemfig Domain-specific packages for specialized content

Formatting & Style

fancyhdr, titlesec, enumitem, booktabs Packages that enhance document appearance

Language & Fonts

babel, fontspec, polyglossia, microtype Internationalization and typography

Finding Packages

CTAN: The Comprehensive TeX Archive Network

finding-packages.tex

Package Documentation

Every package should include documentation. Here’s how to access it:
popular-packages.tex

Package Installation

LaTeX Cloud Studio (Pre-installed)

LaTeX Cloud Studio advantage: All major packages are pre-installed and ready to use. Simply add \usepackage{packagename} to your document.
cloud-studio-packages.tex

Local Installation (For Reference)

Package Usage Patterns

Loading Order Matters

package-order.tex

Package Options

package-options.tex

Conditional Package Loading

conditional-loading.tex

Package Conflicts and Compatibility

Common Conflicts

Known package conflicts:
  1. hyperref conflicts: Load hyperref late, but before cleveref
  2. Font conflicts: Don’t mix incompatible font packages
  3. Math conflicts: amsmath and mathtools can conflict with some packages
  4. Table conflicts: Some table packages don’t work together
  5. Encoding conflicts: inputenc and fontspec are mutually exclusive
handling-conflicts.tex

Debugging Package Issues

debugging-packages.tex

Essential Package Categories

Mathematics and Science

math-science-packages.tex

Graphics and Visualization

graphics-packages.tex

Text and Document Formatting

formatting-packages.tex

Code and Verbatim

code-packages.tex

Advanced Package Management

Creating Your Own Packages

custom-package.sty
using-custom-package.tex

Package Version Control

version-control.tex

Best Practices

Package management best practices:
  1. Document requirements: List all required packages in comments
  2. Use stable packages: Prefer well-established packages over experimental ones
  3. Read documentation: Always check package documentation before use
  4. Test compatibility: Test package combinations in minimal examples
  5. Version control: Document package versions for reproducible builds
  6. Minimal loading: Only load packages you actually use
  7. Load order: Follow standard loading order to avoid conflicts
  8. Keep updated: Use recent package versions when possible

Package Documentation Template

package-documentation.tex
Ready to use this syntax? Continue in the browser editor when you want to adapt the example in a real project.Open LaTeX Cloud Studio

Troubleshooting Guide

Common Error Messages

Fixing common package errors:
  1. “Package not found”: Check spelling and availability
  2. “Option clash”: Package loaded twice with different options
  3. “Command already defined”: Two packages define the same command
  4. “Missing number”: Syntax error in package options
  5. “Unknown option”: Option not supported by package version
  6. “File not found”: Missing package files or dependencies
troubleshooting.tex

Quick Reference

Essential Package Loading Order

example.tex

Package Categories Quick List


Next: Learn about Enhanced cross-linking to improve navigation between related topics in your documentation.