Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Does there exist some command for subtitles in the \maketitle thing?

share|improve this question
6  
The titlepage environment can be used to create a title page with everything you need. The standard classes don't even try to provide "everything" one could need. You can look at the titling package for getting aid in designing a title. –  egreg Mar 31 '12 at 12:15

2 Answers 2

up vote 17 down vote accepted

In the standard classes: no. In the KOMA-Script classes: yes.

\documentclass{scrartcl}

\begin{document}

\title{(Title)}
\subtitle{(Subtitle)}
\author{(Author)}

\maketitle

\end{document}

enter image description here

share|improve this answer
    
How about subsubsub...title? –  hhh Mar 31 '12 at 14:03
    
@hhh AFAIK, no class/package offers this. –  lockstep Apr 1 '12 at 11:05

With the titling package one can define a \subtitle command as follows:

\documentclass[a4paper]{article}
\usepackage{titling}
\newcommand{\subtitle}[1]{%
  \posttitle{%
    \par\end{center}
    \begin{center}\large#1\end{center}
    \vskip0.5em}%
}

\begin{document}

\title{(Title)}
\subtitle{(Subtitle)}

\author{(Author)}

\maketitle

\end{document}

The trick is that titling redefines \maketitle so that it executes, among other things

<pretitle tokens> <title tokens> <posttitle tokens>

and what goes in <posttitle tokens> is set by

\posttitle{tokens}

The default, as made clear in the documentation, is

  \posttitle{\par\end{center}\vskip0.5em}

so what's needed is to insert something in between.

enter image description here

share|improve this answer
    
...how about subsubsub...title? –  hhh Mar 31 '12 at 14:18
    
@hhh What do you mean? –  egreg Mar 31 '12 at 14:19
    
Like is it possible to have \subsubtitle{...}? At least with the \title{...} linebreaks do not work in title -element \title{oneLine\n newLine}. –  hhh Mar 31 '12 at 14:29
2  
Use \\ to force a line break. –  egreg Mar 31 '12 at 14:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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