all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Trivial bug in ox-latex
@ 2018-01-31 20:01 Akater
  2018-01-31 20:22 ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: Akater @ 2018-01-31 20:01 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 561 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-02-03 13:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-31 20:01 Trivial bug in ox-latex Akater
2018-01-31 20:22 ` Nicolas Goaziou
2018-02-01 14:50   ` Akater
2018-02-03 13:57     ` Nicolas Goaziou

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.