Skip to main content
LaTeX counters control all automatic numbering in your document. This guide covers how to create custom counters, modify existing ones, and implement sophisticated numbering schemes for any document element.
Key concept: LaTeX uses counters to track numbers for sections, figures, tables, equations, and more. Understanding counters lets you create custom numbering schemes and control how elements are numbered throughout your document.Related topics: Page numbering | Cross-referencing | Document structure

Understanding LaTeX Counters

Built-in Counters

LaTeX provides many predefined counters:

Counter Operations

Creating Custom Counters

Basic Counter Creation

Counter Display Formats

Advanced Counter Techniques

Conditional Counter Reset

Counter Dependencies

Custom Numbering Environments

Creating Numbered Environments

Shared Counter Systems

List Numbering Customization

Custom List Counters

Multi-Level Custom Numbering

Cross-Counter References

Referencing Custom Counters

Counter-Based Indexing

Specialized Numbering Systems

Scientific Paper Numbering

Best Practices

Counter management guidelines:
  1. Plan your numbering scheme - Design consistent hierarchy before implementation
  2. Use descriptive counter names - problem is better than prob or p
  3. Reset appropriately - Child counters should reset when parent increments
  4. Document your system - Comment complex counter relationships
  5. Test thoroughly - Check numbering across document sections
  6. Consider references - Ensure counter formats work well with \ref{}

Professional Counter Setup

Troubleshooting Counters

Common Counter Issues

Quick Reference

Essential Counter Commands

Counter Display Formats


Next: Learn about Advanced code listings and minted for displaying source code, or explore Headers and footers for additional content placement.