0

What dose the symbol @ mean? @checktitle and s@title.

How to use the two parameters?

\renewcommand{\title}[2][]{%
\gdef\@checktitle{#1}\ifx\@checktitle\empty\gdef\@title{#2}
\gdef\s@title{#2}\else\gdef\@title{#2}\gdef\s@title{#1}\fi}
Blue Bird
  • 113
  • 5
    See What do \makeatletter and \makeatother do? (possible duplicate). You'll need the surrounding pair if you want to (re)define content with @ in the control sequence/macro name. – Werner Aug 12 '21 at 06:15
  • How to use the macro \title? What does this macro mean? I think it can accept two parameters. How to pass these parameters? – Blue Bird Aug 12 '21 at 11:56
  • 1
    \title[<subtitle>]{<title>} would be the usage, with <subtitle> being optional. That is, you can also just use \title{<title>}, which will make the subtitle the same as the title. Inside \title, the subtitle is stored in \s@title and the title inside \@title. \@checktitle is just temporary storage to see whether an empty subtitle was provided (for example, either in \title[]{<title>} or \title{<title>}). – Werner Aug 12 '21 at 12:18

0 Answers0