1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-22 07:09:47 +00:00

org-list: fix item's start number in LaTeX exporter

* lisp/org-list.el (org-list-to-latex): the enumerate environment in
latex increments the counter before using it. Therefore, org-mode
should set the enumeration counter to the desired value minus one.

Patch from Darlan Cavalcante Moreira
TINYCHANGE
This commit is contained in:
Nicolas Goaziou 2011-06-10 15:48:24 +02:00
parent 1de29a0059
commit 889a487ae4

View File

@ -2946,8 +2946,11 @@ with overruling parameters for `org-list-to-generic'."
:istart "\\item " :iend "\n"
:icount (let ((enum (nth depth '("i" "ii" "iii" "iv"))))
(if enum
;; LaTeX increments counter just before
;; using it, so set it to the desired
;; value, minus one.
(format "\\setcounter{enum%s}{%s}\n\\item "
enum counter)
enum (1- counter))
"\\item "))
:csep "\n"
:cbon "\\texttt{[X]}" :cboff "\\texttt{[ ]}")