1

Is there any way to make two distinct aliaspagestyles for different parts of the document. That is to say, can I make one aliaspagestyle for the first page of the TOC while having a different one for the rest of the document?

The problem I want to fix:

Frontmatter pages should be displayed as i ii iii, while in the rest of the document should be displayed as 1/10 2/10 3/10 etc. While at the same time retaining supression of header on the first page the TOC and the chapters and have the option of editing the header for the rest of the TOC pages separately from the mainmatter pages.

\documentclass[12pt,a4paper,onecolumn,oneside,final]{memoir}
\usepackage[english]{babel}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{newcent}
\usepackage[utf8x]{inputenc}
\usepackage[textwidth=14cm,textheight=22cm]{geometry}
\usepackage{lipsum}


\makepagestyle{TOC} % For the mainmatter
\makepsmarks{TOC}{\nouppercaseheads
\createplainmark{toc}{left}{\contentsname}}
\makeoddhead{TOC}{Something}{}{}
\makeoddfoot{TOC}{}{}{\thepage}

\makepagestyle{HDR} % For the mainmatter
\makepsmarks{HDR}{\nouppercaseheads
    \createmark{chapter}{left}{nonumber}{}{\space}
    \createmark{section}{right}{nonumber}{}{\space} 
    \makefootrule{HDR}{14cm}{\normalrulethickness}{8pt}
    \makeheadrule{HDR}{14cm}{\normalrulethickness}
    \createplainmark{toc}{left}{\contentsname}
    \createplainmark{lof}{left}{\listfigurename}
    \createplainmark{lot}{left}{\listtablename}
    \createplainmark{bib}{left}{\bibname}
    \createplainmark{index}{both}{\indexname}
    \createplainmark{glossary}{both}{\glossaryname}}
\makeoddhead{HDR}{Something else}{}{}
\makeoddfoot{HDR}{}{}{\thepage\ / \thelastpage}

\makepagestyle{ALI} % Alias for the mainmatter
\makeoddfoot{ALI}{}{}{\small \thepage\ / \thelastpage}
\makefootrule{ALI}{14cm}{\normalrulethickness}{8pt}
\aliaspagestyle{chapter}{ALI}
\aliaspagestyle{part}{ALI}

\begin{document}
\frontmatter
\tableofcontents \pagestyle{TOC}
\mainmatter \pagestyle{HDR}
\chapter{A chapter}
\lipsum
\chapter{A chapter}
\lipsum
\chapter{A chapter}
\lipsum
\chapter{A chapter}
\lipsum
\chapter{A chapter}
\lipsum
\chapter{A chapter}
\lipsum
\chapter{A chapter}
\lipsum
\chapter{A chapter}
\lipsum
\chapter{A chapter}
\lipsum
\chapter{A chapter}
\lipsum
\chapter{A chapter}
\lipsum
\chapter{A chapter}
\lipsum
\chapter{A chapter}
\lipsum
\chapter{A chapter}
\lipsum
\chapter{A chapter}
\lipsum
\chapter{A chapter}
\lipsum
\chapter{A chapter}
\lipsum
\chapter{A chapter}
\lipsum
\chapter{A chapter}
\lipsum
\chapter{A chapter}
\lipsum
\chapter{A chapter}
\lipsum
\end{document}

I made a whole lot of lipsum chapters so you can see what I mean in the TOC. The only problem is the numbering of the first page.

1 Answer 1

2

I am not entirely sure that I understand your question, but I think that you are just trying to control the footers in different parts of your document and that the main problem is that headers and footers for the first page of a chapter, for example, are different to those on other pages.

There seems to be two issues with your code. First is that you should set the page style before the pages where you want the change to take effect -- currently you switch to your TOC style, for example, after writing \tableofcontents. Similarly, you need to end the page with \clearpage or \newpage before switching styles. Secondly you need a new page style for the first page of your table of contents.

You can solve the second issue by defining something like:

\makepagestyle{ALItoc} % Alias for the mainmatter
\makepsmarks{ALItoc}{\nouppercaseheads
  \makeoddfoot{ALItoc}{}{}{\small \thepage}
  \makefootrule{ALItoc}{14cm}{\normalrulethickness}{8pt}
  \makeoddhead{ALItoc}{}{}{}
}

Now you can solve the remaining issues with:

\frontmatter
\pagestyle{TOC}
\aliaspagestyle{chapter}{ALItoc}
\tableofcontents\clearpage
\aliaspagestyle{chapter}{ALI}
\pagestyle{HDR}
\mainmatter

If I have understood your question then I think that this answers your question.

1
  • Great! :0D As you can probably tell, I have no clue really what I'm doing, and it has taken me around five days to setup the template for my thesis... I only have one thing left now, and then I'm done.. Thanks a bunch!
    – Faergen
    Commented Aug 29, 2014 at 15:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .