27

I have the following:

This is just normal text...

\begin{enumerate}
\item First Item ?\\\\
This is the text of the first item
\item Second Item ?\\\\
This is the text of the second item
\end{enumerate}

Which renders the following:

This is just normal text...

1. First Item ?

   This is the text of the first item

2. Second Item ? 

   This is the text of the second item

I want to specify that the text of the items has no indentation. Basically, I want it to be rendered like such:

This is just normal text...

1. First Item ?

This is the text of the first item

2. Second Item ? 

This is the text of the second item

How can I specify this form of no indentation?

  • 1
    Don't use the enumerate environment at all. What you want to achieve should be possible with just normal line breaks and regular text. Unless the list is ungodly long or you change the order about every few minutes, the automatic numbering from the environment is not that crucial. – Timo Jun 06 '10 at 10:50
  • 8
    @Timo: Why not use an enumerate environment? It’s the best semantical match. This isn’t about automatic enumeration (only incidentally), it’s about semantics. Don’t write plain text in LaTeX, define and use appropriate macros. – Konrad Rudolph Jun 06 '10 at 10:54
  • @Konrad: Of course, you are right. I was merely pointing out that in this instance the effort and syntax of doing things the right way may not be worth the trouble when compared to the more simple way of just getting the thing done. – Timo Jun 06 '10 at 16:22

5 Answers5

22

Using package "enumitem":

\documentclass{article}

\usepackage{enumitem}

\begin{document}

\noindent Foo bar:
\begin{enumerate}[leftmargin=0cm,itemindent=.5cm,labelwidth=\itemindent,labelsep=0cm,align=left]
\item First Item ?\\
This is the text of the first item
\item Second Item ?\\
This is the text of the second item
\end{enumerate}


\end{document}
David Carlisle
  • 757,742
11

Konrad Rudolph's suggestion is on right track, but needs a couple tweaks. Here's tested version that should get what OP wants, requires adding a counter and zeroing out labelsep and labelwidth in addtion to what Konrad was doing:

\documentclass{article}

\usepackage{lipsum}

\newcounter{mycounter}  
\newenvironment{noindlist}
 {\begin{list}{\arabic{mycounter}.~~}{\usecounter{mycounter} \labelsep=0em \labelwidth=0em \leftmargin=0em \itemindent=0em}}
 {\end{list}}

\begin{document}

\begin{noindlist}
\item \lipsum[1]
\lipsum[2]
\item \lipsum[1]
\lipsum[2]
\end{noindlist}

\end{document}

Another solution would be to just use a user-defined counter without defining a new list environment at all. Then you could just use ordinary block paragraphs with no indent and insert and increment the user-defined counter as first part of each numbered paragraph. Would be slightly less code than the 'noindlist' macro above.

You define the counter with same \newcounter{mycounter} command. Increment with \stepcounter{mycounter}. And insert with \arabic{mycounter}. You could define a little macro to do the step and the insert in same command in front of each numbered paragraph.

8

Try customizing the list environment by providing appropriate values for \leftmargin, and \itemindent.

Something like the following (untested, values may actually differ since I don’t know what reference point is used):

\newenvironment{noindlist}
 {\begin{list}{\labelitemi}{\leftmargin=0em \itemindent=0em}}
 {\end{list}}
Konrad Rudolph
  • 39,394
  • 22
  • 107
  • 160
4

The most elegant and compact version I have come accross can be found here: Remove indent when using enumerate

It uses the enumitem package:

\documentclass{article}
\usepackage{enumitem}
\begin{document}
\noindent This is just normal text...
\begin{enumerate}[wide, labelwidth=!, labelindent=0pt]
    \item First Item ?\\[\parskip]
    This is the text of the first item
    \item Second Item ?\\[\parskip]
    This is the text of the second item
\end{enumerate}
\end{document}
dafrick
  • 131
1

the correct way to do it is:

This is just normal text...

\begin{enumerate} \item First Item ? \end{enumerate}

This is the text of the first item

\begin{enumerate}[resume] \item Second Item ? \end{enumerate}

This is the text of the second item

simply using [resume] and if you need to retake a sub-item it will also help you to accompany using \setcounter{enumii}{1}. A complete code that works as an example should include the enumitem package \usepackage{enumitem}

\documentclass[11pt,a4paper]{article}
\usepackage{enumitem}

\begin{document}

This is just normal text...

\begin{enumerate} \item First Item ? \end{enumerate}

This is the text of the first item

\begin{enumerate}[resume] \item Second Item ? \end{enumerate}

This is the text of the second item

\end{document}

this would look as follows

enter image description here