21

I've come across two ways to display lists, \begin{list} and \begin{itemize}. I couldn't find any information on the list environment. What is the difference between the two?

Here is a simple example:

\begin{list}{--}{}
    \item This bullet is within a \verb|\begin{list}|
    \item This is a second bullet
\end{list}
\begin{itemize}
    \renewcommand\labelitemi{--}
    \item This bullet is within a \verb|\begin{itemize}|
    \item This is a second bullet
\end{itemize}

The two commands, shown together

  • It would help if you could post compilable code. You don't normally invoke list directly in a document at all. – cfr Jun 19 '17 at 1:03
  • @ebo There is something like easy list or something. I thought maybe you had that in mind. (That can't be the right name, though, with the space.) – cfr Jun 19 '17 at 22:58
27

list is a basic LaTeX environment used to create list environments of all kinds, including itemize, enumerate and the description environments, as well as the 'trivial' list environments used for such things as quotations and abstracts.

You don't usually use the list environment directly in documents. Instead, it is used to create higher level environments, such as itemize, for use in documents.

Before packages such as enumitem were available, custom description, itemize and enumerate environments were created in this way. (Of course, they still can be, but enumitem makes it unnecessary in most cases.)

Here's an example specifying a simple variant on the description environment.

\documentclass{article}
\makeatletter
\newcommand{\labelpethau}[1]{\textsc{#1:}}
\newlength\normalparindent
\setlength\normalparindent{\parindent}
\newenvironment{pethau}%
{\begin{list}{}%
    {\renewcommand{\makelabel}{\labelpethau}%
      \setlength{\itemindent}{0pt}%
      \setlength{\leftmargin}{0pt}%
      \setlength{\labelwidth}{-1\normalparindent}%
      \addtolength{\topsep}{-0.5\parskip}%
      \listparindent \normalparindent
      \setlength{\parsep}{\parskip}}}%
  {\end{list}}
\makeatother
\begin{document}
\begin{pethau}
  \item[Question] some of what?
  \item[Answer] anything.
\end{pethau}
\end{document}

customised list

10

The itemize environment is a special case of the list environment. The list environment is more general: you can do more things with it. For instance,

\documentclass{article}

\usepackage{xcolor}

\begin{document}

\begin{list}{\color{blue}$\heartsuit$}{\color{red}}
\item first item
\item second item
\item third item
\end{list}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.