使用memoir
类、pagenotes
包。以下是问题截图:
数字 6 应遵循文本的其余部分,因此位于下一页。
这是我正在使用的代码:
% 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}
答案1
使用您的代码创建一个新列表每一个显示的页注。事实上,可见的枚举与列表本身完全分开,因此编号和实际页注之间有分页符。
不要试图将你的页面注释放入通用的领域中,memoir
提供,我修改了基本函数\mem@printpagenotes
(由 调用\printpagenotes
)以在 中设置笔记文件的内容enumerate
,并且使用 来设置文件中的每个项目\item
。
% 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}