0

I'm making an outline and realized I needed another enumeration label. So, when I added the 5th one, and did the same \5 command, there was an error saying that it is an "undefined control sequence." What do I do? Please let me know and thank you.

\usepackage{outlines}
\usepackage{enumitem}
\setenumerate[1]{label=\Roman*.}
\setenumerate[2]{label=\Alph*.}
\setenumerate[3]{label=\roman*.}
\setenumerate[4]{label=\alph*.}
\setenumerate[5]{label=\arabic*.} %%% Not working%%%%%%
\newcommand{\tbf}[1]{\textbf{#1}}
\newcommand{\tit}[1]{\textit{#1}}

\begin{document}

\1 \tbf{Science}:
    \2 stuff 1
        \3 stuff 2
            \4 Stuff 3
                \5 HELP %%% Command not working %%%%%

\end{document}
1
  • By default only 4 levels of itemization/enumeration are supported by LaTeX and therefore most packages dealing with it. You'd have to manually add the next level to outlines.
    – Skillmon
    Feb 23 '19 at 9:18
2

The following uses https://tex.stackexchange.com/a/41409/117050 to add another level of enumeration (so that we can use a fifth level). It then changes the internals of outlines to support a fifth layer and to use myEnumerate as the list type.

\documentclass{article}

\usepackage{outlines}
\usepackage{enumitem}
\newlist{myEnumerate}{enumerate}{5}
\setlist[myEnumerate,1]{label=\Roman*.}
\setlist[myEnumerate,2]{label=\Alph*.}
\setlist[myEnumerate,3]{label=\roman*.}
\setlist[myEnumerate,4]{label=\alph*.}
\setlist[myEnumerate,5]{label=\arabic*.}
\newcommand{\tbf}[1]{\textbf{#1}}
\newcommand{\tit}[1]{\textit{#1}}

\usepackage{xpatch}

\makeatletter
\xapptocmd\outline{\newcommand{\5}{\ol@tov\ol@v\item}}{}
  {\GenericError{}{Patching `outline` failed}{}{}}
\renewcommand\ol@commands[6]
  {%
    \renewcommand{\ol@toz}{#1}%
    \renewcommand{\ol@toi}{#2}%
    \renewcommand{\ol@toii}{#3}%
    \renewcommand{\ol@toiii}{#4}%
    \renewcommand{\ol@toiiii}{#5}%
    \renewcommand{\ol@tov}{#6}%
  }
\xapptocmd\ol@exit{{}}{}
  {\GenericError{}{Patching `\string\ol@exit` failed}{}{}}
\xapptocmd\ol@z{{\ol@inci\ol@incii\ol@inciii\ol@inciiii\ol@incv}}{}
  {\GenericError{}{Patching `\string\ol@z` failed}{}{}}
\xapptocmd\ol@i{{\ol@incii\ol@inciii\ol@inciiii\ol@incv}}{}
  {\GenericError{}{Patching `\string\ol@i` failed}{}{}}
\xapptocmd\ol@ii{{\ol@inciii\ol@inciiii\ol@incv}}{}
  {\GenericError{}{Patching `\string\ol@ii` failed}{}{}}
\xapptocmd\ol@iii{{\ol@inciiii\ol@incv}}{}
  {\GenericError{}{Patching `\string\ol@iii` failed}{}{}}
\xapptocmd\ol@iiii{{\ol@incv}}{}
  {\GenericError{}{Patching `\string\ol@iiii` failed}{}{}}
\newcommand\ol@v
  {%
    \ol@commands
      {\ol@decv\ol@deciiii\ol@deciii\ol@decii\ol@deci}
      {\ol@decv\ol@deciiii\ol@deciii\ol@decii}
      {\ol@decv\ol@deciiii\ol@deciii}
      {\ol@decv\ol@deciiii}
      {\ol@decv}
      {}%
  }
\newcommand\outlinev{\ol@type}
\newcommand\ol@incv{\begin{\outlinev}}
\newcommand\ol@decv{\end{\outlinev}}
\newcommand\ol@tov{}
\renewcommand\ol@type{myEnumerate}
\makeatother

\begin{document}

\begin{outline}
\1 \tbf{Science}:
    \2 stuff 1
        \3 stuff 2
            \4 Stuff 3
                \5 HELP %%% Command not working %%%%%
\end{outline}

\end{document}

enter image description here

3
  • I tried adding it. But when I typeset, it gives me an error saying that "\5 change: implies new theory". What do I do?
    – Dave2343
    Feb 24 '19 at 1:42
  • The actual error was that its too deeply nested. How do I fix this?
    – Dave2343
    Feb 24 '19 at 2:37
  • @Dave2343 I'm not clairvoyant. I don't know what exactly you tried. It does work in the example above.
    – Skillmon
    Feb 24 '19 at 7:23

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.