[Tex/LaTex] Omit the date in \maketitle *without blanking the date*

koma-scripttitles

So, this is building on Omitting the date when using \maketitle; but I'd still like to include the date in the page footer. This means \date{} isn't an option. (Of course, I'd like to get rid of the superfluous spacing in \maketitle as well.)

I'm using KOMA (specifically, scrartcl); but I couldn't hunt down a built-in way to disable this; does that exist? If not, can I use the {titling} package to do this?

\documentclass[paper=a4]{scrartcl}
\usepackage{scrlayer-scrpage}
\automark[subsection]{section}
\pagestyle{scrheadings}

\title{Something}
\author{Some Body}

\ofoot{\today}

\usepackage{blindtext}
\begin{document}
   \maketitle
   \blinddocument
\end{document}

Best Answer

If you only wish to remove the \date-related entry in the title, then you can patch \@maketitle and remove the relevant content (using etoolbox):

enter image description here

\documentclass{scrartcl}
\usepackage{scrlayer-scrpage,etoolbox}
\automark[subsection]{section}
\pagestyle{scrheadings}

\title{Something}
\author{Some Body}

\ofoot{\today}

\usepackage{blindtext}

\makeatletter
% Remove \@date and spacing following it from \@maketitle
\patchcmd{\@maketitle}% <cmd>
  {{\usekomafont{date}{\@date \par}}%
    \vskip \z@ \@plus 1em}% <search>
  {}% <replace>
  {}{}% <success><failure>
\makeatother

\begin{document}

\maketitle
\blinddocument

\end{document}

The above

\patchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>}

searches for <search> in <cmd> and replaces it with <replace> (executing <success> on success of the patch, or <failure> otherwise). Since we're patching \@maketitle, let's look at its definition (in scrkernel-title.dtx):

\newcommand*{\@maketitle}{%
  \global\@topnum=\z@
  \ifx\@titlehead\@empty \else
    \begin{minipage}[t]{\textwidth}
      \usekomafont{titlehead}{\@titlehead\par}%
    \end{minipage}\par
  \fi
  \null
  \vskip 2em%
  \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
    {%
      \usekomafont{author}{%
        \lineskip .5em%
        \begin{tabular}[t]{c}
          \@author
        \end{tabular}\par
      }%
    }%
    \vskip 1em%
    {\usekomafont{date}{\@date \par}}%
    \vskip \z@ \@plus 1em
    {\usekomafont{publishers}{\@publishers \par}}%
    \ifx\@dedication\@empty \else
      \vskip 2em
      {\usekomafont{dedication}{\@dedication \par}}%
    \fi
  \end{center}%
  \par
  \vskip 2em
}%

The occurrence of

    {\usekomafont{date}{\@date \par}}%
    \vskip \z@ \@plus 1em

is replaced with with nothing (removed), since <replace> is empty. As such, no \@date is set, and neither is the usual \vskip space following it.