2

How do I go about defining an enumerate environment (using the enumitem package) (or possibly another environment?) such that the distance from the left side of the text to the LABEL is, say, 5 cm. Using

\begin{enumerate}[leftmargin=5cm]

makes 5 cm to the text inside enumerate, not to the label "ARG."

Also, how do I define the linespread inside enumerate to be 1, such that I still have a blank (1.5) line above the environment? This code:

\begin{enumerate}
\linespread{1}\selectfont

messes up the linespread above.

I'm using the memoir class, the command \linespread{value} to change spacing, and I'm using the enumitem package.

The picture below should display what I want.

This image (made in MS Word :-/) should be able to show what I'm looking for

Here is an example that shows what's wrong:

\documentclass{memoir}
\usepackage{enumitem}
\linespread{1.5} 

\newenvironment{test}[1]{%
  \begin{enumerate}[leftmargin=2cm,rightmargin=2cm]%
    \linespread{1}\selectfont%
    \item[#1.]}{%
  \end{enumerate}
}

\begin{document}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin lacinia tristique arcu sed posuere. Mauris semper dui lobortis, commodo quam a, interdum est. Donec lobortis dapibus massa, ut cursus velit. Donec egestas eget sem ut vehicula. Morbi in est vehicula libero hendrerit luctus eu egestas ante.
\begin{test}{ARG}
Cras vestibulum tincidunt pretium. Fusce gravida leo lacus, nec condimentum mi iaculis quis. Mauris maximus lorem felis, in fringilla magna commodo laoreet.
\end{test}
Vestibulum sodales consectetur porttitor. Ut tincidunt metus a nunc maximus, sed iaculis arcu commodo. Aliquam nibh massa, pretium vitae orci vel, lacinia sodales libero. Nunc quis ex id purus bibendum aliquet pulvinar et sem. Sed a rutrum tortor. Nullam tempor leo eu tristique auctor.
\end{document}

which gives (notice the wrong spacing between the text and the enumerate environment):

NOT 2 cm

1

I assume you are using \usepackage[onehalfspacing]{setspace} to get your document set with one-half spacing. A good package to modify lists is enumitem. This might solve your problem:

\documentclass{article}
\usepackage[onehalfspacing]{setspace}
\usepackage{enumitem}
\usepackage{blindtext}
\begin{document}
\blindtext
\begin{singlespace}
  \begin{enumerate}[leftmargin=5cm]
    \item \blindtext
    \item \blindtext
\end{enumerate}
  \end{singlespace}
\blindtext
\end{document}

enter image description here

  • As I mentioned in my question, using \begin{enumerate}[leftmargin=5cm] does not make the distance to the LABEL 5 cm, but to text inside enumerate. This is not what I want. I have looked at the documentation for enumitem but I cannot seem to figure out how to do this. mirrors.dotsrc.org/ctan/macros/latex/contrib/enumitem/… – smlange Oct 11 '14 at 11:14
  • Did you try my example? What does it produce for you and where does it differ from what you want? Maybe you could also post your MWE above in your question. – Lucas Oct 11 '14 at 11:22
  • I tried your example with the same margin problem. I have now provided a M(non-)WE – smlange Oct 11 '14 at 11:41
  • I see, I also tried your MWE but can not see a quick solution. You might have to play around with the stuff in §3.2 and 3.3 of enumitem. This command might help you see distances at a glance: \newcommand\testbox[1]{\framebox[#1]{this is #1}}% argument is some length – Lucas Oct 11 '14 at 12:06

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.