Re: [O] [Bug] [Patch] List number start with the latex exporter
Hello, Darlan Cavalcante Moreira darc...@gmail.com writes: When using a numbered list it is possible to specify the start number using [@number] so that one can write 1. one 2. two 20. [@20] twenty 21. twenty one This works OK with the HTML exporter, but in the latex exporter the number will be one unity above the desired value. The reason why this happens is because the \item command in 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. A patch is attached for the lisp/org-list.el file. Thank you! Patch applied. Regards, -- Nicolas Goaziou
[O] [Bug] [Patch] List number start with the latex exporter
When using a numbered list it is possible to specify the start number using [@number] so that one can write 1. one 2. two 20. [@20] twenty 21. twenty one This works OK with the HTML exporter, but in the latex exporter the number will be one unity above the desired value. The reason why this happens is because the \item command in 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. A patch is attached for the lisp/org-list.el file. -- Darlan Cavalcante diff --git a/lisp/org-list.el b/lisp/org-list.el index d72a284..efecaf5 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -2947,7 +2947,7 @@ with overruling parameters for `org-list-to-generic'. :icount (let ((enum (nth depth '(i ii iii iv (if enum (format \\setcounter{enum%s}{%s}\n\\item -enum counter) +enum (- counter 1)) \\item )) :csep \n :cbon \\texttt{[X]} :cboff \\texttt{[ ]})