mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-26 07:33:39 +00:00
LaTeX export: Make the verbatim environment configurable
This commit is contained in:
parent
57c12e8bef
commit
e23665ee66
@ -1,5 +1,10 @@
|
||||
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
|
||||
time stamps.
|
||||
|
||||
|
@ -2145,6 +2145,7 @@ in the list) and remove property and value from the list in LISTVAR."
|
||||
|
||||
(defvar htmlp) ;; 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
|
||||
(backend lang code &optional opts indent)
|
||||
@ -2249,7 +2250,8 @@ INDENT was the original indentation of the block."
|
||||
((eq backend 'latex)
|
||||
(setq rtn (org-export-number-lines rtn 'latex 0 0 num cont rpllbl fmt))
|
||||
(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))
|
||||
"#+END_LaTeX\n\n"))
|
||||
((eq backend 'ascii)
|
||||
|
@ -274,6 +274,18 @@ will pass them (combined with the LaTeX default list parameters) to
|
||||
:group 'org-export-latex
|
||||
: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
|
||||
'(:todo nil :priority nil :tags nil)
|
||||
"A plist of keywords to remove from headlines. OBSOLETE.
|
||||
|
Loading…
Reference in New Issue
Block a user