Text Formattingenumitem | Indentation for whole Item in an enumerated List

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
andrewejaffe
Posts: 2
Joined: Mon Nov 05, 2012 4:42 pm

enumitem | Indentation for whole Item in an enumerated List

Post by andrewejaffe »

Hey,

This is my first post, so hopefully I'm clear, and posting this to the right place.

I'm trying to create an enumerated list, where each list element is multi-lined. I was to align the entire list element about 0.75cm away from the left margin. My current code almost does what I want, except for it only indents the first line of the list element, and not the subsequent lines. Here is my code:

Code: Select all

\begin{enumerate}[leftmargin=0cm,itemindent=.75cm,labelwidth=\itemindent,labelsep=0cm,align=left,label={[\arabic*]}]

\item fadajakdhfjadshfadsjhflahlahdjsakfadfadfhadsjfhalsdjfjasdjfhadsfjhdlkfahdslflhadjfhaldsfh
\item fadajakdhfjadshfadsjhflahlahdjsakfadfadfhadsjfhalsdjfjasdjfhadsfjhdlkfahdslflhadjfhaldsfh

\end{enumerate}
I tried \hangindent from the hanging package, but it didn't seem to do anything...Any help would be great, thanks in advance for your time
Last edited by Stefan Kottwitz on Mon Nov 05, 2012 6:24 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

enumitem | Indentation for whole Item in an enumerated List

Post by cgnieder »

Hi Andrew,

Welcome to the LaTeX community!

Maybe something like this is what you want:

Code: Select all

\documentclass{article}
\usepackage{enumitem}
\usepackage{lipsum}% for dummy text
\begin{document}
\lipsum[1]
\begin{enumerate}[leftmargin=.75cm,labelsep=0cm,align=left,label={[\arabic*]}]
  \item \lipsum[1]
  \item \lipsum[2]
\end{enumerate}

\end{document}
Regards
site moderator & package author
andrewejaffe
Posts: 2
Joined: Mon Nov 05, 2012 4:42 pm

enumitem | Indentation for whole Item in an enumerated List

Post by andrewejaffe »

That's a little different than I was imagining. Basically I wanted something like this, with no left margin, and the multi-line element indented (not just the first line:

Code: Select all

[1] Aadsfjadshfadjkshfa
    asdsadfdsafadsfadsfasd
    fadsfdafadfadfadfadsf
This is what [leftmargin=0cm,itemindent=.75cm] looks like:
[1] ASdsjkdhsakjdhas
sdjhsldhsdjkasdhsadk
dsjkadhjkasdhasjdhjk

Do you know the specific options to enable this? Thanks in advance.
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

enumitem | Indentation for whole Item in an enumerated List

Post by cgnieder »

This is how my code from above looks like:
enumitem.png
enumitem.png (50.43 KiB) Viewed 30869 times
Isn't that what you just described?

Regards
site moderator & package author
Post Reply