10

I'm trying to do a very simple task but I'm a beginner in LaTeX, so I have some doubts.

I'd like to change the chapter style. Instead of

Chapter 1

Introduction

I'd like to have

C H A P T E R 1 (bold, centered, underlined and one single space between the letters)

Introduction.

Can someone help me with this?

  • Welcome to TeX.SX! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Adam Liter Feb 25 '14 at 1:55
13

I am not sure if something like this is what you want:

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

\titleformat{\chapter}[display]
  {\normalfont\huge\bfseries}{\filcenter\underline{\MakeUppercase{\textls[400]{\chaptertitlename}}\ \thechapter}}{20pt}{\Huge}

\begin{document}

\chapter{Introduction}
\lipsum[4]

\end{document}

enter image description here

Notice that underlined bold-faced text might be a bad dasign choice.

  • Perhaps! I will try without the underline. Just to check: wich command do I have to use to generate an italic text in CHAPTER 1? – Gustavo Feb 25 '14 at 1:39
  • @Gustavo You're welcome! You can add \itshape just before \MakeUppercase to have italicized font – Gonzalo Medina Feb 25 '14 at 1:43
  • I tried to figure out how to adapt this to use an 'english' rule using swrule but no matter what I do, the result looks like a few blocks stuck together. Not that it matters if the underline is being dropped but maybe I misunderstood what that is supposed to do... – cfr Feb 25 '14 at 2:15
  • @cfr Perhaps something like this? \newlength\ChapNamNumWd \titleformat{\chapter}[display] {\normalfont\huge\bfseries}{\settowidth\ChapNamNumWd{\MakeUppercase{\textls[400]{\chaptertitlename}}\ \thechapter}\filcenter\MakeUppercase{\textls[400]{\chaptertitlename}}\ \thechapter\llap{\raisebox{-6pt}{\swrule{\ChapNamNumWd}{2pt}}}}{20pt}{\Huge} – Gonzalo Medina Feb 25 '14 at 2:42
  • Precisely. But the results look like ugly boxes. That is, the lines I get are not smooth at all however much I increase the counter which is meant to control how fine-grained the gradations are. (At least, default is 50 and I tried at least 20000 with no significant improvement.) I just double-checked and I get the same with that code as I did with mine. (Not surprising as did essentially the same thing.) – cfr Feb 25 '14 at 4:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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