Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would change the font of section and subsection of my document. I have created it using book class. I would use this font:

enter image description here

According to Adobe pdf propriety, this font is AvantGarde-Demi. How can I use it in Latex. what command I should use to recreate this in latex. I think I should use titlesec package right?

share|improve this question
    
A good place to start is the LaTeX Font Catalogue –  Peter Jansson Jan 16 '13 at 22:01
    
According to Latex Font Catologue this found should correspond to AvantGarde –  Mazzy Jan 16 '13 at 22:07
    
Yes, titlesec is the way to go. –  mafp Jan 16 '13 at 23:07

1 Answer 1

up vote 7 down vote accepted

You can also use sectsty

\documentclass{book}
%\usepackage{avant}
%\renewcommand*\familydefault{\sfdefault} %% Only if the base font of the document is to be sans serif
\usepackage[T1]{fontenc}
%\renewcommand{\sfdefault}{pag} %% To make only sf fonts to be avant garde.
\usepackage{sectsty}
%\chapterfont{\fontfamily{pag}\selectfont} %% for chapter if you want
\sectionfont{\fontfamily{pag}\selectfont}
\subsectionfont{\fontfamily{pag}\selectfont} %% Similarly for others. see the manual of sectsty, section 5.
\begin{document}
\setcounter{secnumdepth}{3}
\chapter{Some chapter}
\section{Event Monitor Pattern}
\subsection{Some sub-section}
\subsubsection{Some sub sub section}

\end{document}

enter image description here

With titlesec

\documentclass{book}
%\usepackage{avant}
%\renewcommand*\familydefault{\sfdefault} %% Only if the base font of the document is to be sans serif
\usepackage[T1]{fontenc}
%\renewcommand{\sfdefault}{pag} %% To make only sf fonts to be avant garde.
\usepackage{titlesec}
\titleformat{\chapter}[display]
  {\fontfamily{pag}\selectfont\huge\bfseries}
  {\chaptertitlename\ \thechapter}
  {20pt}
  {\Huge}
\titleformat{\section}
  {\fontfamily{pag}\selectfont\bfseries\Large}
  {\thesection}
  {1em}
  {}
\titleformat{\subsection}
  {\fontfamily{pag}\selectfont\bfseries\Large}
  {\thesection}
  {1em}
  {}
\begin{document}
\setcounter{secnumdepth}{3}
\chapter{Some chapter}
\section{Event Monitor Pattern}
\subsection{Some sub-section}
\subsubsection{Some sub sub section}

\end{document}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.