0

I’m using TeXLive 2015 and the scrreprt document class.

Is there a command like \thesubtitle to print the subtitle as defined by \subtitle{…}? I get an ‘undefined control sequence’ error on \thesubtitle when compiling the following (either with lualatex or pdflatex).

\documentclass{scrreprt}

\title{T}
\subtitle{S}

\begin{document}
\thetitle, \thesubtitle
\end{document}

Here, \thetitle works as expected. Do I need to load a package to get \thesubtitle? Is there another command to do this?

(Can’t be the first one to run into this problem, but I couldn’t find anything in the last five minutes on the web.)

1 Answer 1

1

The "content" of \title and \subtitle is stored in the "internal" commands \@title and \@subtitle. To use them (not using \maketitle or similar command) in the document, you have to use \makeatletter (and \makeatother)

\documentclass{scrreprt}

\title{Title}
\subtitle{Subtitle}

\begin{document}
\makeatletter\@title, \@subtitle\makeatother
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .