lisp/ox-latex.el: Honor non-list value of `org-latex-caption-above'
* lisp/ox-latex.el (org-latex-generate-engraved-preamble): (org-latex-latex-environment): Use `org-latex--caption-above-p' to query whether an element should have its caption above. Reported-by: Mads Bach Villadsen <mbvilladsen@pm.me> Link: https://orgmode.org/list/m2zfx69uhb.fsf@pm.me
This commit is contained in:
parent
b79d9dd604
commit
d51723102a
|
@ -1361,7 +1361,8 @@ default values of which are given by `org-latex-engraved-preamble' and
|
||||||
\\floatname{listing}{\\listingsname}
|
\\floatname{listing}{\\listingsname}
|
||||||
\\newcommand{\\listoflistingsname}{List of Listings}
|
\\newcommand{\\listoflistingsname}{List of Listings}
|
||||||
\\providecommand{\\listoflistings}{\\listof{listing}{\\listoflistingsname}}\n"
|
\\providecommand{\\listoflistings}{\\listof{listing}{\\listoflistingsname}}\n"
|
||||||
(if (memq 'src-block org-latex-caption-above)
|
(if (org-latex--caption-above-p
|
||||||
|
(org-element-create 'src-block) info)
|
||||||
"plaintop" "plain"))
|
"plaintop" "plain"))
|
||||||
t t
|
t t
|
||||||
engraved-preamble)))
|
engraved-preamble)))
|
||||||
|
@ -2682,7 +2683,8 @@ CONTENTS is nil. INFO is a plist holding contextual information."
|
||||||
(org-latex--label latex-environment info nil t)
|
(org-latex--label latex-environment info nil t)
|
||||||
(org-latex--caption/label-string latex-environment info)))
|
(org-latex--caption/label-string latex-environment info)))
|
||||||
(caption-above-p
|
(caption-above-p
|
||||||
(memq type (append (plist-get info :latex-caption-above) '(math)))))
|
(or (eq type 'math)
|
||||||
|
(org-latex--caption-above-p latex-environment info))))
|
||||||
(if (not (or (org-element-property :name latex-environment)
|
(if (not (or (org-element-property :name latex-environment)
|
||||||
(org-element-property :caption latex-environment)))
|
(org-element-property :caption latex-environment)))
|
||||||
value
|
value
|
||||||
|
|
Loading…
Reference in New Issue