Text Formattingmemoir | Modify the Page Number Position

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
CharlieMAC
Posts: 19
Joined: Wed May 04, 2011 5:50 pm

memoir | Modify the Page Number Position

Post by CharlieMAC »

I'm writing my thesis using LaTeX and the memoir class, but I have some troubles with the page number in ToC and the chapter pages.

I have to follow a thesis procedure of my university, which says that the page numbers must be in the lower right corner of the page (footer). I'm using fancyhdr to place all page numbers according to this procedure, but I can't get the TOC and chapter pages have the page numbers there. They are actually in the center of the footer, and I don't know how to move them.

Any suggestion?

I provide MWE in the attachments.

Thanks in advance
Charlie
Attachments
MWE.pdf
(29.32 KiB) Downloaded 364 times
MWE.tex
(6.08 KiB) Downloaded 331 times

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

CharlieMAC
Posts: 19
Joined: Wed May 04, 2011 5:50 pm

memoir | Modify the Page Number Position

Post by CharlieMAC »

I've tried the command:

Code: Select all

\tableofcontents{\thispagestyle{fancy}}
But it doesn't work. The page number of the page is in center of the footer, even though I configured it to be in the right footer.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

memoir | Modify the Page Number Position

Post by localghost »

Pages that introduce a new chapter are typeset with the plain page style by default. In my opinion you should not use fancyhdr, but instead the built-in mechanisms of the class file. For details refer to Sections 7.2 and 7.3 of the memoir manual.


Thorsten
CharlieMAC
Posts: 19
Joined: Wed May 04, 2011 5:50 pm

memoir | Modify the Page Number Position

Post by CharlieMAC »

I tried the following code (according to Thorsten suggestion):

Code: Select all

\makepagestyle{thesis}
\makeevenfoot{thesis}{}{}{-\thepage-}
\makeoddfoot{thesis}{}{}{-\thepage-}
\pagestyle{thesis}
And it partially solved my problem. The chapter pages have now the folio (page number) in the right foot, as it says the code above. However, the TOC doesn't seem to be affected by this code. In fact, the folio is still in the center of the footer instead of the right side, even though I tried the instruction:

Code: Select all

\tableofcontents{\thispagestyle{thesis}}
Is there anyway to force the pagestyle of the TOC?

Thanks in advance
Charlie
Last edited by CharlieMAC on Wed Sep 14, 2011 6:03 am, edited 1 time in total.
CharlieMAC
Posts: 19
Joined: Wed May 04, 2011 5:50 pm

Re: memoir | Modify the Page Number Position

Post by CharlieMAC »

I discovered something weird. The list of figures and the list of tables DO respond to the code I wrote in the previous reply. Is only the TOC that still keeps the folio in the center of the footer.

Thanks for your answers
Charlie
CharlieMAC
Posts: 19
Joined: Wed May 04, 2011 5:50 pm

Re: memoir | Modify the Page Number Position

Post by CharlieMAC »

THere's something I haven't mentioned so far. The ONLY page that doesn't obey the heading/footer configuration is the first page of the table of contents. In the MWE I provided, the TOC is just one page long, but I realized that the rest of the pages of the TOC DO respond to the heading/footer config.

Is still being weird for me.

Is there any way to hack TOC or force it to obey what I want it to do?

Thanks in advance

CHARLIE
Post Reply