Text Formatting\backmatter chapter gets absorbed by preceding chapter ??!

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

\backmatter chapter gets absorbed by preceding chapter ??!

Post by AleCes »

I've got a problem.
This is my prologue:

Code: Select all

\documentclass[a4paper, 12pt, openany, draft]{book}
\usepackage{a4wide}
\usepackage{fontspec}
\usepackage{paralist}
\defaultfontfeatures{Mapping=tex-text}
\setmainfont{Tinos}
\usepackage{polyglossia}
\setmainlanguage{french}
\setotherlanguages{dutch, english, german, latin, italian, spanish}
\setotherlanguage[variant=ancient]{greek}
\usepackage{xunicode}
\usepackage{xltxtra}
\usepackage{bookmark}
\setcounter{tocdepth}{1}
\raggedbottom
\usepackage{soul}
\newfontfamily\greekfont[Script=Greek]{Tinos}
\newcommand{\og}{\guillemotleft}
\newcommand{\fg}{\guillemotright}
\usepackage{enumitem}
\setenumerate{nolistsep}
\setitemize{nolistsep, label=$-$}
\usepackage{footmisc}
%\setcounter{secnumdepth}{4}


\makeatletter
	\long \def \@makefntext #1%
		{%
			\noindent 
			\makebox [25pt][r]{\@thefnmark.\,}#1%
      	}
\makeatother

\renewcommand*\thesection{\arabic{section}}
\usepackage{fancyhdr}


\renewcommand{\sectionmark}[1]{\markright{#1}}

\usepackage{titlesec}
\setcounter{secnumdepth}{4}
\renewcommand*{\thesection}{\arabic{section}}
\renewcommand*{\thesubsubsection}{\alph{subsubsection}}
\titleformat{\subsection}[runin]{\normalfont\bfseries}{\thesubsection}{0.5em}{}[\quad]
\titleformat{\subsubsection}[runin]{\normalfont\bfseries}{\thesubsubsection)}{0.5em}{}[\qquad]
Then I have

Code: Select all

\begin{document}
\tableofcontents
\frontmatter
\chapter{bla}
\mainmatter
\part{bla}
\chapter{bla}
\chapter{bla}
\chapter{bla}
\chapter{bla}
\chapter{bla}
\chapter{bla}
\chapter{bla}
\part{bla}
\chapter{bla}
\backmatter
\chapter{bla}
\end{document}
Now, the \chapter{bla} in \backmatter to all extents and purposes (section numberings etc..., it gets absorbed by the preceding chapter (the eighth). What's wrong with that :?:

Thanks for your help.

Recommended reading 2024:

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

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

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

\backmatter chapter gets absorbed by preceding chapter ??!

Post by Stefan Kottwitz »

This code doesn't have the problem. It's somewhere else in your code which you did not show. Please post a compilable Infominimal working example, which shows that problem, it should not be much more than what you already posted. You can hack down a copy of your document for that.

I tried your code and it works as it is - I only changed the font which I don't have on my system and did not use polyglossia.

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

Re: \backmatter chapter gets absorbed by preceding chapter ?

Post by AleCes »

Hi Stefan.

Please try adding random sections and subsections, especially in the 8th and last chapter (the one in \backmatter) and see if the numeration is progressive or if it is reset at the start of every chapter.

Otherwise I can e-mail you my tex file, it's too big (<256kb) to fit into an attach here.

Regards
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

\backmatter chapter gets absorbed by preceding chapter ??!

Post by Stefan Kottwitz »

Still chapters and sections are not absorbed. The chapter numbering is turned off, but that's the purpose of \backmatter. So also section numbering is progressive. If you don't want that, don't use \backmatter. Why do you use it at all?

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

\backmatter chapter gets absorbed by preceding chapter ??!

Post by AleCes »

Stefan_K wrote:Still chapters and sections are not absorbed. The chapter numbering is turned off, but that's the purpose of \backmatter. So also section numbering is progressive. If you don't want that, don't use \backmatter. Why do you use it at all?

Stefan
Yes, I experienced the same situation you've described. I was wrong to talk of "absorption". To answer your question: I use it because I don't want the last chapter (the epilogue) to receive a chapter number, just like the prologue (which goes in \frontmatter) doesn't. It's a question of symmetry.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

\backmatter chapter gets absorbed by preceding chapter ??!

Post by Stefan Kottwitz »

So just use \backmatter right before the epilogue. This chapter would not be numbered, as desired. A backmatter usually contains bibliography, index and similar, as unnumbered chapters. Usually it doesn't contains sections within unnumbered chapters. You noticed, it can be inconsistent then, because there's no leading chapter number any more. Also section numbers within an unnumbered epilogue don't seem good to me - why number within but not the upper level. You could use unnumbered sections if sections at all.

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

\backmatter chapter gets absorbed by preceding chapter ??!

Post by AleCes »

Stefan_K wrote:So just use \backmatter right before the epilogue. This chapter would not be numbered, as desired. A backmatter usually contains bibliography, index and similar, as unnumbered chapters. Usually it doesn't contains sections within unnumbered chapters. You noticed, it can be inconsistent then, because there's no leading chapter number any more. Also section numbers within an unnumbered epilogue don't seem good to me - why number within but not the upper level. You could use unnumbered sections if sections at all.

Stefan
That's what I did, putting \backmatter before \chapter{Epilogue}, but it doesn't work! Also notice I have customized section numberings that do not display the chapter number:

Code: Select all

\usepackage{titlesec}
\setcounter{secnumdepth}{4}
\renewcommand*{\thesection}{\arabic{section}}
\renewcommand*{\thesubsubsection}{\alph{subsubsection}}
\titleformat{\subsection}[runin]{\normalfont\bfseries}{\thesubsection}{0.5em}{}[\quad]
\titleformat{\subsubsection}[runin]{\normalfont\bfseries}{\thesubsubsection)}{0.5em}{}[\qquad]
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

\backmatter chapter gets absorbed by preceding chapter ??!

Post by Stefan Kottwitz »

AleCes wrote:That's what I did, putting \backmatter before \chapter{Epilogue}, but it doesn't work!
Well, it worked for me as expected and as I described. I also used your code with the customized section numbering. Perhaps you expected something different which is not yet clear - for example what the section numbering in the epilogue should be, if at all. A compilable Infominimal working example together with a clear explanation would have been good and always would be. I think then we would not have this long discussion with the goal of finding out what is meant. I cannot say if I have more time for this today or even this week, as I travel tommorrow, to the DANTE TeX meeting.

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

Re: \backmatter chapter gets absorbed by preceding chapter ?

Post by AleCes »

OK, just take your time. I was thinking of something of a quick fix, that resets the section (and subsection) numbering at the beginning of the last chapter.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

\backmatter chapter gets absorbed by preceding chapter ??!

Post by Stefan Kottwitz »

For such numbering fixes the chngcntr package is usually a good tool.

Stefan
LaTeX.org admin
Post Reply