我一直在写论文,论文中有词汇表和缩写部分,一开始可以显示,但突然就消失了。我对新文档做了很多测试,但几乎没有一个对我有用,只有一个对我有用。我不知道为什么它会起作用,因为如果我按原样复制一份文档,副本中不会显示词汇表,而原件中却会显示。这很奇怪,因为它实际上是相同代码的精确副本。
\documentclass[11pt]{Latex/Classes/PhDthesisPSnPDF}
\usepackage{blindtext} % For dummy text.
% The \blindtext or \Blindtext commands throughout this template generate dummy text to fill the template out.
\include{Latex/Comands} % Special commands written by the author
\usepackage{setspace}
%%-------------------------------------------------------------------------------
% Information of the Student
%-------------------------------------------------------------------------------
\title{Study on something really important}
\author{Author}
\degree{Degree}% Physics
\director{Director}% Thesis director
\degreedate{Year}% Year of the dissertation
\lugar{Place}% Place of the dissertation
\portadatrue
% ----------------------------- Datos del jurado
\student{Paternal last name\\ Maternal Last name\\ Names\\ Telefon number\\ Universidad Nacional Autónoma de México\\ Facultad de Ciencias\\ Física\\ Student Number}
\secretario{Dr \\ Secretary (thesis director) \\ Last name \\ Last name}
\presidente{Dr \\ President \\ Last name \\ Last name}
\vocal{Dr \\ Vocal \\ Last name \\ Last name}
\supuno{Dr \\ substitute 1 \\ Last name \\ Last name}
\supdos{Dr \\ Substitute 2 \\ Last name \\ Last name}
\pags{pages}
\keywords{tesis,autor,tutor,etc} % For metadata
\subject{tema_1,tema_2} % Sebjucts for metadata
%-------------------------------------------------------------------------------
% COVER
%-----------------------------------------------------
\documentclass{article} %Although the documentclass is repeated, the code compiles, only %sometimes it shows the glossary, other times it doesn't
\usepackage[utf8]{inputenc}
\usepackage[acronym]{glossaries}
\makeglossaries
\newglossaryentry{latex}
{
name=latex,
description={Is a mark up language specially suited for
scientific documents}
}
\newglossaryentry{maths}
{
name=mathematics,
description={Mathematics is what mathematicians do}
}
\newglossaryentry{formula}
{
name=formula,
description={A mathematical expression}
}
\newacronym{gcd}{GCD}{Greatest Common Divisor}
%--------------------------
\begin{document}
%
\maketitle
%-------------------------------------------------------------------------------
% FRONT MATTER
%-------------------------------------------------------------------------------
\frontmatter
\include{0-1-Acknowledgments/1-Acknowledgments}
\include{0-2-Declaration/1-Declaration}
\include{0-3-Quote/1-Quote}
\include{0-4-Resumen/1-Resumen}
%-------------------------------------------------------------------------------
% INDICES |
%-------------------------------------------------------------------------------
%
\setcounter{secnumdepth}{3} % organisational level that receives a numbers
\setcounter{tocdepth}{3} % print table of contents for level 3
\tableofcontents % Print main index
%: ----------------------- list of figures/tables ------------------------
%\listoffigures % Genera el ínidce de figuras, comentar línea si no se usa
%\listoftables % Genera índice de tablas, comentar línea si no se usa
%-------------------------------------------------------------------------------
% MAIN MATTER %-------------------------------------------------------------------------------
% the main text starts here with the introduction, 1st chapter,...
\mainmatter
\def\baselinestretch{1} % Line spacing
\input{0-5-Introduccion/1-Motivation-Structure}
\input{1-Theory/1-Basics}
\input{1-Theory/2-Something_more_specific}
\input{2-Results/1-Something}
\input{3-Conclusions/1-Conclusions}
%-------------------------------------------------------------------------------
% References |
%-------------------------------------------------------------------------------
\appendix
\input{5-Apendices/1-Something_extra.tex}
\setlength\bibitemsep{.1\itemsep}
\printbibliography
\printindex
%-------------------------------------------------------------------------------
% Appendix |
%-------------------------------------------------------------------------------
\clearpage
\printglossary[type=\acronymtype]
\printglossary
\end{document}
因为它是一篇论文,所以章节被分开放在.tex
文件中,但这是我包含词汇表的部分。
你知道为什么它有时候有效,有时候无效吗?
答案1
摘自Compiling the glossary
Overleaf 的 Glossaries
手动的:
要在 Overleaf 中编译包含词汇表的文档,您不需要做任何特殊的事情,但如果在编译词汇表后向其中添加新术语,请确保先单击“日志”选项下的“清除缓存文件”)。