org-e-latex: Apply changes to `:genealogy'

* EXPERIMENTAL/org-e-latex.el (org-e-latex-item,
  org-e-latex-link--inline-image): Apply changes to `:genealogy'.
This commit is contained in:
Nicolas Goaziou 2012-01-07 14:30:41 +01:00
parent 50213d28cb
commit fc895b9574
1 changed files with 5 additions and 2 deletions

View File

@ -1169,7 +1169,10 @@ holding contextual information."
"Transcode an ITEM element from Org to LaTeX. "Transcode an ITEM element from Org to LaTeX.
CONTENTS holds the contents of the item. INFO is a plist holding CONTENTS holds the contents of the item. INFO is a plist holding
contextual information." contextual information."
(let* ((level (plist-get (plist-get info :parent-properties) :level)) ;; Grab `:level' from plain-list properties, which is always the
;; first element above current item.
(let* ((level (org-element-get-property
:level (car (plist-get info :genealogy))))
(counter (let ((count (org-element-get-property :counter item))) (counter (let ((count (org-element-get-property :counter item)))
(and count (and count
(< level 4) (< level 4)
@ -1248,7 +1251,7 @@ CONTENTS is nil. INFO is a plist holding contextual information."
(defun org-e-latex-link--inline-image (path info) (defun org-e-latex-link--inline-image (path info)
"Return LaTeX code for an image at PATH. "Return LaTeX code for an image at PATH.
INFO is a plist containing export options." INFO is a plist containing export options."
(let* ((parent-props (plist-get info :parent-properties)) (let* ((parent-props (nth 1 (car (plist-get info :genealogy))))
(caption (org-e-latex--caption/label-string (caption (org-e-latex--caption/label-string
(plist-get parent-props :caption) (plist-get parent-props :caption)
(plist-get parent-props :name) (plist-get parent-props :name)