Text FormattingIndent a single item in an enumerate environment

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
DanielHK
Posts: 2
Joined: Sun Aug 09, 2009 1:54 pm

Indent a single item in an enumerate environment

Post by DanielHK »

Hello,

I'd like to make an enumerated list when one of the items, but not all, is indented further than the rest. It should look something like this:

Code: Select all

  1. one
  2. two
    3. three
  4. four
Does LaTeX support his?
I tried to find an answer to my question using Google, but I couldn't find anything.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
TikZ book
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Indent a single item in an enumerate environment

Post by frabjous »

Here's how I would do it, using the enumitem package, and some manual toying with the counter:

Code: Select all

\documentclass{article}
\usepackage{enumitem}
\begin{document}
   \begin{enumerate}[label=\arabic*.]
      \item one
      \item two
      \addtocounter{enumi}{1}
      \begin{enumerate}[label=\arabic*.,start=\value{enumi}]
         \item three
      \end{enumerate}
      \item four
   \end{enumerate}
\end{document}
Maybe someone will have a better idea, though.
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Indent a single item in an enumerate environment

Post by gmedina »

Another option could be to increase locally the value of \itemindent:

Code: Select all

\documentclass{article}

\begin{document}

\begin{enumerate}
  \item one
  \item two
  {\setlength\itemindent{25pt} \item three}
  \item four
\end{enumerate}

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
DanielHK
Posts: 2
Joined: Sun Aug 09, 2009 1:54 pm

Indent a single item in an enumerate environment

Post by DanielHK »

Thanks, that seems good.
However, I'm surprised one can't just type \indent at the beginning of the \item, or something...
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Indent a single item in an enumerate environment

Post by localghost »

DanielHK wrote:[...] However, I'm surprised one can't just type \indent at the beginning of the \item, or something [...]
The appearance of a list environment is characterized by certain parameters. gmedina has shown how to use one of them.
Post Reply