Text Formattingmemoir | Custom left Margin for enumerated Lists

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
laurocesar
Posts: 7
Joined: Tue Dec 04, 2012 12:34 pm

memoir | Custom left Margin for enumerated Lists

Post by laurocesar »

Hello,

how can I set \leftmargin in a {enumerate} environment of memoir?

Code: Select all

\begin{enumerate}[a)]\leftmargin5cm 
  \item One
  \item Two
\end{enumerate}
In this case, \leftmargin5cm or \setlength{leftmargin}{5cm} has no effect.

Thanks!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

memoir | Custom left Margin for enumerated Lists

Post by meho_r »

If you want an easy version, you can try enumitem package instead of memoir's way of dealing with lists. E.g.:

Code: Select all

\documentclass{memoir}

\usepackage{enumitem}% for customizing the lists

\usepackage{showframe}% just to show page geometry, not needed

\begin{document}

\noindent Some text.

\begin{enumerate}[leftmargin=5cm,label={\alph*)}]
\item First first first first first first first first first first first first first first first
\item Second second second second second second second second second second second second second second second
\item Third third third third third third third third third third third third third third third
\end{enumerate}

Some text.

\end{document}
If you're going to reuse the same list more than once in your document, you can define your own list, e.g., for a list with two levels, you can do something like this:

Code: Select all

\documentclass{memoir}

\usepackage{enumitem}

\newlist{mylist}{enumerate}{2}% a new list named: mylist, of type: enumerate, with number of levels: 2

\setlist[mylist,1]{leftmargin=5cm,label={\alph*)}}% defining the first level
\setlist[mylist,2]{leftmargin=1cm,label={\roman*)}}% defining the second level

\begin{document}

\noindent Some text.

\begin{mylist}% this is the first level
\item Level 1
\item Level 1
\item Level 1
    \begin{mylist}% this is the second level
    \item Level 2
    \item Level 2
    \item Level 2
    \end{mylist}
\item Level 1
\item Level 1
\item Level 1
\end{mylist}

Some text.

\end{document}
For more infos, take a look at enumitem's documentation.
Post Reply