词汇表未打印

词汇表未打印

我正在尝试使用 TexStudio 中的 xindy 制作词汇表。我已经安装了 Perl,但它不起作用。这是我的 MWE

\documentclass[a4paper,openright,12pt]{book}
\usepackage{vmargin}
\usepackage{fancyhdr}
\usepackage{emptypage}
\usepackage{xpatch}
\usepackage{float}
\fancypagestyle{plain}{\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0.5pt}}
\pagestyle{fancy} 
\usepackage{afterpage}
\usepackage{blindtext}
\fancypagestyle{chapterfirstpage}{%
\renewcommand{\headrulewidth}{0pt}%
\renewcommand{\footrulewidth}{0.5pt}%
\fancyhf{}%
\rfoot{\thepage}%
}
\xpatchcmd{\chapter}{\thispagestyle{plain}}{\thispagestyle{chapterfirstpage}}{\typeout{Success}}{\typeout{Failed}}
  \usepackage{epigraph}
 \newcommand\blankpage{%
\null
\thispagestyle{empty}%
\addtocounter{page}{-1}%
\newpage}
\usepackage[utf8]{inputenc}
\setcounter{secnumdepth}{3} 
\setcounter{tocdepth}{3} 
\usepackage[spanish, es-tabla]{babel}
 \usepackage{graphicx}
 \graphicspath{{./figuras/}}
\usepackage{setspace}
\usepackage[backend=bibtex,bibencoding=ascii,style=chem-angew,citestyle=numeric-comp,sorting=none,]{biblatex}
 \addbibresource{biblio} 
 \usepackage{csquotes}
 \usepackage{titlesec}
 \usepackage{tocloft}
 \usepackage{tabu}
 \usepackage{color}
 \usepackage{epsfig}\usepackage{multirow}
 \usepackage{colortbl}
 \usepackage[table]{xcolor}
 \titleformat{\chapter}{\normalfont\huge\sffamily}{\thechapter.}{0.1em}{\Huge}
 \renewcommand\cftchapaftersnum{.}
 \makeindex
 \usepackage[labelfont=bf]{caption}
 \usepackage{bm}
 \usepackage{textcomp}
 \usepackage{upgreek}
 \usepackage[xindy]{glossaries}
 \GlsSetXdyCodePage{duden-utf8}
 \usepackage{translator}
 \setacronymstyle{long-sc-short}
\makeglossaries
 \newacronym{DRX}{DRX}{Difracción de Rayos X}
 \raggedbottom
 \definecolor{lightgray}{gray}{0.9}
 \begin{document}
 \printglossary[letter]
 \end{document}

我收到以下错误:

Warning: File 'acronyms prueba.glo' is empty. Have you used any entries defined in glossary 'main'? Remember to use package option 'nomain' if you don't want to use the main glossary.

谢谢!

答案1

文档中没有\gls{DRX}或命令,这就是为什么没有打印词汇表(并抱怨词汇表为空!)\glsaddallglossaries

\documentclass[a4paper,openright,12pt]{book}

\usepackage{fancyhdr}
\usepackage{emptypage}
\usepackage{xpatch}
\usepackage{float}
\fancypagestyle{plain}{\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0.5pt}}
\pagestyle{fancy} 
\usepackage{afterpage}
\usepackage{blindtext}
\fancypagestyle{chapterfirstpage}{%
\renewcommand{\headrulewidth}{0pt}%
\renewcommand{\footrulewidth}{0.5pt}%
\fancyhf{}%
\rfoot{\thepage}%
}
\xpatchcmd{\chapter}{\thispagestyle{plain}}{\thispagestyle{chapterfirstpage}}{\typeout{Success}}{\typeout{Failed}}
  \usepackage{epigraph}
 \newcommand\blankpage{%
\null
\thispagestyle{empty}%
\addtocounter{page}{-1}%
\newpage}
\usepackage[utf8]{inputenc}
\setcounter{secnumdepth}{3} 
\setcounter{tocdepth}{3} 
\usepackage[spanish, es-tabla]{babel}
 \usepackage{graphicx}
 \graphicspath{{./figuras/}}
\usepackage{setspace}
\usepackage[backend=bibtex,bibencoding=ascii,style=chem-angew,citestyle=numeric-comp,sorting=none,]{biblatex}
 \addbibresource{biblio} 
 \usepackage{csquotes}
 \usepackage{titlesec}
 \usepackage{tocloft}
 \usepackage{tabu}
 \usepackage{color}
 \usepackage{epsfig}\usepackage{multirow}
 \usepackage{colortbl}
 \usepackage[table]{xcolor}
 \titleformat{\chapter}{\normalfont\huge\sffamily}{\thechapter.}{0.1em}{\Huge}
 \renewcommand\cftchapaftersnum{.}
 \makeindex
 \usepackage[labelfont=bf]{caption}
 \usepackage{bm}
 \usepackage{textcomp}
 \usepackage{upgreek}
 \usepackage[xindy]{glossaries}
 \GlsSetXdyCodePage{duden-utf8}
 \usepackage{translator}
 \setacronymstyle{long-sc-short}
\makeglossaries
 \newacronym{DRX}{DRX}{Difracción de Rayos X}
 \raggedbottom
 \definecolor{lightgray}{gray}{0.9}
 \begin{document}
 \gls{DRX}
 \printglossary%[letter]
 \end{document}

相关内容