# Special non-standard font sizes for different types

The more I read about fontsizes in LaTeX, the more confused I've become. I don't know how to meet my requirements, which are the following:

text = 11pt --> This works.

footnotes = 9pt --> This works.

section = 15pt --> ??

subsection = 13pt --> ??

These values are for Arial. I also got them for Times New Roman (each one increased by 1). Concerning sections and subsections I read about scalefont, titlesec, sectsty,... but I could not work out a solution.

For example, if I use the following approach

\documentclass[a4paper, 11pt, oneside, titlepage]{article}
\usepackage{scalefnt}
\usepackage{sectsty}
\sectionfont{\scalefont{1.36}}
\subsectionfont{\scalefont{1.18}}
\usepackage[ansinew]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[scaled]{helvet}
\usepackage[T1]{fontenc}

\begin{document}
\section{Kapitel 1}
\subsection{Kapitel 1.1}
\end{document}


Latex prints a warning

LaTex Font Warning: Font shape 'T1/cmr/bx/n' in size <19.584> not availabe

size <20.74> substituted

How can I change this situation?

-
A general comment for all solutions: Your requirements are probaly PostScript points, while TeX points are a bit different. See tex.stackexchange.com/q/4239/5763; you want to add bp to all font dimens to get PostScript points. – Martin Schröder Apr 15 '13 at 14:48

It's rather unusual to be specifying things per document at this level but not particularly difficult: just copy the definition of \section from article class and change the font size to be the size requested. I'd note that Arial and Helvetica aren't really the same font. The warning about font size was ignorable but if you load the fix-cm package it goes away.

\documentclass[a4paper, 11pt, oneside, titlepage]{article}
\usepackage[ansinew]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[scaled]{helvet}
\usepackage[T1]{fontenc}
\usepackage{fix-cm}
\makeatletter
\renewcommand\section{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\normalfont
%\Large % \@xivpt{18}
\fontsize{15}{20}%
\bfseries}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\normalfont
%\large % \@xiipt{14}
\fontsize{13}{15}%
\bfseries}}
\makeatother

\begin{document}
\section{Kapitel 1}
\subsection{Kapitel 1.1}
\end{document}

-
I tested your code by generating pdf and copying the text to Word. The size matches, Word displays "F18" instead of Arial but a typing comparison is positive. It seems that yours is the perfect solution. – PWillms Apr 15 '13 at 7:20

You need no computation and no \scalefont command: just tell LaTeX what you want.

\documentclass[a4paper, 11pt, oneside, titlepage]{article}
\usepackage[T1]{fontenc}
\usepackage[ansinew]{inputenc}
\usepackage[ngerman]{babel}

\usepackage{newtxtext,newtxmath} % better Times package
\usepackage[scaled]{helvet}

\usepackage{sectsty}
\sectionfont{\fontsize{15}{19}\sffamily}
\subsectionfont{\fontsize{13}{16}\sffamily}

\begin{document}
\section{Kapitel 1}
\subsection{Kapitel 1.1}
\end{document}


Why should anybody want section headers in Helvetica and text in Times is beyond my understanding. It reminds me of the Chinese all wearing the same suit.

-
That's probably a style guide dating from the 1970s which originated in the typewriter area. – Martin Schröder Apr 15 '13 at 14:49

If you want to use the combination Times/Helvetica/Courier with proper scaling for the Helvetica font, you could use the combination

\usepackage{mathptmx}
\usepackage[scaled=.90]{helvet}
\usepackage{courier}


Using the short syntax for \titleformat from the titlesec package and \fontsize{}{}\bfseries you can adjust the font size for the sectional units. To change the font size for footnotes, you can use the etoolbox package to patch \@footnotetext:

\makeatletter
\patchcmd{\@footnotetext}{\footnotesize}{\fontsize{9}{11}\selectfont}{}{}
\makeatother


A complete example:

\documentclass[a4paper,11pt,oneside, titlepage]{article}
\usepackage{mathptmx}
\usepackage[scaled=.92]{helvet}
\usepackage{courier}
\usepackage{titlesec}
\usepackage{etoolbox}
\usepackage{lipsum}% just to generate text for the example

\titleformat*{\section}{\fontsize{15}{18}\bfseries}
\titleformat*{\subsection}{\fontsize{13}{15}\bfseries}
\makeatletter
\patchcmd{\@footnotetext}{\footnotesize}{\fontsize{9}{11}\selectfont}{}{}
\makeatother

\begin{document}

\section{Einleitung}
\lipsum[4]
\subsection{Motivation}
\lipsum[4]

\end{document}

-
I cannot compile as "atoolbox" is not found. – PWillms Apr 15 '13 at 7:20
@PWillms a typo; it is etoolbox. – Gonzalo Medina Apr 15 '13 at 10:44