Doing arithmetic in TeX

I have just discovered accidentally how to perform simple arithmetic operations in TeX:

\number\numexpr 5+5\relax

And this will print the result, not the operands.

Advertisements
Posted in Personal technotes, TeX. Comments Off on Doing arithmetic in TeX
%d bloggers like this: