# Increment/display the content of a (variable)/(section number) under latex?

To have something equivalent to echo of the shell. For instance in .tex file we have:

 \def \var{2}

\end{document}


Edit:

In your comment to your question, you ask something quite different. This could be done like this:

% arara: pdflatex

\documentclass{article}
\newcounter{mycounter}

\begin{document}
\setcounter{mycounter}{42}
\themycounter{} My Section Starting where I Want
\stepcounter{mycounter}

\themycounter{} And Here Comes the Next Section
\end{document}


• This is exactly what I was looking for. Thanks a lot! – Courier Jan 12 '15 at 9:50
• Should I reformulate my question? – Courier Jan 12 '15 at 9:51
• @polar Glad I could help. If you think, this post will help others in future, you could rewrite your question a bit. Or just change the title. Like it stands now, it will be a bit confusing. Don't know... if you think, everything has been answered already on this site, you could also think about deleting it. Whatever you want. – LaRiFaRi Jan 12 '15 at 9:54