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/