0

I am using the following code to create List of Acronyms in my thesis. But the index and its description are overlapping. How to add suitable space between them?

\documentclass[12pt, a4paper, oneside]{CIITThesissV1}
\usepackage{placeins}
\usepackage{soul}
\usepackage{acro}
\usepackage{mfirstuc}
\usepackage{tcolorbox}
\usepackage{etoolbox}
\usepackage{subdepth}
\usepackage{multirow}
\usepackage{framed}
\usepackage{sectsty}
\usepackage{graphicx}
\usepackage{graphics}
%\usepackage[table]{xcolor}
\usepackage{lscape}
\usepackage{amsfonts}
\usepackage{amstext}
\usepackage{amssymb}
\usepackage[english]{babel}
\usepackage{parskip}
\usepackage[export]{adjustbox}
\usepackage{pbox}
\usepackage{hhline}%%%
\usepackage{pdfpages}
\usepackage{rotating}
\usepackage{times}
\usepackage{epsfig}
\usepackage{booktabs}
\usepackage{float}
\usepackage{url}
\usepackage{nomencl}
\usepackage{amsmath}
\usepackage[utf8]{inputenc}
\usepackage{xcolor}
\usepackage{color, colortbl}
\usepackage{lipsum}
\usepackage{setspace}
\usepackage{afterpage}
\usepackage{pdflscape}
\usepackage{pstricks}
\usepackage{subfigure}
\usepackage{titlesec}
\usepackage{cases}
\usepackage[titles,subfigure]{tocloft}
\usepackage{apacite}
\usepackage{amsmath}
\usepackage[hypcap=false]{caption}
\usepackage{authblk}
\usepackage{rotating}
\usepackage{pifont}
\usepackage{url}
\usepackage{array}
\usepackage{enumitem}
\usepackage{bookmark}
\usepackage{arydshln}
\usepackage{booktabs}
%\usepackage[ruled,linesnumbered]{algorithm2e}
\usepackage{hyperref}
\usepackage{algorithm}
\usepackage{algpseudocode}
%\usepackage[noend]{algpseudocode}
\usepackage{longtable}
\usepackage[toc,page]{appendix}
\usepackage{matlab}
\usepackage{listings}
\lstset{breaklines=true}
\usepackage{lineno}
\usepackage[acronym]{glossaries}
\usepackage{titlesec}
\usepackage{tikz,pgfplots}
\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
    T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}

\acsetup{
  index = false,
  list-long-format = \makefirstuc ,
  list-name={LIST OF ACRONYMS},
  list-style = lof ,
  list-heading = lof, %because I want the list with same style as LOF
  extra-style = toc
}

\DeclareAcronym{DBSCAN}{
  short = DBSCAN ,
  long = Density-Based Spatial Clustering of Applications with Noise ,
  short-plural ={s} ,
  long-plural = {s},
  class = general ,
  short-format = \scshape ,
  index = DBSCAN
}

\titleformat{\chapter}[display]   
{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}   
\titlespacing*{\chapter}{0pt}{0pt}{30pt}

\setlength\cftbeforechapskip{10pt}
\renewcommand\cftfigafterpnum{\vskip8pt\par}
\renewcommand\cfttabafterpnum{\vskip8pt\par}
\renewcommand\cftchapafterpnum{\vskip8pt}
\renewcommand\cftsecafterpnum{\vskip8pt}

\makeatletter
\pretocmd{\chapter}{\addtocontents{toc}{\protect\addvspace{15\p@}}}{}{}
\pretocmd{\section}{\addtocontents{toc}{\protect\addvspace{15\p@}}}{}{}
\makeatother


\makeatletter
\def\BState{\State\hskip-\ALG@thistlm}
\newenvironment{figurehere}{\def\@captype{figure}}{}
\makeatother

\renewcommand\cftchapfont{\textbf\normalfont}
\renewcommand\cftchappagefont{{\normalfont}}
\AtBeginDocument{\renewcommand\contentsname{TABLE OF CONTENTS}}
\AtBeginDocument{\renewcommand\contentsname{\leftline{LIST OF FIGURES}}}
\titleformat{\chapter}[display]
{\bfseries\Large}
{\vspace{0.005cm}\centering \Large\bfseries{Chapter \thechapter}}
{1ex}
{\bfseries\Large\centering}

