Have a look at the relsize
package. Package description:
The basic command of the package is \relsize
, whose argument is a
number of \magstep
s to change size; from this are defined commands
\larger
, \smaller
, \textlarger
, etc.
Update:
In the next release of KOMA script new font elements are implemented titlehead
, author
, date
, publishers
, dedication
Source (German): http://www.komascript.de/releasesvn
(The current version is v3.11b)
First answer:
The font size of \dedication
inside KOMA is hard coded. The relevant part of the code is:
\ifx\@dedication\@empty \else
\next@tpage\null\vfill
{\centering \Large \@dedication \par}%
\vskip \z@ \@plus3fill
\if@twoside \next@tpage\cleardoubleemptypage \fi
\fi
You can redefine the default definition of \dedication
to add some font information. This can be achieved by:
\makeatletter
\renewcommand{\dedication}[1]{%
\gdef\@dedication{\normalsize #1}}
\makeatother
As a first KOMA-Implementation you can use the following definition which allows the font size of dedication
to manipulate by setkomafont
:
\setcounter{errorcontextlines}{999}
\documentclass{scrreprt}
\usepackage{xpatch}
\makeatletter
\newkomafont{dedication}{\Large}
\xpatchcmd{\maketitle}{\Large \@dedication}{\scr@fnt@dedication \@dedication}{}{}
\makeatother
\setkomafont{dedication}{\small}
\begin{document}
\author{foo}
\title{foobar}
\dedication{foobarfoo}
\maketitle
\end{document}
Best Answer
The documentation (
scrguien
) says about the title (I highlighted the relevant part):The reason why the change of font size performed with
\setkomafont
won't have effect is becausescrartcl.cls
usesso 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):As lockstep mentions, the above solution will produce the desired solution if the
titlepage
option is false (which is the default). If thetitlepage
option is set to true, one can patch\maketitle
with the help of thexpatch
package:Here's some code that will work whether
titlepage
is set to true or false: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
: