我想在带有endnotes
包的尾注中进行特定的自定义。默认情况下,注释编号与注释文本的首字母相连。我希望两者之间有一个固定的空格。此时结果是
1Dfh dfhdfh wertwert ertert asdf asdf dfgh erty rtuy rtuytu asdf asdf dfgh erty rtuy rtuytu 13Dfh dfhdfh wertwert ertert asdf asdf dfgh erty rtuy rtuytu asdf asdf dfgh erty rtuy rtuytu
但我希望它有
1 Dfh dfhdfh wertwert ertert asdf asdf dfgh erty rtuy rtuytu asdf asdf dfgh erty rtuy rtuytu 13 Dfh dfhdfh wertwert ertert asdf asdf dfgh erty rtuy rtuytu asdf asdf dfgh erty rtuy rtuytu
我必须修改什么设置?
====================================================== 附录
当然,即使它微不足道......
\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage{endnotes}
\let\footnote=\endnote
\begin{document}
\footnote{\lipsum[1]}
\footnote{\lipsum[2]}
\theendnotes
\end{document}
答案1
您可以修改命令\makeenmark
之前的定义\theendnotes
\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage{endnotes}
\let\footnote=\endnote
\begin{document}
\footnote{\lipsum*[1]}
\footnote{\lipsum*[2]}
% modify how \makeenmark works
\renewcommand{\makeenmark}{\textsuperscript{\theenmark}\enspace}
\theendnotes
\end{document}
另一种可能性是
\renewcommand{\makeenmark}{\theenmark\enspace}
如果您希望将代码放在序言中(这可能是一件好事),只需执行以下操作:
\usepackage{etoolbox}
\preto{\theendnotes}{%
\renewcommand{\makeenmark}{\textsuperscript{\theenmark}\enspace}%
}
完整示例:
\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage{endnotes}
\usepackage{etoolbox}
\preto{\theendnotes}{%
\renewcommand{\makeenmark}{\textsuperscript{\theenmark}\enspace}%
}
\let\footnote=\endnote
\begin{document}
\footnote{\lipsum*[1]}
\footnote{\lipsum*[2]}
\theendnotes
\end{document}
答案2
在你的序言中添加以下几行:
\usepackage{etoolbox}
\makeatletter
\patchcmd{\@endnotetext}
{\@theenmark}
{\@theenmark\enspace}
{}
{}
\makeatother
你将拥有
平均能量损失
\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage{endnotes}
\let\footnote=\endnote
\usepackage{etoolbox}
\makeatletter
\patchcmd{\@endnotetext}
{\@theenmark}
{\@theenmark\enspace}
{}
{}
\makeatother
\begin{document}
Some\footnote{\lipsum[1]}text
\footnote{\lipsum[2]}
\theendnotes
\end{document}
答案3
我的答案类似于埃格雷格的但 egreg 更快......
\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage{endnotes}
\let\footnote\endnote
\begin{document}
\footnote{\lipsum[1]}
\footnote{\lipsum[2]}
\def\makeenmark{\hbox{\theenmark}\quad}
\theendnotes
\end{document}
或者对于左对齐编号,使用
\def\makeenmark{\makebox[\parindent]{\theenmark\hfill}}