org-e-latex: Ignore empty captions in lstlisting environments
* contrib/lisp/org-e-latex.el (org-e-latex-src-block): Ignore empty captions in lstlisting environments.
This commit is contained in:
parent
a0e3e84edc
commit
7efd61249b
|
@ -2096,12 +2096,13 @@ contextual information."
|
||||||
(let ((lst-lang
|
(let ((lst-lang
|
||||||
(or (cadr (assq (intern lang) org-e-latex-listings-langs)) lang))
|
(or (cadr (assq (intern lang) org-e-latex-listings-langs)) lang))
|
||||||
(caption-str
|
(caption-str
|
||||||
(let ((main (org-export-get-caption src-block))
|
(when caption
|
||||||
(secondary (org-export-get-caption src-block t)))
|
(let ((main (org-export-get-caption src-block))
|
||||||
(if (not secondary) (format "{%s}" (org-export-data main info))
|
(secondary (org-export-get-caption src-block t)))
|
||||||
(format "{[%s]%s}"
|
(if (not secondary) (format "{%s}" (org-export-data main info))
|
||||||
(org-export-data secondary info)
|
(format "{[%s]%s}"
|
||||||
(org-export-data main info))))))
|
(org-export-data secondary info)
|
||||||
|
(org-export-data main info)))))))
|
||||||
(concat
|
(concat
|
||||||
;; Options.
|
;; Options.
|
||||||
(format "\\lstset{%s}\n"
|
(format "\\lstset{%s}\n"
|
||||||
|
|
Loading…
Reference in New Issue