2

Hi I want to put the chapters title in one line and uppercase, I found this code that makes it inline but how ti make it uppercase too

code:

\usepackage{titlesec}
\titleformat{\chapter}[hang] 
{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter:}{1em}{}
  • Instead of {} try {\MakeUppercase} – egreg Jul 3 '15 at 17:51
  • thanks this works for the chapter name, I need the chapter number uppercase too – efirvida Jul 3 '15 at 17:54
  • \MakeUppercase{\chaptertitlename} – egreg Jul 3 '15 at 17:55
  • didnt work the result of these is "Chapter 1: CHAPTERMarco Teórico" and i want something like "CHAPTER 1: MARCO TERÓICO" – efirvida Jul 3 '15 at 18:00
4

Use a couple of \MakeUppercase instructions:

\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}

\usepackage{titlesec}

\titleformat{\chapter}[hang]
  {\normalfont\Large\bfseries}
  {\MakeUppercase{\chaptertitlename}\ \thechapter:}
  {.5em}
  {\MakeUppercase}

\begin{document}

\mainmatter

\chapter{Marco Teórico}

\end{document}

I used \Large instead of \huge because I got an overfull line with the latter. I also reduced the space between the colon and the title.

enter image description here

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.