2

How do I change the size of my chapter headings to 35 pt, section headings to 24 pt and subsection headings to 14 pt?

I know I can change the sizes using \HUGE, \Huge, etc... but according to the memoir manual, \HUGE is only 20 pt when \normalsize is 9 pt.

\documentclass[9pt,extrafontsizes]{memoir}

\usepackage[sfdefault]{roboto}

\chapterstyle{hangnum}

\newcommand{\vubfont}[1]{\usefont{T1}{qag}{m}{n}#1}
\newcommand{\vubfontbf}[1]{\usefont{T1}{qag}{b}{n}#1}

\renewcommand*{\chapnumfont}{\vubfontbf\HUGE}
\renewcommand*{\chaptitlefont}{\vubfont\HUGE}
\setsecheadstyle{\vubfont\Huge}
\setsubsecheadstyle{\vubfontbf\LARGE}

\begin{document}
\chapter{Avant Garde -- 35pt}
\section{Avant Garde -- 24pt}
Roboto -- 9pt
\subsection{Avant Garde bold -- 14pt}
Roboto -- 9pt
\end{document}

(Also, is this the best way to change the fonts of the headings to Avant Garde?)

6
  • 1
    A quick solution would be \def\HUGE{\fontsize{35}{42}\selectfont} etc... But it needs some more changes to be a real change of the HUGE command as it specifies some more parameters I think if no lines are breaking in your titles it will be ok. (You need anyfontsize package)
    – koleygr
    Aug 18, 2017 at 17:17
  • See also here for memoir : tex.stackexchange.com/questions/323443/…... And check XeLaTeX (in compination with fontspec package if there are no conflictions with memoir) if you don't already know for whatever font you want
    – koleygr
    Aug 18, 2017 at 17:21
  • 1
    @koleygr one doesn't necessarily need anyfontsize for \fontsize{35}{42}\selectfont to be working for any arbitrary sizes, but a scalable font.
    – Skillmon
    Aug 18, 2017 at 17:25
  • @Skillmon +1... I just thought that my comment is general like this and did not checked if Avant Garde is one of them... but we don't really know OP's \normalsize (normaltext) font choice (so it may be usefull)
    – koleygr
    Aug 18, 2017 at 17:28
  • You (@titto) should also keep in mind, that TeX's pt differ from Word's (if you have to meet a specific layout, that is). The difference is very small (\epsilon_{rel}=0.375%), though.
    – Skillmon
    Aug 18, 2017 at 17:43

1 Answer 1

0

You can define a new fontsize using

\def\<name>{\fontsize{<fontsize>}{<baselineskip>}\selectfont}

Also, in memoir, when you use the class option 9pt, \huge is 14pt.

This works:

\documentclass[9pt,extrafontsizes]{memoir}

\usepackage[sfdefault]{roboto}

\chapterstyle{hangnum}

\newcommand{\vubfont}[1]{\usefont{T1}{qag}{m}{n}#1}
\newcommand{\vubfontbf}[1]{\usefont{T1}{qag}{b}{n}#1}
\def\chapsize{\fontsize{35}{42}\selectfont}
\def\secsize{\fontsize{24}{30}\selectfont}

\renewcommand*{\chapnumfont}{\vubfontbf\chapsize}
\renewcommand*{\chaptitlefont}{\vubfont\chapsize}
\setsecheadstyle{\vubfont\secsize}
\setsubsecheadstyle{\vubfontbf\huge}

\begin{document}
    \chapter{Avant Garde -- 35pt}
    \section{Avant Garde -- 24pt}
    Roboto -- 9pt
    \subsection{Avant Garde bold -- 14pt}
    Roboto -- 9pt
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .