26

I want to indent enumerated items more. However every method I found deals with a single item in a list. How do I do this globally?

7
  • 3
    You use enumitem. See section 5 Global settings (p 9) of the enumitem documentation.
    – Werner
    Feb 8, 2013 at 7:25
  • 1
    @Werner Are there other ways to do this? "enumitem" conflicts with the "enumerate" package I'm using right now.
    – h__
    Feb 8, 2013 at 7:29
  • What are you using the enumerate package for? Feb 8, 2013 at 8:43
  • 1
    @hyh All (one) feature of the enumerate package is provided by enumitem as well.
    – yo'
    Feb 8, 2013 at 13:13
  • 1
    @NathanaelFarley I use the enumerate package because I need to use different numberings for the list, like a), b), c) or (i), (ii), (iii). (Texifying something old.) Can this be done with the other packages you suggested?
    – h__
    Feb 8, 2013 at 17:32

2 Answers 2

21

One crude method is to modify the definition of \item as follows:

Sample output

\documentclass{article}

\usepackage{enumerate,letltxmacro}
\LetLtxMacro\itemold\item
\renewcommand{\item}{\itemindent10cm\itemold}

\begin{document}

Text
\begin{enumerate}[(1)]
\item One
\item Two
\item Three
\end{enumerate}

\end{document}

But this is going to give you probably unwanted behaviour with nested lists. Also, as you experience it affects a number of other enviroments, that naivly seem to have nothing to do with lists, since LaTeX internally uses a trivlist environment as a basic building block for environment formatting.

I would advise you to switch entirely over to paralist or enumitem instead, for example as described below.

Paralist

With paralist you use the command \setdefaultleftmargin, which takes 6 arguments for the relative indents of the lists at levels 1 to 6. When using the optional argument to enumerate, it turns out that you also have to specify one of the label adjustment options to the package, otherwise these margin changes will be ignored. (This looks like a bug in the otherwise well-tried package.)

Sample paralist output

\documentclass{article}

\usepackage[neverdecrease]{paralist}

\begin{document}

Test --- standard margins.
\begin{enumerate}[(1)]
\item One
\item Two
  \begin{enumerate}[(a)]
  \item Sub
  \end{enumerate}
\item Three
\end{enumerate}

\setdefaultleftmargin{8cm}{2cm}{}{}{}{}
Test --- changed margins.
\begin{enumerate}[(1)]
\item One
\item Two
  \begin{enumerate}[(a)]
  \item Sub
  \end{enumerate}
\item Three
\end{enumerate}

\end{document}

enumitem

Here you need to load the package with the shortlabels option to get enumerate's syntax for the specification of the labels. The \setlist command is used to adjust default parameters for different lists and you can specify which levels they apply to. For example, \setlist[enumerate,1] will apply to enumerates at level 1. Providing an argument of the form {leftmargin=10cm} will then change the given left margin.

Sample enumitem output

\documentclass{article}

\usepackage[shortlabels]{enumitem}

\begin{document}

Test --- standard margins.
\begin{enumerate}[(1)]
\item One
\item Two
  \begin{enumerate}[(a)]
  \item Sub
  \end{enumerate}
\item Three
\end{enumerate}

\setlist[enumerate,1]{leftmargin=10cm}
\setlist[enumerate,2]{leftmargin=2cm}
Test --- changed margins.
\begin{enumerate}[(1)]
\item One
\item Two
  \begin{enumerate}[(a)]
  \item Sub
  \end{enumerate}
\item Three
\end{enumerate}

\end{document}

The enumitem package is newer has many more facilities than the lighter weight paralist. It provides powerful and easy control over all types of list formatting.

Note the spacing in the paralist and enumitem examples is different, as there are some slightly different package defaults.

11
  • That works! However, \proof is also indented. Any fix of this?
    – h__
    Feb 8, 2013 at 16:27
  • I use the enumerate package because I need to use different numberings for the list, like a), b), c) or (i), (ii), (iii). (Texifying something old.) Can this be done with the other packages you suggested?
    – h__
    Feb 8, 2013 at 16:27
  • 1
    Absolutely, both packages provide such facilities. paralist's syntax is exactly as enumerate's for this change, but you can also set defaults in a nice way. enumitim has a package option shortlabels emulating the enumerate syntax. Feb 8, 2013 at 21:25
  • The problem with \proof is not so unexpacted. LaTeX uses lists in all sorts of strange places to build various constructions that you wouldn't expect. That is way using one of the other packages is strongly recommended for such changes. Feb 8, 2013 at 21:26
  • I followed your suggestion and switched to paralist. However, the method described in the other answer doesn't work for me.
    – h__
    Feb 10, 2013 at 3:30
4

You can use the paralist package to set the default left margins of lists/enumerates/etc. Simply use the command \setdefaultleftmargin like so.

\documentclass{article}
\usepackage{paralist}
\usepackage{enumerate} %% to check paralist doesn't clash
\begin{document}
This is a test
\begin{enumerate}
\item This
\item is
\item a
\item list
\end{enumerate}

\setdefaultleftmargin{0pt}{}{}{}{}{}
This is a test
\begin{enumerate}
\item This
\item is
\item a
\item list
\end{enumerate}
\end{document}

enter image description here

You can find a description of \setdefaultleftmargin here.

6
  • I'm trying to switch to the paralist package. But \setdefaultleftmargin doesn't work for me at all. I tried to put in all kinds of lengths but nothing changes. A command like \setdefaultleftmargin{1em}{2.2em}{1.8em}{3pt}{1em}{1cm} doesn't give me any change.
    – h__
    Feb 10, 2013 at 3:29
  • It's possible that other packages are conflicting with it. Which others are you using? It could help to put paralist last, so that it overwrites the behaviour of any other packages you've loaded. If that doesn't work, where do you put \setdefaultleftmargin? Try it inside the \begin{document} if you can, again it may be another package changing the settings once \begin{document} is processed. Feb 10, 2013 at 8:05
  • And if niether of those work, a MWE of it not working would be a great help! Feb 10, 2013 at 8:06
  • \newcommand{\nc}{\newcommand} \nc{\up}{\usepackage} \up[hmargin=1.2cm, vmargin=2cm]{geometry} \up{amsfonts} \up{amsmath} \up{amsthm} \up{amssymb} \up{xspace} \up[all]{xy} \up{ulem}% \uuline for double uline \up{extarrows} \up{paralist} \up[utf8]{inputenc} \up[T1]{fontenc} \up{titlesec}
    – h__
    Feb 10, 2013 at 8:29
  • What does MWE mean?
    – h__
    Feb 10, 2013 at 8:30

You must log in to answer this question.

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