[Tex/LaTex] creating two pages for symbols and abbreviations

acronymsglossaries

I am using thesis template from my university as here.

In this template there is one page specifically allocated for "LIST OF SYMBOLS AND ACRONYMS" at the \frontmatter.

I want to split this page so that I have two pages instead of one, they are "LIST OF ABBREVIATIONS" and "LIST OF SYMBOLS"

I have tried to reproduce the two pages with MWE, but I have failed.

Below I provide the MWE which I used.

Can I get some helping hand on this? Appreciate any help.

\documentclass[12pt,a4paper,oneside]{memoir}

%PACKAGES
\usepackage{lipsum}
\usepackage[utf8]{inputenc} % interpret input as unicode
\usepackage[T1]{fontenc}    % choose main font encoding (Cork)
\usepackage{graphicx}
\usepackage[english]{babel}
\usepackage{url}
\usepackage[normalem]{ulem} %for using striking likes
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{siunitx}
\usepackage{cleveref}
\usepackage{booktabs}

%FOR ACRONYM
\RequirePackage{relsize}
\RequirePackage[toc,nonumberlist,shortcuts,translate=false,style=long,acronym]{glossaries}
\RequirePackage{glossaries-babel}
\renewcommand*{\glsgroupskip}{}
\renewcommand{\glossarypreamble}{\renewcommand*{\arraystretch}{1.2}\SingleSpacing\footnotesize}
\renewcommand{\glossarypostamble}{\normalsize}
\renewcommand*{\glspostdescription}{}
\makeglossaries

\newcommand\listofacronyms{\printglossary[type=\acronymtype]}


%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
\addto\captionsenglish{%
    \renewcommand*\acronymname{\texorpdfstring{LIST OF ABBREVIATIONS}{List of Abbreviations}}
    %\renewcommand*\symbolmname{\texorpdfstring{LIST OF SYMBOLS}{List of Symbols}}
}
%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


\loadglsentries{../umalayaThesisVj/FrontMatters/myacronyms}
%\loadglsentries{../umalayaThesisVj/FrontMatters/mysymbols}


\begin{document}
\frontmatter

\listofacronyms\clearpage

I want to create a list of symbols used in my thesis. The list has to be pretty much like the list of figures or tables purpose. 



\end{document}

Best Answer

Without seeing the contents of your files myacronyms.tex and mysymbols.tex this is just guesswork, but \loadglsentries has an optional argument that indicates which glossary the entries should be added to, however this mechanism only works if the type is set to \glsdefaulttype in the definitions. This is done by default when you use \newglossaryentry (without explicitly using type). If on the other hand you use \newacronym, the type defaults to \acronymtype. In this case, the optional argument to \loadglsentries is ignored.

This means that if, for example, your myacronyms.tex file looks like:

\newacronym{abc}{ABC}{long form}

then

\loadglsentries{myacronyms}

should automatically add all the abbreviations to the \acronymtype glossary.

If your mysymbols.tex file looks like:

\newglossaryentry{sample}{name=sample,description=an example}

then

\loadglsentries{mysymbols}

should automatically add all those entries to the default (main) glossary.

So, if your myacronyms.tex and mysymbols.tex files look like the above, then this trimmed-down version of your MWE should work correctly:

\documentclass[12pt,a4paper,oneside]{memoir}

\usepackage[style=long,acronym]{glossaries}

\makeglossaries

\loadglsentries{myacronyms}
\loadglsentries{mysymbols}

\begin{document}

\frontmatter

\printglossary[type=\acronymtype,title=List of Abbreviations]

\printglossary[type=main,title=List of Symbols]

\mainmatter

\chapter{Sample}

Use entries: \gls{abc} and \gls{sample}.

\end{document}

If, however, your myacronyms.tex file looks like:

\newacronym[type=\glsdefaulttype]{abc}{ABC}{long form}

then

\loadglsentries{myacronyms}

will add your abbreviations to the default (main) glossary, which means that all your symbols and abbreviations will be in the same glossary. You should also get a warning message from makeglossaries:

Warning: File 'test.acn' is empty.
Have you used any entries defined in glossary 'acronym'?

(Where the main file is called test.tex.)

In this case you need to use the optional argument to \loadglsentries:

\documentclass[12pt,a4paper,oneside]{memoir}

\usepackage[style=long,acronym]{glossaries}

\makeglossaries

\loadglsentries[\acronymtype]{myacronyms}
\loadglsentries{mysymbols}

\begin{document}

\frontmatter

\printglossary[type=\acronymtype,title=List of Abbreviations]

\printglossary[type=main,title=List of Symbols]

\mainmatter

\chapter{Sample}

Use entries: \gls{abc} and \gls{sample}.

\end{document}