1

I tried to modify \maketitle: different \vspaces, date at the very bottom.

Unfortunately, as soon as I add the code to change \maketitle, the line \renewcommand{\titlepagestyle}{empty} has no effect anymore.

How can I disable the page number on the first page and move the date to the location of the page number?

\documentclass[12pt,DIV=14,a4paper,parskip=true,titlepage=true]{scrartcl}

\makeatletter
\renewcommand*{\maketitle}{%
  % taken and shortened from /usr/share/texmf/tex/latex/koma-script/scrartcl.cls
  \global\@topnum=\z@
  \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative
  \null
  \vskip 22em%
  \begin{center}%
    \ifx\@subject\@empty \else
      {\usekomafont{subject}{\@subject \par}}%
      \vskip 1.5em
    \fi
    {\usekomafont{title}{\Huge \@title \par}}%
    \vskip .5em
    {\ifx\@subtitle\@empty\else\usekomafont{subtitle}\@subtitle\par\fi}%
    \vskip 1em
    \null\vfill
    {\usekomafont{date}{\@date \par}}%
  \end{center}%
  \par
  \vskip 0em
  \clearpage
}%
\makeatother

\renewcommand{\titlepagestyle}{empty}


\subject{Opinion 12}

\title{My Opinion}
\date{1 August 2017}

\begin{document}
\maketitle

\section{here gets}

\end{document}

enter image description here

Schweinebacke
  • 26,336
rriemann
  • 363
  • 3
    Why messing around with internals? I suggest to have a look at https://tex.stackexchange.com/questions/209993/how-to-customize-my-titlepage – Johannes_B Nov 15 '17 at 06:03
  • Thanks for your input. I consider to make out of this a template with pandoc that calls \maketitle by default. If there is a less complicated way to change \maketitle without loosing koma features, I'm eager to hear about it. (I'll read the source suggested by @Johannes_B). @Schweinebacke, how can I use the page style in my redefinition? – rriemann Nov 15 '17 at 09:38

1 Answers1

3

\titlepagestyle is used only on in-page titles made with titlepage=false and KOMA-Script's original \maketitle. You are using titlepage=true, so KOMA-Script itself wouldn't use \titlepagestyle even without your redefinition of \maketitle. You are defining a title page only, no in-page title. It is recommended (and mentioned in the KOMA-Script manual) to use titlepage environment for title pages. The original \maketitle definition in KOMA-Script also uses titlepage for title pages.

You can add \begin{titlepage} at the very beginning of your redefinition and replace the \clearpage at the end by \end{titlepage}:

\documentclass[12pt,DIV=14,parskip=true]{scrartcl}

\makeatletter
\renewcommand*{\maketitle}{%
  % taken and shortened from /usr/share/texmf/tex/latex/koma-script/scrartcl.cls
  \begin{titlepage}
  \global\@topnum=\z@
  \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative
  \null
  \vskip 22em%
  \begin{center}%
    \ifx\@subject\@empty \else
      {\usekomafont{subject}{\@subject \par}}%
      \vskip 1.5em
    \fi
    {\usekomafont{title}{\Huge \@title \par}}%
    \vskip .5em
    {\ifx\@subtitle\@empty\else\usekomafont{subtitle}\@subtitle\par\fi}%
    \vskip 1em
    \null\vfill
    {\usekomafont{date}{\@date \par}}%
  \end{center}%
  \par
  \vskip 0em
  \end{titlepage}
}%
\makeatother

\subject{Opinion 12}

\title{My Opinion}
\date{1 August 2017}

\begin{document}
\maketitle

\section{here gets}

\end{document}

title page with <code>titlepage</code>

BTW: With your redefinition not only \titlepagestyle is unused. Option titlepage also cannot change the behaviour of \maketitle any longer. The redefinition is very extrem. So it does not make sense to set the option or to redefine \titlepagestyle. I have removed them from the example.

Schweinebacke
  • 26,336