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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Consider the following MWE:

\documentclass{book}
\usepackage{titlesec} 
\usepackage{lipsum} % just to generate text for the example
\usepackage[tracking=smallcaps]{microtype}

\titleformat{\chapter}[display]
  {\bfseries\Large}
  {\filright\MakeUppercase{\chaptertitlename} \Huge\thechapter}
  {1ex}
  {\titlerule\vspace{1ex}\filleft}
  [\vspace{1ex}\titlerule]

\begin{document}

\chapter{Test Unnumbered Chapter}
\lipsum[1-2]
\chapter{Test Numbered Chapter}
\lipsum[1-2]
{\scshape Test}
\end{document}  

How can we edit the \chaptertitlename command so that it spaces out correctly by using the microtype package?

share|improve this question

Putting it into a \textls{...} spaces it out.

\documentclass{book}
\usepackage{titlesec} 
\usepackage{lipsum} % just to generate text for the example
\usepackage[tracking=smallcaps]{microtype}

\titleformat{\chapter}[display]
  {\bfseries\Large}
  {\filright\textls{\MakeUppercase{\chaptertitlename}} \Huge\thechapter}
  {1ex}
  {\titlerule\vspace{1ex}\filleft}
  [\vspace{1ex}\titlerule]

\begin{document}

\chapter{Test Unnumbered Chapter}
\lipsum[1-2]
\chapter{Test Numbered Chapter}
\lipsum[1-2]
{\scshape Test}
\end{document} 

The result is a fine example of why even wonderful microtype, or any other automatic way of letterspacing currently available in *TeX, is unsuitable for creating letter-spaced all-caps that actually look good. That's because TeX has no knowledge of what a given letter looks like. So in letterspacing, an A is treated the same as a V or an O, which obviously isn't how it's done. That's why in TeX, we can't have, e.g., optical kerning -- which would be pretty handy here.

enter image description here

In this case, there's no need to worry, though. Larger text usually benefits from tighter spacing. Large all-caps you can simply leave at default spacing IMHO.

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.