4

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}{}
4
  • Instead of {} try {\MakeUppercase}
    – egreg
    Jul 3, 2015 at 17:51
  • thanks this works for the chapter name, I need the chapter number uppercase too
    – efirvida
    Jul 3, 2015 at 17:54
  • \MakeUppercase{\chaptertitlename}
    – egreg
    Jul 3, 2015 at 17:55
  • 2
    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, 2015 at 18:00

2 Answers 2

7

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

0
1

\renewcommand{\chaptername}{CHAPTER} add to your preamble. It should capitalize the word CHAPTER.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .