尾注

尾注

我之前已经尝试过了

两栏中的尾注:如何将 \section 放在一栏中?

但我还没能找到解决方案。这就是我所寻找的:

尾注 (a) 按章节编号,(b) 排版为两栏,(c) 以章节标题作为页眉,(d) 排版为一栏。

以下是我的示例:

\documentclass{book}
\usepackage{enotez,multicol}
\usepackage{kantlipsum,mwe}

\EnotezCurrentSplitTitle
\setenotez{list-name={},
reset = true,
split = chapter,
split-sectioning = {chapter},
split-heading = {\chapter*{#1}},
split-title={}
}

\begin{document}

\chapter{Erstes Kapitel}
Text\endnote{\kant[1]}. Text\endnote{\kant[2]}.     
Text\endnote{\kant[3];\kant[4]}.
Text\endnote{\kant[5];\kant[6]}.

\chapter{Zweites Kapitel}

Text\endnote{\kant[1]}. Text\endnote{\kant[2]}.    
Text\endnote{\kant[3];\kant[4]}.
Text\endnote{\kant[5];\kant[6]}.

\newpage

\appendix
\begin{multicols}{2}
\printendnotes
\end{multicols}
\end{document}

\end{document}

我没有被 enotez 包困住。任何帮助我都感激不尽。谢谢。

编辑:我尝试显示结果:

尾注

第一章(单列标题)

  1. 左栏有尾注。2. 右栏有尾注。

第二章(单列标题)

  1. 左栏有尾注。2. 右栏有尾注。

答案1

我昨天将 v0.8 上传到 CTAN,其中包含必要的修复,因此\AtEveryEndnotesList\AtEveryListSplit(和相关的)钩子可以按广告宣传的那样工作。

这个想法是使用这些钩子来开始和结束mulicols列表(不包括标题):

\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{enotez,multicol}
\usepackage{kantlipsum,microtype}

\setenotez{
  reset = true,
  split = chapter,
}

\AtEveryEndnotesList{\begin{multicols}{2}} % before the whole list
\AfterEveryEndnotesList{\end{multicols}}   % after the whole list
\AfterEveryListSplit{\begin{multicols}{2}} % after a sub-heading in the splitted list
\AtEveryListSplit{\end{multicols}}         % before a sub-heading in the splitted list

% column sep between columns in a multicols env:
\setlength\columnsep{22pt}

\begin{document}

\chapter{Superduper}
Text\endnote{\kant[1]}. Text\endnote{\kant[2]}.     
Text\endnote{\kant[3];\kant[4]}.
Text\endnote{\kant[5];\kant[6]}.

\chapter{Eher langweilig}
Text\endnote{\kant[1]}. Text\endnote{\kant[2]}.    
Text\endnote{\kant[3];\kant[4]}.
Text\endnote{\kant[5];\kant[6]}.

\newpage

\appendix
\chapter*{Anmerkungen}
\printendnotes

\end{document}

在此处输入图片描述

将实际章节标题作为列表的子标题需要做更多工作:我们需要一个类似zref及其titleref模块,\label位于每一个\ref章节以及子标题中的标签的可能性:

我们\usepackage[user,titleref]{zref}可以在 \ztitleref{}`\zlabel{<label>}之后使用\chapter's and use来获取相应的章节标题。为了不必一直手动获取标签,我们可以这样做:

\usepackage{xparse}
\let\oldchapter\chapter
\RenewDocumentCommand\chapter{som}{%
  \IfBooleanTF{#1}
    {\oldchapter*{#3}}
    {%
      \IfNoValueTF{#2}
        {\oldchapter{#3}}
        {\oldchapter[#2]{#3}}%
      \zlabel{ch:\arabic{chapter}}%
    }%
}

ch:<num>每次\chapter使用时都会放置一个 zlabel 。使用新的\NewSplitTitleTag宏,enotez我们现在可以像副标题一样获取章节标题:

\NewSplitTitleTag{chapter title}{\ztitleref{ch:<split-level-id>}}
\setenotez{
  reset = true,
  split = chapter,
  split-title = {<name> <ref>: <chapter title>}
}

在此处输入图片描述

完整代码:

\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{enotez}[2015/06/24]
\usepackage{multicol}
\usepackage{kantlipsum,microtype}

\usepackage[user,titleref]{zref}
\usepackage{xparse}
\let\oldchapter\chapter
\RenewDocumentCommand\chapter{som}{%
  \IfBooleanTF{#1}
    {\oldchapter*{#3}}
    {%
      \IfNoValueTF{#2}
        {\oldchapter{#3}}
        {\oldchapter[#2]{#3}}%
      \zlabel{ch:\arabic{chapter}}%
    }%
}

\NewSplitTitleTag{chapter title}{\ztitleref{ch:<split-level-id>}}
\setenotez{
  reset = true,
  split = chapter,
  split-title = {<name> <ref>: <chapter title>}
}

\AtEveryEndnotesList{\begin{multicols}{2}} % before the whole list
\AfterEveryEndnotesList{\end{multicols}}   % after the whole list
\AfterEveryListSplit{\begin{multicols}{2}} % after a sub-heading in the splitted list
\AtEveryListSplit{\end{multicols}}         % before a sub-heading in the splitted list

% column sep between columns in a multicols env:
\setlength\columnsep{22pt}

\begin{document}

\chapter{Superduper}
Text\endnote{\kant[1]}. Text\endnote{\kant[2]}.     
Text\endnote{\kant[3];\kant[4]}.
Text\endnote{\kant[5];\kant[6]}.

\chapter{Eher langweilig}
Text\endnote{\kant[1]}. Text\endnote{\kant[2]}.    
Text\endnote{\kant[3];\kant[4]}.
Text\endnote{\kant[5];\kant[6]}.

\newpage

\appendix
\printendnotes

\end{document}

相关内容