GeneralIncrease Size of Chapter Numbers and Make Title Uppercase

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Increase Size of Chapter Numbers and Make Title Uppercase

Post by AleCes »

Hello everybody,

I need to increase the size of chapter numbers without altering the size of the title. Also, I'd like doing away with the label "chapter" preceding numbers.

Minimal example:

Code: Select all

\documentclass[10pt,a5paper,openany]{book}
\usepackage[top=1.5cm,headsep=4pt,outer=2cm,inner=1cm,nofoot,bottom=1.5cm]{geometry}
\usepackage{blindtext}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancypagestyle{plain}{%
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}}
\renewcommand{\chaptermark}[1]{%
\markboth{\MakeUppercase{%
\thechapter.%
\ #1}}{}}
\fancyhead[RO]{\rightmark}
\fancyhead[LE]{\leftmark}
\fancyhead[RE]{\thepage}
\fancyhead[LO]{\thepage}
\usepackage[center,uppercase,tiny]{titlesec}
\titlespacing{\chapter}{0pt}{*0}{*1.5}

\begin{document}
    \chapter{Introduction}
    \blindtext
    \chapter{Conclusion}
    \blindtext
\end{document}
Last edited by AleCes on Sun Feb 09, 2014 12:26 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Increase Size of Chapter Numbers and Make Title Uppercase

Post by AleCes »

I've almost solved it by devising this code:

Code: Select all

\titleformat{\chapter}[display]
{\centering\bfseries\large}
{\Huge\thechapter}
{0pt}
{}
[]
However, if I go for fine customization with \titleformat, the generic options I used before, that is [center,uppercase,tiny] are discarded, and if add MakeUppercase to {\centering\bfseries\large} I get error messages... why :? Is there a workaround? If so, I'm done with this issue!
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Re: Increase Size of Chapter Numbers

Post by Stefan Kottwitz »

Instead of telling "when I do this and that" and mentioning error message without really telling such a message, you could post example code which shows that error. ;-) It's just quite hard to solve otherwise. Making it easier for the reader leads to the solution more quickly.

Stefan
LaTeX.org admin
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Increase Size of Chapter Numbers and Make Title Uppercase

Post by AleCes »

Sorry, here's the message:

{\centering\bfseries\large\MakeUppercase}
! Incomplete \iffalse; all text was ignored after line 105.
<inserted text>
\fi
<*> "La Rivoluzione Francese a Santo Domingo.tex"
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Increase Size of Chapter Numbers and Make Title Uppercase

Post by cgnieder »

AleCes wrote:I've almost solved it by devising this code:

Code: Select all

\titleformat{\chapter}[display]
{\centering\bfseries\large}
{\Huge\thechapter}
{0pt}
{}
[]
However, if I go for fine customization with \titleformat, the generic options I used before, that is [center,uppercase,tiny] are discarded, and if add MakeUppercase to {\centering\bfseries\large} I get error messages... why :? Is there a workaround? If so, I'm done with this issue!
Use this:

Code: Select all

\titleformat{\chapter}[display]
    {\centering\bfseries\large}
    {\Huge\thechapter}
    {0pt}
    {\MakeUppercase}
    []
The last mandatory argument puts code bofore the title body. Quoting titlesec's documentation:
<before-code> is code preceding the title body. The very last command can take an argument
This is important: \MakeUppercase has a mandatory argument:

Code: Select all

\MakeUppercase{<text to be uppercased>}
Regards
site moderator & package author
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Re: Increase Size of Chapter Numbers and Make Title Uppercas

Post by AleCes »

Thanks! You've been so helpful to me! ;)
nzbone
Posts: 7
Joined: Mon Jul 07, 2014 8:27 pm

Increase Size of Chapter Numbers and Make Title Uppercase

Post by nzbone »

Hi everyone,

Sorry for hijacking but I am having similar issues with chapter headings and please forgive me I only started with latex yesterday!

I want to get a title similar to the screenshot attached. I can't seem to get the following to work
1) Very large font size for the number and a smaller one for the actual chapter title
2) Colour of both the chapter title and number
3) Helvetica font

Code: Select all

\usepackage{titlesec}
\titlespacing{\chapter}{0pt}{*25}{*5}
\titleformat{\chapter}[display]
    {\filleft\bfseries\Huge}
    {\Huge\thechapter}{10pt}{\sc}
    []
Thanks so much!!
Attachments
Screen Shot 2014-07-07 at 19.22.27.png
Screen Shot 2014-07-07 at 19.22.27.png (14.25 KiB) Viewed 19240 times
Post Reply