4

I want to change the font size for the chapter title and chapter number.

My code in part is as below.

I want the font for the chapter to be greater than the one achieved through \Huge. Is there any way to do that for the document class I am using?

\documentclass[a4paper,12pt,oneside]{report}
\usepackage[left=3.81cm,right=2.54cm,top=2.54cm,bottom=2.54cm]{geometry}

\usepackage{sectsty}

\chapternumberfont{\Huge} 
\newcommand{\chapfnt}{\fontsize{300}{250}}
\newcommand{\secfnt}{\fontsize{14}{17}}
\newcommand{\ssecfnt}{\fontsize{12}{14}}
\chaptertitlefont{\Huge}

My current font size looks like this:

enter image description here

1 Answer 1

3

\fontsize{<size>}{<baseline skip>} should be followed by \selectfont in order to select the font:

enter image description here

\documentclass{report}

\usepackage{sectsty,lmodern}

\begin{document}

\chapter{A chapter}

Lorem ipsum \ldots

\chapternumberfont{\fontsize{35pt}{32pt}\selectfont}
\chaptertitlefont{\fontsize{38pt}{35pt}\selectfont}

\chapter{A chapter}

Lorem ipsum \ldots

\end{document}
2
  • What is meant by baseline skip? Is it the left margin?
    – hola
    Sep 7, 2020 at 9:52
  • 1
    @xxx---: No. A baseline skip is the vertical length between the baseline of two horizontal pieces of text... like two lines of a paragraph. <size> is (should be) smaller than <baseline skip> otherwise the lines within a paragraph will have virtually no space between them. Check out the difference between \fontsize{10pt}{10pt}\selectfont\lipsum[1] and \fontsize{10pt}{12pt}\selectfont\lipsum[1] yourself (code; output).
    – Werner
    Sep 7, 2020 at 17:21

You must log in to answer this question.

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