11

How can I get the same result as the code below without having to use \quad spacing? Is there any parameter in enumitem to adjust the horizontal spacing?

\begin{description}
\item{Item 1} \quad Description 1
\item{Item 2} \quad Description 2
\end{description}

MWE for alignment issue:

\documentclass{book}

%%% Paper format %%%
\usepackage[paper=a4paper,bottom=2cm,left=3cm,right=2cm,top=3cm,headheight=7mm,headsep=5mm,marginparsep=5mm,marginparwidth=10mm]{geometry}
%%%%%%%%%%%%%

\usepackage{enumitem}
\usepackage{amsmath}

\begin{document}
\chapter*{Lista de Simbolos}
\begin{description}[labelsep=4em, align=left]
\item[$b$] Taxa agregada de bits alcançável para o sistema
\item[$H(f)$] Espectro do canal
\item[$H_k$] Ganho do $k$-ésimo subcanal
\item[$P_x$] Potência total de transmissão
\item[$s_k$] Densidade espectral de potência do sinal no $k$-ésimo subcanal
\item[$Sx(f)$] Densidade espectral de potência do sinal na frequência contínua
\item[$Sn(f)$] Densidade espectral de potência do AWGN na frequência contínua
\item[$\text{SNR}_k$] Razão sinal-ruído no subcanal $k$
\item[$\mathbf{X}$] Vetor correspondente ao símbolo DMT
\item[$\mathbf{X}_+$] Vetor de subsímbolos dos tons positivos do símbolo DMT.
\item[$X_k$] Subsímbolo no $k$-ésimo tom do símbolo DMT
\item[$\Gamma$] \textsl[Gap] de SNR a capacidade
\item[$\Delta f$] Largura de banda do subcanal (espaçamento tonal).
\item[$\sigma_k$] Densidade espectral de potência do AWGN no $k$-ésimo subcanal
\end{description}
\end{document}

1 Answer 1

8

The parameter labelsep gives the distance between the label and the following text.

\documentclass{article}
\usepackage{showframe}
\usepackage{enumitem}
\usepackage{lipsum}
\pagestyle{empty}
\begin{document}

\begin{description}[labelsep=1em]
\item[first matter] \lipsum[1]
\item[some other matter] \lipsum[1]
\end{description}

\end{document}

Note how I use square brackets around the label content for description. I think it is pretty standard that \quad has a length of 1em, but that may depend on the document class your using.

If you want to change how the labels and for each label are positioned you can use the parameters labelwidth and labelindent.

\chapter*{Lista de Simbolos}
\begin{description}[labelsep=4em, align=left, labelwidth=1in,labelindent=1cm]
  \item[$b$] Taxa agregada de bits alcançável para o sistema
  \item[$H(f)$] Espectro do canal
  \item[$H_k$] Ganho do $k$-ésimo subcanal
  \item[$P_x$] Potência total de transmissão
  \item[$s_k$] Densidade espectral de potência do sinal no $k$-ésimo subcanal
  \item[$Sx(f)$] Densidade espectral de potência do sinal na frequência contínua
  \item[$Sn(f)$] Densidade espectral de potência do AWGN na frequência contínua
  \item[$\text{SNR}_k$] Razão sinal-ruído no subcanal $k$
  \item[$\mathbf{X}$] Vetor correspondente ao símbolo DMT
  \item[$\mathbf{X}_+$] Vetor de subsímbolos dos tons positivos do símbolo DMT.
  \item[$X_k$] Subsímbolo no $k$-ésimo tom do símbolo DMT
  \item[$\Gamma$] \textsl{Gap} de SNR a capacidade
  \item[$\Delta f$] Largura de banda do subcanal (espaçamento tonal).
  \item[$\sigma_k$] Densidade espectral de potência do AWGN no $k$-ésimo subcanal
\end{description}

Here, the values I chose are rather dramatic. I'm sure you'll want something more conservative.

enter image description here

Some other points

Instead of writing \textsl[Gap] you want to write \textsl{Gap}. This is different from how \item handles things. Basically, \textsl has a mandatory argument that you pass to it through curly brackets. \item, on the other hand, has an optional argument for overriding the label contents (which is what you want to do in a description environment).

Also, I'm not sure how you're handling your font encoding, but you might want to put something like \usepackage[utf8]{inputenc} in the preamble. However, I'm not really much of an authority on fonts, and don't necessarily know the best approach to take here.

6
  • Thank you. "\begin{description}[labelsep=4em, align=left]" worked as I wanted. However, now the descriptions are aligned with the chapter title (it is a list of acronyms), whereas the labels should be aligned. What am I doing wrong?
    – igorauad
    Jul 31, 2013 at 16:02
  • Ok, I edited the original post with the example.
    – igorauad
    Jul 31, 2013 at 16:16
  • Thank you very much. Now it appears exactly as I wanted.
    – igorauad
    Jul 31, 2013 at 16:23
  • @igorauad I've added a few more pointers to my answer.
    – A.Ellett
    Jul 31, 2013 at 17:10
  • Thank you, once again. I'm handling the font issue in the original document with \usepackage[brazil]{babel}, \usepackage[T1]{fontenc} and \usepackage[utf8]{inputenc}. Thanks for the tip on textsl.
    – igorauad
    Jul 31, 2013 at 19:33

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.