[texhax] Memoir Class Top Margin Issue - Continuation Pages

Bruce Bosco bbosco at comtechefdata.com
Mon Nov 14 18:01:58 CET 2011


I am using Memoir class template for my thesis. One nagging problem that
I cannot seem to fix occurs on continuation pages of the TOC and the
main body. I am focusing on the TOC right now and hope that the fix will
apply to the other parts. The problem is that I need a 1.0 inch top and
bottom margin throughout the entire document. Any header must be 1"
below page top and any text double spaced below the header. I have
titile, abstract , acknowledge, first page of TOC and first page of main
text body set OK. The second page of TOC should look like this:
 
*** top of page ***
 
1"
 
Chapter                                                page
    (double space)
       Section
 
Instead, it is :
 
*** top of page ***
<< 1"
Chapter                                              page
       Section
 
(note that the above is not the actual tex output. But closely
represents the output)...
 
Similarly, the main body pages following the first page are also << 1".
I believe the top margin for these pages are the same as for the second
TOC page.
 
I have been working on this for days and have tried everything I can
come up with. The only commands that seem to do anything unfortunately
effect both the first TOC and the second. Any help would be very much
appreciated.
 
Thanks again,
 
Bruce
 
MWE:
 
.tex code:
 
    \documentclass[oneside,12pt]{memoir}
    \DoubleSpacing         % memoir's double spacing
    \usepackage{mypkg}     % this package
    \topmargin -0.4125in        % read Lamport p.163
    \evensidemargin 0in   % same as oddsidemargin but for left-hand
pages
    \textheight 9.1in
    \parskip 7.2pt           % sets spacing between paragraphs
    \parindent 0pt          % sets leading space for paragraphs
    \DoubleSpacing
    \begin{document}
    \maxtocdepth{subparagraph} % put everything into the ToC
    \pagestyle{toc}
    \tableofcontents*
    \mainmatter
    \pagestyle{toc}
    \addtocontents{toc}{\cftpagenumbersoff{chapter}}
    \addcontentsline{toc}{chapter}{CHAPTER}
    \addtocontents{toc}{\cftpagenumberson{chapter}}
    \pagestyle{plain}
    \chapter{INTRODUCTION}
    \section{Background and Motivation}
    \chapter{TWO}
    \section{Why ?}
    \chapter{THREE}
    \section{Why not ?}
    \subsection{Qualitat ave Qequirements}
    \chapter{THREE}
    \section{Qualitat ave Qequirements}
    \chapter{THREE}
    \section{Qualitat ave Qequirements}
    \chapter{THREE}
    \section{Qualitat ave Qequirements}
    \chapter{THREE}
    \section{Qualitat ave Qequirements}
    \chapter{THREE}
    \section{Qualitat ave Qequirements}
    \chapter{THREE}
    \section{Qualitat ave Qequirements}
    \chapter{THREE}
    \section{Qualitat ave Qequirements}
    \chapter{THREE}
    \section{Qualitat ave Qequirements}
    \chapter{THREE}
    \section{Qualitat ave Qequirements}
    \end{document}
 
My package file:
 
    \NeedsTeXFormat{LaTeX2e}
    \ProvidesPackage{mypkg}
 
\@ifclassloaded{memoir}{\let\endpwasu\relax}{\let\endpwasu\endinput
      \PackageError{pwasu}{The pwasu package only works with the memoir
class}{\@ehd}}
    \endpwasu
    % Some useful lengths for layout purposes
    \newlength{\toptafiddle}
    \newlength{\bottafiddle}
    \newlength{\topfiddle}
    \newlength{\botfiddle}
    \newlength{\linespace}
    \setlrmarginsandblock{1.375in}{1.375in}{*}
    %% bottom of text at 1in, footer below
    %% top of header at 1in, first text line double spaced below base
of header
    \setlength{\linespace}{\baselineskip} %% the current equivalent of
\onelineskip
    \setlength{\headheight}{\lineskip}
    \setlength{\headsep}{\linespace}
    \addtolength{\headsep}{-\topskip}
    \setlength{\uppermargin}{1in}
    \makepagestyle{asu}
    %% for continuation pages of the ToC, LoF, LoT, LoS
    \makepagestyle{toc}
      \makeevenfoot{toc}{}{\thepage}{}
      \makeoddfoot{toc}{}{\thepage}{}
      \makeevenhead{toc}{CHAPTER}{}{Page}
      \makeoddhead{toc}{CHAPTER}{}{Page}
    %% chapter style
    \makechapterstyle{asu}{%
    \setlength{\beforechapskip} {-.5\topfiddle}
    \setlength{\afterchapskip} {\onelineskip}
      \setlength{\beforechapskip}{-0.2in}
      \setlength{\afterchapskip}{3pt}
      \renewcommand*{\chapnamefont}{\normalfont}
      \renewcommand*{\chapnumfont}{\chapnamefont}
      \renewcommand*{\printchapternum}{\centering\chapnumfont
\thechapter}
 
\renewcommand*{\chaptitlefont}{\normalfont\centering\vspace*{-\onelineskip}}
      \renewcommand*{\printchapternonum}
 
    }
    %%% (subsub)section styles
    \setsecheadstyle{\centering\normalfont\vspace*{-\onelineskip}}
    \setsubsecheadstyle{\centering\itshape\vspace*{-\onelineskip}}
    \setsubsubsecheadstyle{\centering\vspace*{-\onelineskip}}
    \setlength{\aftersecskip}{3pt}
    %%%% Do the ToC
    \let\oldtoc\tableofcontents
    \renewcommand{\tableofcontents}{\clearpage\pagestyle{toc}\oldtoc}
     \renewcommand{\contentsname}{TABLE OF CONTENTS}
    \renewcommand*{\tocheadstart}{\vspace*{-.0225in}}
    \renewcommand*{\aftertoctitle}{\thispagestyle{plain}%
      \par\nobreak \mbox{}\hfill{\normalfont Page}\par\nobreak}
    \renewcommand*{\cftchapterfont}{\normalfont}
    \renewcommand*{\cftchapterpagefont}{\normalfont}
    \renewcommand*{\cftchapterleader}{%
      \cftchapterfont\cftdotfill{\cftchapterdotsep}}
    \renewcommand*{\cftchapterdotsep}{\cftdotsep}
    \setlength{\cftbeforechapterskip}{0pt plus 0pt}
    \chapterstyle{asu}
    \endinput
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20111114/8d568343/attachment-0001.html>


More information about the texhax mailing list