1

I'm trying to create an enumeration for a Hierarchical Task Analysis. According to the style I've been given the list needs to look like the following:

To try and demonstrate the indentations clearer (markdown wasn't working very well) I have indicated indents using '-'. The enumerisation is meant to have 0 as the root with 1 and 2 as its children. 1.1, 1.2 and 1.3 are all children of 1. Sorry the original question wasn't completely clear.

Plan 0: 1 then 2

0 Use SatNav

-1 Select new

--1.1 Chose Postcode

--1.2 Chose City

--1.3 Chose Previous Destination

-2 Chose Mode

However, I can't get LaTeX to display a list in this style where the root is 0 and its children start at 1. Please help.

Here is an example from my lecture notes: Lecture note example

3

If I understand you correctly you want to:

  1. have your enumerations to start from 0 instead of one;
  2. have the labels for your enumerations (at least two levels) to end with a parenthesis;
  3. have the number nested

I have provided the code below, here some remarks:

  • use the package enumitem to customize the lists
  • the setlist instruction allows for the first layer to start from 0
  • the renewcommand apply the parenthesis and the "nested numbering".

So here it is:

 \documentclass{article}
 \usepackage[utf8]{inputenc}
 %enumitem will manage the enumerations
 \usepackage{enumitem}

 % tells that the enumeration of level 1 (outermost) should start at 0
 \setlist[enumerate,1]{start=0}

 % sets the label for the second level of the enumeration to its counter value
 \renewcommand{\labelenumii}{\theenumii}

 % set the value of the second level counter representation as 
 % 1st level counter followed by "." 
 % followed by the arabic number of the 2nd level, 
 % followed by ")" e.g. 2.1)
 \renewcommand{\theenumii}{\theenumi.\arabic{enumii})}

 % sets the label for the first level of the enumeration to its value followed by ")"
 \renewcommand{\labelenumi}{\theenumi)} 

 \begin{document}

 \begin{enumerate}
   \item Use SatNav
   \item Select new destination
   \begin{enumerate}
     \item Chose Postcode
     \item Chose City
     \item chose Previous Destination
   \end{enumerate}
   \item Chose Mode 
 \end{enumerate}

 \end{document}

Here are the results

1
\documentclass{article}
\usepackage{enumitem}
\begin{document}
    \begin{enumerate}[start=0]
       \item Use SatNav
       \item Select new destination
           \begin{enumerate}[label*=\arabic*.]
             \item Chose Postcode
             \item Chose City
             \item chose Previous Destination
           \end{enumerate}
       \item Chose Mode 
    \end{enumerate}
 \end{document}

enter image description here

If you will use a lot nested list with legal style, write in the preamble some like:

\newlist{legal}{enumerate}{5}
\setlist[legal]{label*=\arabic*.}

And then you can use the environment legal without optional arguments (i.e., \begin{legal} \item text ... \end{legal}).

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.