1

When using an option for enumerate the indent before the items disappears. I would like to set the indent to the same indent that is naturally used for itemize, enumerate etc., but I don't know how to get the value for this natural indent. I tried \begin{enumerate}[\hspace{\leftmargin}a)] but that produces an indent far too wide.

\documentclass[12pt]{article}
\usepackage{enumerate} 

\begin{document}
  \noindent Text
  \begin{enumerate}[a)]
    \item text
    \item text
    \item text
  \end{enumerate}
\end{document}

enter image description here

5
  • Welcome! It'd be helpful if you complete your code snippet to a minimal working example. This is a short document that starts with \documentclass and ends with \end{document} and contains as few lines of code/text as are necessary to reproduce the issue. This is in particular important because you appear to be using either the enumerate package or the enumitem package (with the shortlabels option). Feb 9, 2019 at 11:34
  • There are \leftmargini, \leftmarginii, \leftmarginiii and \leftmarginiv for the different enumeration levels. A better way to control those values is provided by package enumitem.
    – user31729
    Feb 9, 2019 at 11:41
  • @ChristianHupfer all produce an indent that is far wider than the "normal" indent
    – Katy
    Feb 9, 2019 at 11:44
  • @Katy: Well, I actually meant to modify them, but rather use \usepackage[shortlabels]{enumitem} if you insist on the [a)] syntax and then take a look on labelindent etc. values
    – user31729
    Feb 9, 2019 at 11:46
  • @ChristianHupfer the question is what value I use for modification. I want it to be aligned with other itemize and enumerate lists. So I need to know what indent they are using
    – Katy
    Feb 9, 2019 at 11:56

1 Answer 1

1

Instead of \usepackage{enumerate}, you can use \usepackage[shortlabels]{enumitem}. This powerful package has a lot of different options to configure the appearance of lists, check out the documentation if you want to learn more about it.

The shortlabels option adds the [a)] functionality, and there it automatically gets the indentation right. So this produces the desired output:

\documentclass[12pt]{article}
\usepackage[shortlabels]{enumitem}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\begin{enumerate}
    \item text
    \item text
    \item text
\end{enumerate}
\lipsum[2]
\begin{enumerate}[a)]
    \item text
    \item text
    \item text
\end{enumerate}
\end{document}

enter image description here

3
  • I'm working within a pretty big project. If I change the use of the package enumerate to enumitem, won't that potentially mess up stuff somewhere else?
    – Katy
    Feb 9, 2019 at 11:50
  • @Katy: From the documentation: "[shortlabels] is intended mainly as a sort of compatibility mode with the enumerate package". I cannot guarantee that it won't break anything in your project, you can only find out by trying, I guess.
    – Tiuri
    Feb 9, 2019 at 11:54
  • 1
    @ChristianHupfer: While the question title is about the "indent variable", the question body is actually about "How do I get this label type with the natural indentation". This is taken care of by enumitem without the use of any indent variable.
    – Tiuri
    Feb 9, 2019 at 11:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .