引用(新)单词首次出现的行号

引用(新)单词首次出现的行号

我想交叉引用某些文本中某个单词首次出现的行号。例如,给定一段文本:

LESSON I
In the traffic court of a large mid-western city, a young
lady was brought before the judge to answer a ticket given
her for driving through a red light. She explained to his
honor that she was a school teacher and requested an imme-
diate disposal of her case in order that she might hasten
on to her classes. A wild gleam came into the judge's eye.
"You are a school teacher, eh?" said he. "Madam, I shall
realize my lifelong ambition. Sit down at that table and
write 'I went through a red light' five hundred times." 

其中,新词“disposal”出现在第 5 行,因此新词列表如下:

----------------------------------------------------
1. disposal (L.5)
2. hasten   (L.5)
3. gleam    (L.6)
...
----------------------------------------------------

如何交叉引用这样的数字?

答案1

亚麻布软件包提供了这个功能:

\documentclass[a4paper]{article}
\usepackage{lineno}

\begin{document}
\begin{linenumbers}
In the traffic court of a large mid-western city, a young
lady was brought before the judge to answer a ticket given
her for driving through a red light. She explained to his
honor that she was a school teacher and requested an immediate
disposal\linelabel{disposal} of her case in order that she might hasten
on to her classes. A wild gleam came into the judge's eye.
"You are a school teacher, eh?" said he. "Madam, I shall
realize my lifelong ambition. Sit down at that table and
write 'I went through a red light' five hundred times."
\end{linenumbers}

\ref{disposal}
\end{document}

相关内容