我想知道是否存在一种可能性/方法/包,通过它我可以唯一地标记中的所有脚注位置book.tex
。另一个文件footnote.tex
,包含脚注和匹配的标签,可用于插入脚注?
例子:
blah blah blah\footnotemark{id1} blah blah\footnotemark{id2}
在chap1.tex
;
\footnotetext{id1}{blah blah},\footnotetext{id2}{blah blah blah}
在chap1foot.tex
。chap1.tex
运行时我需要\footnotetext{id1}{blah blah}
在每页中显示从 1 开始的脚注计数器。
答案1
我相信你正在寻找的是sepfootnotes
包。下面是其基本用法的一个示例:
% to keep this example self-contained
% the file that contains the footnotes:
\RequirePackage{filecontents}
\begin{filecontents}{\jobname-notes.tex}
\Anotecontent{id1}{\label{id1}This is the footnote with id1.}
\Anotecontent{id2}{\label{id2}This is the footnote with id2.}
\Anotecontent{id3}{This is the footnote with id3.}
\end{filecontents}
\documentclass{scrartcl}
\usepackage{sepfootnotes}
% this defines new footnotes and the commands
% \Anotecontent{<id>}{<text>}
% \Anote{<id>}
% and a few more:
\newfootnotes{A}
% input the footnote definitions:
\input{\jobname-notes}
% just for this example:
\textheight=80pt
\begin{document}
A text\Anote{id1} with some footnotes\Anote{id2} to demonstrate how
`sepfootnotes' works.\footnotemark[\ref{id1}] In order to make
this\Anote{id3} a bit longer here's another\footnotemark[\ref{id2}]
sentence.
\end{document}