\documentclass[12pt,twoside,openright,a4paper]{report}
%All packages included as I am not sure what the problem is.
\usepackage{tgbonum,dcolumn,graphicx,epsfig,caption,psfrag,lineno,amsmath,setspace,fancyhdr,afterpage,amssymb,subcaption,multirow,makecell,array,titlesec,datetime,times,amssymb,amsfonts,bm,color,soul,tikz,mathrsfs,longtable,etoolbox,xcolor,colortbl,hhline,verbatim}
\usepackage[toc,nonumberlist,acronym]{glossaries}
\newglossary[nlg]{notation}{not}{ntn}{Defect notation}
\makeglossaries
\glossarystyle{long}
\input{Glossaries/Glossaries}
\setlength{\glsdescwidth}{0.8\textwidth}
\begin{document}
\tableofcontents
\addcontentsline{toc}{chapter}{Table of Contents}
\listoffigures
\addcontentsline{toc}{chapter}{List of Figures} %Does appear when figures are included
\listoftables
\addcontentsline{toc}{chapter}{List of Tables} %Does not appear in document at all and therefore is not in the Table of Contents
\glsaddall %No glossary terms appear in the document all are added here
\begingroup\let\newpage\relax %To print all Glossaries one after another with no page break
\printglossary[title=Glossary of mathematical notation, toctitle=Glossary of mathematical notation]
\printglossary[type=\acronymtype,style=long,title=Acronyms and abbreviations]
\printglossary[type=notation,style=long]
\endgroup
\chapter{Introduction}
\begin{table}[!ht]
\centering
\caption{A table that does not appear in list of tables. \label{table}}
\begin{tabular}{lll}
Does & not & appear \\ \hline
in't & list & of tables \\
\end{tabular}
\end{table}
\end{document}
答案1
您尚未提供Glossaries/Glossaries.tex
文件,因此我使用了软件包提供的测试文件glossaries
。使用这些文件可显示表格列表:
\documentclass[12pt,twoside,openright,a4paper]{report}
%All packages included as I am not sure what the problem is.
\usepackage{tgbonum,dcolumn,graphicx,epsfig,caption,psfrag,lineno,amsmath,setspace,fancyhdr,afterpage,amssymb,subcaption,multirow,makecell,array,titlesec,datetime,times,amssymb,amsfonts,bm,color,soul,tikz,mathrsfs,longtable,etoolbox,xcolor,colortbl,hhline,verbatim}
\usepackage[toc,nonumberlist,acronym]{glossaries}
\newglossary[nlg]{notation}{not}{ntn}{Defect notation}
\makeglossaries
\setglossarystyle{long}
\loadglsentries[main]{example-glossaries-brief}
\loadglsentries[\acronymtype]{example-glossaries-acronym}
\loadglsentries[notation]{example-glossaries-symbols}
\setlength{\glsdescwidth}{0.8\textwidth}
\begin{document}
\tableofcontents
\addcontentsline{toc}{chapter}{Table of Contents}
\listoffigures
\addcontentsline{toc}{chapter}{List of Figures}
\listoftables
\addcontentsline{toc}{chapter}{List of Tables}
\glsaddall %No glossary terms appear in the document all are added here
\begingroup
\let\newpage\relax %To print all Glossaries one after another with no page break
\printglossary[type=main,
title=Glossary of mathematical notation,
toctitle=Glossary of mathematical notation]
\printglossary[type=\acronymtype,style=long,title=Acronyms and abbreviations]
\printglossary[type=notation,style=long]
\endgroup
\chapter{Introduction}
\begin{table}[!ht]
\centering
\caption{A table that does not appear in list of tables. \label{table}}
\begin{tabular}{lll}
Does & not & appear \\ \hline
in't & list & of tables \\
\end{tabular}
\end{table}
\begin{figure}
\centering
\includegraphics{example-image}
\caption{Example Image}
\end{figure}
\end{document}
内容页:
表格列表页面:
除非有什么东西中断了构建过程,否则表格列表没有理由不出现,因此请检查记录文件中的错误消息。(文件.log
用于 LaTeX 错误,以及.glg
、.alg
和.nlg
文件用于makeindex
错误。)
一些与问题无关的注释:
不要使用,最好\let\newpage\relax
将词汇表设置更改为\section*
使用\chapter*
:
\usepackage[toc,nonumberlist,acronym,section]{glossaries}
然后就可以了
\printglossary[type=main,
title=Glossary of mathematical notation,
toctitle=Glossary of mathematical notation]
\printglossary[type=\acronymtype,style=long,title=Acronyms and abbreviations]
\printglossary[type=notation,style=long]
或者添加一个总章节以将其与目录分开:
\chapter*{Notation}
\printglossary[type=main,
title=Glossary of mathematical notation,
toctitle=Glossary of mathematical notation]
\printglossary[type=\acronymtype,style=long,title=Acronyms and abbreviations]
\printglossary[type=notation,style=long]
epsfig
已弃用,如果已加载,则无需再加载它graphicx
。仅用于\includegraphics
包含图像文件。
这times
包也已过时,应替换为mathptmx
。