TeXipedia

etex-pkg

Enables access to extended e-TeX features and register ranges within LaTeX documents, enhancing core functionality beyond traditional TeX limitations.

Overview

Provides fundamental support for utilizing e-TeX extensions in LaTeX documents, particularly focusing on expanded register allocation capabilities. This package is essential for modern LaTeX implementations where additional register capacity is needed.

  • Modifies LaTeX's internal register allocation system to utilize e-TeX's extended range
  • Serves as a foundation for packages requiring access to additional registers
  • Particularly valuable for complex documents with numerous counters, boxes, or other register-dependent elements
  • Works seamlessly with the LaTeX kernel to provide enhanced functionality without user intervention

Getting Started

To use etex-pkg, include it in your document preamble:

\documentclass{article}
\usepackage{etex}

This package modifies LaTeX's register allocation macros to make use of the extended register range provided by e-TeX. Most modern LaTeX distributions already incorporate e-TeX extensions by default, so this package is primarily useful for older documents or when you specifically need to ensure e-TeX features are available.

Examples

Using e-TeX's extended register allocation in a LaTeX document with many counters.

\documentclass{article}
\usepackage{etex}

\begin{document}
\section{Extended Register Allocation}

% Define 100 new counters (which would exceed traditional TeX's limit)
% but works fine with e-TeX's extended allocation
\newcount\mycounterone
\newcount\mycountertwo
\newcount\mycounterthree
% ... and so on (in a real document you could define many more)

\mycounterone=42
\mycountertwo=100
\mycounterthree=255

The value of counter one is \the\mycounterone.

The value of counter two is \the\mycountertwo.

The value of counter three is \the\mycounterthree.

\end{document}

Using e-TeX's extended dimension registers in a complex layout document.

\documentclass{article}
\usepackage{etex}

\begin{document}
\section{Using Extended Dimension Registers}

% Define multiple dimension registers (beyond traditional TeX limits)
\newdimen\leftmarginA
\newdimen\leftmarginB
\newdimen\leftmarginC
\newdimen\rightmarginA
\newdimen\rightmarginB
\newdimen\rightmarginC

% Set values
\leftmarginA=1cm
\leftmarginB=1.5cm
\leftmarginC=2cm
\rightmarginA=1cm
\rightmarginB=1.5cm
\rightmarginC=2cm

This document uses multiple dimension registers to store different margin settings.

Left margin A: \the\leftmarginA

Left margin B: \the\leftmarginB

Left margin C: \the\leftmarginC

Right margin A: \the\rightmarginA

Right margin B: \the\rightmarginB

Right margin C: \the\rightmarginC

\end{document}