Theses, Books, Title pagesChanging style of numbering for the parts of a book

Classicthesis, Bachelor and Master thesis, PhD, Doctoral degree
Post Reply
fabioonier
Posts: 26
Joined: Thu Jul 06, 2017 5:37 am

Changing style of numbering for the parts of a book

Post by fabioonier »

Hello, everybody. My name is Fabio and I'm new in this forum.

I'm writing a book and I need to make a change to the numbering of chapters, sections, theorems,... The problem is that the numbers always finish with a dot (example: Theorem 1.1.) and I need to show the numbering without that dot (example: Theorem 1.1)

How could I do it?

Thanks for your attention and help.

Please, forgive me my english writing.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Changing style of numbering for the parts of a book

Post by Stefan Kottwitz »

Hi Fabio,

welcome to the forum!

Do you use a KOMA-Script document class, such as scrbook or scrreprt? In that case just add the noenddot option, such as

\documentclass[numbers=noenddot]{scrbook}

Stefan
LaTeX.org admin
fabioonier
Posts: 26
Joined: Thu Jul 06, 2017 5:37 am

Changing style of numbering for the parts of a book

Post by fabioonier »

Hi, Stefan.

I'm using just the book document class. In that case, how can I eliminate the end dot of the numbering of the parts of the book?

Thanks for your help.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Changing style of numbering for the parts of a book

Post by Stefan Kottwitz »

That numbering style is not the default with the book class. Can you please post your document settings, that is, the complete document preamble until \begin{document}?

Stefan
LaTeX.org admin
fabioonier
Posts: 26
Joined: Thu Jul 06, 2017 5:37 am

Changing style of numbering for the parts of a book

Post by fabioonier »

Hi, Stefan. This is my document settings

Code: Select all

\documentclass[letterpaper,reqno]{book}
\usepackage{makeidx}
\usepackage[spanish]{babel}
%\usepackage[latin1]{inputenc}
\usepackage[utf8]{inputenc}
\usepackage{color}
\usepackage{verbatim}
\usepackage[text={168mm,240mm},centering]{geometry}
\usepackage{amssymb,amsmath,amsthm}
\usepackage{epsfig,amssymb,amsmath,amsthm,graphicx,psfrag,float}
\usepackage[pdf]{pstricks}
\usepackage{pstricks-add,pst-math,pst-xkey,pst-pdf,auto-pst-pdf}
\usepackage[all]{xy}
\usepackage{enumerate}
\usepackage{hyperref}

\makeindex

\DeclareMathOperator{\hocolim}{hocolim}
\DeclareMathOperator{\map}{map}
\DeclareMathOperator{\mor}{Mor}
\DeclareMathOperator{\ob}{Ob}
\DeclareMathOperator{\cone}{cone}
\DeclareMathOperator{\inc}{inc}
\DeclareMathOperator{\pr}{pr}
\DeclareMathOperator{\torsion}{torsion}
\DeclareMathOperator{\im}{im}
\DeclareMathOperator{\coker}{coker}
\DeclareMathOperator{\iso}{Isom}
\DeclareMathOperator{\inte}{int}
\definecolor{Gris}{gray}{0.92}

\newtheorem{lemma}{Lema}[chapter]
\newtheorem{definition}{Definici\'on}[chapter]
\newtheorem{proposition}[lemma]{Proposición}
\newtheorem{theorem}[lemma]{\textbf{Teorema}}
\newtheorem{procedure}{\textbf{Procedimiento}}[chapter]
\newtheorem*{main}{Main Theorem}
\newtheorem{corollary}[lemma]{Corolario}

\theoremstyle{definition}
\newtheorem{example}{Ejemplo}[chapter]
\newtheorem{exercise}{}[chapter]
\newtheorem{notation}{\textbf{\textit{Notaci\'on}}}[chapter]

\theoremstyle{remark}
\newtheorem{remark}{\textbf{Observaci\'on}}

\renewcommand{\chaptername}{Capítulo}

\numberwithin{lemma}{chapter}
\numberwithin{remark}{chapter}
\numberwithin{exercise}{section}

\numberwithin{definition}{chapter}

\pagestyle{myheadings}
It's a math book. That's why I need to enumerate chapters, sections, subsections (theorems, definitions, lemmas, notations,...)

You say that the book style doesn't display the numbers with a dot at the end (e.g, 1.2.) but that's what I get in the output. I don't understand why.

Thanks for your help
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Changing style of numbering for the parts of a book

Post by Johannes_B »

The dot for section numbers is caused by the spanish option to babel. Add es-nosectiondot to the babel options.

Concerning theorems etc., they are ruled by amsthm. Use newtheoremstyle to customize their appearance.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
fabioonier
Posts: 26
Joined: Thu Jul 06, 2017 5:37 am

Changing style of numbering for the parts of a book

Post by fabioonier »

Hi, Johannes_B.
The option es-nosectiondot worked! Thanks for your help.

I was reading the documentation for \newtheoremstyle and nothing is said about how can I modify the numbering style. I guess that I have to email to the author.

Thanks for your help.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Changing style of numbering for the parts of a book

Post by Johannes_B »

If i look into amsthdoc.pdf i can see a semicolon and a comment: Punctuation after theorem head.

That should be what is doing something in your case, but to be honest, i didn't really test.

Please, let's kepp it to a forum, where many people can read and answer questions instead of asking one single person directly.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
fabioonier
Posts: 26
Joined: Thu Jul 06, 2017 5:37 am

Changing style of numbering for the parts of a book

Post by fabioonier »

Hi, everybody. The problem is solved, thanks to Johannes_B.

The amsthdoc.pdf has instructions about how to definite a new theorem enviromnment. It was simple: just define a theorem environment with what you want and then use that theorem environment.

I guess this topic is solved and closed.

Thanks to Stefan and Johannes_B for your help.
Post Reply