[Tex/LaTex] inline uppercase chapter title

chapterstitlestitlesec

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}{}

Best Answer

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