8

I noticed that when I use enumerated list environment it produces an extra indentation to the document. So that if I'm using \usepackage[margin=3cm]{geometry} and then the enumerated list, the left margin is further indented than the right one, and the text is not centerally symmetric. Is there a simple way to fix this, other than define a new list environment for non-indented numbers? (possible, but I rather use a something simple. geometry package options would be preferable)

  • 2
    Welcome to tex.sx! Normally, lists are "indented" only relative to the left margin because the label (here, a number) needs some space. It is certainly possible to change the settings for lists, but you have to specify exactly how the lists should look like (e.g., "labels should be positioned in the left margin, raggedleft, with 1em space between label and text"). – lockstep Sep 15 '11 at 22:35
  • Welcome to TeX.sx! Note that this is a question and answer site and not a normal forum. It doesn't follow the normal thread style. Only solutions should be posted as answers. Please edit your question or add comments to provide feedback instead. Your session expired and your second post was therefore added with a new, but identical looking, account. Therefore you couldn't add comments (which is limited to the OP or users with >=50rep). Please consider register you account to avoid this in the future. – Martin Scharrer Sep 16 '11 at 6:53
12

To get enumerated and itemized lists that have the same amounts of left-hand and right-hand indentation, I'd recommend using the enumitem package -- which provides many extensions to and improvements over LaTeX's list environments -- and its leftmargin and rightmargin options. The following MWE illustrates this.

\documentclass{article}
\usepackage[margin=3cm]{geometry} % per the example in your code
\usepackage{lipsum} % for filler text
\usepackage{enumitem}

\begin{document}
\lipsum[1] % filler text
\begin{enumerate}[leftmargin=2cm,rightmargin=2cm]
\item \lipsum[2]
\end{enumerate}
\lipsum[3]
\begin{itemize}[leftmargin=1cm,rightmargin=1cm]
\item \lipsum[4]
\end{itemize}
\end{document}

Added material after receiving a comment from the OP. I'm afraid I'm not quite sure about the meaning of the question

But how do I make the indentations of the \item the same as the original text?

The new MWE below provides four separate option settings for shaping the itemized (or, equivalently, enumerated) list items. Hopefully, one of these settings meets your needs.

\documentclass{article}
% some short filler text, ca. 3 lines long
\newcommand{\shortfiller}{Nam dui ligula, fringilla a, euismod sodales, sollicitudin vel, wisi. Morbi auctor lorem non justo. Nam lacus libero, pretium at, obortis vitae, ultricies et, tellus. Donec aliquet, tortor sed accumsan bibendum, erat ligula aliquet magna.}
\usepackage{fancyvrb}
\usepackage[margin=3cm]{geometry}
\usepackage{enumitem}

\begin{document} 
\DefineShortVerb{\|}
\emph{``Normal'' text paragraph.} \shortfiller
%% Option 1
\begin{enumerate}[leftmargin=2cm, rightmargin=2cm]
\item \emph{Settings:} |[leftmargin=2cm, rightmargin=2cm]|. 
\shortfiller
\end{enumerate}

\emph{``Normal'' text paragraph.} \shortfiller
%% Option 2
\begin{enumerate}[resume, wide=2cm, leftmargin=2cm, rightmargin=2cm]
\item \emph{Settings:} |[wide=2cm, leftmargin=2cm,  rightmargin=2cm]|.
\shortfiller
\end{enumerate}

\emph{``Normal'' text paragraph.} \shortfiller
%% Option 3
\begin{enumerate}[resume, wide=\parindent, leftmargin=\parindent, rightmargin=\parindent]
\item \emph{Settings:} |[wide=\parindent, leftmargin=\parindent, rightmargin=\parindent]|.  
\shortfiller
\end{enumerate}

\emph{``Normal'' text paragraph.} \shortfiller
%% Option 4
\begin{enumerate}[resume, wide=\parindent]
\item \emph{Setting in this and the following item:} |[wide=\parindent]|. 
\shortfiller 
\item \shortfiller
\end{enumerate}

\emph{``Normal'' text paragraph.} \shortfiller
\end{document}

Suppose the final setting of the list items is what you're looking for. If you want this setting to apply uniformly to all enumerated and itemized lists, you should insert the command

\setlist{wide=\parindent}

in your document's preamble, immediately after the \usepackage{enumitem} instruction.

  • Thanks. It does work in providing symmetric indentation with respect to left and right margins. But how do I make the indentations of the \item the same as the original text? For example, in the following text the first "regular" enumerate has it's \item indented with respect to the the text, and the "enhanced" one with leftmargin and rightmargin has it's text aligned with the first lipsum text, not it's number aligned. – PineApple Sep 16 '11 at 3:50
  • \documentclass{article} \usepackage[margin=3cm]{geometry} % per the example in your code \usepackage{lipsum} % for filler text \usepackage{enumitem} \begin{document} \lipsum[1] % filler text \begin{enumerate} \item \lipsum[3] \end{enumerate} \begin{enumerate}[leftmargin=0cm,rightmargin=0cm] \item \lipsum[3] \end{enumerate} \end{document} – PineApple Sep 16 '11 at 3:50
  • I'm afraid I'm not quite sure what you're looking for. In the answer above, I've added some more examples to illustrate various outcomes. Hopefully, one of these is what you're looking for. Happy TeXing! – Mico Sep 16 '11 at 9:50
  • Ok thanks! The option [wide=\parindent, leftmargin=\parindent, rightmargin=\parindent] does what I wanted – PineApple Sep 16 '11 at 14:28
2

Both this question as well as its (closed) duplicate How to move enumerate to the right suggest to use the enumitem environment.

However, it is known to conflict with beamer (in particular with the options [<+->], which you can pass on the list environments). Thus, in these cases, one needs a different solution:

I have solved this issue by simply putting the itemize into a minipage and moving the minipage to the right:

 \begin{frame}{some title}

 \hspace*{.1\linewidth}%
 \begin{minipage}[t]{.9\linewidth}
   \begin{itemize}[<+->]
     \item first item
     \item second item
   \end{itemize}
 \end{minipage}

 \end{frame}

Please note that due to moving it to the right you might want to make the minipage smaller. Thus, when moving it 10% of the linewidth to the right (\hspace*{.1\linewidth}), make the minipage 90% of the linewidth (\begin{minipage}[t]{.9\linewidth}).

If ou want "to see" how large your minipage is, surround it with \fbox{}

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.