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?

3
  • 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 6, 2010 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. Jun 6, 2010 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 6, 2010 at 16:22

5 Answers 5

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}
2
  • 2
    Doesn't work for custom item labels ex. \item[(a)] Foo. Just looks horrible. Mar 29, 2020 at 20:20
  • Where do these parameters go with something like \begin{enumerate}[1.] ?
    – user4417
    Feb 10 at 9:41
10

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}}
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}
2
  • 1
    Don't use \\\\ to make empty lines. It can result in an empty first on the page! Nov 8, 2017 at 8:03
  • Thanks, I have adjusted the example to use \\[\parskip]
    – dafrick
    Nov 8, 2017 at 12:18
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .