enotez 包:如何格式化拆分部分标题?

enotez 包:如何格式化拆分部分标题?

这是以下问题的后续: 两栏尾注和一栏标题

Clemens 的回答正是我所需要的。但还有另一个愿望:鉴于章节小节在正文中很杂乱,但我想让它们作为尾注中的分割标题居中。

我尝试过这个:

\setenotez{
list-name = {},
reset = true,
split = chapter,
split-title = {\centering <chapter title>},
mark-cs = {\textsuperscript}
}

但只得到错误:

在此处输入图片描述

有什么想法吗?再次感谢您。

答案1

最后,这是我发现的,感谢克莱门斯的评论(当然,还有他在有关 enotez 的第一个问题上提供的巨大帮助,我在页面顶部提到过):

\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{enotez,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}}%
    \refstepcounter{chapter}
  \zlabel{ch:\arabic{chapter}}%
}%
}

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

\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


\DeclareInstance{enotez-list}{custom}{paragraph}
{heading = \chapter*{#1},
notes-sep = 0\baselineskip,
format = \normalfont\footnotesize,
number = \textsuperscript{#1}
}

% 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[custom]

\end{document}

相关内容