# Can I use different font sizes in the title of my document?

I am using a poster template I found here to base my poster on. I want to use small caps in my title, but the font used, cmbright, does not support this.

So I thought I could fake it by doing something like this:

S\footnotesize{MALL}\normalsize{C}\footnotesize{APS}


which works in the running text and in the section headers (using \protect), but not in the title option of the documentclass. When I use it there, the code does not compile, and I get the following error (at the command \usepackage[T1]{fontenc}):

Undefined control sequence. \usepackage


This is my code:

\documentclass[
,title     = {{S\footnotesize{MALL}\normalsize{C}\footnotesize{APS}: No small caps}}
,toplogo   = {{uni-logo}}
,papersize = {{a0paper}}
,colcount  = {{3columns}}
,longtitle
,nocrop
]{dtuposter}

\usepackage[T1]{fontenc}        % special characters
\usepackage[utf8]{inputenc}    % Unicode, Linux

\usepackage{cmbright}
\usepackage{arevmath}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{enumitem}
\setlist{nosep,leftmargin=*}

\usepackage{booktabs}
\usepackage{siunitx}


My question: How can I use \normalsize, \footnotesize etc. in the documentclass title option? Is there some workaround that does not include fiddling with the dtuposter.cls file?

Unfortunately, I can't provide a MWE because for the code to run, the dtuposter.cls file and some other files and images are required - and I can't attach these here.

I am on Windows and use MiKTeX 2.9.

I suggest a different strategy:

\documentclass[
title = SMALLCAPS: Small caps,
toplogo = uni-logo,
papersize = a0paper,
colcount  = 3columns,
longtitle,
nocrop,
]{dtuposter}

\makeatletter
\protected\def\rdvtitle{%
\check@mathfonts
S{\fontsize{\sf@size}{0}\selectfont MALL}C{\fontsize{\sf@size}{0}\selectfont APS}:
Small caps%
}
\makeatother
\setkeys{dtuposter}{title=\rdvtitle}

\usepackage[T1]{fontenc}        % special characters
\usepackage[utf8]{inputenc}    % Unicode, Linux

\usepackage{cmbright}
\usepackage{arevmath}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{enumitem}
\setlist{nosep,leftmargin=*}

\usepackage{booktabs}
\usepackage{siunitx}

\begin{document}

\maketitle

\end{document}


Note that \footnotesize is wrong, because the title is typeset at in a larger font; with \sf@size we get the size for first level subscripts in the current font size.

• Fantastic! This works. However, I get an error message pertaining to the geometry.sty file : Missing \endcsname inserted. \ProcessOptionsKV[c]{Gm}, as well as a warning pertaining to the main.tex file: Token not allowed in a PDF string (PDFDocEncoding):(hyperref) removing \rdvtitle. Also, the spacing between the two lines that the title consists of has reduced now. Any thoughts on this?
– rdv
Nov 3 '19 at 19:21
• @rdv I found a better way, see edited answer Nov 3 '19 at 21:11
• Thanks again - no more error messages! Can you also advise on the issue that my two-line title is now too narrowly spaced? I tried \setkeys{dtuposter}{title=\rdvtitle\par} (so adding \par) - but this spreads the lines too much, pushing the content of the poster to a second page.
– rdv
Nov 3 '19 at 21:55
• @rdv Sorry, but I can't see “too large or too narrow spreading”. Nov 3 '19 at 22:29
• Sorry, I was unclear. In the example above there is no problem since the whole title is on one line. My actual title, however, is much longer and needs two lines - and there is very little spacing between them, giving a cramped look.
– rdv
Nov 3 '19 at 23:06