Text FormattingAppendix - section numbering

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
silviahfuente
Posts: 1
Joined: Sun Jun 17, 2018 8:49 pm

Appendix - section numbering

Post by silviahfuente »

I have a problem with my appendix environment. My appendix has two chapter with sections and subsections. In the first chapter the sections and subsections numbering are A.0.1 and A.0.1.1, respectivelly. In the second chapter I have, B.1 and B.1.1. I want section and subsection numbering like second chapter.
Please see example below.

Code: Select all

\begin{appendices}
	\pagestyle{empty}
	\pagestyle{fancy}
	\fancyhead[RO]{}
	\fancyhead[RE]{\textit{Development of new products from polyols of biomass}}
	\fancyhead[LO]{Apêndice \thechapter}
	\fancyhead[CO]{\nomecapitulo}
	\fancyhead[LE]{}
	\fancyfoot[C]{}
	\fancyfoot[LE,RO]{\bfseries\thepage}
	\renewcommand{\headrulewidth}{1.5pt}
	\renewcommand{\footrulewidth}{1.5pt}

	\renewcommand\chaptername{Appendix}
	\addtocontents{toc}{\protect\setcounter{tocdepth}{1}} 
	\makeatletter
	\addtocontents{toc}{%
		\begingroup
		\let\protect\l@chapter\protect\l@section
		\let\protect\l@section\protect\l@subsection
	}
	\makeatother
		
	\chapter{Procedures}
	
	\subsection{Chemical Composition of Raw Materials}\label{feedstock}

\chapter{Instrumental techniques}
	
	\section{Spectroscopic techniques}
Last edited by Stefan Kottwitz on Wed Jun 20, 2018 12:25 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.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Appendix - section numbering

Post by Johannes_B »

Please post a compilable document, not just a code snippet.

From what i can see, you are doing some strange stuff that should not be needed if used properly.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Appendix - section numbering

Post by Stefan Kottwitz »

Welcome to the forum!

The problem is right here:

Code: Select all

\chapter{Procedures}
 
\subsection{Chemical Composition of Raw Materials}
You don't have a section in this chapter, before you start a subsection. So the section number stays 0. Just write \section{Chemical Composition of Raw Materials} or insert another section heading to get a section 1 in chapter A, to get the subsection A.1.1.

Stefan
LaTeX.org admin
Post Reply