Chapter 4, Creating Lists

Contents:


A bulleted list

\documentclass{article}
\begin{document}
\section*{Useful packages}
LaTeX provides several packages for designing the layout:
\begin{itemize}
  \item geometry
  \item typearea
  \item fancyhdr
  \item scrpage2
  \item setspace
\end{itemize}
\end{document}
bulleted list

Nested bulleted lists

\documentclass{article}
\begin{document}
\begin{itemize}
  \item Page layout
  \begin{itemize}
    \item geometry
    \item typearea
  \end{itemize}
  \item Headers and footers
  \begin{itemize}
    \item fancyhdr
    \item scrpage2
  \end{itemize}
  \item Line spacing
  \begin{itemize}
    \item setspace
  \end{itemize}
\end{itemize}
\end{document}
nested bulleted list

A numbered list

\documentclass{article}
\usepackage[shortlabels]{enumitem}
\begin{document}
\begin{enumerate}[label=\textcircled{\scriptsize\Alph*},
    font=\sffamily]
  \item State the paper size by an option to the document
        class
  \item Determine the margin dimensions using one of these
        packages:
  \begin{itemize}[label=---,itemsep=-2pt]
    \item geometry
    \item typearea
  \end{itemize}
  \item Customize header and footer by one of these packages:
  \begin{itemize}
    \item fancyhdr
    \item scrpage2
  \end{itemize}
  \item Adjust the line spacing for the whole document
  \begin{itemize}
    \item by using the setspace package
    \item or by the command \verb|\linespread{factor}|
  \end{itemize}
\end{enumerate}
\end{document}
tabbing example

Compact lists

\documentclass{article}
\usepackage{paralist}
\begin{document}
\begin{compactenum}
  \item State the paper size by an option to the document
       class
  \item Determine the margin dimensions using one of these
       packages:
  \begin{compactitem}
    \item geometry
    \item typearea
  \end{compactitem}
  \item Customize header and footer by one of these packages:
  \begin{compactitem}
    \item fancyhdr
    \item scrpage2
  \end{compactitem}
  \item Adjust the line spacing for the whole document
  \begin{compactitem}
    \item by using the setspace package
    \item or by the command \verb|\linespread{factor}|
  \end{compactitem}
\end{compactenum}
\end{document}
tabbing example

In-pragraph lists

\documentclass{article}
\usepackage{paralist}
\begin{document}
\begin{compactenum}
  \setcounter{enumi}{3}
  \item Adjust the line spacing for the whole document
  \begin{compactitem}
    \item by using the setspace package and one of its options:
      \begin{inparaenum}
      \item singlespacing
      \item onehalfspacing
      \item double spacing
      \end{inparaenum}
    \item or by the command \verb|\linespread{factor}|
  \end{compactitem}
\end{compactenum}
\end{document}
tabbing example

Lists with customized symbols

\documentclass{article}
\usepackage{enumitem}
\setlist{nolistsep,leftmargin=*}
\setitemize[1]{label=---}
\setenumerate[1]{label=\textcircled{\scriptsize\Alph*},
  font=\sffamily}
\begin{document}
\begin{itemize}
  \item State the paper size by an option to the document
       class
  \item Determine the margin dimensions using one of these
       packages:
  \begin{itemize}
    \item geometry
    \item typearea
  \end{itemize}
  \item Customize header and footer by one of these packages:
  \begin{itemize}
    \item fancyhdr
    \item scrpage2
  \end{itemize}
  \item Adjust the line spacing for the whole document
  \begin{itemize}
    \item by using the setspace package
    \item or by the command \verb|\linespread{factor}|
  \end{itemize}
\end{itemize}
\end{document}
tabbing example

Restarting numbering

\documentclass{article}
\usepackage{enumitem}
\setlist{nolistsep}
\setitemize[1]{label=---}
\setenumerate[1]{label=\textcircled{\scriptsize\Alph*},
  font=\sffamily}
\begin{document}
\begin{enumerate}
  \item State the paper size by an option to the document
       class
  \item Determine the margin dimensions using one of these
       packages:
  \begin{itemize}
    \item geometry
    \item typearea
  \end{itemize}
  \item Customize header and footer by one of these packages:
  \begin{itemize}
    \item fancyhdr
    \item scrpage2
  \end{itemize}
\end{enumerate}
\subsubsection*{Tweaking the line spacing:}
\begin{enumerate}[resume*] 
  \item Adjust the line spacing for the whole document
  \begin{itemize}
    \item by using the setspace package
    \item or by the command \verb|\linespread{factor}|
  \end{itemize}
\end{enumerate}
\end{document}
tabbing example

A definition list

\documentclass{article}
\usepackage{enumitem}
\setdescription{itemsep=0pt,parsep=0pt,leftmargin=0.5cm}
\begin{document}
\begin{description}
  \item[paralist] provides compact lists and list versions
    that can be used within paragraphs, helps to customize
    labels and layout
  \item[enumitem] gives control over labels and lenghts in all
    kind of lists
  \item[mdwlist] is useful to customize description lists,
    it even allows multi-line labels. It features compact lists
    and the capability to suspend and resume.
  \item[desclist] offers more flexibility in definition list
  \item[multenum] produces vertical enumeration in
    multiple columns
\end{description}
\end{document}
tabbing example

Layout of lists

\documentclass[12pt]{article}
\usepackage{layouts}
\begin{document}
\listdiagram
\end{document}
tabbing example

Back to the list of contents]]>

Leave a Reply

Required fields are marked *