Page LayoutHelp getting correct page numbering for TOC using Memoir

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
barndog
Posts: 4
Joined: Fri Aug 21, 2009 11:10 am

Help getting correct page numbering for TOC using Memoir

Post by barndog »

Code: Select all

\newcommand*{\memfontfamily}{lbr}
\newcommand*{\memfontpack}{lucidabr}
\documentclass[11pt,letterpaper,extrafontsizes,oneside]{memoir}
\usepackage{titlesec}
\usepackage{titletoc}
\usepackage{chngcntr}
\usepackage{lucidabr}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
%\documentclass[10pt,letterpaper,truedoublespace]{BSeasyNIUthesis}
\special{papersize=8.5in,11in}
\usepackage{amstext}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{longtable}
\usepackage{rotating}
\usepackage{harvard}
%\usepackage{natbib}
\usepackage{graphicx}
\usepackage{pictexwd}
\usepackage{mflogo}
\usepackage{afterpage}
\usepackage{float}
%\usepackage{titletoc}
\renewcommand{\textfraction}{0.15}
\renewcommand{\topfraction}{0.85}
\renewcommand{\bottomfraction}{0.65}
\renewcommand{\floatpagefraction}{0.60}


\renewcommand{\thesection}{\arabic{section}}
\settocdepth{paragraph}
\setsecnumdepth{paragraph}
\addtodef{\appendix}{}{\renewcommand{\thesection}{\Alph{section}}}




\makeatletter
\newcommand\listappname{List of Appendices}
\newcommand\listofappendices{%
    \chapter*{\listappname
        \@mkboth{%
           \MakeUppercase\listappname}{\MakeUppercase\listappname}}%
    \@starttoc{app}}
\newcounter{myapp}
\newcommand*{\l@myappendix}[2]{%
  \stepcounter{myapp}%
  \ifnum \c@tocdepth >\m@ne
     \vskip \cftbeforechapterskip
    {\leftskip \cftchapterindent\relax
     \rightskip \@tocrmarg
     \parfillskip -\rightskip
     \parindent \cftchapterindent\relax\@afterindenttrue
     \interlinepenalty\@M
     \leavevmode
     \@tempdima \cftchapternumwidth\relax
     \let\@cftbsnum \cftchapterpresnum
     \let\@cftasnum \cftchapteraftersnum
     \let\@cftasnumb \cftchapteraftersnumb
     \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
     {\cftchapterfont\Alph{myapp}\enspace #1}\nobreak
     \cftchapterfillnum{#2}}
  \fi}
\makeatother

%\usepackage{aer}
%\usepackage{aertt}
%\usepackage{ulem}
%\usepackage{cje}
%\usepackage{et}
%\usepackage[light,all]{draftcopy}
%\usepackage{fancyhdr}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\pagestyle{plain}
%\usepackage{hyperref}
%\usepackage{setspace}

%%%%% CHANGE PERSONAL INFORMATION BELOW FOR YOUR TITLE AND SIGN-OFF SHEETS
\def\fullname{Barney Schwartz}
\def\department{Economics}
\def\fulltitle{Income Distribution of Taiwan between 1980 and 1999}
\def\major{Economics}
\def\dissertation{Dissertation}
\def\degree{Doctor of Philosophy}
\def\thisyear{2002}
\def\thismonth{November}
\begin{document}

%\book*{Income Distribution in Taiwan 1979-2004}
%\include{certpage}%this provides the niu dissertation certification sheet
%\include{titlepage}
\pagenumbering{roman}

%\topmatter
%\pagestyle{empty}
%\include{ABSTRACT}%THIS GETS YOU NIU ABSTRACT COVERPAGE

%\include{ded}%THIS GETS A DEDICATION PAGE. TO ACTIVATE REMOVE THE LEADING \% SIGN
%\include{acknow}

\addcontentsline{toc}{chapter}{List of Appendices}

\tableofcontents*

\listofappendices
\newpage
\listoffigures
\newpage
\listoftables
\newpage
%\addtocontents{toc}{\protect\vspace{0.3in}
%{\parindent 0pt}}
%\pagestyle{myheadings}
%\setcounter{page}{1}
%\pagenumbering{arabic}

\mainmatter

\startcontents[toc]
\printcontents[toc]{}{0}{\setcounter{tocdepth}{4}}


\input{chap1}

\input{chap3}

\input{chap2}

\input{chap4}

\input{chap5}

\include{chap6}

\input{chap7}

\input{chap8}

\input{chap9}

\stopcontents[toc]

%\singlespacing
% BEGIN backmatter HERE!
\setcounter{secnumdepth}{3}

\resumecontents[toc]

\appendix
\appendixpage

\input{appa}
%\input{appaa}
\input{appb}
\input{appc}



\bibliography{mybib}
%\bibliographystyle{aertt}
%\bibliographystyle{cje}
\bibliographystyle{econometrica}
%\bibliographystyle{et}
%\bibliographystyle{kluwer}

\stopcontents[toc]

\end{document}
I have the above code but it results in WRONGLY numbering List of Appendices as page i when it should be page iii. I have searched all over. Could someone point me to the correct code to fix this. Also I get an EXTRA TOC which causes the document text to start on page 3 instead of page 1.

HELP PLEASE

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Help getting correct page numbering for TOC using Memoir

Post by gmedina »

Hi,

I see that you are using some of the code I wrote for S_David in this other thread:

Separate List of Appendices.

Now I am a little busy... Anyway, to avoid duplicated ToCs, simply delete the \tableofcontents* command.

As soon as I have some time, I will give you some other recommendations.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
barndog
Posts: 4
Joined: Fri Aug 21, 2009 11:10 am

Re: Help getting correct page numbering for TOC using Memoir

Post by barndog »

Yes I am and I THANK YOU!! If you are ever in the neighbirhood of Chicago, Illinois I would really like to meet you. Thanks for the code, the suggestions and you interest. If you accept private messages I would like to begin a dialogue with you.
Post Reply