I am using Easy Thesis template from Sharelatex. This template uses Thesis.cls which contains code for ABBREVIATIONS. The code is shown below:
%VJ START (ABBREVIATIONS)
\newcommand\listabbrename{List Of Abbreviations} % title "List Of Abbreviations" printed in "LIST OF ABBREVIATIONS"
\usepackage{longtable}
\newcommand\listofabbre [2]{
\btypeout{\listabbrename}
%VJ \addtotoc{\listabbrename}
\chapter*{\listabbrename
\@mkboth{
\MakeUppercase\listabbrename}{\MakeUppercase\listabbrename} }
\begin{longtable}[l]{#1}#2\end{longtable}\par
\cleardoublepage
}
%VJ END (ABBREVIATIONS)
I get some idea from a post by Ivan at (Modifying existing code to sort a list of abbreviations) using glossaries package to get the abbreviations to sort in order. I feel his way is much easier. So I tried to modified the existing code in Thesis.cls incorporating Ivan's code. I tried to generate compilable code for testing purpose and the code is below:
\documentclass[a4paper, 12pt]{../Thesis}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
%start section in Thesis.cls%
\usepackage{longtable}
\usepackage[acronym,nonumberlist,shortcuts]{glossaries}
\glossarystyle{long}
\renewcommand*{\acronymname}{List of Abbreviations} % rename title
\renewcommand*{\glspostdescription}{} % remove dot at the end of description
\makeglossaries
%\newcommand\setacronymdb[1]{\loadglsentries{#1}} % the name of the acronym database
\newcommand\listofnomenclature[2]{
\btypeout{\acronymname}
%%VJ \addtotoc{\listsymbolname}
\chapter*{\acronymname
\@mkboth{
\MakeUppercase\acronymname}{\MakeUppercase\acronymname} }
\begin{longtable}[l]{#1}#2\end{longtable}\par
\printglossaries
\par
\cleardoublepage
}
%end section in Thesis.cls%
%\setacronymdb{Abbrev}
\begin{document}
%\listofnomenclature
\input{../Frontpages/Abbrev.tex}
\section{Introduction}
This is how I refer to the samples of acronym in the database named Abbrev: \acs{CO2}.
\end{document}
The Abbrev.tex file contains:
%\clearpage
\addtotoc{LIST OF ABBREVIATIONS-test}
\pagestyle{fancy} % The page style headers have been "empty" all this time,
% now use the "fancy" headers as defined before
\setstretch{1.3} % Set the line spacing to 1.5,
% this makes the following tables easier to read
%\lhead{\emph{Abbreviations}} % Set the left side page header to "Abbreviations"
%\listofabbrenamesvj{l l}
\listofnomenclature{l r}
{
\addtocontents{toc}{\vspace{0.5em}} % Add a gap in the Contents,
\newacronym{CO2}{CO$_{2}$}{Carbon diOxide}
\newacronym{GSM}{GSM}{Global System for Mobile Communications}
}
This time I can compile this code using my "Thesis.cls" but the output format of TOC and title is not as I wanted.
I hope to get some help here. Many thanks in advance.