![如何索引单词并将其页码放在最后一页?](https://linux22.com/image/426982/%E5%A6%82%E4%BD%95%E7%B4%A2%E5%BC%95%E5%8D%95%E8%AF%8D%E5%B9%B6%E5%B0%86%E5%85%B6%E9%A1%B5%E7%A0%81%E6%94%BE%E5%9C%A8%E6%9C%80%E5%90%8E%E4%B8%80%E9%A1%B5%EF%BC%9F.png)
我在文档中突出显示了一些单词\textbf{}
,我想将它们收集到目录(或索引)样式的表格中,其中单词位于一侧,突出显示的页面位于左侧,位于呈现的文档末尾。这是否可行,还是太复杂了?
答案1
我不确定这是否能回答你的问题,但你可以在文档前使用包\usepackage{imakeidx}
and \makeindex
。对于你想包含的每个单词,你必须在文档末尾使用命令\index{}
after 和 finally\printindex
因此,在实践中
\documentclass{article}
\usepackage{imakeidx} %package
\makeindex %compulsory command
\begin{document}
\section{Explaining stratigraphy}
In this section, I will explain the concepts of stratigraphy \index{stratigraphy}, strata \index{strata} and deposit \index{deposit}.
\newpage
\section{Definitions}
In this section, I will define the following words: latex \index{latex}, index \index{index} ...
\newpage
This is a new page for the example \index{example}
\printindex %to print
\end{document}