[Tex/LaTex] \noindent won’t work for stopping indentation after a math formula

descriptionequationsindentationlists

In this minimal working example:

\documentclass{article}
\begin{document}
\begin{description}
\item [{a)}] \begin{flushleft} test1 test1 test1 test1
test2 test2 test2 test2 
\[
x^2+x+1=0
\]
%
\noindent test3 test3 test3 test3
\par\end{flushleft}
\item [{b)}] test4 test4 test4 test4
test5 test5 test5 test5
\end{description}
\end{document}

I don't want the

test3 test3 test3 test3

line, after the equation indented. But neither using \noindent nor the trick with the "%" from this question worked. Do you have any ideas how I could stop the indentation? (It is preferable, to keep everything inside the

\begin{description}..

block and not to use a different command – or if I have to use a different command, than I would like to use one that allows me to put the "a)" and "b)" at the beginning of each line and handles spacing, like the \begin{description} automatically.)

Best Answer

As egreg and Werner have hinted, the observed indentation is not caused by a paragraph, but is a feature of any but the first lines of your description items. You can see this by placing additional "test2" strings before the equation in your first item.

\documentclass{article}
\begin{document}
\begin{description}
\item [{a)}] \begin{flushleft} test1 test1 test1 test1
test2 test2 test2 test2 
test2 test2 test2 test2 
test2 test2 test2 test2 
test2 test2 test2 test2 
test2 test2 test2 test2 
test2 test2 test2 test2 
\[
x^2+x+1=0
\]
%
\noindent test3 test3 test3 test3
\par\end{flushleft}
\item [{b)}] test4 test4 test4 test4
test5 test5 test5 test5
\end{description}
\end{document}

enter image description here

I suggest to use an enumerate environment instead (and to load the enumitem package to customize the environment's label).

\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}[label=\textbf{\alph*)}]
\item test1 test1 test1 test1
test2 test2 test2 test2 
\[
x^2+x+1=0
\]
%
test3 test3 test3 test3
\item test4 test4 test4 test4
test5 test5 test5 test5
\end{enumerate}
\end{document}

enter image description here

Related Question