Can someone help with decoding the code at the bottom? Note that the code is part of a custom class for dissertation that i found.
Specifically:
\def\@degreeyear{#1}\if@cyrset\else\def\@copyrightyear{#1}\fi
- Can someone explain step by step what this line does?
- What is the purpose of
\if@cyrset
when this is always be false why not just\def\@degreeyear{#1}\def\@copyrightyear{#1}\fi
even though I still have no idea what this is supposed to do? - Why is
\def\@degreeyear{\number\month}
as month? - and why is
\@degreeyear
defined twice? (The author says in a comment that when\degreeyear
is not used, current year is used. But even if\def\@degreeyear{\number\year}
was used, I still do not see the conditional logic). - In general where does
\def
ends definition (space possibly?)?
The code:
\def\@degreeyear{\number\month}
\def\@degreemonth{\ifcase\month\or
January\or February\or March\or April\or May\or June\or
July\or August\or September\or October\or November\or December\fi}
\def\@copyrightyear{\number\year}
\newif\if@cyrset
\@cyrsetfalse
\newcommand{\degreeyear}[1]
{\def\@degreeyear{#1}\if@cyrset\else\def\@copyrightyear{#1}\fi}
\newcommand{\degreemonth}[1]{\def\@degreemonth{#1}}
\newcommand{\copyrightyear}[1]{\def\@copyrightyear{#1}\@cyrsettrue}