Directory macros/latex/contrib/setbuilder
setbuilder
Version 0.1 (2026-07-19)
Smart set-builder notation for LaTeX: one command instead of \left\{ ... \,\middle\vert\, ... \right\}.
\usepackage{setbuilder} ... \set{x \in \mathbb{R} \given x^2 < 2} % { x ∈ ℝ | x² < 2 } \set*{\frac{n}{n+1} \given n \in \mathbb{N}} % braces AND bar auto-scale \set[\Big]{x \given f(x) = \max_y f(y)} % fixed size
Features:
- correct thin spaces around the separator, which automatically vanish in sub/superscripts (
\nonscript); - the separator bar scales together with the braces in the starred and sized forms;
- line breaks are permitted after the bar in inline formulas;
\suchthatas a synonym of\given; both give a helpful error when used outside\set.
Options
| Option | Effect | |
|---|---|---|
bar (default) |
separator is a vertical bar: { x \ |
x > 0 } |
colon |
separator is a colon: { x : x > 0 } |
|
synonym=<name> |
additionally define \<name> as a full copy of \set |
If another package already defines \set, setbuilder leaves it untouched and tells you to pick a synonym:
\usepackage[synonym=mkset]{setbuilder}
Installation
Once on CTAN, the package is available in TeX Live and MiKTeX: tlmgr install setbuilder. For manual installation, copy setbuilder.sty into your project directory or into your personal TeX tree (~/texmf/tex/latex/setbuilder/).
Requirements
mathtools- LaTeX kernel 2022-06-01 or newer (key-value options,
\NewCommandCopy)
Documentation
See setbuilder.pdf for the full manual with typeset examples.
Download the contents of this package in one zip archive (207.0k).
setbuilder – Mathematical sets with correctly scaled braces and separator
The package provides a \set command for set-builder notation: \set{x \in \mathbb{R} \given x^2 < 2}. The separator (a vertical bar, or a colon with the colon option) is typeset with correct thin spaces, which automatically vanish in sub- and superscripts. The starred form \set* scales the braces and the separator together; \set[\Big] sets a fixed size. A synonym=<name> package option defines the same command under a different name, e.g. when \set is already taken by another package. The package is based on mathtools.
| Package | setbuilder |
| Bug tracker | |
| Repository | |
| Version | 0.1 2026-07-19 |
| Licenses | MIT License |
| Copyright | 2026 Vseslav Sekorin |
| Maintainer | Vseslav Sekorin |
| Contained in | TeX Live as setbuilder |
| Topics | Maths |