[Tex/LaTex] Abbreviation list align left with space between

acroacronymsspacingvertical alignment

Hi, Here is a sample code of my problem:

\documentclass[12pt,a4paper]{report}
\usepackage[labelfont=bf]{caption}
\usepackage{listings}
\usepackage{acro}


\DeclareAcronym{loT}{
short = IoT ,
long = Internet of Things ,
class = abbrev
}

\DeclareAcronym{dbms}{
short = DBMS ,
long = Database Management System ,
class = abbrev
}
\begin{document}

\acuseall
\printacronyms[include-classes=abbrev,name=Abbreviations]
\end{document}

I have an abbreviation list, the result is:
enter image description here

As you can see, between the abbreviation and the spread word, the space is the same, but this leads to the un-align or not neat …so what I want is like this:

enter image description here

Can anyone help me with this…thanks a lot

Best Answer

I introduce the leftitemize environment, that places its labels in a 2cm wide left-aligned box (in bold). The labels are aligned with the enclosing environment margin.

\documentclass{article}
\usepackage{enumitem}
\let\svitem\item%
\def\mybox#1{\makebox[2cm][l]{\bfseries#1}}
\newenvironment{leftitemize}
{\renewcommand\item[1][$\bullet$]{\svitem[\mybox{##1}]}%
  \begin{itemize}[leftmargin=\dimexpr2cm+\labelsep]}{\end{itemize}}
\begin{document}
\noindent Here is my left margin
\begin{leftitemize}
\item[FFT] Fast Fourier Transform
\item[GPRS] General Packet Radio Services xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxx
\end{leftitemize}
\end{document}

enter image description here

Related Question