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 am using fncychap and would like to use a different font for the chapter label than the rest of the document. Is there any easy and general way?

share|improve this question
    
Please provide some more information about your computing setup. E.g., do you use pdf(la)tex, xe(la)tex, or lua(la)tex -- or something else? Which documentclass do you use? And, which fonts are you currently using and/or looking to use for the chapter headings? –  Mico Jan 8 '13 at 20:39

1 Answer 1

up vote 1 down vote accepted

The exact configuration depends on the fncychap style you’re using, but in general, there are a few macros for adapting the style, as described in section 2.1 of the fncychap documentation. The ones for changing the font etc. are \ChNameVar{stuff}, \ChNumVar{stuff} and \ChTitleVar{stuff}. Here’s an example for the style Sonny using pdfLaTeX:

\documentclass[12pt]{report}
\usepackage{xcolor}
\usepackage[T1]{fontenc}
\usepackage[Sonny]{fncychap}
  % defaults:
  %\ChNameVar{\Large\sf}
  %\ChNumVar{\Huge}
  %\ChTitleVar{\Large\sf}
  % custom:
  \ChNameVar{\Large\fontfamily{put}\selectfont\color{blue}}
  \ChNumVar{\Huge\fontfamily{pzc}\selectfont\color{red}}
  \ChTitleVar{\Large\fontfamily{phv}\selectfont\scshape\color{green}}
\begin{document}
\chapter{Hello World!}
Foo bar baz
\end{document}

output

For some more details on how to change the font and also how to do it with XeLaTeX, LuaLaTeX, or ConTeXt, see How do I use a particular font for a small section of text in my document?.

Also note that in some fncychap styles, variables influence the following variables; e.g. in my example, “Hello World!” and the rules would be red if I hadn’t specified their color. I’m not sure if that’s a bug or intended behavior.

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.