To have something equivalent to echo of the shell. For instance in .tex file we have:
\def \var{2}
The content of var is $var
How to edit the tex file in such a way we have as output:
The content of var is 2?
Especially, can we perform arithmetic operations under latex? Say
var = var + x
section
and should not implement stuff on your own. If you really want to do it yourself,stepcounter
andrefstepcounter
are the commands to use with LaTeX2e. – Johannes_B Jan 12 '15 at 9:40