127

I'm relatively new to TeX but until now I used mostly the beamer class. There I did this:

\documentclass{beamer}
  \title{title}
  \subtitle{subtitle}
  \author{name}
  \date{\today}
\begin{document}
    %content
\end{document}

And it worked as I would expect but when I use the article class the subtitle does not work.

So it seems that a) I got something wrong or b) it's not the right document class. So I ask you guys:

How do I use a subtitle in the article class?

or

Which document class should I use for my document? I'm attempting to write a document with 50 to 100 pages. It will be a documentation for a programming project so it will contain code snippets and diagrams.

95

If you used scrartcl instead of article, the command \subtitle would immediately work as expected. scrartcl belongs to the KOMA-Script classes which are extended replacements of the LaTeX standard classes. I strongly recommend KOMA-Script. For reasons have a look at:

Your document is considerably large. An article-like class may be ok (scrartcl), but if you need a chapter-like sectioning you could consider to use report (or scrreprt, which is a KOMA class).

You might be interested in the answers to this question:

  • note that \maketitle makes both the title and subtitle when scrartcl is used. (no call to something like \makesubtitle is needed.) – dbliss Nov 30 '15 at 20:50
80

To supplement Stefan's answer, the core LaTeX article class does not have a \subtitle macro. You can therefore either do something like

\title{Title \\ Subtitle}

or consider the titlepage environment. Other document classes, notably KOMA-Script, do have a separate \subtitle macro available.

  • 33
    Isn't in normal for the subtitle to be slightly smaller than the title. So if the title were \Large the command might be supplemented: \title{Title \\ \large Subtitle} – Seamus Nov 25 '10 at 16:58
  • 2
    @Seamus: This would depend on exactly how the 'subtitle' is intended to look, but you are right that this is often the case. I'd probably go for the titlepage environment to do this. – Joseph Wright Nov 25 '10 at 17:20
  • @JosephWright How can I use the titlepage environment to do this? Can you explain? – becko May 30 '15 at 20:59
  • @becko tex.stackexchange.com/questions/209993/… – Johannes_B Jun 11 '17 at 10:25
4

A fully adapted possibility for the subtitle generation in the document class article includes reducing the fontsize in the subtitle, as @Seamus mentioned above, but relatively (!), and increasing the distance between title and subtitle. Therefore my suggestion is following:

\documentclass{article}
\usepackage{relsize}

\title{Experimental Test\\[0.2em]\smaller{}Stimuli generation}

\begin{document}
    \maketitle
    My document
\end{document}

enter image description here

If you want a "fully" adaptable title: relative size and line separation can be adapted

\documentclass{article}
\usepackage{relsize}


\newcommand{\subtitlerelsize}{1} %relative size: integer value
\newcommand{\subtitlelinesep}{0.2em} %line separation: a LaTeX length

\title{Experimental Test\\[\subtitlelinesep]%
    \smaller[\subtitlerelsize]{}Stimuli generation}

\begin{document}
    \maketitle
    My document
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.