法語詞彙表

法語詞彙表

我試著找一本法語詞彙表。所以我從包裝中的一個樣本(英文)開始glossaries。我latex然後makeglossaries運行latex(x2),樣本一切正常。我使用套件xindy的選項運行相同的範例glossaries,並\usepackage[spanish]{babel}按照術語表包指南中的建議進行添加,一切都運作良好。

但這裡開始我的問題,如果我用法語更改西班牙語,我會從 xindy 收到一條錯誤訊息:

ERROR: Syntax Error in (INDEXENTRY :TKEY (:|EMPTYSET@INDEXeNDCSNAME|) :LOCREF "{}{11}" :ATTR "pageglsnumberformat").

這是我的乳膠代碼:

 \documentclass{report}
 \usepackage[utf8]{inputenc}
 \usepackage[T1]{fontenc}

\usepackage[french]{babel}

\usepackage[xindy,toc,acronym]{glossaries}

% Define a new glossary type called notation
\newglossary[nlg]{notation}{not}{ntn}{Notation}

\makeglossaries

% Notation definitions


\newglossaryentry{not:emptyset}{type=notation,
name={$O$},
text={00},
description={The empty set},
sort={O}}

% Main glossary definitions


\newglossaryentry{gls:card}{name=cardinality,
description={The number of elements in the specified set}}

% Acronym definitions

\newacronym{nf}{NF}{new foundations}

\begin{document}
\title{Sample Document using the glossaries Package}
\author{Nicola Talbot}

\maketitle

\tableofcontents

\printglossaries

\chapter{Introduction}

$\gls{not:emptyset}$ 

\gls{gls:card}

\gls{nf}
\end{document}

我凝視著這個,但我什麼也沒發現。請問,有人可以幫助我嗎?

答案1

(將我的評論轉換為答案。)

babel與設定一起使用時french,冒號:將轉換為活動字元。詞彙表條目標籤用於形成儲存條目資料的內部命令,因此它們不能包含任何活動字元。刪除冒號或將其替換為非活動字元可以解決該問題。例如,用句點替換它們就可以了:

\documentclass{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage[french]{babel}

\usepackage[xindy,toc,acronym]{glossaries}

% Define a new glossary type called notation
\newglossary[nlg]{notation}{not}{ntn}{Notation}

\makeglossaries

% Notation definitions


\newglossaryentry{not.emptyset}{type=notation,
name={$O$},
text={00},
description={The empty set},
sort={O}}

% Main glossary definitions


\newglossaryentry{gls.card}{name=cardinality,
description={The number of elements in the specified set}}

% Acronym definitions

\newacronym{nf}{NF}{new foundations}

\begin{document}
\title{Sample Document using the glossaries Package}
\author{Nicola Talbot}

\maketitle

\tableofcontents

\printglossaries

\chapter{Introduction}

$\gls{not.emptyset}$ 

\gls{gls.card}

\gls{nf}
\end{document}

相關內容