How to make a enumerate list with no indent and no left margin like this?

Here is a way with enumitem: I define a \problems (level 1+2) list environment and a questions environment, which is to be used semantically as problems, level 2(but technically, nothing prevents you to use it at the first level). Similarly, I defined two clones of \item, \pb and \qu.

\documentclass[12pt, a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}

\usepackage[showframe]{geometry}
\usepackage{blindtext}

\usepackage{enumitem}
\newlist{problems}{enumerate}{2}
\setlist[problems, 1]{label=Problem~\arabic*. , font=\bfseries,  wide=0pt}%
\setlist[problems, 2]{label=\emph{alph*}),  wide=0pt, before=\leavevmode, topsep=0pt}%
\newenvironment{questions}{\problems}{\endproblems}
\let\pb\item
\let\qu\item

\begin{document}

Text text text text text text text text text text text text text text text text text text text text text text text text text text text text.
\begin{problems}
  \pb \blindtext
  \pb \blindtext
  \item
  \begin{questions}
    \qu \blindtext
    \qu \blindtext
  \end{questions}
\end{problems}

\end{document}

enter image description here


As mentioned before, you can use the enumitem package.

Using the enumitem package, you may specify options to the \begin{enumerate} macro. In the newer versions, you may specify a wide option. In the old versions you must specify multiple options to reduce the margins. You may specify the label using the label option. The following is an example based on your question:

\documentclass[12pt,a4paper]{article}
\usepackage{blindtext}
\usepackage{enumitem}    
\begin{document}    

\begin{enumerate}[
    label={\bf Problem \arabic*.}
    align=left, leftmargin=0pt, 
          labelindent=0pt,listparindent=0pt, labelwidth=8em, itemindent=!]

    \item \blindtext. 
    \item \blindtext. 

\end{enumerate}

\end{document}

The third item in your question may introduce other two problems: (1) How to create an empy item and (2) how to introduce an inner list without additional space.

Fisrt, if you need an item with a blank line, trying to include only \\ will result an error. According to LaTeX, there is no line to end. You can use ~\\ to include a blank space and then a new line.

Second, when you introduce an inner list, LaTeX may introduce additional space between the items. You can use \vspace{} with a negative value to reduce the space. \vspace{-\topsep} reduces the space by the length of the top separation. \vspace{-2\topsep} reduces the double.

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

\begin{document}

\noindent I want to make a enumerate list like this:\\

\begin{enumerate}[
    label={\bf Problem \arabic*.},
    align=left, leftmargin=0pt, labelindent=0pt,listparindent=0pt, labelwidth=6em, itemindent=!]

    \item \blindtext 
    \item \blindtext 

    % a blank item
    \item ~\\

    % an inner list        
    \vspace{-2\topsep}
    \begin{enumerate}[
        label=\alph*),
        align=left, leftmargin=0pt, labelindent=0pt,listparindent=0pt, labelwidth=0pt, itemindent=!]

        \item \blindtext
        \item \blindtext            
    \end{enumerate}

\end{enumerate}    
\end{document}

Tags:

Enumerate