\begin{document}

\pagestyle{fancy}
\fancyhf{}
\rhead{\textbf{\textit{Annex M1}}}
\lhead{}
\rfoot{ \thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}

\fancypagestyle{plain}{
\fancyhf{}
\fancyfoot[OR]{\thepage}
\fancyfoot[EL]{\thepage}
\renewcommand{\headrulewidth}{0pt} 
}
\include{cover9_abstract} %please consider that I am writing some text here, and using \ac{DBSCAN} to include acronym
\renewcommand{\contentsname}{TABLE OF CONTENTS}
\tableofcontents
\include{tables}
\include{figures}
\addcontentsline{toc}{chapter}{List of Acronyms}
\setlength\cftparskip{-2pt}
\setlength\cftbeforechapskip{0pt}
\printacronyms[sort=true]
\clearpage

\end{document} 

And I am using \ac{DBSCAN} for example in Abstract. The list is printing fine, but I dont know how to adjust the space between acronym index and its description. It is giving me the following ouput. Index and Description of Acronym are overlapping Also, I want to underline LIST OF ACRONYMS heading using \textwidth.

Kindly help.

  • Welcome to TeX.SX! Could you please make sure, your example is a self contained minimal working example (MWE) that others can compile and get the same output you show? Currently others can't since your MWE includes external files others don't have access to. Also, there is only one \DeclareAcronym command in your preamble. Lastly, the documentclass is also missing. – leandriis Dec 27 '19 at 9:58
  • Please also clarify: \acsetup and \DeclareAcronym are commands fro the acro package. You don't load this package in your preamble but you load glossaries instead. The latter has its own commands. Please clarify which package you actually want to use. You will also need \usepackage{mfirstuc} in order to use \makefirstuc. – leandriis Dec 27 '19 at 10:01
  • @leandriis my apologies for not providing the MWE earlier. Edited the question, kindly check it now. – Anees Dec 27 '19 at 10:07
  • Thanks for your edit. Some general comments regarding your preamble: Please go through it and reevaluate if you really need all of the packages you load. There is acro, nomencl and glossaries. Do you really use all of them? Lastly, also make sure, that hyperref is the last package in your preamble. (There are only a few exceptions to that.) You can also remove graphics and replace \usepackage{xcolor}\usepackage{color, colortble} with a simple \usepackage[table]{xcolor}. – leandriis Dec 27 '19 at 10:12
  • 1
    Finally, CIITThesissV1 is not a standard class. Please check if the problem persists if you use a standard class. If so, your MWE can use this standard class (such as article). If not, please include a link to the CIITThesissV1.cls file. – leandriis Dec 27 '19 at 10:14
1

According to the acro package documentation, list-short-width should be the option you need to change:

This option controls the width reserved for the short forms of the acronyms in the lof list style.

According the the manual, the default is 3em. If you use 6em instead, as shown in the following MWE, the overlap should be removed:

enter image description here

\documentclass{article}
\usepackage{acro}
\usepackage{mfirstuc}


\acsetup{
  index = false,
  list-long-format = \makefirstuc ,
  list-name={LIST OF ACRONYMS},
  list-style = lof , %because I want the list to be similar as LOF
  list-heading = lof,
  extra-style = comma, 
  list-short-width =6em
}

\DeclareAcronym{DBSCAN}{
  short = DBSCAN ,
  long = Density-Based Spatial Clustering of Applications with Noise ,
  short-plural ={s} ,
  long-plural = {s},
  class = general ,
  short-format = \scshape ,
  index = DBSCAN
}

\begin{document}

\ac{DBSCAN}

\printacronyms[sort=true]

\end{document} 
| improve this answer | |
  • Thank you so much. Seriously cant thank you enough. You are a life saver. – Anees Dec 27 '19 at 10:35
  • @leandriss Could you please be able to tell me how to underline the heading List of Acronyms up to text width? As my LOF and LOT headings are underlined. – Anees Dec 27 '19 at 10:37
  • @Anees: Please ask this as a nwe, separate follow-up-question to this one. – leandriis Dec 27 '19 at 10:42

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.