如何做盲注尾注

如何做盲注尾注

“盲尾注”由尾注引用的页码、文本中尾注编号前面的文本以及尾注文本组成。文本本身没有尾注编号。此结构用于所有尾注(在本例中,在使用回忆录文档类的书中)。这已成为面向普通大众而非学者的书籍的流行尾注样式。

文本如下所示(假设文本在第 3 页):

这是带有尾注的文本,将出现在尾注中,但没有尾注编号。

尾注如下:

3   “无尾注编号”:这是尾注的正文。”

尾注文本的右侧参差不齐。左侧是左对齐的,文本的左边距与脚注文本的开头齐平(在示例中,与开头的引号齐平)。

我开始未编号的尾注,按页码和摘录引用 这让我接近了我想要的结果。我玩过enotez和其他包,但我离期望的结果更远了,而不是更接近了。我有三个无法解决的问题:

  1. 我无法用页码替换尾注编号(在尾注中)(它尝试重新定义@makeenmarkpageref,但没有成功)。页码后不应有句号。

  2. 我无法在删除章节编号的章节(即前言和结论)的尾注中获得标题。我知道我需要额外的代码来解决 * 版本的章节标题,但我尝试的组合没有得到想要的结果。

  3. 当一章没有尾注时(不太可能,但有可能),我希望从尾注中省略该章标题。在示例中,第二章的标题不会出现在尾注中。

我已经达到了目前能力的极限。我的 MWE 如下:

\documentclass{memoir}

\usepackage{endnotes}
\usepackage{etoolbox}
\usepackage{ebgaramond}

\makeatletter
\def\endnote{\@ifnextchar[\@xendnote{\stepcounter{endnote}%
    \protected@xdef\@theenmark{\theendnote}%
    \label{en:\@theenmark}%
    %\@endnotemark
    \@endnotetext}}

\def\@makeenmark{\pageref{en:\@theenmark}}

\renewcommand{\enotesize}{\normalsize}
\renewcommand\enoteformat{%
    \raggedright
    \leftskip=1.8em
    \makebox[0pt][r]{\theenmark. \rule{0pt}{\dimexpr\ht\strutbox}}%
 }
\apptocmd{\@makechapterhead} {\addtoendnotes{\protect\subsection* {\textsc{\MakeLowercase{\thechapter: #1}}}\indent}}{}{}
\makeatother

\begin{document}

\tableofcontents

\chapter*{Preface}
    \addcontentsline{toc}{chapter}{Preface}
This is a sentence in the preface.\endnote{\textbf{``in the preface'':} This is the preface endnote. I have made each of the endnotes long so that the text will wrap.}

\chapter{First Chapter}
This is a sentence in the first chapter.\endnote{\textbf{``the first chapter'':} This is the first chapter endnote. I have made each of the endnotes long so that the text will wrap.}

\chapter{Second Chapter}
This is a sentence in the second chapter; it does not have an endnote.

\chapter{Third Chapter}
This is a sentence in the third chapter.\endnote{\textbf{``the third chapter'':} This is the third chapter endnote. I have made each of the endnotes long so that the text will wrap.}

\chapter*{Conclusion}
    \addcontentsline{toc}{chapter}{Conclusion}
This is a sentence in the conclusion.\endnote{\textbf{``in the conclusion'':} This is the conclusion endnote. I have made each of the endnotes long so that the text will wrap.}

\clearpage

\theendnotes

\end{document}

MWE 给我以下结果(在尾注中没有前言或结论标题,也没有页码而是尾注编号): 在此处输入图片描述

答案1

Memoir 提供了\pagenote作为包的替代方案endnote来创建尾注。通过调整代码,\pagenote您可以获得正确的盲注尾注。以下代码基于回忆录类尾注 \idtextinnotes 和 \printpageinnotes 的反向顺序以获得期望的结果。

请注意,尾注的页码后面是空格,然后是显示尾注与章节文本(引用并以粗体显示)关联的文本,冒号,然后是尾注文本。还请注意,包含文本的段落是左对齐的。这遵循了出版商通常使用的格式。

这个解决方案也解决了我提出的三个问题:

  1. 它显示的是尾注的页码而不是尾注编号。
  2. 它在注释中包含了未编号章节的标题(例如,前言、结论)。
  3. 它不显示没有尾注的章节的标题。
\documentclass{memoir}`

\usepackage{ebgaramond}
\makepagenote
\notepageref

\makeatletter
\renewcommand*{\notedivision}{{\chapter*\notesname}}
\renewcommand*{\pagenotesubhead}[3]{\section*{#2: #3}}
\renewcommand\pagenotesubheadstarred[3]{\section*{#2 #3}}
\renewcommand*{\idtextinnotes}[1]{\textbf{``#1'':}\hskip .5em}
\renewcommand*{\pageinnotes}[1]{\pageref{#1}\hskip .5em}
\renewcommand{\prenoteinnotes}{\par\noindent\hangindent 2em}
\renewcommand\startnoteentrystart[4]{%
  \prenoteinnotes
  \pageinnotes{#3}
  \hskip 1em
  \noteidinnotes{#1}{#2}
  \@ifmtarg{#2}{\def\@currentlabel{#1}}{}
  \pagenoteanchor{#4}
  \prenotetext%
}
\makeatother

\begin{document}

\tableofcontents*

\chapter*{Preface}
    \addcontentsline{toc}{chapter}{Preface}

This is a sentence in the preface.\pagenote[in the preface]{This is the preface endnote. I have made each of the endnotes long so that the text will wrap.} This is a second sentences in the preface, to test what happens when there are two notes.\pagenote[are two notes]{This is the second preface endnote. I have made each of the endnotes long so that the text will wrap.}

\chapter{First Chapter}

This is a sentence in the first chapter.\pagenote[the first chapter]{This is the first chapter endnote. I have made each of the endnotes long so that the text will wrap.}

\chapter{Second Chapter}

This is a sentence in the second chapter; it does not have an endnote.

\chapter{Third Chapter}

This is a sentence in the third chapter.\pagenote[the third chapter]{This is the third chapter endnote. I have made each of the endnotes long so that the text will wrap.}

\chapter*{Conclusion}
    \addcontentsline{toc}{chapter}{Conclusion}

This is a sentence in the conclusion.\pagenote[in the conclusion]{This is the conclusion endnote. I have made each of the endnotes long so that the text will wrap.}

\clearpage

\printpagenotes
    \addcontentsline{toc}{chapter}{Notes}

\end{document}

这是输出:

在此处输入图片描述

相关内容