From mboxrd@z Thu Jan 1 00:00:00 1970 From: Akater Subject: Trivial bug in ox-latex Date: Wed, 31 Jan 2018 20:01:45 +0000 Message-ID: <87mv0tu79y.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56780) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1egydG-0006BV-P8 for emacs-orgmode@gnu.org; Wed, 31 Jan 2018 15:05:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1egydD-0002sY-EG for emacs-orgmode@gnu.org; Wed, 31 Jan 2018 15:05:22 -0500 Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]:40458) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1egydD-0002s2-8X for emacs-orgmode@gnu.org; Wed, 31 Jan 2018 15:05:19 -0500 Received: by mail-wm0-x234.google.com with SMTP id v123so1379280wmd.5 for ; Wed, 31 Jan 2018 12:05:18 -0800 (PST) Received: from localhost ([51.15.53.83]) by smtp.googlemail.com with ESMTPSA id y64sm494255wmg.35.2018.01.31.12.05.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Jan 2018 12:05:16 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain 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. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJaciCpAAoJELK+sWGx7H9EG0oQAIDsinZqZ/SCddGZrm/IWEFp JOXHgXEPHwpg3RkCD2e5lzYYbPKd0Yvqcc0G74wR/9RQT1YsZ5o1S7zUe3Sab9uX YdmeGkBl2ksASKUq/edRxAvfzpn/29DhtNA+fV66SccJQlmBqtYBKUeUMUrbkMjX DyWGgq22RjzNRD7ljDNx7tJLTXID4hJRyvU1YrfaLNGmhquRWa5jezdl24dHCL7W gkO7T6plujzISUW1hohSRW1zW3QTkOqLKmoBewgWYauvHRBt7EpGQJwmjS7ypyET fiky5xPz/dW+VSP/NqvAWkr2jhcYArVxxjlIUuM6B86DoezBz/cdb8xabXe/Y0j7 tTdghn68zR0uKewHC23+p2hQFhNfiXUHN07gZUJu9diV9x+UMEOl70rlNJC8QWiV oRDt8sjDdfFuN5utIvFABkF5D2NBXXc9lRqR1Ewqr1FkHQC46m1SOjQ7qKDMePe0 UVrJJORdNeafoFTXPHAaxkSMJz59JIuCQ9WkpStDTFjpQYeDCYFsan4tXQp6ltEf 56B/vmIPUJCw4gqljDhvNY6KyuTW7SH3ytEArQYkox8XDtMTwTV7PBpHDWhaP/5y 1nBd1q7fYz3YcNF5fKosx3qvQ7tjctcFSGkgACCUsBonP9pplrJ5NXDREpRvxANg pHfC/pSyVsWj+WCli3eb =DmnB -----END PGP SIGNATURE----- --=-=-=--