0

I am trying to compile a list of abbreviations for my PhD dissertation. The Latex template (Cornell) suggest I use the \abbrlist command but I can't seem to be able to generate a list with acronyms from all chapters. I am using the glossaries package with all the proper options and have found a way to generate the list but it does not show in the table of contents (since it is not recognized by the \abbrlist command). How can use the \abbrlist command? the people who designed the thesis template say \abbrlist behaves like the \chapter* command. what does that mean?

Update: it appears that the Cornell cls is not compatible with \abbrlist so instead I did the following:

\usepackage{hyperref}
\usepackage[acronym,automake,nomain,nonumberlist,nogroupskip]{glossaries}
\setacronymstyle{long-short}
\renewcommand{\acronymname}{List of Abbreviations}

and down just before the document begins:

\printglossaries
\addcontentsline{toc}{chapter}{List of Abbreviations}
\glsaddall

I am using the following document class/preamble:

\documentclass[phd,tocprelim,final]{cornell}
\usepackage{geometry}                       
\geometry{letterpaper}
\usepackage{subcaption}
\usepackage{caption}
\renewcommand{\topfraction}{0.85}
\renewcommand{\textfraction}{0.1}
\renewcommand{\floatpagefraction}{0.75}
\usepackage{standalone}
\usepackage{moreverb}
\usepackage[stable]{footmisc}
\usepackage{setspace}
\usepackage{etoolbox}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{txfonts}
\usepackage{palatino}
\usepackage[utf8]{inputenc}
\usepackage{indentfirst}
\usepackage{booktabs}
\usepackage{array}
\usepackage{tabularx}
\usepackage{adjustbox}
\usepackage{graphicx}'

And this is the final result: enter image description here

  • The glossaries package doesn't provide that command. If you want the glossary to show in the table of contents, you should be able to just use the toc package option: \usepackage[toc]{glossaries}. – Nicola Talbot Nov 25 '18 at 0:09
  • Thanks! That's what I was thinking and tried to do. The problem is that glossaries is incompatible with the tocprelim option in my document class, and that the lists of figures and tables won't show in the table of contents (if I switch to toc). – Thibaud Nov 25 '18 at 0:20
  • The toc package option just puts \addcontentsline after the section heading that's automatically generated when the glossary is displayed. If the template instructions are to use \abbrlist instead of \chapter*, then the solution could be to redefine \glossarysection to use \abbrlist, but this is just guesswork. It would help to have a minimal working example (MWE) with a link to the class (if not on CTAN) that demonstrates the problem in order to provide a proper answer. – Nicola Talbot Nov 25 '18 at 11:58
  • I think I figured it out! I don't think the Cornell cls allows me to use glossaries. \abbrlist would require including the list as a separate tex file, whereas glossaries generates the list automatically. What I need to do is to try to add a line to the table of contents (using the tocprelim option), which I have yet to figure out. – Thibaud Nov 26 '18 at 15:36
  • Are you using cornell.cls? – Nicola Talbot Nov 26 '18 at 16:09
0

Using cornell.cls, the following works:

\documentclass[tocprelim]{cornell}

\usepackage{glossaries}

\makeglossaries

\loadglsentries{example-glossaries-acronym}% dummy file for testing
\glsaddall % add all dummy entries

\renewcommand{\glossarysection}[2][]{\abbrlist}

\begin{document}
\contentspage

\printglossary

\chapter{Sample}
\end{document}

Document build (assuming file is called myDoc.tex):

pdflatex myDoc
makeglossaries myDoc
pdflatex myDoc
pdflatex myDoc

The list of abbreviations will only show in the table of contents on the third instance of pdflatex. (Replace pdflatex with xelatex etc, as appropriate.)

The table of contents page:

image of table of contents

Beginning of list of abbreviations:

image of top part of list of abbreviations page

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.