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 want to be able to use small caps for chapter headings. According to Using \textsc{} within \section{} CM default font does not support small caps so I need to use:

\usepackage[T1]{fontenc}

in the preamble.

However, this changes font for whole document. I do have quite complex set up and global setting causes few issues so I would like to get same effect as by using \usepackage[T1]{fontenc} in preamble (that is - to be able to use small caps for chapter headings), but only for chapter headings that defined created by using following macro:

 \def \centeredchapter#1{
    \chapter*{\centering{\LARGE \textsc{#1}}}
    \addcontentsline{toc}{chapter}{#1}
    }

Is it possible?

share|improve this question
1  
presumably (untested) \chapter*{\centering{\LARGE\fontencoding{T1}\textsc{#1}}} –  David Carlisle Mar 3 at 11:41
3  
Well you can always use \fontencoding{T1} locally, but imho you should better solve your global problems with T1 encoding. T1 is a much better encoding than the default OT1 –  Ulrike Fischer Mar 3 at 11:42
    
Using \fontencoding{T1} in macro as suggested by David and Ulrike works in my case. Just for clarity - is \fontencoding{T1} a Tex or LaTeX native command? I thought it is fontenc package command but it works without loading that package. –  Rafal Mar 3 at 11:54
add comment

1 Answer 1

up vote 5 down vote accepted

Font encoding is built into the LaTeX format, the fontenc package mainly just gives an interface to setting the document defaults so you can use

\chapter*{\centering{\LARGE\fontencoding{T1}\textsc{#1}}}
share|improve this answer
add comment

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.