The following snippet in ox-latex.el processes negative tocdepths incorrectly:
#+begin_src emacs-lisp
;; Table of contents.
(let ((depth (plist-get info :with-toc)))
(when depth
(concat (when (wholenump depth)
(format "\\setcounter{tocdepth}{%d}\n" depth))
(plist-get info :latex-toc-command))))
#+end_src
When depth is -1, wholenump form evaluates to nil, and setcounter command is
not exported at all.
See, e.g.
https://en.wikibooks.org/wiki/LaTeX/Document_Structure#Sectioning_commands
for example of a negative level use.
signature.asc
Description: PGP signature
