Verzeichnis macros/latex/contrib/substnote
substnote
Version 0.1.0 (2026-07-30)
Substitution notation with a switchable convention. There is no agreement on how to write "the result of substituting t for x in φ": φ[t/x], φ[x/t], φ[x := t], φ[x ← t], (φ)ˣ_t all occur, and the two slash conventions are mirror images of each other. This package provides one command and lets the convention be chosen once, in the preamble.
\usepackage{substnote} % or [style=updown], etc. ... \subst{\varphi}{x}{t} % φ[t/x] (default) \subst{\varphi}{x,y}{s,t} % φ[s/x, t/y] simultaneous \subst*{\varphi}{x}{\frac{a}{b}} % delimiters auto-scale \substmark{x}{t} % the mark alone \subst[style=updown]{\varphi}{x}{t} % [φ]^x_t, per-use override \subst[style=updown,fences=parens]{\varphi}{x}{t} % (φ)^x_t
Mismatched variable and term lists are reported as an error rather than having the surplus entries discarded.
Styles
style= |
Output |
|---|---|
slash |
φt/x |
slashrev |
φx/t |
assign |
φx ≔ tcolon( centred on the axis) |
arrow |
φx ← t |
mapsto |
φx ↦ t |
updown |
φ^xt |
updownrev |
φ^tx |
Other keys
| Key | Effect |
|---|---|
fences=<name> |
brackets (default), parens, braces, none. Encloses the mark in the delimited styles and the expression in the up-down ones, which are never left undelimited, so none is read there as parens |
pairsep=<code> |
separator between simultaneous substitutions (def. ,\,) |
synonym=<name> |
also define \<name> and \<name>mark (load-time only) |
All keys except synonym work both as package options (document-wide convention) and in the optional argument of each command (per use). An unknown value for style or fences is reported at once, together with the list of what is allowed.
\substmark carries no expression, so in the up-down styles it emits the scripts alone rather than a pair of empty delimiters.
If another package already defines \subst or \substmark, substnote leaves the name untouched and tells you to pick a synonym:
\usepackage[synonym=mysubst]{substnote}
Requirements
A LaTeX kernel from 2022-06-01 or newer. The package loads nothing else.
Documentation
See substnote.pdf for the full manual with typeset examples.
Author
Vseslav Sekorin <vssekorin@gmail.com>
License
Copyright (c) 2026 Vseslav Sekorin. This material is subject to the MIT License; see the LICENSE file for the full text.
Herunterladen des vollständigen Inhalts dieses Pakets in einem Zip-Archiv (188.5k).
substnote – Substitution notation with a switchable convention
The package provides a single command for the notation of substitution, \subst{\varphi}{x}{t}, and lets the convention be chosen once in the preamble. Seven conventions are supported, among them the two mirror-image readings of the slash, the assignment colon, the arrow and the up-down form with the variable above the term. Simultaneous substitutions are written as two comma lists paired by index, and lists of different lengths are reported as an error. The delimiters are selected with a key and scale to their contents in the starred form, and the colon of the assignment convention is centred on the mathematical axis. The commands are mode-aware and robust, so they may be used in section titles and captions. The package requires only a recent LaTeX kernel and loads nothing else.
| Paket | substnote |
| Fehlermeldungen | |
| Repository | |
| Version | 0.1.0 2026-07-30 |
| Lizenzen | MIT License |
| Copyright | 2026 Vseslav Sekorin |
| Betreuer | Vseslav Sekorin |
| Enthalten in | TeX Live als substnote |
| Themen | Mathematik |