Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Using memoir class, pagenotes package. Here is a screenshot of the problem:

odd breakline

Number 6 should follow the rest of the text, hence be in the following page.

This is the code I'm using:

% Document size 
\documentclass[a5paper,11pt,titlepage,openright]{memoir}
\setstocksize{216mm}{154mm}
\settrimmedsize{215mm}{153mm}{*}
\settrims{1mm}{1mm}
\setulmarginsandblock{20mm}{22mm}{*}
\setlrmarginsandblock{22mm}{15mm}{*}
\checkandfixthelayout
\trimLmarks

% Packages
\usepackage[british]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{type1cm}
\usepackage{nameref}
\usepackage{eurosym}
\usepackage{enumerate}
\usepackage{lettrine}
\usepackage{amsmath}
\usepackage{float}
\usepackage{hyperref}
\hypersetup{colorlinks=false,pdfborder=0 0 0}
\usepackage{tikz}
\usepackage{booktabs}
\usepackage{graphicx}
\usepackage{units}
\usepackage{endnotes}
\usepackage{tipa}
\usepackage{longtable}
\usepackage{epigraph}
\usepackage{wasysym}
\usepackage{etoolbox}
\usepackage{stfloats}
\usepackage{caption}[2010/01/03]

% Chapter titles
\usepackage{calc,fourier}
\usepackage[T1]{fontenc}
\makeatletter
\setlength\midchapskip{7pt}
\makechapterstyle{VZ21}{
  \renewcommand\chapnamefont{\Large\scshape}
  \renewcommand\chapnumfont{\Large\scshape\centering}
  \renewcommand\chaptitlefont{\huge\bfseries\centering}
  \renewcommand\printchaptertitle[1]{%
    \setlength\tabcolsep{7pt}   % used as indentation on both sides
    \settowidth\@tempdimc{\chaptitlefont ##1}%
    \setlength\@tempdimc{\textwidth-\@tempdimc-2\tabcolsep}%
\chaptitlefont
\ifdim\@tempdimc > 0pt\relax    % one line
\begin{tabular}{c}
  \toprule  ##1\\ \bottomrule
\end{tabular}
\else   % two+ lines
\begin{tabular}{
    >{\chaptitlefont\arraybackslash}p{\textwidth-2\tabcolsep}}
  \toprule ##1\\ \bottomrule
    \end{tabular}
\fi }
}
\makeatother
\chapterstyle{VZ21}

% Fix \url width
\renewcommand{\UrlBreaks}{\do\/\do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\do\k\do\l\do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w\do\x\do\y\do\z\do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M\do\N\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X\do\Y\do\Z}

% Width
\newcolumntype{M}{>{\begin{varwidth}{40mm}}l<{\end{varwidth}}} %M is for Maximal column
\linespread{1.1}

% Fix pagenotes
\let\pagenote=\endnote
\makeatletter
\renewcommand*\prenotetext{%
  \list{}{%
    \setlength\leftmargin{2.3em}%
    \setlength\topsep{-\baselineskip}}
  \item}
\renewcommand*\postnotetext{\endlist\bigskip\medskip}
\makeatother

\renewcommand*\idtextinnotes[1]{#1.\vspace*{-\baselineskip}}
\renewcommand*\notenuminnotes[1]{#1.\vspace*{-\baselineskip}}
\makepagenote

\renewcommand\enoteheading{\chapter {\notesname}%
  \mbox{}\par\vskip-\baselineskip}
\renewcommand\enoteformat{\noindent\theenmark.\hspace{5pt}}
\renewcommand\notesname{Notes}

% Section title
\setsecheadstyle{\large\uppercase}

\renewcommand*{\pagenotesubhead}[3]{\section*{#1 #2\ --\ #3}}
\renewcommand*{\pagenotesubheadstarred}[3]{\section*{#3}}

\begin{document}

\mainmatter
\pagestyle{headings}


Text.\pagenote{\emph{US Posts Stronger Solid Growth in July}, Mokoto Rich, 2011. The New York Times.\emph{US Posts Stronger Solid Growth in July}, Mokoto Rich, 2011. The New York Times.\emph{US Posts Stronger Solid Growth in July}, Mokoto Rich, 2011. The New York Times.\\\url{http://www.nytimes.com/2011/08/06/business/economy/us-posts-solid-job-gains-amid-fears.html?pagewanted=all}} 
Text.\pagenote{\emph{US Posts Stronger Solid Growth in July}, Mokoto Rich, 2011. The New York Times.\\\url{http://www.nytimes.com/2011/08/06/business/economy/us-posts-solid-job-gains-amid-fears.html?pagewanted=all}} 
Text.\pagenote{\emph{US Posts Stronger Solid Growth in July}, Mokoto Rich, 2011. The New York Times.\\\url{http://www.nytimes.com/2011/08/06/business/economy/us-posts-solid-job-gains-amid-fears.html?pagewanted=all}} 
Text.\pagenote{\emph{US Posts Stronger Solid Growth in July}, Mokoto Rich, 2011. The New York Times.\\\url{http://www.nytimes.com/2011/08/06/business/economy/us-posts-solid-job-gains-amid-fears.html?pagewanted=all}} 
Text.\pagenote{\emph{US Posts Stronger Solid Growth in July}, Mokoto Rich, 2011. The New York Times.\\\url{http://www.nytimes.com/2011/08/06/business/economy/us-posts-solid-job-gains-amid-fears.html?pagewanted=all}} 
Text.\pagenote{\emph{US Posts Stronger Solid Growth in July}, Mokoto Rich, 2011. The New York Times.\\\url{http://www.nytimes.com/2011/08/06/business/economy/us-posts-solid-job-gains-amid-fears.html?pagewanted=all}} 

\printpagenotes*

\backmatter
\clearpage


\end{document}
share|improve this question
add comment

1 Answer 1

Using your code, you create a new list with every page note that is displayed. In fact, the visible enumeration is completely separate from the list itself, hence the page break between the numbering and the actual page note.

Instead of trying to fit your page notes into the generic realm that memoir provides, I've modified the base function \mem@printpagenotes (called by \printpagenotes) to set the contents of the notes file within an enumerate, and each item in the file is set using \item.

enter image description here

% Document size 
\documentclass[a5paper,11pt,openright]{memoir}% http://ctan.org/pkg/memoir
\setstocksize{216mm}{154mm}
\settrimmedsize{215mm}{153mm}{*}
\settrims{1mm}{1mm}
\setulmarginsandblock{20mm}{22mm}{*}
\setlrmarginsandblock{22mm}{15mm}{*}
\checkandfixthelayout
\trimLmarks

% Packages
\usepackage{enumitem}% http://ctan.org/pkg/enumitem
\usepackage{hyperref}% http://ctan.org/pkg/hyperref
\hypersetup{colorlinks=false,pdfborder=0 0 0}
\usepackage{booktabs}% http://ctan.org/pkg/booktabs
\usepackage{endnotes}% http://ctan.org/pkg/endnotes

% Chapter titles
\usepackage{calc}% http://ctan.org/pkg/calc
\usepackage{fourier}% http://ctan.org/pkg/fourier
\makeatletter
\setlength\midchapskip{7pt}
\makechapterstyle{VZ21}{
  \renewcommand\chapnamefont{\Large\scshape}
  \renewcommand\chapnumfont{\Large\scshape\centering}
  \renewcommand\chaptitlefont{\huge\bfseries\centering}
  \renewcommand\printchaptertitle[1]{%
    \setlength\tabcolsep{7pt}   % used as indentation on both sides
    \settowidth\@tempdimc{\chaptitlefont ##1}%
    \setlength\@tempdimc{\textwidth-\@tempdimc-2\tabcolsep}%
\chaptitlefont
\ifdim\@tempdimc > 0pt\relax    % one line
\begin{tabular}{c}
  \toprule  ##1\\ \bottomrule
\end{tabular}
\else   % two+ lines
\begin{tabular}{
    >{\chaptitlefont\arraybackslash}p{\textwidth-2\tabcolsep}}
  \toprule ##1\\ \bottomrule
    \end{tabular}
\fi }
}
\makeatother
\chapterstyle{VZ21}

% Fix \url width
\renewcommand{\UrlBreaks}{\do\/\do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\do\k\do\l\do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w\do\x\do\y\do\z\do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M\do\N\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X\do\Y\do\Z}

\linespread{1.1}

% Fix pagenotes
\let\pagenote=\endnote

\makepagenote

\renewcommand\notesname{Notes}

% Section title
\setsecheadstyle{\large\uppercase}

\renewcommand*{\pagenotesubhead}[3]{\section*{#1 #2\ --\ #3}}
\renewcommand*{\pagenotesubheadstarred}[3]{\section*{#3}}

\makeatletter
\renewcommand\mem@printpagenotes[1]{%
  \ifmempagenotes
    \notedivision% <--- Denotes \chapter
    \IfFileExists{\jobname.ent}{%
      \begingroup
      \mem@make@gt@safe%
      \def\startnoteentry####1####2####3####4>{%
        \begingroup
        \@ResetGT
        \item[####1.]%
      }
      \def\endnoteentry{\endnoteentryend\endgroup}
      \immediate\closeout\@notefile
      \vspace*{-2\baselineskip}% Remove large skip after \chapter
      \begin{enumerate}[nosep]% <--- start list here
      \input{\jobname.ent}% Read page notes
      \end{enumerate}% <--- end list here
      \if#1\immediate\openout\@notefile=\jobname.ent\fi%
      \endgroup
    }{%
      \mempnofilewarn
    }%
  \fi%
}

\begin{document}

\mainmatter
\pagestyle{headings}


Text.\pagenote{\emph{US Posts Stronger Solid Growth in July}, Mokoto Rich, 2011. The New York Times.\emph{US Posts Stronger Solid Growth in July}, Mokoto Rich, 2011. The New York Times.\emph{US Posts Stronger Solid Growth in July}, Mokoto Rich, 2011. The New York Times.\\\url{http://www.nytimes.com/2011/08/06/business/economy/us-posts-solid-job-gains-amid-fears.html?pagewanted=all}} 
Text.\pagenote{\emph{US Posts Stronger Solid Growth in July}, Mokoto Rich, 2011. The New York Times.\\\url{http://www.nytimes.com/2011/08/06/business/economy/us-posts-solid-job-gains-amid-fears.html?pagewanted=all}} 
Text.\pagenote{\emph{US Posts Stronger Solid Growth in July}, Mokoto Rich, 2011. The New York Times.\\\url{http://www.nytimes.com/2011/08/06/business/economy/us-posts-solid-job-gains-amid-fears.html?pagewanted=all}} 
Text.\pagenote{\emph{US Posts Stronger Solid Growth in July}, Mokoto Rich, 2011. The New York Times.\\\url{http://www.nytimes.com/2011/08/06/business/economy/us-posts-solid-job-gains-amid-fears.html?pagewanted=all}} 
Text.\pagenote{\emph{US Posts Stronger Solid Growth in July}, Mokoto Rich, 2011. The New York Times.\\\url{http://www.nytimes.com/2011/08/06/business/economy/us-posts-solid-job-gains-amid-fears.html?pagewanted=all}} 
Text.\pagenote{\emph{US Posts Stronger Solid Growth in July}, Mokoto Rich, 2011. The New York Times.\\\url{http://www.nytimes.com/2011/08/06/business/economy/us-posts-solid-job-gains-amid-fears.html?pagewanted=all}} 

\printpagenotes*

\backmatter
\clearpage


\end{document}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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