0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-07-16 15:46:27 +00:00

LaTeX export: Make the verbatim environment configurable

This commit is contained in:
Carsten Dominik 2009-06-18 09:30:00 +02:00
parent 57c12e8bef
commit e23665ee66
3 changed files with 20 additions and 1 deletions

View file

@ -1,5 +1,10 @@
2009-06-18 Carsten Dominik <carsten.dominik@gmail.com> 2009-06-18 Carsten Dominik <carsten.dominik@gmail.com>
* org-latex.el (org-export-latex-verbatim-wrap): New option.
* org-exp.el (org-export-format-source-code-or-example): Use
`org-export-latex-verbatim-wrap'.
* org.el (org-clone-subtree-with-time-shift): Also shift inactive * org.el (org-clone-subtree-with-time-shift): Also shift inactive
time stamps. time stamps.

View file

@ -2145,6 +2145,7 @@ 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
(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)
@ -2249,7 +2250,8 @@ 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 "\\begin{verbatim}\n" rtn "\n\\end{verbatim}\n") (org-add-props (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)

View file

@ -274,6 +274,18 @@ will pass them (combined with the LaTeX default list parameters) to
:group 'org-export-latex :group 'org-export-latex
:type 'plist) :type 'plist)
(defcustom org-export-latex-verbatim-wrap
'("\\begin{verbatim}\n" . "\\end{verbatim}\n")
"Environment to be wrapped around a fixed-width section in LaTeX export.
This is a cons with two strings, to be added before and after the
fixed-with text.
Defaults to \\begin{verbatim} and \\end{verbatim}."
:group 'org-export_translation
:group 'org-export-latex
:type '(cons (string :tag "Open")
(string :tag "Close")))
(defcustom org-export-latex-remove-from-headlines (defcustom org-export-latex-remove-from-headlines
'(:todo nil :priority nil :tags nil) '(:todo nil :priority nil :tags nil)
"A plist of keywords to remove from headlines. OBSOLETE. "A plist of keywords to remove from headlines. OBSOLETE.