How to add a subtitle in class article in Latex?
Asked Answered
P

2

6

I am writing a report in Latex and my document class must be article. I want to add some additional text under my title but I can't find anything that would correspond to a subtitle command. Does anyone have any suggestions?

\documentclass[11pt,a4paper]{article}
\title {Title}
\author{Name}
Phelloderm answered 26/11, 2020 at 19:3 Comment(1)
please make a compilable minimal reproducible exampleAmling
A
12
\documentclass[11pt,a4paper]{article}
\title {Title}
\author{Name}

\makeatletter
\def\@maketitle{%
  \newpage
  \null
  \vskip 2em%
  \begin{center}%
  \let \footnote \thanks
    {\LARGE \@title \par}%
    \vskip 1em%
    {\Large Whatever Subtitle you want\par}%
    \vskip 1.5em%
    {\large
      \lineskip .5em%
      \begin{tabular}[t]{c}%
        \@author
      \end{tabular}\par}%
    \vskip 1em%
    {\large \@date}%
  \end{center}%
  \par
  \vskip 1.5em}
\makeatother


\begin{document}
\maketitle

test

\end{document}
Amling answered 26/11, 2020 at 22:29 Comment(0)
H
7

Hopefully, I found a very easy and quick solution:

\documentclass[11pt,a4paper]{article}
\title {Title \\[1ex] \large Subtitle}
\author{Name}

\begin{document}
\maketitle

Text.
\end{document}
Hifi answered 27/11, 2020 at 9:4 Comment(2)
This will mess with the pdf meta data if used in combination with hyperref and without paragraphs the line spacing will be wrong.Amling
@Amling thank you! My reference. By the way, many compliments for your [latex] silver badge, lots of contributions and help here and there, that's great :)Hifi

© 2022 - 2024 — McMap. All rights reserved.