summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2011-12-11 16:23:09 +0100
committerBastien Guerry <bzg@altern.org>2011-12-11 16:23:09 +0100
commitdf6b7be939f3fddfe15829698db7885e42e75e1e (patch)
treeea1c3fb8aa0c0d11f1df6a62e3acbedb8de0c8ad
parenta42be4b0c0e6fc6869247998ea7d7b7a2e6be212 (diff)
downloadorg-mode-df6b7be939f3fddfe15829698db7885e42e75e1e.tar.gz
Rename EXPERIMENTAL/org-latex.el to EXPERIMENTAL/org-e-latex.el.
This prevents a namespace conflict with lisp/org-latex.el. By convention, new exporters in EXPERIMENTAL/ will share the org-e-* prefix.
-rw-r--r--EXPERIMENTAL/org-e-latex.el (renamed from EXPERIMENTAL/org-latex.el)348
1 files changed, 174 insertions, 174 deletions
diff --git a/EXPERIMENTAL/org-latex.el b/EXPERIMENTAL/org-e-latex.el
index 17e6c76..1a90418 100644
--- a/EXPERIMENTAL/org-latex.el
+++ b/EXPERIMENTAL/org-e-latex.el
@@ -1,4 +1,4 @@
-;;; org-latex.el --- LaTeX Back-End For Org Export Engine
+;;; org-e-latex.el --- LaTeX Back-End For Org Export Engine
;; Copyright (C) 2011 Free Software Foundation, Inc.
@@ -35,9 +35,9 @@
;;; Internal Variables
-(defconst org-latex-option-alist
- '((:date "DATE" nil org-latex-date-format t)
- (:latex-class "LATEX_CLASS" nil org-latex-default-class t)
+(defconst org-e-latex-option-alist
+ '((:date "DATE" nil org-e-latex-date-format t)
+ (:latex-class "LATEX_CLASS" nil org-e-latex-default-class t)
(:latex-class-options "LATEX_CLASS_OPTIONS" nil nil t)
(:latex-header-extra "LATEX_HEADER" nil nil newline))
"Alist between LaTeX export properties and ways to set them.
@@ -56,12 +56,12 @@ structure of the value.")
;;;; Preamble
-(defcustom org-latex-default-class "article"
+(defcustom org-e-latex-default-class "article"
"The default LaTeX class."
:group 'org-export-latex
:type '(string :tag "LaTeX class"))
-(defcustom org-latex-classes
+(defcustom org-e-latex-classes
'(("article"
"\\documentclass[11pt]{article}"
("\\section{%s}" . "\\section*{%s}")
@@ -100,8 +100,8 @@ It should contain the \\documentclass macro, and anything else that is needed
for this setup. To this header, the following commands will be added:
- Calls to \\usepackage for all packages mentioned in the variables
- `org-latex-default-packages-alist' and
- `org-latex-packages-alist'. Thus, your header definitions should
+ `org-e-latex-default-packages-alist' and
+ `org-e-latex-packages-alist'. Thus, your header definitions should
avoid to also request these packages.
- Lines specified via \"#+LaTeX_HEADER:\"
@@ -128,12 +128,12 @@ So a header like
will omit the default packages, and will include the #+LaTeX_HEADER lines,
then have a call to \\providecommand, and then place \\usepackage commands
-based on the content of `org-latex-packages-alist'.
+based on the content of `org-e-latex-packages-alist'.
-If your header or `org-latex-default-packages-alist' inserts
+If your header or `org-e-latex-default-packages-alist' inserts
\"\\usepackage[AUTO]{inputenc}\", AUTO will automatically be replaced with
a coding system derived from `buffer-file-coding-system'. See also the
-variable `org-latex-inputenc-alist' for a way to influence this
+variable `org-e-latex-inputenc-alist' for a way to influence this
mechanism.
The sectioning structure
@@ -178,7 +178,7 @@ which the section title will be added."
(string :tag "Closing (unnumbered)"))
(function :tag "Hook computing sectioning"))))))
-(defcustom org-latex-inputenc-alist nil
+(defcustom org-e-latex-inputenc-alist nil
"Alist of inputenc coding system names, and what should really be used.
For example, adding an entry
@@ -192,13 +192,13 @@ are written as utf8 files."
(string :tag "Derived from buffer")
(string :tag "Use this instead"))))
-(defcustom org-latex-date-format
+(defcustom org-e-latex-date-format
"\\today"
"Format string for \\date{...}."
:group 'org-export-latex
:type 'boolean)
-(defcustom org-latex-title-command "\\maketitle"
+(defcustom org-e-latex-title-command "\\maketitle"
"The command used to insert the title just after \\begin{document}.
If this string contains the formatting specification \"%s\" then
it will be used as a formatting string, passing the title as an
@@ -209,7 +209,7 @@ argument."
;;;; Headline
-(defcustom org-latex-format-headline-function nil
+(defcustom org-e-latex-format-headline-function nil
"Function to format headline text.
This function will be called with 5 arguments:
@@ -224,7 +224,7 @@ The function result will be used in the section format string.
As an example, one could set the variable to the following, in
order to reproduce the default set-up:
-\(defun org-latex-format-headline-default \(todo todo-type priority text tags\)
+\(defun org-e-latex-format-headline-default \(todo todo-type priority text tags\)
\"Default format function for an headline.\"
\(concat \(when todo \(format \"\\\\textbf{\\\\textsc{\\\\textsf{%s}}} \" todo\)\)
\(when priority \(format \"\\\\framebox{\\\\#%c} \" priority\)\)
@@ -236,7 +236,7 @@ order to reproduce the default set-up:
;;;; Emphasis
-(defcustom org-latex-emphasis-alist
+(defcustom org-e-latex-emphasis-alist
'(("*" . "\\textbf{%s}")
("/" . "\\emph{%s}")
("_" . "\\underline{%s}")
@@ -259,7 +259,7 @@ to typeset and try to protect special characters."
;;;; Footnotes
-(defcustom org-latex-footnote-separator "\\textsuperscript{,}\\,"
+(defcustom org-e-latex-footnote-separator "\\textsuperscript{,}\\,"
"Text used to separate footnotes."
:group 'org-export-latex
:type 'string)
@@ -267,17 +267,17 @@ to typeset and try to protect special characters."
;;;; Time-stamps
-(defcustom org-latex-active-timestamp-format "\\textit{%s}"
+(defcustom org-e-latex-active-timestamp-format "\\textit{%s}"
"A printf format string to be applied to active time-stamps."
:group 'org-export-latex
:type 'string)
-(defcustom org-latex-inactive-timestamp-format "\\textit{%s}"
+(defcustom org-e-latex-inactive-timestamp-format "\\textit{%s}"
"A printf format string to be applied to inactive time-stamps."
:group 'org-export-latex
:type 'string)
-(defcustom org-latex-diary-timestamp-format "\\textit{%s}"
+(defcustom org-e-latex-diary-timestamp-format "\\textit{%s}"
"A printf format string to be applied to diary time-stamps."
:group 'org-export-latex
:type 'string)
@@ -285,17 +285,17 @@ to typeset and try to protect special characters."
;;;; Links
-(defcustom org-latex-image-default-option "width=.9\\linewidth"
+(defcustom org-e-latex-image-default-option "width=.9\\linewidth"
"Default option for images."
:group 'org-export-latex
:type 'string)
-(defcustom org-latex-default-figure-position "htb"
+(defcustom org-e-latex-default-figure-position "htb"
"Default position for latex figures."
:group 'org-export-latex
:type 'string)
-(defcustom org-latex-inline-image-extensions
+(defcustom org-e-latex-inline-image-extensions
'("pdf" "jpeg" "jpg" "png" "ps" "eps")
"Extensions of image files that can be inlined into LaTeX.
@@ -310,22 +310,22 @@ encompasses both."
;;;; Tables
-(defcustom org-latex-default-table-environment "tabular"
+(defcustom org-e-latex-default-table-environment "tabular"
"Default environment used to build tables."
:group 'org-export-latex
:type 'string)
-(defcustom org-latex-tables-centered t
+(defcustom org-e-latex-tables-centered t
"When non-nil, tables are exported in a center environment."
:group 'org-export-latex
:type 'boolean)
-(defcustom org-latex-tables-verbatim nil
+(defcustom org-e-latex-tables-verbatim nil
"When non-nil, tables are exported verbatim."
:group 'org-export-latex
:type 'boolean)
-(defcustom org-latex-table-caption-above t
+(defcustom org-e-latex-table-caption-above t
"When non-nil, place caption string at the beginning of the table.
Otherwise, place it near the end."
:group 'org-export-latex
@@ -334,7 +334,7 @@ Otherwise, place it near the end."
;;;; Drawers
-(defcustom org-latex-format-drawer-function nil
+(defcustom org-e-latex-format-drawer-function nil
"Function called to format a drawer in LaTeX code.
The function must accept two parameters:
@@ -346,7 +346,7 @@ The function should return the string to be exported.
For example, the variable could be set to the following function
in order to mimic default behaviour:
-\(defun org-latex-format-drawer-default \(name contents\)
+\(defun org-e-latex-format-drawer-default \(name contents\)
\"Format a drawer element for LaTeX export.\"
contents\)"
:group 'org-export-latex
@@ -355,7 +355,7 @@ in order to mimic default behaviour:
;;;; Inlinetasks
-(defcustom org-latex-format-inlinetask-function nil
+(defcustom org-e-latex-format-inlinetask-function nil
"Function called to format an inlinetask in LaTeX code.
The function must accept six parameters:
@@ -371,7 +371,7 @@ The function should return the string to be exported.
For example, the variable could be set to the following function
in order to mimic default behaviour:
-\(defun org-latex-format-inlinetask-default \(todo type priority name tags contents\)
+\(defun org-e-latex-format-inlinetask-default \(todo type priority name tags contents\)
\"Format an inline task element for LaTeX export.\"
\(let \(\(full-title
\(concat
@@ -394,33 +394,33 @@ in order to mimic default behaviour:
;; Src blocks
-(defcustom org-latex-listings nil
+(defcustom org-e-latex-listings nil
"Non-nil means export source code using the listings package.
This package will fontify source code, possibly even with color.
If you want to use this, you also need to make LaTeX use the
listings package, and if you want to have color, the color
-package. Just add these to `org-latex-packages-alist',
+package. Just add these to `org-e-latex-packages-alist',
for example using customize, or with something like
- (require 'org-latex)
+ (require 'org-e-latex)
(add-to-list 'org-export-latex-packages-alist '(\"\" \"listings\"))
(add-to-list 'org-export-latex-packages-alist '(\"\" \"color\"))
Alternatively,
- (setq org-latex-listings 'minted)
+ (setq org-e-latex-listings 'minted)
causes source code to be exported using the minted package as
opposed to listings. If you want to use minted, you need to add
-the minted package to `org-latex-packages-alist', for
+the minted package to `org-e-latex-packages-alist', for
example using customize, or with
- (require 'org-latex)
- (add-to-list 'org-latex-packages-alist '(\"\" \"minted\"))
+ (require 'org-e-latex)
+ (add-to-list 'org-e-latex-packages-alist '(\"\" \"minted\"))
In addition, it is necessary to install
pygments (http://pygments.org), and to configure the variable
-`org-latex-to-pdf-process' so that the -shell-escape option is
+`org-e-latex-to-pdf-process' so that the -shell-escape option is
passed to pdflatex."
:group 'org-export-latex
:type '(choice
@@ -428,7 +428,7 @@ passed to pdflatex."
(const :tag "Use minted" 'minted)
(const :tag "Export verbatim" nil)))
-(defcustom org-latex-listings-langs
+(defcustom org-e-latex-listings-langs
'((emacs-lisp "Lisp") (lisp "Lisp") (clojure "Lisp")
(c "C") (cc "C++")
(fortran "fortran")
@@ -451,7 +451,7 @@ hurt if it is present."
(symbol :tag "Major mode ")
(string :tag "Listings language"))))
-(defcustom org-latex-listings-options nil
+(defcustom org-e-latex-listings-options nil
"Association list of options for the latex listings package.
These options are supplied as a comma-separated list to the
@@ -474,7 +474,7 @@ languages."
(string :tag "Listings option name ")
(string :tag "Listings option value"))))
-(defcustom org-latex-minted-langs
+(defcustom org-e-latex-minted-langs
'((emacs-lisp "common-lisp")
(cc "c++")
(cperl "perl")
@@ -497,7 +497,7 @@ pygmentize -L lexers"
(symbol :tag "Major mode ")
(string :tag "Minted language"))))
-(defcustom org-latex-minted-options nil
+(defcustom org-e-latex-minted-options nil
"Association list of options for the latex minted package.
These options are supplied within square brackets in
@@ -520,7 +520,7 @@ options will be applied to blocks of all languages."
(string :tag "Minted option name ")
(string :tag "Minted option value"))))
-(defvar org-latex-custom-lang-environments nil
+(defvar org-e-latex-custom-lang-environments nil
"Association list mapping languages to language-specific latex
environments used during export of src blocks by the listings and
minted latex packages. For example,
@@ -538,7 +538,7 @@ during latex export it will output
;;;; Plain text
-(defcustom org-latex-quotes
+(defcustom org-e-latex-quotes
'(("fr" ("\\(\\s-\\|[[(]\\)\"" . "«~") ("\\(\\S-\\)\"" . "~»") ("\\(\\s-\\|(\\)'" . "'"))
("en" ("\\(\\s-\\|[[(]\\)\"" . "``") ("\\(\\S-\\)\"" . "''") ("\\(\\s-\\|(\\)'" . "`")))
"Alist for quotes to use when converting english double-quotes.
@@ -568,7 +568,7 @@ string defines the replacement string for this quote."
;;; Internal Functions
-(defun org-latex--caption/label-string (caption label info)
+(defun org-e-latex--caption/label-string (caption label info)
"Return caption and label LaTeX string for floats.
CAPTION is a secondary string \(a list of strings and Org
@@ -577,7 +577,7 @@ a plist holding contextual information.
If there's no caption nor label, return the empty string.
-For non-floats, see `org-latex--wrap-label'."
+For non-floats, see `org-e-latex--wrap-label'."
(let ((caption-str (and caption
(org-export-secondary-string
caption 'latex info)))
@@ -594,7 +594,7 @@ For non-floats, see `org-latex--wrap-label'."
;; Standard caption format.
(t (format "\\caption{%s%s}\n" label-str caption-str)))))
-(defun org-latex--guess-inputenc (header)
+(defun org-e-latex--guess-inputenc (header)
"Set the coding system in inputenc to what the buffer is.
HEADER is the LaTeX header string.
@@ -607,12 +607,12 @@ Return the new header."
(if (not cs)
header
;; First translate if that is requested.
- (setq cs (or (cdr (assoc cs org-latex-inputenc-alist)) cs))
+ (setq cs (or (cdr (assoc cs org-e-latex-inputenc-alist)) cs))
;; Then find the \usepackage statement and replace the option.
(replace-regexp-in-string "\\\\usepackage\\[\\(AUTO\\)\\]{inputenc}"
cs header t nil 1))))
-(defun org-latex--find-verb-separator (s)
+(defun org-e-latex--find-verb-separator (s)
"Return a character not used in string S.
This is used to choose a separator for constructs like \\verb."
(let ((ll "~,./?;':\"|!@#%^&-_=+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ<>()[]{}"))
@@ -620,7 +620,7 @@ This is used to choose a separator for constructs like \\verb."
when (not (string-match (regexp-quote (char-to-string c)) s))
return (char-to-string c))))
-(defun org-latex--make-option-string (options)
+(defun org-e-latex--make-option-string (options)
"Return a comma separated string of keywords and values.
OPTIONS is an alist where the key is the options keyword as
a string, and the value a list containing the keyword value, or
@@ -632,22 +632,22 @@ nil."
options
","))
-(defun org-latex--quotation-marks (text info)
+(defun org-e-latex--quotation-marks (text info)
"Export quotation marks depending on language conventions."
(mapc (lambda(l)
(let ((start 0))
(while (setq start (string-match (car l) text start))
(let ((new-quote (concat (match-string 1 text) (cdr l))))
(setq text (replace-match new-quote t t text))))))
- (cdr (or (assoc (plist-get info :language) org-latex-quotes)
+ (cdr (or (assoc (plist-get info :language) org-e-latex-quotes)
;; Falls back on English.
- (assoc "en" org-latex-quotes))))
+ (assoc "en" org-e-latex-quotes))))
text)
-(defun org-latex--wrap-label (element output)
+(defun org-e-latex--wrap-label (element output)
"Wrap label associated to ELEMENT around OUTPUT, if appropriate.
This function shouldn't be used for floats. See
-`org-latex--caption/label-string'."
+`org-e-latex--caption/label-string'."
(let ((label (org-element-get-property :name element)))
(if (or (not output) (not label) (string= output "") (string= label ""))
output
@@ -657,7 +657,7 @@ This function shouldn't be used for floats. See
;;; Template
-(defun org-latex-template (contents info)
+(defun org-e-latex-template (contents info)
"Return complete document string after LaTeX conversion.
CONTENTS is the transcoded contents string. INFO is a plist
holding export options."
@@ -671,7 +671,7 @@ holding export options."
(let ((class (plist-get info :latex-class))
(class-options (plist-get info :latex-class-options)))
(org-element-normalize-string
- (let* ((header (nth 1 (assoc class org-latex-classes)))
+ (let* ((header (nth 1 (assoc class org-e-latex-classes)))
(document-class-string
(and (stringp header)
(if class-options
@@ -679,7 +679,7 @@ holding export options."
"^[ \t]*\\\\documentclass\\(\\[.*?\\]\\)"
class-options header t nil 1)
header))))
- (org-latex--guess-inputenc
+ (org-e-latex--guess-inputenc
(org-splice-latex-header
document-class-string
org-export-latex-default-packages-alist ; defined in org.el
@@ -718,11 +718,11 @@ holding export options."
;; 8. Title command.
(org-element-normalize-string
(cond ((string= "" title) nil)
- ((not (stringp org-latex-title-command)) nil)
+ ((not (stringp org-e-latex-title-command)) nil)
((string-match "\\(?:[^%]\\|^\\)%s"
- org-latex-title-command)
- (format org-latex-title-command title))
- (t org-latex-title-command)))
+ org-e-latex-title-command)
+ (format org-e-latex-title-command title))
+ (t org-e-latex-title-command)))
;; 9. Table of contents.
(let ((depth (plist-get info :with-toc)))
(when depth
@@ -747,11 +747,11 @@ holding export options."
;;;; Block
-(defun org-latex-center-block (center-block contents info)
+(defun org-e-latex-center-block (center-block contents info)
"Transcode a CENTER-BLOCK element from Org to LaTeX.
CONTENTS holds the contents of the block. INFO is a plist
holding contextual information."
- (org-latex--wrap-label
+ (org-e-latex--wrap-label
center-block
(format "\\begin{center}\n%s\\end{center}" contents)))
@@ -768,44 +768,44 @@ holding contextual information."
;;;; Drawer
-(defun org-latex-drawer (drawer contents info)
+(defun org-e-latex-drawer (drawer contents info)
"Transcode a DRAWER element from Org to LaTeX.
CONTENTS holds the contents of the block. INFO is a plist
holding contextual information."
(let* ((name (org-element-get-property :drawer-name drawer))
- (output (if (functionp org-latex-format-drawer-function)
- (funcall org-latex-format-drawer-function
+ (output (if (functionp org-e-latex-format-drawer-function)
+ (funcall org-e-latex-format-drawer-function
name contents)
;; If there's no user defined function: simply
;; display contents of the drawer.
contents)))
- (org-latex--wrap-label drawer output)))
+ (org-e-latex--wrap-label drawer output)))
;;;; Dynamic Block
-(defun org-latex-dynamic-block (dynamic-block contents info)
+(defun org-e-latex-dynamic-block (dynamic-block contents info)
"Transcode a DYNAMIC-BLOCK element from Org to LaTeX.
CONTENTS holds the contents of the block. INFO is a plist
holding contextual information. See
`org-export-data'."
- (org-latex--wrap-label dynamic-block contents))
+ (org-e-latex--wrap-label dynamic-block contents))
;;;; Emphasis
-(defun org-latex-emphasis (emphasis contents info)
+(defun org-e-latex-emphasis (emphasis contents info)
"Transcode EMPHASIS from Org to LaTeX.
CONTENTS is the contents of the emphasized text. INFO is a plist
holding contextual information.."
(format (cdr (assoc (org-element-get-property :marker emphasis)
- org-latex-emphasis-alist))
+ org-e-latex-emphasis-alist))
contents))
;;;; Entity
-(defun org-latex-entity (entity contents info)
+(defun org-e-latex-entity (entity contents info)
"Transcode an ENTITY object from Org to LaTeX.
CONTENTS are the definition itself. INFO is a plist holding
contextual information."
@@ -817,18 +817,18 @@ contextual information."
;;;; Example Block
-(defun org-latex-example-block (example-block contents info)
+(defun org-e-latex-example-block (example-block contents info)
"Transcode a EXAMPLE-BLOCK element from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual information."
(let* ((options (or (org-element-get-property :options example-block) ""))
(value (org-export-handle-code
(org-element-get-property :value example-block) options info)))
- (org-latex--wrap-label example-block value)))
+ (org-e-latex--wrap-label example-block value)))
;;;; Export Snippet
-(defun org-latex-export-snippet (export-snippet contents info)
+(defun org-e-latex-export-snippet (export-snippet contents info)
"Transcode a EXPORT-SNIPPET object from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual information."
(org-element-get-property :value export-snippet))
@@ -836,7 +836,7 @@ CONTENTS is nil. INFO is a plist holding contextual information."
;;;; Export Block
-(defun org-latex-export-block (export-block contents info)
+(defun org-e-latex-export-block (export-block contents info)
"Transcode a EXPORT-BLOCK element from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual information."
(when (string= (org-element-get-property :type export-block) "latex")
@@ -845,14 +845,14 @@ CONTENTS is nil. INFO is a plist holding contextual information."
;;;; Fixed Width
-(defun org-latex-fixed-width (fixed-width contents info)
+(defun org-e-latex-fixed-width (fixed-width contents info)
"Transcode a FIXED-WIDTH element from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual information."
(let* ((value (org-element-normalize-string
(replace-regexp-in-string
"^[ \t]*: ?" ""
(org-element-get-property :value fixed-width)))))
- (org-latex--wrap-label
+ (org-e-latex--wrap-label
fixed-width
(format "\\begin{verbatim}\n%s\\end{verbatim}" value))))
@@ -864,13 +864,13 @@ CONTENTS is nil. INFO is a plist holding contextual information."
;;;; Footnote Reference
-(defun org-latex-footnote-reference (footnote-reference contents info)
+(defun org-e-latex-footnote-reference (footnote-reference contents info)
"Transcode a FOOTNOTE-REFERENCE element from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual information."
(concat
;; Insert separator between two footnotes in a row.
(when (eq (plist-get info :previous-object) 'footnote-reference)
- org-latex-footnote-separator)
+ org-e-latex-footnote-separator)
;; Use \footnotemark if the footnote has already been defined.
;; Otherwise, define it with \footnote command.
(let* ((all-seen (plist-get info :seen-footnote-labels))
@@ -898,7 +898,7 @@ CONTENTS is nil. INFO is a plist holding contextual information."
;;;; Headline
-(defun org-latex-headline (headline contents info)
+(defun org-e-latex-headline (headline contents info)
"Transcode an HEADLINE element from Org to LaTeX.
CONTENTS holds the contents of the headline. INFO is a plist
holding contextual information."
@@ -907,7 +907,7 @@ holding contextual information."
;; Get level relative to current parsed data.
(level (+ (org-element-get-property :level headline)
(plist-get info :headline-offset)))
- (class-sectionning (assoc class org-latex-classes))
+ (class-sectionning (assoc class org-e-latex-classes))
;; Section formatting will set two placeholders: one for the
;; title and the other for the contents.
(section-fmt
@@ -944,9 +944,9 @@ holding contextual information."
(priority (and (plist-get info :with-priority)
(org-element-get-property :priority headline)))
;; Create the headline text.
- (full-text (if (functionp org-latex-format-headline-function)
+ (full-text (if (functionp org-e-latex-format-headline-function)
;; User-defined formatting function.
- (funcall org-latex-format-headline-function
+ (funcall org-e-latex-format-headline-function
todo todo-type priority text tags)
;; Default formatting.
(concat
@@ -998,13 +998,13 @@ holding contextual information."
;;;; Horizontal Rule
-(defun org-latex-horizontal-rule (horizontal-rule contents info)
+(defun org-e-latex-horizontal-rule (horizontal-rule contents info)
"Transcode an HORIZONTAL-RULE object from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual information."
(let ((attr (mapconcat #'identity
(org-element-get-property :attr_latex horizontal-rule)
" ")))
- (org-latex--wrap-label horizontal-rule (concat "\\hrule " attr))))
+ (org-e-latex--wrap-label horizontal-rule (concat "\\hrule " attr))))
;;;; Inline Babel Call
@@ -1014,24 +1014,24 @@ CONTENTS is nil. INFO is a plist holding contextual information."
;;;; Inline Src Block
-(defun org-latex-inline-src-block (inline-src-block contents info)
+(defun org-e-latex-inline-src-block (inline-src-block contents info)
"Transcode an INLINE-SRC-BLOCK element from Org to LaTeX.
CONTENTS holds the contents of the item. INFO is a plist holding
contextual information."
(let* ((code (org-element-get-property :value inline-src-block))
- (separator (org-latex--find-verb-separator code)))
+ (separator (org-e-latex--find-verb-separator code)))
(cond
;; Do not use a special package: transcode it verbatim.
- ((not org-latex-listings)
+ ((not org-e-latex-listings)
(concat "\\verb" separator code separator))
;; Use minted package.
- ((eq org-latex-listings 'minted)
+ ((eq org-e-latex-listings 'minted)
(let* ((org-lang (org-element-get-property :language inline-src-block))
(mint-lang (or (cadr (assq (intern org-lang)
- org-latex-minted-langs))
+ org-e-latex-minted-langs))
org-lang))
- (options (org-latex--make-option-string
- org-latex-minted-options)))
+ (options (org-e-latex--make-option-string
+ org-e-latex-minted-options)))
(concat (format "\\mint%s{%s}"
(if (string= options "") "" (format "[%s]" options))
mint-lang)
@@ -1041,10 +1041,10 @@ contextual information."
;; Maybe translate language's name.
(let* ((org-lang (org-element-get-property :language inline-src-block))
(lst-lang (or (cadr (assq (intern org-lang)
- org-latex-listings-langs))
+ org-e-latex-listings-langs))
org-lang))
- (options (org-latex--make-option-string
- (append org-latex-listings-options
+ (options (org-e-latex--make-option-string
+ (append org-e-latex-listings-options
`(("language" ,lst-lang))))))
(concat (format "\\lstinline[%s]" options)
separator code separator))))))
@@ -1052,7 +1052,7 @@ contextual information."
;;;; Inlinetask
-(defun org-latex-inlinetask (inlinetask contents info)
+(defun org-e-latex-inlinetask (inlinetask contents info)
"Transcode an INLINETASK element from Org to LaTeX.
CONTENTS holds the contents of the block. INFO is a plist
holding contextual information."
@@ -1068,13 +1068,13 @@ holding contextual information."
(org-element-get-property :tags inlinetask)))
(priority (and (plist-get info :with-priority)
(org-element-get-property :priority inlinetask))))
- ;; If `org-latex-format-inlinetask-function' is provided, call it
+ ;; If `org-e-latex-format-inlinetask-function' is provided, call it
;; with appropriate arguments.
- (if (functionp org-latex-format-inlinetask-function)
- (funcall org-latex-format-inlinetask-function
+ (if (functionp org-e-latex-format-inlinetask-function)
+ (funcall org-e-latex-format-inlinetask-function
todo todo-type priority title tags contents)
;; Otherwise, use a default template.
- (org-latex--wrap-label
+ (org-e-latex--wrap-label
inlinetask
(let ((full-title
(concat
@@ -1096,7 +1096,7 @@ holding contextual information."
;;;; Item
-(defun org-latex-item (item contents info)
+(defun org-e-latex-item (item contents info)
"Transcode an ITEM element from Org to LaTeX.
CONTENTS holds the contents of the item. INFO is a plist holding
contextual information."
@@ -1120,7 +1120,7 @@ contextual information."
;;;; Keyword
-(defun org-latex-keyword (keyword contents info)
+(defun org-e-latex-keyword (keyword contents info)
"Transcode a KEYWORD element from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual information."
(let ((key (downcase (org-element-get-property :key keyword)))
@@ -1150,17 +1150,17 @@ CONTENTS is nil. INFO is a plist holding contextual information."
;;;; Latex Environment
-(defun org-latex-latex-environment (latex-environment contents info)
+(defun org-e-latex-latex-environment (latex-environment contents info)
"Transcode a LATEX-ENVIRONMENT element from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual information."
- (org-latex--wrap-label
+ (org-e-latex--wrap-label
latex-environment
(org-remove-indentation (org-element-get-property :value latex-environment))))
;;;; Latex Fragment
-(defun org-latex-latex-fragment (latex-fragment contents info)
+(defun org-e-latex-latex-fragment (latex-fragment contents info)
"Transcode a LATEX-FRAGMENT object from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual information."
(org-element-get-property :value latex-fragment))
@@ -1168,7 +1168,7 @@ CONTENTS is nil. INFO is a plist holding contextual information."
;;;; Line Break
-(defun org-latex-line-break (line-break contents info)
+(defun org-e-latex-line-break (line-break contents info)
"Transcode a LINE-BREAK object from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual information."
"\\\\")
@@ -1176,11 +1176,11 @@ CONTENTS is nil. INFO is a plist holding contextual information."
;;;; Link
-(defun org-latex-link--inline-image (path info)
+(defun org-e-latex-link--inline-image (path info)
"Return LaTeX code for an image at PATH.
INFO is a plist containing export options."
(let* ((parent-props (plist-get info :parent-properties))
- (caption (org-latex--caption/label-string
+ (caption (org-e-latex--caption/label-string
(plist-get parent-props :caption)
(plist-get parent-props :name)
info))
@@ -1202,7 +1202,7 @@ INFO is a plist containing export options."
(org-match-string-no-properties 1 attr))
((eq disposition 'wrap) "{l}{0.5\\textwidth}")
((eq disposition 'float)
- (concat "[" org-latex-default-figure-position "]"))
+ (concat "[" org-e-latex-default-figure-position "]"))
(t ""))))
;; Now clear ATTR from any special keyword and set a default
;; value if nothing is left.
@@ -1215,7 +1215,7 @@ INFO is a plist containing export options."
(setq attr (cond ((not (string= attr "")) attr)
((eq disposition 'float) "width=0.7\\textwidth")
((eq disposition 'wrap) "width=0.48\\textwidth")
- (t (or org-latex-image-default-option ""))))
+ (t (or org-e-latex-image-default-option ""))))
;; Return proper string, depending on DISPOSITION.
(case disposition
('wrap (format "\\begin{wrapfigure}%s
@@ -1232,7 +1232,7 @@ INFO is a plist containing export options."
%s\\end{figure}" placement attr path caption))
(t (format "\\includegraphics[%s]{%s}" attr path)))))
-(defun org-latex-link (link desc info)
+(defun org-e-latex-link (link desc info)
"Transcode a LINK object from Org to LaTeX.
DESC is the description part of the link, or the empty string.
@@ -1243,7 +1243,7 @@ INFO is a plist holding contextual information. See
;; Ensure DESC really exists, or set it to nil.
(desc (and (not (string= desc "")) desc))
(imagep (org-export-inline-image-p
- link desc org-latex-inline-image-extensions))
+ link desc org-e-latex-inline-image-extensions))
(path (cond
((member type '("http" "https" "ftp" "mailto"))
(concat type ":" raw-path))
@@ -1259,7 +1259,7 @@ INFO is a plist holding contextual information. See
protocol)
(cond
;; Image file.
- (imagep (org-latex-link--inline-image path info))
+ (imagep (org-e-latex-link--inline-image path info))
;; Id: for now, assume it's an internal link. TODO: do something
;; to check if it isn't in the current file.
((string= type "id")
@@ -1318,7 +1318,7 @@ INFO is a plist holding contextual information. See
;;;; Macro
-(defun org-latex-macro (macro contents info)
+(defun org-e-latex-macro (macro contents info)
"Transcode a MACRO element from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual information."
;; Use available tools.
@@ -1327,7 +1327,7 @@ CONTENTS is nil. INFO is a plist holding contextual information."
;;;; Paragraph
-(defun org-latex-paragraph (paragraph contents info)
+(defun org-e-latex-paragraph (paragraph contents info)
"Transcode a PARAGRAPH element from Org to LaTeX.
CONTENTS is the contents of the paragraph, as a string. INFO is
the plist used as a communication channel."
@@ -1336,7 +1336,7 @@ the plist used as a communication channel."
;;;; Plain List
-(defun org-latex-plain-list (plain-list contents info)
+(defun org-e-latex-plain-list (plain-list contents info)
"Transcode a PLAIN-LIST element from Org to LaTeX.
CONTENTS is the contents of the list. INFO is a plist holding
contextual information."
@@ -1358,7 +1358,7 @@ contextual information."
((eq type 'ordered) "enumerate")
((eq type 'unordered) "itemize")
((eq type 'descriptive) "description"))))
- (org-latex--wrap-label
+ (org-e-latex--wrap-label
plain-list
(format "\\begin{%s}%s\n%s\\end{%s}"
latex-type
@@ -1376,7 +1376,7 @@ contextual information."
;;;; Plain Text
-(defun org-latex-plain-text (text info)
+(defun org-e-latex-plain-text (text info)
"Transcode a TEXT string from Org to LaTeX.
TEXT is the string to transcode. INFO is a plist holding
contextual information."
@@ -1396,7 +1396,7 @@ contextual information."
(format "\\%s{}" (match-string 1 text)) nil t text)
start (match-end 0))))
;; Handle quotation marks
- (setq text (org-latex--quotation-marks text info))
+ (setq text (org-e-latex--quotation-marks text info))
;; Convert special strings.
(when (plist-get info :with-special-strings)
(while (string-match (regexp-quote "...") text)
@@ -1411,7 +1411,7 @@ contextual information."
;;;; Property Drawer
-(defun org-latex-property-drawer (property-drawer contents info)
+(defun org-e-latex-property-drawer (property-drawer contents info)
"Transcode a PROPERTY-DRAWER element from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual
information."
@@ -1422,18 +1422,18 @@ information."
;;;; Quote Block
-(defun org-latex-quote-block (quote-block contents info)
+(defun org-e-latex-quote-block (quote-block contents info)
"Transcode a QUOTE-BLOCK element from Org to LaTeX.
CONTENTS holds the contents of the block. INFO is a plist
holding contextual information."
- (org-latex--wrap-label
+ (org-e-latex--wrap-label
quote-block
(format "\\begin{quote}\n%s\\end{quote}" contents)))
;;;; Quote Section
-(defun org-latex-quote-section (quote-section contents info)
+(defun org-e-latex-quote-section (quote-section contents info)
"Transcode a QUOTE-SECTION element from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual information."
(let ((value (org-remove-indentation
@@ -1443,7 +1443,7 @@ CONTENTS is nil. INFO is a plist holding contextual information."
;;;; Radio Target
-(defun org-latex-radio-target (radio-target text info)
+(defun org-e-latex-radio-target (radio-target text info)
"Transcode a RADIO-TARGET object from Org to LaTeX.
TEXT is the text of the target. INFO is a plist holding
contextual information."
@@ -1455,19 +1455,19 @@ contextual information."
;;;; Special Block
-(defun org-latex-special-block (special-block contents info)
+(defun org-e-latex-special-block (special-block contents info)
"Transcode a SPECIAL-BLOCK element from Org to LaTeX.
CONTENTS holds the contents of the block. INFO is a plist
holding contextual information."
(let ((type (downcase (org-element-get-property :type special-block))))
- (org-latex--wrap-label
+ (org-e-latex--wrap-label
special-block
(format "\\begin{%s}\n%s\\end{%s}" type contents type))))
;;;; Src Block
-(defun org-latex-src-block (src-block contents info)
+(defun org-e-latex-src-block (src-block contents info)
"Transcode a SRC-BLOCK element from Org to LaTeX.
CONTENTS holds the contents of the item. INFO is a plist holding
contextual information."
@@ -1480,11 +1480,11 @@ contextual information."
(label (org-element-get-property :name src-block))
(custom-env (and lang
(cadr (assq (intern lang)
- org-latex-custom-lang-environments)))))
+ org-e-latex-custom-lang-environments)))))
(cond
;; No source fontification.
- ((not org-latex-listings)
- (let ((caption-str (org-latex--caption/label-string
+ ((not org-e-latex-listings)
+ (let ((caption-str (org-e-latex--caption/label-string
caption label info))
(float-env (when caption "\\begin{figure}[H]\n%s\n\\end{figure}")))
(format (or float-env "%s")
@@ -1495,29 +1495,29 @@ contextual information."
(custom-env
(format "\\begin{%s}\n%s\\end{%s}\n" custom-env code custom-env))
;; Use minted package.
- ((eq org-latex-listings 'minted)
- (let* ((mint-lang (or (cadr (assq (intern lang) org-latex-minted-langs))
+ ((eq org-e-latex-listings 'minted)
+ (let* ((mint-lang (or (cadr (assq (intern lang) org-e-latex-minted-langs))
lang))
(float-env (when (or label caption)
(format "\\begin{listing}[H]\n%%s\n%s\\end{listing}"
- (org-latex--caption/label-string
+ (org-e-latex--caption/label-string
caption label info))))
(body (format "\\begin{minted}[%s]{%s}\n%s\\end{minted}"
- (org-latex--make-option-string
- org-latex-minted-options)
+ (org-e-latex--make-option-string
+ org-e-latex-minted-options)
mint-lang code)))
(if float-env (format float-env body) body)))
;; Use listings package.
(t
- (let ((lst-lang (or (cadr (assq (intern lang) org-latex-listings-langs))
+ (let ((lst-lang (or (cadr (assq (intern lang) org-e-latex-listings-langs))
lang))
(caption-str (and caption
(org-export-secondary-string
(org-element-get-property :caption src-block)
'latex info))))
(concat (format "\\lstset{%s}\n"
- (org-latex--make-option-string
- (append org-latex-listings-options
+ (org-e-latex--make-option-string
+ (append org-e-latex-listings-options
`(("language" ,lst-lang))
(when label `(("label" ,label)))
(when caption-str
@@ -1527,7 +1527,7 @@ contextual information."
;;;; Statistics Cookie
-(defun org-latex-statistics-cookie (statistics-cookie contents info)
+(defun org-e-latex-statistics-cookie (statistics-cookie contents info)
"Transcode a STATISTICS-COOKIE object from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual information."
(org-element-get-property :value statistics-cookie))
@@ -1535,7 +1535,7 @@ CONTENTS is nil. INFO is a plist holding contextual information."
;;;; Subscript
-(defun org-latex-subscript (subscript contents info)
+(defun org-e-latex-subscript (subscript contents info)
"Transcode a SUBSCRIPT object from Org to LaTeX.
CONTENTS is the contents of the object. INFO is a plist holding
contextual information."
@@ -1544,7 +1544,7 @@ contextual information."
;;;; Superscript
-(defun org-latex-superscript (superscript contents info)
+(defun org-e-latex-superscript (superscript contents info)
"Transcode a SUPERSCRIPT object from Org to LaTeX.
CONTENTS is the contents of the object. INFO is a plist holding
contextual information."
@@ -1553,7 +1553,7 @@ contextual information."
;;;; Table
-(defun org-latex-table--format-string (table info)
+(defun org-e-latex-table--format-string (table info)
"Return an appropriate format string for TABLE.
INFO is the plist containing format info about the table, as
@@ -1561,20 +1561,20 @@ returned by `org-export-table-format-info'.
The format string one placeholder for the body of the table."
(let* ((label (org-element-get-property :name table))
- (caption (org-latex--caption/label-string
+ (caption (org-e-latex--caption/label-string
(org-element-get-property :caption table) label info))
(attr (mapconcat #'identity
(org-element-get-property :attr_latex table)
" "))
;; Determine alignment string.
- (alignment (org-latex-table--align-string attr info))
+ (alignment (org-e-latex-table--align-string attr info))
;; Determine environment for the table: longtable, tabular...
(table-env (cond
- ((not attr) org-latex-default-table-environment)
+ ((not attr) org-e-latex-default-table-environment)
((string-match "\\<longtable\\>" attr) "longtable")
((string-match "\\(tabular.\\)" attr)
(org-match-string-no-properties 1 attr))
- (t org-latex-default-table-environment)))
+ (t org-e-latex-default-table-environment)))
;; If table is a float, determine environment: table or table*.
(float-env (cond
((string= "longtable" table-env) nil)
@@ -1591,7 +1591,7 @@ The format string one placeholder for the body of the table."
(string-match "\\<placement=\\(\\S-+\\)" attr))
(org-match-string-no-properties 1 attr)
(concat "["
- org-latex-default-figure-position
+ org-e-latex-default-figure-position
"]"))))
;; Prepare the final format string for the table.
(cond
@@ -1599,11 +1599,11 @@ The format string one placeholder for the body of the table."
((string= "longtable" table-env)
(format "\\begin{longtable}{%s}\n%s\n%%s\n%s\\end{longtable}"
alignment
- (if (or (not org-latex-table-caption-above)
+ (if (or (not org-e-latex-table-caption-above)
(string= "" caption))
""
(concat (org-trim caption) "\\\\"))
- (if (or org-latex-table-caption-above
+ (if (or org-e-latex-table-caption-above
(string= "" caption))
""
(concat (org-trim caption) "\\\\\n"))))
@@ -1611,19 +1611,19 @@ The format string one placeholder for the body of the table."
(t (concat (when float-env
(concat
(format "\\begin{%s}%s\n" float-env placement)
- (if org-latex-table-caption-above caption "")))
- (when org-latex-tables-centered "\\begin{center}\n")
+ (if org-e-latex-table-caption-above caption "")))
+ (when org-e-latex-tables-centered "\\begin{center}\n")
(format "\\begin{%s}%s{%s}\n%%s\n\\end{%s}"
table-env
(if width (format "{%s}" width) "")
alignment
table-env)
- (when org-latex-tables-centered "\n\\end{center}")
+ (when org-e-latex-tables-centered "\n\\end{center}")
(when float-env
- (concat (if org-latex-table-caption-above "" caption)
+ (concat (if org-e-latex-table-caption-above "" caption)
(format "\n\\end{%s}" float-env))))))))
-(defun org-latex-table--align-string (attr info)
+(defun org-e-latex-table--align-string (attr info)
"Return an appropriate LaTeX alignment string.
INFO is the plist containing format info about the table, as
@@ -1653,7 +1653,7 @@ returned by `org-export-table-format-info'."
concat (concat sep al) into output
finally return (concat output (aref separators cols))))))
-(defun org-latex-table (table contents info)
+(defun org-e-latex-table (table contents info)
"Transcode a TABLE element from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual information."
(let ((attr (mapconcat #'identity
@@ -1662,7 +1662,7 @@ CONTENTS is nil. INFO is a plist holding contextual information."
(raw-table (org-element-get-property :raw-table table)))
(cond
;; Case 1: verbatim table.
- ((or org-latex-tables-verbatim
+ ((or org-e-latex-tables-verbatim
(and attr (string-match "\\<verbatim\\>" attr)))
(format "\\begin{verbatim}\n%s\n\\end{verbatim}"
(org-export-clean-table
@@ -1694,7 +1694,7 @@ CONTENTS is nil. INFO is a plist holding contextual information."
(setq pos (string-match "^\\\\hline\n?" output pos)))
(incf n)
(unless (= n 2) (setq output (replace-match "" nil nil output))))))
- (if org-latex-tables-centered
+ (if org-e-latex-tables-centered
(format "\\begin{center}\n%s\n\\end{center}" output)
output)))
;; Case 3: Standard table.
@@ -1708,7 +1708,7 @@ CONTENTS is nil. INFO is a plist holding contextual information."
;; `org-element-parse-secondary-string' to expand any Org
;; object within. Eventually, flesh the format string out with
;; the table.
- (format (org-latex-table--format-string table table-info)
+ (format (org-e-latex-table--format-string table table-info)
(orgtbl-to-latex
(mapcar
(lambda (row)
@@ -1739,7 +1739,7 @@ CONTENTS is nil. INFO is a plist holding contextual information."
;;;; Target
-(defun org-latex-target (target text info)
+(defun org-e-latex-target (target text info)
"Transcode a TARGET object from Org to LaTeX.
TEXT is the text of the target. INFO is a plist holding
contextual information."
@@ -1751,7 +1751,7 @@ contextual information."
;;;; Time-stamp
-(defun org-latex-time-stamp (time-stamp contents info)
+(defun org-e-latex-time-stamp (time-stamp contents info)
"Transcode a TIME-STAMP object from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual information."
(let ((value (org-element-get-property :value time-stamp))
@@ -1764,24 +1764,24 @@ CONTENTS is nil. INFO is a plist holding contextual information."
((eq appt-type 'closed)
(format "\\textbf{\\textsc{%s}} " org-closed-string)))
(cond ((memq type '(active active-range))
- (format org-latex-active-timestamp-format value))
+ (format org-e-latex-active-timestamp-format value))
((memq type '(inactive inactive-range))
- (format org-latex-inactive-timestamp-format value))
+ (format org-e-latex-inactive-timestamp-format value))
(t
- (format org-latex-diary-timestamp-format value))))))
+ (format org-e-latex-diary-timestamp-format value))))))
;;;; Verbatim
-(defun org-latex-verbatim (element contents info)
+(defun org-e-latex-verbatim (element contents info)
"Return verbatim text in LaTeX."
(let ((fmt (cdr (assoc (org-element-get-property :marker element)
- org-latex-emphasis-alist)))
+ org-e-latex-emphasis-alist)))
(value (org-element-get-property :value element)))
(cond
;; Handle the `verb' special case.
((eq 'verb fmt)
- (let ((separator (org-latex--find-verb-separator value)))
+ (let ((separator (org-e-latex--find-verb-separator value)))
(concat "\\verb" separator value separator)))
;; Handle the `protectedtexttt' special case.
((eq 'protectedtexttt fmt)
@@ -1809,10 +1809,10 @@ CONTENTS is nil. INFO is a plist holding contextual information."
;;;; Verse Block
-(defun org-latex-verse-block (verse-block contents info)
+(defun org-e-latex-verse-block (verse-block contents info)
"Transcode a VERSE-BLOCK element from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual information."
- (org-latex--wrap-label
+ (org-e-latex--wrap-label
verse-block
;; In a verse environment, add a line break to each newline
;; character and change each white space at beginning of a line
@@ -1834,5 +1834,5 @@ CONTENTS is nil. INFO is a plist holding contextual information."
(format "\\begin{verse}\n%s\\end{verse}" contents))))
-(provide 'org-latex)
-;;; org-latex.el ends here
+(provide 'org-e-latex)
+;;; org-e-latex.el ends here