3

What is the best way to change the amount of horizontal space in list environments?

Examples:

1.############################ % Near the enumerated item - compacted horizontal space
  ############################

2.############################
  ############################

3.############################
  ############################

and

1.     ############################ % Far from the enumerated item - stretched horizontal space
       ############################

2.     ############################
       ############################

3.     ############################
       ############################
3

You can adjust all list parameters easily using the enumitem package. For the example you give, the relevant parameter is the labelsep key:

\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}[labelsep=5em]
\item foo
\item bar
\end{enumerate}
\end{document}

For other parameters, check the documentation or look for other questions on the site that use the enumitem package.

| improve this answer | |
6

Without using any package, you can use list as follows.

enter image description here

\documentclass{article}


\usepackage{lipsum}
\begin{document}


\noindent
\lipsum[1]

\begin{list}{\stepcounter{enumi}Problem \arabic{enumi}:\ }
{
\setlength{\labelwidth}{2cm}
\setlength{\labelsep}{1cm}
\setlength{\leftmargin}{3cm}
}
   \item \lipsum[2]
   \item \lipsum[3]
\end{list}

\end{document}
| improve this answer | |
  • Sure, but if you want all lists to have the same format, this kind of solution gets tedious quite quickly. – Alan Munn Aug 2 '11 at 13:34
  • 1
    @Alan: Just define a new common environment, namely mylist. :-) Depending on the scenario we want, we might need to reset the counter. – xport Aug 2 '11 at 13:35
  • 2
    Yes, you can do this, but then your document parts aren't very portable. There are advantages to keeping standard environments. – Alan Munn Aug 2 '11 at 13:38

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.