summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2016-10-18 23:10:56 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2016-10-18 23:10:56 +0200
commitadaf808605a999f38692417894bc65a32eb08963 (patch)
treedab62d335cd1ef8cb292ee35624cad44a9a0d59f
parenta2b1be7461034aca08f7336830247800eb46cb04 (diff)
downloadorg-mode-adaf808605a999f38692417894bc65a32eb08963.tar.gz
ox-latex: Fix source block label with listings package
* lisp/ox-latex.el (org-latex-src-block): Properly translate label into Org internal reference when using "listings" package.
-rw-r--r--lisp/ox-latex.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 1f1ad40..3c9623e 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -2934,7 +2934,9 @@ contextual information."
((and float (not (assoc "float" lst-opt)))
`(("float" ,(plist-get info :latex-default-figure-position)))))
`(("language" ,lst-lang))
- (if label `(("label" ,label)) '(("label" " ")))
+ (if label
+ `(("label" ,(org-latex--label src-block info)))
+ '(("label" " ")))
(if caption-str `(("caption" ,caption-str)) '(("caption" " ")))
`(("captionpos" ,(if caption-above-p "t" "b")))
(cond ((assoc "numbers" lst-opt) nil)