|
@@ -574,6 +574,7 @@ much faster."
|
|
(:priority "pri" org-export-with-priority)
|
|
(:priority "pri" org-export-with-priority)
|
|
(:TeX-macros "TeX" org-export-with-TeX-macros)
|
|
(:TeX-macros "TeX" org-export-with-TeX-macros)
|
|
(:LaTeX-fragments "LaTeX" org-export-with-LaTeX-fragments)
|
|
(:LaTeX-fragments "LaTeX" org-export-with-LaTeX-fragments)
|
|
|
|
+ (:latex-listings nil org-export-latex-listings)
|
|
(:skip-before-1st-heading "skip" org-export-skip-text-before-1st-heading)
|
|
(:skip-before-1st-heading "skip" org-export-skip-text-before-1st-heading)
|
|
(:fixed-width ":" org-export-with-fixed-width)
|
|
(:fixed-width ":" org-export-with-fixed-width)
|
|
(:timestamps "<" org-export-with-timestamps)
|
|
(:timestamps "<" org-export-with-timestamps)
|
|
@@ -2204,6 +2205,8 @@ in the list) and remove property and value from the list in LISTVAR."
|
|
(defvar htmlp) ;; dynamically scoped
|
|
(defvar htmlp) ;; dynamically scoped
|
|
(defvar latexp) ;; dynamically scoped
|
|
(defvar latexp) ;; dynamically scoped
|
|
(defvar org-export-latex-verbatim-wrap) ;; defined in org-latex.el
|
|
(defvar org-export-latex-verbatim-wrap) ;; defined in org-latex.el
|
|
|
|
+(defvar org-export-latex-listings) ;; defined in org-latex.el
|
|
|
|
+(defvar org-export-latex-listings-langs) ;; defined in org-latex.el
|
|
|
|
|
|
(defun org-export-format-source-code-or-example
|
|
(defun org-export-format-source-code-or-example
|
|
(backend lang code &optional opts indent)
|
|
(backend lang code &optional opts indent)
|
|
@@ -2310,8 +2313,20 @@ INDENT was the original indentation of the block."
|
|
((eq backend 'latex)
|
|
((eq backend 'latex)
|
|
(setq rtn (org-export-number-lines rtn 'latex 0 0 num cont rpllbl fmt))
|
|
(setq rtn (org-export-number-lines rtn 'latex 0 0 num cont rpllbl fmt))
|
|
(concat "\n#+BEGIN_LaTeX\n"
|
|
(concat "\n#+BEGIN_LaTeX\n"
|
|
- (org-add-props (concat (car org-export-latex-verbatim-wrap)
|
|
|
|
- rtn (cdr org-export-latex-verbatim-wrap))
|
|
|
|
|
|
+ (org-add-props
|
|
|
|
+ (if org-export-latex-listings
|
|
|
|
+ (concat
|
|
|
|
+ (if lang
|
|
|
|
+ (let* ((lang-sym (intern (concat ":" lang)))
|
|
|
|
+ (lstlang (or (plist-get org-export-latex-listings-langs
|
|
|
|
+ lang-sym)
|
|
|
|
+ lang)))
|
|
|
|
+ (format "\\lstset{language=%s}\n" lstlang))
|
|
|
|
+ "")
|
|
|
|
+ "\\begin{lstlisting}\n"
|
|
|
|
+ rtn "\\end{lstlisting}\n")
|
|
|
|
+ (concat (car org-export-latex-verbatim-wrap)
|
|
|
|
+ rtn (cdr org-export-latex-verbatim-wrap)))
|
|
'(org-protected t))
|
|
'(org-protected t))
|
|
"#+END_LaTeX\n\n"))
|
|
"#+END_LaTeX\n\n"))
|
|
((eq backend 'ascii)
|
|
((eq backend 'ascii)
|