Kaynağa Gözat

org-e-latex: Change list of listings command according to package used

* EXPERIMENTAL/org-e-latex.el (org-e-latex-keyword): Use
  \listoflistings for minted and \lstlistoflistings for listings package.
Nicolas Goaziou 13 yıl önce
ebeveyn
işleme
3e18c9cad7
1 değiştirilmiş dosya ile 7 ekleme ve 1 silme
  1. 7 1
      EXPERIMENTAL/org-e-latex.el

+ 7 - 1
EXPERIMENTAL/org-e-latex.el

@@ -1280,7 +1280,13 @@ CONTENTS is nil.  INFO is a plist holding contextual information."
 	     "\\tableofcontents")))
 	 ((string= "tables" value) "\\listoftables")
 	 ((string= "figures" value) "\\listoffigures")
-	 ((string= "listings" value) "\\listoflistings")))))))
+	 ((string= "listings" value)
+	  (cond
+	   ((eq org-e-latex-listings 'minted) "\\listoflistings")
+	   (org-e-latex-listings "\\lstlistoflistings")
+	   ;; At the moment, src blocks with a caption are wrapped
+	   ;; into a figure environment.
+	   (t "\\listoffigures")))))))))
 
 
 ;;;; Latex Environment