diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2011-06-10 15:48:24 +0200 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2011-06-10 15:50:51 +0200 |
commit | 889a487ae436ceb34877d87e90828016feeab1ad (patch) | |
tree | 02bab5069bd5f780ddcae60f48acb13afc95b15f | |
parent | 1de29a0059e300da5e0245a209f66275c4eb3ec8 (diff) | |
download | org-mode-889a487ae436ceb34877d87e90828016feeab1ad.tar.gz |
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
-rw-r--r-- | lisp/org-list.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/org-list.el b/lisp/org-list.el index d72a284..5160224 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -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{[ ]}") |