title: Too deeply nested at just fourth nesting level using pandoc with markdown?
body: <p>The following code is not accepted by <code>pandoc</code>:</p>
  
  <pre><code>1. Code Behaviors
      1. Logging
          1. No "bare" `System.out.println`'s
          1. Logging level can be calibrated by simple change(s) to logging.xml and/or log4j.properties
          1. Errors and exceptions go to appropriate WARN and/or ERROR logging levels
      1. Errors and Exceptions
          1. Almost never "swallowed"
              1. Can only happen for well understood situations
                  1. Must be documented clearly in code why they are swallowed
                  1. Only a specific exception or error may be swallowed this way
                  - In particular can not be done for general Exception.
                  - Throwable can never be handled this way
  </code></pre>
  
  <p>Which should look like this:</p>
  
  <ol>
  <li>Code Behaviors
  
  <ol>
  <li>Logging
  
  <ol>
  <li>No "bare" <code>System.out.println</code>'s</li>
  <li>Logging level can be calibrated by simple change(s) to logging.xml and/or log4j.properties</li>
  <li>Errors and exceptions go to appropriate WARN and/or ERROR logging levels</li>
  </ol></li>
  <li>Errors and Exceptions
  
  <ol>
  <li>Almost never "swallowed"
  
  <ol>
  <li>Can only happen for well understood situations
  
  <ol>
  <li>Must be documented clearly in code why they are swallowed</li>
  <li>Only a specific exception or error may be swallowed this way
  
  <ul>
  <li>In particular can not be done for general Exception.</li>
  <li>Throwable can never be handled this way</li>
  </ul></li>
  </ol></li>
  </ol></li>
  </ol></li>
  </ol></li>
  </ol>
  
  <p>Using the command line</p>
  
  <pre><code>pandoc --toc  --toc-depth=6 -V fontsize=10pt --pdf-engine xelatex
    -V geometry:"left=1.5cm,right=1.5cm,top=2cm,bottom=2cm" -o review.pdf review.md
  </code></pre>
  
  <p>We get</p>
  
  <pre><code>Error producing PDF.
  ! LaTeX Error: Too deeply nested.
  
  See the LaTeX manual or LaTeX Companion for explanation.
  Type  H &lt;return&gt;  for immediate help.
   ...
  
  l.159         \begin{enumerate}
  </code></pre>
  
  <p><strong>Update</strong>  I tried to add in additional levels using <code>enumitem</code> package to the preamble as suggested here <a href="https://tex.stackexchange.com/a/464459/45938">https://tex.stackexchange.com/a/464459/45938</a> - but to no effect (same error produced):</p>
  
  <pre><code>---
  title: My Review
  subtitle: My subtitle 
  documentclass: extarticle
  author: First Last Sept 15, 2019
  geometry: "left=1.5cm,right=1.5cm,top=2cm,bottom=2cm"
  header-includes:
    - \usepackage{unicode-math}
    - \setmainfont{TeX Gyre Schola}
    - \setmathfont{TeX Gyre Schola Math}
    - \usepackage{enumitem}
    - \setlistdepth{20}
    - \renewlist{itemize}{itemize}{20}
    - \setlist[itemize]{label=$\cdot$}
    - \setlist[itemize,1]{label=\textbullet}
    - \setlist[itemize,2]{label=--}
    - \setlist[itemize,3]{label=*}
  
  output:
    rmarkdown::html_document:
      theme: lumen
      fig_caption: yes
  
  ---
  </code></pre>