Directory macros/latex/contrib/mathformule
mathformule
mathformule provides the numbered formule display environment for both single-line and aligned multiline mathematics. Multiline displays may carry one overall equation number or configurable subnumbers on individual rows. They may also be enclosed by an extensible brace on either side, with optional math material outside the brace. Global, per-environment, and per-row spacing corrections are available. If no top-level ampersand is present, multiline rows share a left edge automatically. A leading ampersand is valid, and explicit ampersands retain the conventional right-before/left-after column alignment.
The package does not explicitly require or load an auxiliary package. Its typesetting core uses TeX primitives and LaTeX kernel facilities and does not wrap the equation, align, or aligned environments. It shares LaTeX's standard equation counter and integrates with the usual numbering and cross-reference mechanisms. It is designed to coexist with the principal AMS mathematics and common cross-reference packages.
Version 0.6 is intended for current LaTeX2ε formats and has been verified with pdfLaTeX, XeLaTeX, and LuaLaTeX. It is not a plain TeX macro file.
Files
README.md: package overview, installation notes, and license statementmathformule.sty: package implementationmathformule-doc-en.pdf: English manualmathformule-doc-en.tex: source of the English manualmathformule-doc-zh.pdf: Chinese manualmathformule-doc-zh.tex: source of the Chinese manualmwe.tex: complete minimal exampleCHANGELOG.md: release historyLICENSE: complete text of the LPPL 1.3c
Installation
For local use, place mathformule.sty beside the document and load it with:
\usepackage{mathformule}
For a system-wide installation, place the style file under a suitable local TeX tree, for example tex/latex/mathformule/, and refresh the file database when required by the TeX distribution.
Documentation
Build the English manual with pdfLaTeX:
pdflatex mathformule-doc-en.tex pdflatex mathformule-doc-en.tex
Build the Chinese manual with XeLaTeX and a TeX distribution containing ctex and the Fandol fonts:
xelatex mathformule-doc-zh.tex xelatex mathformule-doc-zh.tex
The documentation loads additional packages for page layout, links, and Chinese typesetting. They are documentation-only requirements and are not loaded by mathformule.sty.
Compatibility
Version 0.6 has been tested with pdfLaTeX, XeLaTeX, and LuaLaTeX. Tests also cover section- and chapter-based equation numbering, leqno, fleqn, AMS mathematics packages, and common hyperlink and cross-reference packages. No conflict is currently known from the tested combinations, but behaviour in an arbitrary document can still depend on the document class, package versions, and loading order.
Author and license
Copyright (C) 2026 Quan Sun Contact: <rmm74845@gmail.com>
This material is subject to the LaTeX Project Public License, version 1.3c or later. The license text is available at https://www.latex-project.org/lppl/lppl-1-3c/.
The Work, as defined by the LPPL, consists of the files listed in the Files section of this README.
This work has LPPL maintenance status maintained. The Current Maintainer is Quan Sun.
This work is distributed without warranty, to the extent permitted by applicable law.
Download the contents of this package in one zip archive (555.5k).
mathformule – A lightweight environment for single- and multiline numbered math
This package provides the LaTeX2ε formule environment for both single-line and ampersand-aligned multiline display mathematics. A multiline display may use one overall equation number or configurable per-row subnumbers. Extensible left and right braces, optional mathematics outside a brace, and signed row- and brace-spacing corrections are supported.
The package shares LaTeX's standard equation counter and integrates with the usual numbering and cross-reference mechanisms.
| Package | mathformule |
| Version | 0.6 |
| Licenses | The LaTeX Project Public License 1.3c |
| Copyright | 2026 Quan Sun |
| Maintainer | Quan Sun |
| Contained in | TeX Live as mathformule |
| Topics | Maths |
| See also | eqnlines |