This commit is contained in:
parent
10607d45ae
commit
88d218a5a0
|
@ -2172,8 +2172,9 @@ contextual information."
|
|||
"Transcode an ITEM element from Org to LaTeX.
|
||||
CONTENTS holds the contents of the item. INFO is a plist holding
|
||||
contextual information."
|
||||
(let* ((counter
|
||||
(let ((count (org-element-property :counter item))
|
||||
(let* ((orderedp (eq (org-element-property
|
||||
:type (org-export-get-parent item))
|
||||
'ordered))
|
||||
(level
|
||||
;; Determine level of current item to determine the
|
||||
;; correct LaTeX counter to use (enumi, enumii...).
|
||||
|
@ -2185,12 +2186,13 @@ contextual information."
|
|||
(eq (org-element-property :type parent)
|
||||
'ordered))
|
||||
(cl-incf level)))
|
||||
level)))
|
||||
(and count
|
||||
level))
|
||||
(count (org-element-property :counter item))
|
||||
(counter (and count
|
||||
(< level 5)
|
||||
(format "\\setcounter{enum%s}{%s}\n"
|
||||
(nth (1- level) '("i" "ii" "iii" "iv"))
|
||||
(1- count)))))
|
||||
(1- count))))
|
||||
(checkbox (cl-case (org-element-property :checkbox item)
|
||||
(on "$\\boxtimes$")
|
||||
(off "$\\square$")
|
||||
|
@ -2209,9 +2211,11 @@ contextual information."
|
|||
"\\item"
|
||||
(cond
|
||||
((and checkbox tag)
|
||||
(format "{%s %s} %s" checkbox tag tag-footnotes))
|
||||
(format (if orderedp "{%s %s} %s" "[{%s %s}] %s")
|
||||
checkbox tag tag-footnotes))
|
||||
((or checkbox tag)
|
||||
(format "{%s} %s" (or checkbox tag) tag-footnotes))
|
||||
(format (if orderedp "{%s} %s" "[{%s}] %s")
|
||||
(or checkbox tag) tag-footnotes))
|
||||
;; Without a tag or a check-box, if CONTENTS starts with
|
||||
;; an opening square bracket, add "\relax" to "\item",
|
||||
;; unless the brackets comes from an initial export
|
||||
|
|
Loading…
Reference in New Issue