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

Page number on first page of chapters (memoir class)

383 views
Skip to first unread message

José Carlos Santos

unread,
Aug 6, 2007, 1:16:57 PM8/6/07
to
Hi all,

I am typesetting a book using the memoir class. I want that:

1) the first page of a chapter may be both on odd-numbered and
even-numbered pages;

2) on any page, the page number is located at the footer and,
furthermore, at the left on even-numbered pages and on the right
otherwise.

However, I am unable to have success concerning the second item on the
first pages of chapters. Consider the following file:

\documentclass[openany]{memoir}
\chapterstyle{section}
\makeevenfoot{chapter}{\thepage}{}{}
\makeoddfoot{chapter}{}{}{\thepage}
\pagestyle{empty}
\begin{document}
\mainmatter
\chapter{Begin}\thispagestyle{empty}
One\newpage Two
\end{document}

On page one, the page number is centered. The memoir package
documentation says that "\chapter calls \thispagestyle{chapter}" and
that's why, in order to solve my problem, I added the lines

\makeevenfoot{chapter}{\thepage}{}{}
\makeoddfoot{chapter}{}{}{\thepage}

but I still get the page number centered at the first line. What
should I do?

Best regards,

Jose Carlos Santos

Lars Madsen

unread,
Aug 7, 2007, 4:15:19 AM8/7/07
to

hmm, your example show no headers or footers at all.

the chapter pagestyle is not a pagestyle on its own, it is an alias for plain,
and as such changing it does not always work

this normally works

\copypagestyle{chapter}{plain}


\makeevenfoot{chapter}{\thepage}{}{}
\makeoddfoot{chapter}{}{}{\thepage}

the copy line makes chapter into a 'real' pagestyle that can then be changed

--

/daleif (remove RTFSIGNATURE from email address)

LaTeX FAQ: http://www.tex.ac.uk/faq
LaTeX book: http://www.imf.au.dk/system/latex/bog/ (in Danish)
Remember to post minimal examples, see URL below
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl
http://www.minimalbeispiel.de/mini-en.html

José Carlos Santos

unread,
Aug 7, 2007, 7:32:59 AM8/7/07
to

> hmm, your example show no headers or footers at all.

Sorry. I forgot to add the lines

\makeevenfoot{empty}{\thepage}{}{}
\makeoddfoot{empty}{}{}{\thepage}

to the preamble of the document.

> the chapter pagestyle is not a pagestyle on its own, it is an alias for
> plain, and as such changing it does not always work
>
> this normally works
>
> \copypagestyle{chapter}{plain}
> \makeevenfoot{chapter}{\thepage}{}{}
> \makeoddfoot{chapter}{}{}{\thepage}
>
> the copy line makes chapter into a 'real' pagestyle that can then be
> changed

Great! It worked.

0 new messages