CTAN Comprehensive TeX Archive Network

Directory macros/latex2e/contrib/substnote

README.md

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 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.

Download the contents of this package in one zip archive (188.5k).

...
Guest Book Sitemap Contact Contact Author