I've been using some style file to write my thesis and it contains some weird macro definition I don't seem to understand, specifically it contains the following code to make a custom title page:
\let\origin@lmaketitle\maketitle
\def\makethesistitle{
\def\@titlehead{\centering\st@logo\\\smallskip\large\st@university}
\def\@title{\st@title}
\def\@subject{\@fordegree\\\st@subject}
\def\@author{{\normalsize\@by}\\{\st@author} \\[1.5\bigskipamount]%
{\normalsize\@undersup}\\{\itshape\st@supervisor}%
\\[1.5\bigskipamount]}
\def\@date{\ifdefined\st@date\st@date\else\if@Latin\latintoday\else\today\fi\fi}
\origin@lmaketitle
\newcommand\date[1]{\def\st@date{##1}}
\newcommand\title[1]{\def\st@title{##1}}
\newcommand\author[1]{\def\st@author{##1}}
\newcommand\subject[1]{\def\st@subject{##1}}}
\renewcommand\date[1]{\def\st@date{#1}}
\renewcommand\title[1]{\def\st@title{#1}}
\renewcommand\author[1]{\def\st@author{#1}}
\renewcommand\subject[1]{\def\st@subject{#1}}
\newcommand\logo[1]{\def\st@logo{#1}}
\newcommand\university[1]{\def\st@university{#1}}
\newcommand\supervisor[1]{\def\st@supervisor{#1}}
\def\@undersup{\if@Latin Supervisor\else استاد راهنما\fi}
\def\@by{\if@Latin By\else نگارش\fi}
\def\@fordegree{\if@Latin B.Sc Thesis\else پایاننامه کارشناسی\fi}
These commands are then used as usual to define the content of that page:
\begin{document}
\logo{\includegraphics{logo}}
\date{
today
}
\title{
some title
}
\author{
me
}
\university{%
there
}
\subject{%
that
}
\supervisor{
you
}
\frontmatter \makethesistitle
As the style definition only seems to be defining macros that define new macros, I don't really get what is going on here. There is seemingly no problem with this code as it outputs just what its supposed to. I'd appreciate if someone could enlighten me a little bit.
\makethesistitlecalls\origin@lmaketitlewhich has been set to\maketitle; that's where the actual title is constructed on the page. – Werner Jun 28 '17 at 11:21