I'm programming a calendar in LaTeX
and as it should be used for my univertsity planning, I want to split it up in semesters. So on one page there are the months from September to February and on the second page, there will be the months March to August.
To have a dynamic code which I don't have to touch after finishing the calandar, I'm defining all the variables that will be used in the preamble.
For example
\def\year{2017}
This variable is later called by the Tikz calendar. My problem is, that the version of the calendar spreads over two different years. My idea was to define a second variable \def\nextyear
which is equal to \year + 1
. Unfortunately \def\nextyear{\year+1}
returns 2017+1
instead of 2018
…
How can I add one year to my variable?
Best Answer
Using
\pgfmathtruncatemacro
makes the trick.