I am still struggling with enumitem
. I don't understand the horizontal spacing parameters at all. I have indeed read the documentation, and numerous answers to numerous questions, but despite all that I just don't get it! I have absolutely no idea what labelindent=*
or labelindent=!
are supposed to do. Could someone please explain in simple terms what the five parameters are and what these *
and !
options do?
In particular, I want the second line of my list here to stack under the first line rather than start slightly over to the left. Here is my attempt to do that, but as you can see it's not working. (Incidentally, I am explicitly setting labelindent=0pt
because it is globally set to \parindent
for normal use in this document.)
\documentclass[12pt, a4paper, oneside, fleqn]{report}
\usepackage{enumitem}
\setlist[description]{leftmargin=\parindent,labelindent=\parindent,itemsep=1pt,parsep=0pt,topsep=0pt}
\begin{document}
\chapter*{Symbols list}
\begin{description}[labelindent=0pt,labelwidth=0.7cm,leftmargin=0.7cm]
%
\item[x] Text text text text more words. Here is a full sentence to use up some space. And yet another sentence. blah blah blah
\item[y] Text text text text more words. Here is a full sentence to use up some space. And yet another sentence. blah blah blah
\item[z] Text text text text more words. Here is a full sentence to use up some space. And yet another sentence. blah blah blah
\end{description}
\end{document}
Update
I've tried the solution that @Bernard has put in his answer, but it is not working for me. I'm updating my code, because my label text is quite wide (I didn't include it at first because I feel like my entire thesis will be published in tex.se before I submit ;-).
Here is Bernard's suggestion with the labelwidth
extended to 2.1cm to accommodate the wide text, and labelindent=0pt
, which is a setting I wanted:
\documentclass[12pt, a4paper, oneside, fleqn]{report}
\usepackage{enumitem}
\setlist[description]{leftmargin=\parindent,labelindent=\parindent,itemsep=1pt,parsep=0pt,topsep=0pt}
\usepackage[showframe, top=2.5cm, left=3.5cm, bottom=2.5cm, right=2.5cm, includehead]{geometry}
\geometry{headheight=28pt, headsep=18pt}
\begin{document}
\chapter*{Symbols list}
\begin{description}[labelindent=0em ,labelwidth=2.1cm, labelsep*=1em, leftmargin =!, style = standard]%
\item[$\mathbf{H}$] Forward model Jacobian matrix
\item[$\mathbf{MoistCov}$] Background error covariance matrix calculated from an ensemble of forecast states and using a new moisture control variable designed to eliminate increments in the stratosphere.
\end{description}
\end{document}
Here's what it looks like:
Here's what happens when in addition to that I comment out the \setlist
command at the beginning, which is odd because there is clearly some interaction, though I don't know wny, because it looks like I should have overridden the horizontal settings. It looks like leftmargin=!
is not calculating leftmargin
from the other settings:
itemindent
to0pt
to get things to align. I always find the picture on page 5 the only way to really get to grips with this stuff.