TeXipedia

ltxmisc

Provides a collection of small, useful LaTeX utilities and enhancements that don't warrant separate packages.

Overview

Serves as a repository for miscellaneous LaTeX tools and minor enhancements that improve document formatting and functionality. While individual components are lightweight, together they address common formatting needs and workflow improvements.

  • Contains various helper macros and small enhancements for document formatting
  • Useful for authors needing simple solutions without loading multiple separate packages
  • Includes fixes and improvements for common LaTeX formatting challenges
  • Particularly valuable for users seeking lightweight alternatives to larger packages for basic formatting tasks

Getting Started

The ltxmisc is a collection of miscellaneous LaTeX packages, not a single LaTeX package. To use these files:

  1. The packages in this collection should be installed as part of your TeX distribution
  2. Include the specific package you need in your document preamble
\documentclass{article}
\usepackage{specific-package-name}  % Replace with the actual package name you need

Refer to the documentation of the specific package within the collection for its particular usage requirements.

Examples

Using the 'afterpage' package from ltxmisc to place content on the next page.

\documentclass{article}
\usepackage{afterpage}
\usepackage{lipsum} % For sample text

\begin{document}
\lipsum[1-2] % Some text on the first page

% Content that will appear at the top of the next page
\afterpage{\begin{center}\Large This text appears at the top of page 2\end{center}}

\lipsum[3-10] % More text to force a page break
\end{document}

Using the 'calc' package from ltxmisc for length calculations.

\documentclass{article}
\usepackage{calc}

\begin{document}
\newlength{\totalwidth}
\newlength{\leftpart}
\newlength{\rightpart}

% Set lengths using calculations
\setlength{\totalwidth}{\textwidth}
\setlength{\leftpart}{0.3\totalwidth}
\setlength{\rightpart}{\totalwidth-\leftpart}

\noindent\rule{\leftpart}{1pt}\hfill\rule{\rightpart}{1pt}

\vspace{1cm}
\noindent The left part is 30\% of the text width (\the\leftpart).\\
The right part is 70\% of the text width (\the\rightpart).
\end{document}

Using the 'exscale' package from ltxmisc to scale math symbols in different sizes.

\documentclass{article}
\usepackage{exscale}

\begin{document}
\section{Normal Size Math}
In normal text, summation looks like this: $\sum_{i=1}^{n} i$

\section{Large Size Math}
\begin{large}
In large text, summation scales appropriately: $\sum_{i=1}^{n} i$
\end{large}

\section{Huge Size Math}
\begin{huge}
In huge text, summation scales even more: $\sum_{i=1}^{n} i$
\end{huge}

\section{Display Math}
Compare with display math:
\[
\sum_{i=1}^{n} i = \frac{n(n+1)}{2}
\]
\end{document}