从更多 \include{file} 文件构建索引

从更多 \include{file} 文件构建索引

有没有简单的方法(我不是程序员)如何在包含更多 \include 文件的文档中构建和打印按捷克语排序的索引?我不知道如何在这里给出一个最小的例子。所以我正在使用这个:

\documentclass[10pt]{article}
\usepackage{geometry}
\usepackage{ebgaramond}
\usepackage{polyglossia}
\setmainlanguage{czech}

\usepackage[xindy={language=czech, codepage=utf8}, style=altlist]{glossaries}
\usepackage[xindy]{imakeidx}
\makeglossaries
\def\xindylangopt{-M lang/czech/utf8-lang}
\makeindex[title=Jmenný rejstřík,options=\xindylangopt]

\begin{document}
\include{lahodova}
%.
%.
%.
\printglossary
\printindex
\end{document}

并使用以下命令编译和构建索引:

lualatex sample.tex

makeglossaries sample

lualatex -shell-escape sample.tex

没有 \include 文件,一切都运行正常

Lahodova 文件中有以下几行:

Generační zasazení je dle Mannheima\index{Mannheim, Karl} dáno (stejně jako demografické vytyčení pojmu) především biologickými aspekty.

Literární historik Vlastimil Válek\index{Válek, Vlastimil} memoárovou literaturu označil jako literaturu.

Silvia Nürneberger\index{Nürneberger, Silvia} na příkladu holokaustu uvádí.

答案1

以下示例代码基于您的代码,并包含一些词汇表条目和一些索引条目:

\documentclass[10pt]{article}
\usepackage{inputenc}
\usepackage{polyglossia}
\setmainlanguage{czech}

\usepackage[xindy={language=czech, codepage=utf8}, style=altlist]{glossaries}    

\usepackage[xindy]{imakeidx}

\loadglsentries{defns}

\makeglossaries 

\def\xindylangopt{-M lang/czech/utf8-lang}

\makeindex[title=Jmenný rejstřík,options=\xindylangopt]

\begin{document}

Here’s my \gls{ex} term.
First use: \gls{svm}. Second use: \gls{svm}. \gls{Oxf} is a fence containing \glspl{ox}. Not to be confused with a \Gls{ford} car carrying \glspl{ox}. The \gls{Oxf} fence contains\index{contain, to} also the \gls{OxfU} for \gls{el} cows.

\input{song}

Generační zasazení je dle Mannheima\index{Mannheim, Karl} dáno (stejně jako demografické vytyčení pojmu) především biologickými aspekty.

Literární historik Vlastimil Válek\index{Válek, Vlastimil} memoárovou literaturu označil jako literaturu.

Silvia Nürneberger\index{Nürneberger, Silvia} na příkladu holokaustu uvádí.

\printglossaries 

\printindex

\end{document}

文件在song.tex哪里

\begin{verse}
Quanto è dolce, o Salvatore\index{Gesù, Cristo Salvatore}\\
di servire a te\\
ed offrire con amore\\
questo \gls{Oxf} a te.

Prendi\index{Prendere, verbo} pure la mia vita\\
io la dono a te.\\
La tua grazia\index{Grazia, increata} mai largita\\
l'hai donata a me.

\end{verse}

该文件defns.tex包含以下内容:

\newacronym{svm}{SVM}{support vector machine}
\newglossaryentry{ex}{name={sample},description={an example}}
\newglossaryentry{ox}{name={ox},description={a bovin}}
\newglossaryentry{ford}{name={ford},description={a car}}
\newglossaryentry{Oxf}{name={Oxford},description={a city}}
\newglossaryentry{OxfU}{name={Oxford University},description={a place where studying}}
\newglossaryentry{el}{name={élite},description={a restricted group of people}}

如果使用这些命令进行编译:

lualatex sample.tex

makeglossaries sample

texindy -M lang/czech/utf8-lang sample.idx

lualatex sample.tex

然后你就会得到这个文本:

在此处输入图片描述

接下来是词汇表

在此处输入图片描述

在另一页上

在此处输入图片描述

如您所见,包含的文件中条目也存在。

相关内容