2

I have a book project, and I used memoir for writing it. The book has the Table of Contents, List of Figures and List of Tables. As the book is substantially finished, the publisher wants that all the pages from Table of Contents to List of Tables have the number on the external side of the page, with the exclusion of the first page itself.

A minimal example is attached here, is not really MWE, but I show you the codes:

 \documentclass[11pt]{memoir} % for a 4long document, it wa\refs 11pt
 \usepackage{fontspec} % Font selection for XeLaTeX; see fontspec.pdf for documentation
 \defaultfontfeatures{Mapping=tex-text} % to support TeX conventions like ``---''
\usepackage{xunicode} % Unicode support for LaTeX character names (accents, European chars, etc){}
\usepackage{xltxtra} % Extra customizations for XeLaTeX
\usepackage{etoolbox}
\usepackage{polyglossia}
\usepackage{tabularx}
\setmainfont{Times New Roman}

\begin{document}
\pagestyle{simple}
\tableofcontents* % the asterisk means that the contents itself isn't put into the ToC
\clearpage
\listoffigures*
\clearpage
\listoftables*

\end{document}

This example will make having the first page of the Table of the Contents with the page number on the bottom page, plus the successive TOC pages having the number on the external side. The problem is the \clearpage command reset the \listoffigures and \listoftables commands. As figures and tables are only one page each of the respective lists, they have the page numbers cented at the bottom, while the publisher wants on the external side on the heading, like a continuation of the TOC. if I take off the \clearpage there is no problem, but the pages will look strange. So, I believe that I should redifine the \clearpage command for this specific part only, without influencing the respective other sections. In fact, the chapters are included in different files.

Suggestions appreciated as deadline forthcoming.

  • Avoid loading xunicode and xltxtra; the former is already loaded (if needed) by fontspec, the latter only adds rarely needed features. – egreg Aug 25 '16 at 8:02
4

(1) Please only use the stuff that is relevant for the question in your MWE. The fontspec stuff is irrelevant here.

(2) Have I understood you right in that only on the first page of the toc the page style has to be plain and on the others an outer pagestyle variant?

BTW: \clearpage has nothing to do with the page style here. The issue is that TOC, LOF and LOT each execute \thispagestyle{chapter} like normal chapters. We want something different. Luckily memoir have some hooks:

\documentclass[11pt,a4paper]{memoir}

\makepagestyle{outer}
\makeoddfoot{outer}{}{}{\thepage}
\makeevenfoot{outer}{\thepage}{}{}

\renewcommand\cfttocbeforelisthook{\typeout{toc}\thispagestyle{plain}}
\renewcommand\cftlofbeforelisthook{\typeout{lof}\thispagestyle{outer}}
\renewcommand\cftlotbeforelisthook{\typeout{lof}\thispagestyle{outer}}
\pagestyle{outer}
\begin{document}

\tableofcontents* % the asterisk means that the contents itself isn't put into the ToC
\clearpage
\listoffigures*
\clearpage
\listoftables*

\def\test{
  \section{Test}
  \section{Test}
  \section{Test}
  \section{Test}
  \section{Test}
  \section{Test}
  \section{Test}
  \section{Test}
}

\test\test\test\test\test\test\test\test\test\test\test



\end{document}
  • the publisher wanted the page numbers at the top of the page outside, so it was like first page of the table of contents with the page number in the centre of the page and the other numbers on the header outside. So, due to my unclear question, it should be \makeoddhead{outer}{}{}{\thepage} \makeevenhead{outer}{\thepage}{}{} for both cases. I tried and now works perfectly. – Roberto Gozzoli Aug 25 '16 at 10:12
  • @egreg, thanks for the remark. Just out of my ignorance, having both xunicode and xlxtra packages loaded in the way I have done, does it create any conflict? I believe that I created the masterfile from the example coming with TeXShop. – Roberto Gozzoli Aug 25 '16 at 10:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.