Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: How to stop \frontmatter from resetting the counter When using itmore than once

290 views
Skip to first unread message
Message has been deleted

Axel Berger

unread,
Jun 26, 2017, 11:34:14 AM6/26/17
to
drag...@googlemail.com wrote:
> What code do you put in the preambles to stop it resting the counter
> when you put it in the second time?

None. Backmatter ist backmatter and should be called such.

The numbering can be set with
\pagenumbering{roman}\setcounter{page}{}

You save the current page in a \newcounter or \newcommand at the end of
your frontmatter, add one and insert it above.

Axel

--
/¯\ No | Dipl.-Ing. F. Axel Berger Tel: +49/ 221/ 7771 8067
\ / HTML | Roald-Amundsen-Straße 2a Fax: +49/ 221/ 7771 8069
 X in | D-50829 Köln-Ossendorf http://berger-odenthal.de
/ \ Mail | -- No unannounced, large, binary attachments, please! --
Message has been deleted

Peter Flynn

unread,
Jun 26, 2017, 2:36:14 PM6/26/17
to
On 06/26/2017 03:48 PM, drag...@googlemail.com wrote:

In your Subject: *what* counter are you referring to? LaTeX has many.

> For example say you have something like:
>
> \documentclass[12pt,oneside]{book}
> ...
> ...
> \frontmatter %labels page numbers for chapters via roman numbers starting at i

Front matter is usually formatted as unnumbered sections, not chapters,
eg \clearpage\section*{Preamble}

> \chapter*{Preambles}
> \chapter*{Introduction}
>
> \mainmatter %lables page numbers for Arabic numerical starting at 1
> \chapter{Chapter 1}
> \chapter*{Chapter 2}

That looks wrong, should be \chapter

For Appendixes, use

\appendix
\chapter{Appendix}

then they will be lettered correctly.

> \frontmatter %labels page number to continue previous roman numerals, start iii

Don't use \frontmatter for back matter, use \backmatter.

Again, back matter sections are usually done as \section*

> \chapter*{Bibliography}
>
> What code do you put in the preambles to stop it resting the counter
> when you put it in the second time?

I don't under stand the question, but I *think* what you mean is you
want the roman numbering from the front matter continued in thr back
matter, right?

> So I tried back matter and it wasn't continuing. So I tried
> \newcommand i'm still trying to look at wikibooks though.

You're looking in the wrong place. Modify the meaning of \mainmatter and
\backmatter from book.cls (I don't think there is a package to do what
you want, as it's rather unusual, although perhaps the Memoir or the
KomaScript classes might do it).

=====================================================================
\documentclass[12pt,oneside]{book}
\newcounter{fmpage}
\makeatletter
\renewcommand\mainmatter{%
\clearpage
\setcounter{fmpage}{\value{page}}%
\message{page is \thefmpage}
\@mainmattertrue
\pagenumbering{arabic}}
\renewcommand\backmatter{%
\clearpage
\@mainmatterfalse
\markright{}%
\pagenumbering{roman}%
\setcounter{page}{\value{fmpage}}}
\makeatother
\begin{document}
\title{Title}
\author{Author}
\maketitle
\frontmatter
\section*{Preamble}
Stuff
\clearpage
\section*{Introduction}
Stuff
\mainmatter
\chapter{First}
Stuff
\chapter{Second}
Stuff
\appendix
\chapter{First}
\backmatter
\section*{Bibliography}
Stuff
\end{document}
======================================================================

///Peter
--
Using LaTeX? See http://latex.silmaril.ie/formattinginformation/


Axel Berger

unread,
Jun 26, 2017, 4:22:09 PM6/26/17
to
drag...@googlemail.com wrote:
> So I tried back matter and it wasn't continuing.

Of course not. From further down:

> \pagenumbering{roman}\setcounter{page}{4}
> \frontmatter

\backmatter and \frontmatter reset the page counter and change the style
of the page numbering. So of course you have to apply your own settings
after and not before those commands.
0 new messages