{calculations} is about calculations in (La)TeX documents. A popular package is calc, although others also exist (fp, pgf, and LaTeX3 packages, e.g `xfp`).

is about calculations in (La)TeX documents. A popular package is calc that redefines most length- and counter-setting macros (like \setcounter, \addtocounter, \setlength and \addtolength) to allow expression-style input.

Regular mathematical calculations are possible via the fp package, which provides infix or RPN notation for calculations. The powerful pgf package provides a similar and more extended functionality, as does LaTeX3's l3fp.

Please note that the features of l3fp can be used outside of LaTeX3 code with \fpeval by loading the xfp package.

history | excerpt history