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.

Posted in Personal technotes, TeX. Comments Off on Doing arithmetic in TeX

\include and \input

Thanks to this comment, I have realized the main difference between \include and \input in LaTeX: \include has a page break before and after the file and \input doesn’t.

Posted in Personal technotes, TeX. Comments Off on \include and \input