The documentation (scrguien
) says about the title (I highlighted the relevant part):
The title is output with a very large font size. Besides the change of
size, the settings for the element title also take effect. By default
these settings are identical to the settings for the element
disposition (see table 3.2, page 51). The default settings may be
changed using the commands \setkomafont
and \addtokomafont
(see
section 3.6, page 51). The font size is, however, not affected (see
table 3.2, page 59).
The reason why the change of font size performed with \setkomafont
won't have effect is because scrartcl.cls
uses
\titlefont\huge \@title\par
so any modification to the font size made with \setkomafont
(applied through \titlefont
) will be overwritten by the \ḩuge
command after \titlefont
.
Here's a possible solution using the etoolbox
package to patch the internal command \@maketitle
to change the default \huge
(instead of \small
use the desired size):
\documentclass{scrartcl}
\usepackage{etoolbox}
\setkomafont{title}{\normalfont\bfseries}
\makeatletter
\patchcmd{\@maketitle}{\titlefont\huge}{\titlefont\small}{}{}
\makeatother
\title{The Title}
\author{The Author}
\begin{document}
\maketitle
\end{document}
As lockstep mentions, the above solution will produce the desired solution if the titlepage
option is false (which is the default). If the titlepage
option is set to true, one can patch \maketitle
with the help of the xpatch
package:
\documentclass[titlepage]{scrartcl}
\usepackage{xpatch}
\setkomafont{title}{\normalfont\bfseries}
\makeatletter
\xpatchcmd{\maketitle}{\titlefont\huge}{\titlefont\small}{}{}
\makeatother
\title{The Title}
\author{The Author}
\begin{document}
\maketitle
\end{document}
Here's some code that will work whether titlepage
is set to true or false:
\documentclass{scrartcl}
\usepackage{xpatch}
\setkomafont{title}{\normalfont\bfseries}
\makeatletter
\xpatchcmd{\maketitle}{\titlefont\huge}{\titlefont\small}{}{}
\xpatchcmd{\@maketitle}{\titlefont\huge}{\titlefont\small}{}{}
\makeatother
\title{The Title}
\author{The Author}
\begin{document}
\maketitle
\end{document}
Another option (mentioned by Andrew Swann in a comment), but I am not sure if this will have undesired side effects, is to
use the font size switch directly in the argument of \title
:
\documentclass{scrartcl}
\setkomafont{title}{\normalfont\bfseries}
\title{\small The Title}
\author{The Author}
\begin{document}
\maketitle
\end{document}
It is controlled by \namefont
, so you just need to redefine that. As an example, the standard definition for the casual
style is:
\renewcommand*{\namefont}{\fontsize{38}{40}\mdseries\upshape}
Similarly, the following macros control the fonts of other elements (the macro names should speak for themselves): \titlefont
, \addressfont
, \quotefont
, \sectionfont
, \subsectionfont
, \hintfont
and \pagenumberfont
.
Best Answer
Just change
to
or whatever you wish it to be.
This tells LaTeX to do the following:
\LARGE
.Moreover, you are telling LaTeX to do this before:
\begin{document}
;Try to see it from LaTeX's perspective: what can it do but complain?