從更多 \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

比你得到這個文本:

在此輸入影像描述

接下來是術語表

在此輸入影像描述

在另一頁上是索引

在此輸入影像描述

正如您所看到的,包含的文件中的條目也存在。

相關內容