Text FormattingChapter title formatting

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
nzbone
Posts: 7
Joined: Mon Jul 07, 2014 8:27 pm

Chapter title formatting

Post by nzbone »

Hi everyone,

Firstly, I am new to Latex so please go easy :-)

I want to get a title similar to the screenshot attached. I can't seem to get the following to work
1) Very large font size for the number and a smaller one for the actual chapter title
2) Colour of both the chapter title and number
3) Helvetica font

I have tried this but it only gets me partway there

Code: Select all

\usepackage{titlesec}
\titlespacing{\chapter}{0pt}{*25}{*5}
\titleformat{\chapter}[display]
    {\filleft\bfseries\Huge}
    {\Huge\thechapter}{10pt}{\sc}
    []
Thanks

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

nzbone
Posts: 7
Joined: Mon Jul 07, 2014 8:27 pm

Chapter title formatting

Post by nzbone »

Figured it out.

Code: Select all

\usepackage{fix-cm}

\titleformat{\chapter}[display]
    {\filleft\bfseries\fontsize{32}{32}\selectfont\color{blue}}
    {\fontsize{55}{55}\selectfont\thechapter}{-10pt}{\sc}
    []
   
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Chapter title formatting

Post by Stefan Kottwitz »

Thank you for posting the solution!

Btw. though fix-cm solves problems with larger font sizes, I would switch to the similar but newer and fine Latin Modern instead:

\usepackage{lmodern}

Stefan
LaTeX.org admin
nzbone
Posts: 7
Joined: Mon Jul 07, 2014 8:27 pm

Chapter title formatting

Post by nzbone »

Hi,

Thanks.

I am using XeLaTeX with the following

Code: Select all

\usepackage{fontspec}
\setmainfont{Calibri}


Specifically calibri because that is how all my charts and graphs are formatted.


So

Code: Select all

\usepackage{lmodern}
messes up the font.

Are there any specific benefits?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Re: Chapter title formatting

Post by Stefan Kottwitz »

Do you really need fix-cm then? It's for the standard Computer Modern font.
Just because of this I recommended Latin Modern. The font is your choice, just if I need a very good but very similar replacement for the standard font, I would choose Latin Modern. It's planned as successor, and it supports T1 font encoding.

Stefan
LaTeX.org admin
nzbone
Posts: 7
Joined: Mon Jul 07, 2014 8:27 pm

Re: Chapter title formatting

Post by nzbone »

Ahhh ok I see. Thanks a lot. Removed fix-cm.
Post Reply