在我正在撰写的报告中,我同时使用了脚注和尾注;脚注与普通脚注一样,但尾注用于引用(我不太喜欢在 LaTeX 中引用内容的普通方式)。为了让读者区分文本中的脚注和尾注,我进行了更改,\makeenmark
使脚注看起来像这样1,尾注看起来像这样[1]。
\renewcommand{\makeenmark}{\hbox{$^{[\theenmark]}$}}
效果很好,但现在我的问题是报告后面部分的外观\theendnotes
。它们的外观如下:
笔记
[1] Lorem ipsum dolor sit amet, consectetur adipiscing elit.
[2] Mauris pulvinar lacus quis quam ornare venenatis。
[3] Nam aliquet augue vel condimentum malesuada。
我想笔记部分显示如下:
笔记
- Lorem ipsum dolor sit amet,consectetur adipiscing elit。
- Mauris pulvinar lacus quim quam ornare venenatis。
- 我用我的调味品腌制了鱼。
我曾尝试过类似这样的事情:
\makeatletter
\renewcommand{\@makeentext}[1]{\theenmark.\enskip #1}
\makeatother
第一次通过后,我收到错误;第二次通过后,什么都没有。然而,(令人沮丧的是)它似乎没有改变任何东西!有人能告诉我我做错了什么,以及我如何才能得到我想要的效果吗?
[更新]
这是 MWE。我还通过 ShareLatex 运行了它,发现它返回了\@makeentext
未定义的 - 这很奇怪,因为它肯定是根据endnote
包的文档进行定义。
\documentclass{article}
% Footnotes
\usepackage{footmisc}
\usepackage{fnpct}
\usepackage{scrextend}
\deffootnote{0em}{1.6em}{\thefootnotemark.\enskip}
% Endnotes
\usepackage{endnotes}
\renewcommand{\makeenmark}{\hbox{$^{[\theenmark]}$}}
\makeatletter
\renewcommand{\@makeentext}[1]{\theenmark.\enskip #1}
\makeatother
\begin{document}
It was on a dreary night of November\footnote{Example footnote.}, that I beheld the accomplishment of my toils. With an anxiety that
almost amounted to agony, I collected the instruments of life around me, that I might infuse a spark of being into the lifeless
thing that lay at my feet. It was already one in the morning; the rain pattered dismally against the panes, and my candle was nearly
burnt out, when, by the glimmer of the half-extinguished light, I saw the dull yellow eye of the creature open; it breathed hard,
and a convulsive motion agitated its limbs.\endnote{An excerpt from \emph{Frankenstein} by Mary Shelley, taken from Project Gutenberg.}
\cleardoublepage
\theendnotes
\end{document}
答案1
不幸的是,文档是错误的:命令是\@endnotetext
而不是\@makeentext
。但是,如果您想保留正常脚注的布局,则应重新定义\enoteformat
:
\documentclass{article}
% Footnotes
\usepackage{footmisc}
\usepackage{fnpct}
\usepackage{scrextend}
\deffootnote{0em}{1.6em}{\thefootnotemark.\enskip}
% Endnotes
\usepackage{endnotes}
\renewcommand{\makeenmark}{\hbox{$^{[\theenmark]}$}}
\makeatletter
\def\enoteformat{%
\rightskip\z@ \leftskip\z@ \parindent=1.8em
\leavevmode{\setbox\z@=\lastbox}\llap{\theenmark.\enskip}%
}
\makeatother
\textheight=5cm % just for the example
\begin{document}
It was on a dreary night of November\footnote{Example footnote.\par With a paragraph break.}, that I
beheld the accomplishment of my toils. With an anxiety that almost amounted to agony, I collected the
instruments of life around me, that I might infuse a spark of being into the lifeless thing that lay at
my feet. It was already one in the morning; the rain pattered dismally against the panes, and my candle
was nearly burnt out, when, by the glimmer of the half-extinguished light, I saw the dull yellow eye of
the creature open; it breathed hard, and a convulsive motion agitated its limbs.\endnote{An excerpt
from \emph{Frankenstein} by Mary Shelley, taken from Project Gutenberg.\par With a paragraph break.}
\cleardoublepage
\theendnotes
\end{document}