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
|
||||
(or (cadr (assq (intern lang) org-e-latex-listings-langs)) lang))
|
||||
(caption-str
|
||||
(let ((main (org-export-get-caption src-block))
|
||||
(secondary (org-export-get-caption src-block t)))
|
||||
(if (not secondary) (format "{%s}" (org-export-data main info))
|
||||
(format "{[%s]%s}"
|
||||
(org-export-data secondary info)
|
||||
(org-export-data main info))))))
|
||||
(when caption
|
||||
(let ((main (org-export-get-caption src-block))
|
||||
(secondary (org-export-get-caption src-block t)))
|
||||
(if (not secondary) (format "{%s}" (org-export-data main info))
|
||||
(format "{[%s]%s}"
|
||||
(org-export-data secondary info)
|
||||
(org-export-data main info)))))))
|
||||
(concat
|
||||
;; Options.
|
||||
(format "\\lstset{%s}\n"
|
||||
|
|
Loading…
Reference in New Issue