Selaa lähdekoodia

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.
Nicolas Goaziou 8 vuotta sitten
vanhempi
commit
adaf808605
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  1. 3 1
      lisp/ox-latex.el

+ 3 - 1
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)