org-mode/lisp/ox-latex.el

3321 lines
118 KiB
EmacsLisp
Raw Normal View History

;;; ox-latex.el --- LaTeX Back-End for Org Export Engine
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
2015-02-16 00:40:07 +00:00
;; Copyright (C) 2011-2015 Free Software Foundation, Inc.
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;; Author: Nicolas Goaziou <n.goaziou at gmail dot com>
;; Keywords: outlines, hypermedia, calendar, wp
Backport changes from Emacs revs 115081 and 115082 2013-11-12 Stefan Monnier <monnier@iro.umontreal.ca> Address some byte-compiler warnings. * ob-abc.el (org-babel-expand-body:abc): Use dolist. (org-babel-execute:abc): Fix regexp quoting. * ob-calc.el (org--var-syms): Rename from `var-syms'. * ob-lilypond.el (ly-compile-lilyfile): Remove redundant let-binding. * ob-table.el (sbe): Move debug declaration. * org-clock.el (org--msg-extra): Rename from `msg-extra'. * org.el (org-version): Avoid var name starting with _. (org-inhibit-startup, org-called-with-limited-levels) (org-link-search-inhibit-query, org-time-was-given) (org-end-time-was-given, org-def, org-defdecode, org-with-time): * org-colview.el (org-agenda-overriding-columns-format): * org-agenda.el (org-agenda-multi, org-depend-tag-blocked) (org-agenda-show-log-scoped): * ob-python.el (py-which-bufname, python-shell-buffer-name): * ob-haskell.el (org-export-copy-to-kill-ring): * ob-exp.el (org-link-search-inhibit-query): * ob-R.el (ess-eval-visibly-p): * ob-core.el (org-src-window-setup): Declare before use. (org-babel-expand-noweb-references): Remove unused `blocks-in-buffer'. * ox-odt.el (org-odt-hfy-face-to-css): * org-src.el (org-src-associate-babel-session, org-src-get-lang-mode): * org-bibtex.el (org-bibtex-get, org-bibtex-ask, org-bibtex) (org-bibtex-check): * ob-tangle.el (org-babel-tangle, org-babel-spec-to-string) (org-babel-tangle-single-block, org-babel-tangle-comment-links): * ob-table.el (sbe): * ob-sqlite.el (org-babel-sqlite-expand-vars): * ob-sql.el (org-babel-sql-expand-vars): * ob-shen.el (org-babel-execute:shen): * ob-sh.el (org-babel-execute:sh, org-babel-sh-evaluate): * ob-scala.el (org-babel-scala-evaluate): * ob-ruby.el (org-babel-ruby-table-or-string) (org-babel-ruby-evaluate): * ob-python.el (org-babel-python-table-or-string) (org-babel-python-evaluate-external-process) (org-babel-python-evaluate-session): * ob-picolisp.el (org-babel-execute:picolisp): * ob-perl.el (org-babel-perl-evaluate): * ob-maxima.el (org-babel-execute:maxima): * ob-lisp.el (org-babel-execute:lisp): * ob-java.el (org-babel-execute:java): * ob-io.el (org-babel-io-evaluate): * ob-haskell.el (org-babel-execute:haskell): * ob-fortran.el (org-babel-execute:fortran): * ob-exp.el (org-babel-exp-code): * ob-emacs-lisp.el (org-babel-execute:emacs-lisp): * ob-ditaa.el (org-babel-execute:ditaa): * ob-core.el (org-babel-execute-src-block, org-babel-sha1-hash) (org-babel-parse-header-arguments, org-babel-reassemble-table) (org-babel-goto-src-block-head, org-babel-mark-block) (org-babel-expand-noweb-references, org-babel-script-escape) (org-babel-process-file-name): * ob-clojure.el (org-babel-execute:clojure): * ob-calc.el (org-babel-execute:calc): * ob-awk.el (org-babel-execute:awk): * ob-abc.el (org-babel-execute:abc): * ob-R.el (org-babel-expand-body:R): * ob-C.el (org-babel-C-execute): Avoid deprecated ((lambda) ...). 2013-11-12 Glenn Morris <rgm@gnu.org> * ox-html.el (org-html-scripts): Add 2013 to copyright years. (org-html-infojs-template): Copyright holder to FSF.
2013-11-12 19:57:31 +00:00
;; This file is part of GNU Emacs.
2013-02-23 08:56:24 +00:00
;; GNU Emacs is free software: you can redistribute it and/or modify
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
2013-02-23 08:56:24 +00:00
;; GNU Emacs is distributed in the hope that it will be useful,
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
2013-02-23 08:56:24 +00:00
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;; Commentary:
;;
;; See Org manual for details.
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;; Code:
(eval-when-compile (require 'cl))
(require 'ox)
(require 'ox-publish)
(defvar org-latex-default-packages-alist)
(defvar org-latex-packages-alist)
2012-07-01 20:29:23 +00:00
(defvar orgtbl-exp-regexp)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;; Define Back-End
(org-export-define-backend 'latex
'((bold . org-latex-bold)
(center-block . org-latex-center-block)
(clock . org-latex-clock)
(code . org-latex-code)
(drawer . org-latex-drawer)
(dynamic-block . org-latex-dynamic-block)
(entity . org-latex-entity)
(example-block . org-latex-example-block)
(export-block . org-latex-export-block)
(export-snippet . org-latex-export-snippet)
(fixed-width . org-latex-fixed-width)
(footnote-definition . org-latex-footnote-definition)
(footnote-reference . org-latex-footnote-reference)
(headline . org-latex-headline)
(horizontal-rule . org-latex-horizontal-rule)
(inline-src-block . org-latex-inline-src-block)
(inlinetask . org-latex-inlinetask)
(italic . org-latex-italic)
(item . org-latex-item)
(keyword . org-latex-keyword)
(latex-environment . org-latex-latex-environment)
(latex-fragment . org-latex-latex-fragment)
(line-break . org-latex-line-break)
(link . org-latex-link)
(node-property . org-latex-node-property)
(paragraph . org-latex-paragraph)
(plain-list . org-latex-plain-list)
(plain-text . org-latex-plain-text)
(planning . org-latex-planning)
(property-drawer . org-latex-property-drawer)
(quote-block . org-latex-quote-block)
(radio-target . org-latex-radio-target)
(section . org-latex-section)
(special-block . org-latex-special-block)
(src-block . org-latex-src-block)
(statistics-cookie . org-latex-statistics-cookie)
(strike-through . org-latex-strike-through)
(subscript . org-latex-subscript)
(superscript . org-latex-superscript)
(table . org-latex-table)
(table-cell . org-latex-table-cell)
(table-row . org-latex-table-row)
(target . org-latex-target)
(template . org-latex-template)
(timestamp . org-latex-timestamp)
(underline . org-latex-underline)
(verbatim . org-latex-verbatim)
(verse-block . org-latex-verse-block)
;; Pseudo objects and elements.
(latex-math-block . org-latex-math-block)
(latex-matrices . org-latex-matrices))
:export-block '("LATEX" "TEX")
:menu-entry
'(?l "Export to LaTeX"
((?L "As LaTeX buffer" org-latex-export-as-latex)
(?l "As LaTeX file" org-latex-export-to-latex)
(?p "As PDF file" org-latex-export-to-pdf)
(?o "As PDF file and open"
(lambda (a s v b)
(if a (org-latex-export-to-pdf t s v b)
(org-open-file (org-latex-export-to-pdf nil s v b)))))))
:filters-alist '((:filter-options . org-latex-math-block-options-filter)
(:filter-parse-tree org-latex-math-block-tree-filter
org-latex-matrices-tree-filter))
:options-alist
'((:latex-class "LATEX_CLASS" nil org-latex-default-class t)
(:latex-class-options "LATEX_CLASS_OPTIONS" nil nil t)
(:latex-header "LATEX_HEADER" nil nil newline)
(:latex-header-extra "LATEX_HEADER_EXTRA" nil nil newline)
(:description "DESCRIPTION" nil nil parse)
(:keywords "KEYWORDS" nil nil parse)
(:subtitle "SUBTITLE" nil nil parse)
;; Other variables.
(:latex-active-timestamp-format nil nil org-latex-active-timestamp-format)
(:latex-caption-above nil nil org-latex-caption-above)
(:latex-classes nil nil org-latex-classes)
(:latex-custom-id-labels nil nil org-latex-custom-id-as-label)
(:latex-default-figure-position nil nil org-latex-default-figure-position)
(:latex-default-table-environment nil nil org-latex-default-table-environment)
(:latex-default-table-mode nil nil org-latex-default-table-mode)
(:latex-diary-timestamp-format nil nil org-latex-diary-timestamp-format)
(:latex-footnote-separator nil nil org-latex-footnote-separator)
(:latex-format-drawer-function nil nil org-latex-format-drawer-function)
(:latex-format-headline-function nil nil org-latex-format-headline-function)
(:latex-format-inlinetask-function nil nil org-latex-format-inlinetask-function)
(:latex-hyperref-template nil nil org-latex-hyperref-template t)
(:latex-image-default-height nil nil org-latex-image-default-height)
(:latex-image-default-option nil nil org-latex-image-default-option)
(:latex-image-default-width nil nil org-latex-image-default-width)
(:latex-inactive-timestamp-format nil nil org-latex-inactive-timestamp-format)
(:latex-inline-image-rules nil nil org-latex-inline-image-rules)
(:latex-link-with-unknown-path-format nil nil org-latex-link-with-unknown-path-format)
(:latex-listings nil nil org-latex-listings)
(:latex-listings-langs nil nil org-latex-listings-langs)
(:latex-listings-options nil nil org-latex-listings-options)
(:latex-minted-langs nil nil org-latex-minted-langs)
(:latex-minted-options nil nil org-latex-minted-options)
(:latex-subtitle-format nil nil org-latex-subtitle-format)
(:latex-subtitle-separate nil nil org-latex-subtitle-separate)
(:latex-table-scientific-notation nil nil org-latex-table-scientific-notation)
(:latex-tables-booktabs nil nil org-latex-tables-booktabs)
(:latex-tables-centered nil nil org-latex-tables-centered)
(:latex-text-markup-alist nil nil org-latex-text-markup-alist)
(:latex-title-command nil nil org-latex-title-command)
(:latex-toc-command nil nil org-latex-toc-command)
;; Redefine regular options.
(:date "DATE" nil "\\today" parse)))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;; Internal Variables
(defconst org-latex-babel-language-alist
'(("af" . "afrikaans")
("bg" . "bulgarian")
("bt-br" . "brazilian")
("ca" . "catalan")
("cs" . "czech")
("cy" . "welsh")
("da" . "danish")
("de" . "germanb")
("de-at" . "naustrian")
("de-de" . "ngerman")
("el" . "greek")
("en" . "english")
("en-au" . "australian")
("en-ca" . "canadian")
("en-gb" . "british")
("en-ie" . "irish")
("en-nz" . "newzealand")
("en-us" . "american")
("es" . "spanish")
("et" . "estonian")
("eu" . "basque")
("fi" . "finnish")
("fr" . "frenchb")
("fr-ca" . "canadien")
("gl" . "galician")
("hr" . "croatian")
("hu" . "hungarian")
("id" . "indonesian")
("is" . "icelandic")
("it" . "italian")
("la" . "latin")
("ms" . "malay")
("nl" . "dutch")
("nb" . "norsk")
("nn" . "nynorsk")
("no" . "norsk")
("pl" . "polish")
("pt" . "portuguese")
("ro" . "romanian")
("ru" . "russian")
("sa" . "sanskrit")
("sb" . "uppersorbian")
("sk" . "slovak")
("sl" . "slovene")
("sq" . "albanian")
("sr" . "serbian")
("sv" . "swedish")
("ta" . "tamil")
("tr" . "turkish")
("uk" . "ukrainian"))
"Alist between language code and corresponding Babel option.")
(defconst org-latex-table-matrix-macros '(("bordermatrix" . "\\cr")
("qbordermatrix" . "\\cr")
("kbordermatrix" . "\\\\"))
"Alist between matrix macros and their row ending.")
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;; User Configurable Variables
(defgroup org-export-latex nil
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Options for exporting Org mode files to LaTeX."
:tag "Org Export LaTeX"
:group 'org-export)
;;;; Generic
(defcustom org-latex-caption-above '(table)
"When non-nil, place caption string at the beginning of elements.
Otherwise, place it near the end. When value is a list of
symbols, put caption above selected elements only. Allowed
symbols are: `image', `table', `src-block' and `special-block'."
:group 'org-export-latex
:version "25.1"
:package-version '(Org . "8.3")
:type '(choice
(const :tag "For all elements" t)
(const :tag "For no element" nil)
(set :tag "For the following elements only" :greedy t
(const :tag "Images" image)
(const :tag "Tables" table)
(const :tag "Source code" src-block)
(const :tag "Special blocks" special-block))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Preamble
(defcustom org-latex-default-class "article"
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"The default LaTeX class."
:group 'org-export-latex
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
:type '(string :tag "LaTeX class"))
(defcustom org-latex-classes
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
'(("article"
"\\documentclass[11pt]{article}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
("report"
"\\documentclass[11pt]{report}"
("\\part{%s}" . "\\part*{%s}")
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
("book"
"\\documentclass[11pt]{book}"
("\\part{%s}" . "\\part*{%s}")
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
"Alist of LaTeX classes and associated header and structure.
If #+LATEX_CLASS is set in the buffer, use its value and the
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
associated information. Here is the structure of each cell:
\(class-name
header-string
\(numbered-section . unnumbered-section)
...)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
The header string
-----------------
The HEADER-STRING is the header that will be inserted into the
LaTeX file. It should contain the \\documentclass macro, and
anything else that is needed for this setup. To this header, the
following commands will be added:
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
- 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 avoid to also request these packages.
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
- Lines specified via \"#+LATEX_HEADER:\" and
\"#+LATEX_HEADER_EXTRA:\" keywords.
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
If you need more control about the sequence in which the header
is built up, or if you want to exclude one of these building
blocks for a particular class, you can use the following
macro-like placeholders.
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
[DEFAULT-PACKAGES] \\usepackage statements for default packages
[NO-DEFAULT-PACKAGES] do not include any of the default packages
[PACKAGES] \\usepackage statements for packages
[NO-PACKAGES] do not include the packages
[EXTRA] the stuff from #+LATEX_HEADER(_EXTRA)
[NO-EXTRA] do not include #+LATEX_HEADER(_EXTRA) stuff
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
So a header like
\\documentclass{article}
[NO-DEFAULT-PACKAGES]
[EXTRA]
\\providecommand{\\alert}[1]{\\textbf{#1}}
[PACKAGES]
will omit the default packages, and will include the
#+LATEX_HEADER and #+LATEX_HEADER_EXTRA lines, then have a call
to \\providecommand, and then place \\usepackage commands based
on the content of `org-latex-packages-alist'.
If your header, `org-latex-default-packages-alist' or
`org-latex-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 mechanism.
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
Likewise, if your header contains \"\\usepackage[AUTO]{babel}\",
AUTO will be replaced with the language related to the language
code specified by `org-export-default-language', which see. Note
that constructions such as \"\\usepackage[french,AUTO,english]{babel}\"
are permitted.
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
The sectioning structure
------------------------
The sectioning structure of the class is given by the elements
following the header string. For each sectioning level, a number
of strings is specified. A %s formatter is mandatory in each
section string and will be replaced by the title of the section.
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
Instead of a cons cell (numbered . unnumbered), you can also
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
provide a list of 2 or 4 elements,
\(numbered-open numbered-close)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
or
\(numbered-open numbered-close unnumbered-open unnumbered-close)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
providing opening and closing strings for a LaTeX environment
that should represent the document section. The opening clause
should have a %s to represent the section title.
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
Instead of a list of sectioning commands, you can also specify
a function name. That function will be called with two
parameters, the (reduced) level of the headline, and a predicate
non-nil when the headline should be numbered. It must return
a format string in which the section title will be added."
:group 'org-export-latex
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
:type '(repeat
2011-12-09 13:38:36 +00:00
(list (string :tag "LaTeX class")
(string :tag "LaTeX header")
(repeat :tag "Levels" :inline t
(choice
(cons :tag "Heading"
(string :tag " numbered")
(string :tag "unnumbered"))
(list :tag "Environment"
(string :tag "Opening (numbered)")
(string :tag "Closing (numbered)")
(string :tag "Opening (unnumbered)")
(string :tag "Closing (unnumbered)"))
(function :tag "Hook computing sectioning"))))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(defcustom org-latex-inputenc-alist nil
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Alist of inputenc coding system names, and what should really be used.
For example, adding an entry
(\"utf8\" . \"utf8x\")
will cause \\usepackage[utf8x]{inputenc} to be used for buffers that
are written as utf8 files."
:group 'org-export-latex
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
:type '(repeat
2011-12-09 13:38:36 +00:00
(cons
(string :tag "Derived from buffer")
(string :tag "Use this instead"))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(defcustom org-latex-title-command "\\maketitle"
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"The command used to insert the title just after \\begin{document}.
This format string may contain these elements:
%a for AUTHOR keyword
%t for TITLE keyword
%s for SUBTITLE keyword
%k for KEYWORDS line
%d for DESCRIPTION line
%c for CREATOR line
%l for Language keyword
%L for capitalized language keyword
%D for DATE keyword
If you need to use a \"%\" character, you need to escape it
like that: \"%%\".
Setting :latex-title-command in publishing projects will take
precedence over this variable."
:group 'org-export-latex
:type '(string :tag "Format string"))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(defcustom org-latex-subtitle-format "\\\\\\medskip\n\\large %s"
"Format string used for transcoded subtitle.
The format string should have at most one \"%s\"-expression,
which is replaced with the subtitle."
:group 'org-export-latex
:version "25.1"
:package-version '(Org . "8.3")
:type '(string :tag "Format string"))
(defcustom org-latex-subtitle-separate nil
"Non-nil means the subtitle is not typeset as part of title."
:group 'org-export-latex
:version "25.1"
:package-version '(Org . "8.3")
:type 'boolean)
(defcustom org-latex-toc-command "\\tableofcontents\n\n"
"LaTeX command to set the table of contents, list of figures, etc.
This command only applies to the table of contents generated with
the toc:nil option, not to those generated with #+TOC keyword."
:group 'org-export-latex
:type 'string)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(defcustom org-latex-hyperref-template
"\\hypersetup{\n pdfauthor={%a},\n pdftitle={%t},\n pdfkeywords={%k},
pdfsubject={%d},\n pdfcreator={%c}, \n pdflang={%L}}\n"
"Template for hyperref package options.
This format string may contain these elements:
%a for AUTHOR keyword
%t for TITLE keyword
%s for SUBTITLE keyword
%k for KEYWORDS line
%d for DESCRIPTION line
%c for CREATOR line
%l for Language keyword
%L for capitalized language keyword
%D for DATE keyword
If you need to use a \"%\" character, you need to escape it
like that: \"%%\".
Setting :latex-hyperref-template in publishing projects will take
precedence over this variable."
:group 'org-export-latex
:version "25.1"
:package-version '(Org . "8.3")
:type '(string :tag "Format string"))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Headline
(defcustom org-latex-format-headline-function
'org-latex-format-headline-default-function
"Function for formatting the headline's text.
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
This function will be called with six arguments:
TODO the todo keyword (string or nil)
TODO-TYPE the type of todo (symbol: `todo', `done', nil)
PRIORITY the priority of the headline (integer or nil)
TEXT the main headline text (string)
TAGS the tags (list of strings or nil)
INFO the export options (plist)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
The function result will be used in the section format string."
:group 'org-export-latex
:version "24.4"
:package-version '(Org . "8.0")
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
:type 'function)
(defcustom org-latex-custom-id-as-label nil
"Toggle use of CUSTOM_ID properties for generating section labels.
When this variable is non-nil, Org will use the value of a
headline's CUSTOM_ID property as the key for the \\label command
for the LaTeX section corresponding to the headline.
By default, Org generates its own internal section labels for all
headlines during LaTeX export. This process ensures that the
\\label keys are unique and valid, but it means the keys are not
available in advance of the export process.
Setting this variable gives you control over how Org generates
labels for sections during LaTeX export, so that you may know
their keys in advance. One reason to do this is that it allows
you to refer to headlines using a single label both in Org's link
syntax and in embedded LaTeX code.
For example, when this variable is non-nil, a headline like this:
** Some section
:PROPERTIES:
:CUSTOM_ID: sec:foo
:END:
This is section [[#sec:foo]].
#+BEGIN_LATEX
And this is still section \\ref{sec:foo}.
#+END_LATEX
will be exported to LaTeX as:
\\subsection{Some section}
\\label{sec:foo}
This is section \\ref{sec:foo}.
And this is still section \\ref{sec:foo}.
Note, however, that setting this variable introduces a limitation
on the possible values for CUSTOM_ID. When this variable is
non-nil and a headline defines a CUSTOM_ID value, Org simply
passes this value to \\label unchanged. You are responsible for
ensuring that the value is a valid LaTeX \\label key, and that no
other \\label commands with the same key appear elsewhere in your
document. (Keys may contain letters, numbers, and the following
punctuation: '_' '.' '-' ':'.) There are no such limitations on
CUSTOM_ID when this variable is nil.
For headlines that do not define the CUSTOM_ID property, Org will
continue to use its default labeling scheme to generate labels
and resolve links into section references."
:group 'org-export-latex
:type 'boolean
:version "25.1"
:package-version '(Org . "8.3"))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Footnotes
(defcustom org-latex-footnote-separator "\\textsuperscript{,}\\,"
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Text used to separate footnotes."
:group 'org-export-latex
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
:type 'string)
;;;; Timestamps
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(defcustom org-latex-active-timestamp-format "\\textit{%s}"
"A printf format string to be applied to active timestamps."
:group 'org-export-latex
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
:type 'string)
(defcustom org-latex-inactive-timestamp-format "\\textit{%s}"
"A printf format string to be applied to inactive timestamps."
:group 'org-export-latex
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
:type 'string)
(defcustom org-latex-diary-timestamp-format "\\textit{%s}"
"A printf format string to be applied to diary timestamps."
:group 'org-export-latex
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
:type 'string)
;;;; Links
(defcustom org-latex-image-default-option ""
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Default option for images."
:group 'org-export-latex
:version "24.4"
:package-version '(Org . "8.0")
:type 'string)
(defcustom org-latex-image-default-width ".9\\linewidth"
"Default width for images.
This value will not be used if a height is provided."
:group 'org-export-latex
:version "24.4"
:package-version '(Org . "8.0")
:type 'string)
(defcustom org-latex-image-default-height ""
"Default height for images.
This value will not be used if a width is provided, or if the
image is wrapped within a \"figure\" or \"wrapfigure\"
environment."
:group 'org-export-latex
:version "24.4"
:package-version '(Org . "8.0")
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
:type 'string)
(defcustom org-latex-default-figure-position "htb"
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Default position for latex figures."
:group 'org-export-latex
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
:type 'string)
(defcustom org-latex-inline-image-rules
'(("file" . "\\.\\(pdf\\|jpeg\\|jpg\\|png\\|ps\\|eps\\|tikz\\|pgf\\|svg\\)\\'"))
"Rules characterizing image files that can be inlined into LaTeX.
A rule consists in an association whose key is the type of link
to consider, and value is a regexp that will be matched against
link's path.
Note that, by default, the image extension *actually* allowed
depend on the way the LaTeX file is processed. When used with
pdflatex, pdf, jpg and png images are OK. When processing
through dvi to Postscript, only ps and eps are allowed. The
default we use here encompasses both."
:group 'org-export-latex
:version "24.4"
:package-version '(Org . "8.0")
:type '(alist :key-type (string :tag "Type")
:value-type (regexp :tag "Path")))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(defcustom org-latex-link-with-unknown-path-format "\\texttt{%s}"
"Format string for links with unknown path type."
:group 'org-export-latex
:type 'string)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Tables
(defcustom org-latex-default-table-environment "tabular"
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Default environment used to build tables."
:group 'org-export-latex
:version "24.4"
:package-version '(Org . "8.0")
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
:type 'string)
(defcustom org-latex-default-table-mode 'table
"Default mode for tables.
Value can be a symbol among:
`table' Regular LaTeX table.
`math' In this mode, every cell is considered as being in math
mode and the complete table will be wrapped within a math
environment. It is particularly useful to write matrices.
`inline-math' This mode is almost the same as `math', but the
math environment will be inlined.
`verbatim' The table is exported as it appears in the Org
buffer, within a verbatim environment.
This value can be overridden locally with, i.e. \":mode math\" in
LaTeX attributes.
When modifying this variable, it may be useful to change
`org-latex-default-table-environment' accordingly."
:group 'org-export-latex
:version "24.4"
:package-version '(Org . "8.0")
:type '(choice (const :tag "Table" table)
(const :tag "Matrix" math)
(const :tag "Inline matrix" inline-math)
(const :tag "Verbatim" verbatim))
:safe (lambda (s) (memq s '(table math inline-math verbatim))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(defcustom org-latex-tables-centered t
"When non-nil, tables are exported in a center environment."
:group 'org-export-latex
:type 'boolean
:safe #'booleanp)
(defcustom org-latex-tables-booktabs nil
"When non-nil, display tables in a formal \"booktabs\" style.
This option assumes that the \"booktabs\" package is properly
loaded in the header of the document. This value can be ignored
locally with \":booktabs t\" and \":booktabs nil\" LaTeX
attributes."
:group 'org-export-latex
:version "24.4"
:package-version '(Org . "8.0")
:type 'boolean
:safe #'booleanp)
(defcustom org-latex-table-scientific-notation "%s\\,(%s)"
"Format string to display numbers in scientific notation.
The format should have \"%s\" twice, for mantissa and exponent
\(i.e., \"%s\\\\times10^{%s}\").
When nil, no transformation is made."
:group 'org-export-latex
:version "24.4"
:package-version '(Org . "8.0")
:type '(choice
(string :tag "Format string")
(const :tag "No formatting" nil)))
org-element: Define new objects (bold, code, italic, ...) * contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo. (org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through, org-e-ascii-underline): New functions. (org-e-ascii-emphasis): Remove function. * contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable renamed from `org-e-html-emphasis-alist'. Change value type. (org-e-html-bold, org-e-html-italic, org-e-html-strike-through, org-e-html-underline): New functions. (org-e-html-verbatim): Update function. (org-e-html-emphasis): Remove function. * contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist): Variable renamed from `org-e-latex-emphasis-alist'. Change value type. (org-e-latex-center-block): Fix docstring. (org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code, org-e-latex-italic, org-e-latex-strike-through, org-e-latex-underline): New functions. (org-e-latex-verbatim): Update function. (org-e-latex-emphasis): Remove function. * contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code, org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline): New functions. (org-e-odt-verbatim): Update function. (org-e-odt-center-block): Fix docstring. (org-e-odt-emphasis): Remove function. * contrib/lisp/org-element.el (org-element-bold-parser): (org-element-bold-interpreter, org-element-code-parser, org-element-code-interpreter, org-element-italic-parser, org-element-italic-interpreter, org-element-strike-through-parser, org-element-strike-through-interpreter, org-element-underline-parser, org-element-underline-interpreter): New functions. (org-element-emphasis-parser, org-element-emphasis-interpreter): Remove functions. (org-element-verbatim-parser, org-element-verbatim-interpreter, org-element-text-markup-successor): Update function. (org-element-object-successor-alist): Add associations for new object types. (org-element-recursive-objects): Add `bold', `italic', `strike-through' and `underline' as recursive types. (org-element-object-restrictions): Add restrictions for new recursive object types. * contrib/lisp/org-export.el (org-export-filters-alist): Add filters for new object types. (org-export-with-todo-keywords): Add missing keywords. (org-export-filter-center-block-functions, org-export-filter-drawer-functions, org-export-filter-dynamic-block-functions, org-export-filter-headline-functions, org-export-filter-inlinetask-functions, org-export-filter-plain-list-functions, org-export-filter-item-functions, org-export-filter-comment-functions, org-export-filter-comment-block-functions, org-export-filter-example-block-functions, org-export-filter-export-block-functions, org-export-filter-fixed-width-functions, org-export-filter-footnote-definition-functions, org-export-filter-horizontal-rule-functions, org-export-filter-keyword-functions, org-export-filter-latex-environment-functions, org-export-filter-babel-call-functions, org-export-filter-paragraph-functions, org-export-filter-property-drawer-functions, org-export-filter-quote-section-functions, org-export-filter-quote-block-functions, org-export-filter-section-functions, org-export-filter-special-block-functions, org-export-filter-src-block-functions, org-export-filter-table-functions, org-export-filter-table-cell-functions, org-export-filter-table-row-functions, org-export-filter-verse-block-functions, org-export-filter-entity-functions, org-export-filter-export-snippet-functions, org-export-filter-footnote-reference-functions, org-export-filter-inline-babel-call-functions, org-export-filter-inline-src-block-functions, org-export-filter-latex-fragment-functions, org-export-filter-line-break-functions, org-export-filter-link-functions, org-export-filter-macro-functions, org-export-filter-radio-target-functions, org-export-filter-statistics-cookie-functions, org-export-filter-subscript-functions, org-export-filter-superscript-functions, org-export-filter-target-functions, org-export-filter-time-stamp-functions, org-export-filter-verbatim-functions): Fix docstring. (org-export-filter-bold-functions, org-export-filter-code-functions, org-export-filter-italic-functions, org-export-filter-strike-through-functions, org-export-filter-underline-functions): New variables. (org-export-filter-emphasis-functions): Remove variable. * testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
;;;; Text markup
(defcustom org-latex-text-markup-alist '((bold . "\\textbf{%s}")
(code . verb)
(italic . "\\emph{%s}")
(strike-through . "\\sout{%s}")
(underline . "\\uline{%s}")
(verbatim . protectedtexttt))
org-element: Define new objects (bold, code, italic, ...) * contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo. (org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through, org-e-ascii-underline): New functions. (org-e-ascii-emphasis): Remove function. * contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable renamed from `org-e-html-emphasis-alist'. Change value type. (org-e-html-bold, org-e-html-italic, org-e-html-strike-through, org-e-html-underline): New functions. (org-e-html-verbatim): Update function. (org-e-html-emphasis): Remove function. * contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist): Variable renamed from `org-e-latex-emphasis-alist'. Change value type. (org-e-latex-center-block): Fix docstring. (org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code, org-e-latex-italic, org-e-latex-strike-through, org-e-latex-underline): New functions. (org-e-latex-verbatim): Update function. (org-e-latex-emphasis): Remove function. * contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code, org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline): New functions. (org-e-odt-verbatim): Update function. (org-e-odt-center-block): Fix docstring. (org-e-odt-emphasis): Remove function. * contrib/lisp/org-element.el (org-element-bold-parser): (org-element-bold-interpreter, org-element-code-parser, org-element-code-interpreter, org-element-italic-parser, org-element-italic-interpreter, org-element-strike-through-parser, org-element-strike-through-interpreter, org-element-underline-parser, org-element-underline-interpreter): New functions. (org-element-emphasis-parser, org-element-emphasis-interpreter): Remove functions. (org-element-verbatim-parser, org-element-verbatim-interpreter, org-element-text-markup-successor): Update function. (org-element-object-successor-alist): Add associations for new object types. (org-element-recursive-objects): Add `bold', `italic', `strike-through' and `underline' as recursive types. (org-element-object-restrictions): Add restrictions for new recursive object types. * contrib/lisp/org-export.el (org-export-filters-alist): Add filters for new object types. (org-export-with-todo-keywords): Add missing keywords. (org-export-filter-center-block-functions, org-export-filter-drawer-functions, org-export-filter-dynamic-block-functions, org-export-filter-headline-functions, org-export-filter-inlinetask-functions, org-export-filter-plain-list-functions, org-export-filter-item-functions, org-export-filter-comment-functions, org-export-filter-comment-block-functions, org-export-filter-example-block-functions, org-export-filter-export-block-functions, org-export-filter-fixed-width-functions, org-export-filter-footnote-definition-functions, org-export-filter-horizontal-rule-functions, org-export-filter-keyword-functions, org-export-filter-latex-environment-functions, org-export-filter-babel-call-functions, org-export-filter-paragraph-functions, org-export-filter-property-drawer-functions, org-export-filter-quote-section-functions, org-export-filter-quote-block-functions, org-export-filter-section-functions, org-export-filter-special-block-functions, org-export-filter-src-block-functions, org-export-filter-table-functions, org-export-filter-table-cell-functions, org-export-filter-table-row-functions, org-export-filter-verse-block-functions, org-export-filter-entity-functions, org-export-filter-export-snippet-functions, org-export-filter-footnote-reference-functions, org-export-filter-inline-babel-call-functions, org-export-filter-inline-src-block-functions, org-export-filter-latex-fragment-functions, org-export-filter-line-break-functions, org-export-filter-link-functions, org-export-filter-macro-functions, org-export-filter-radio-target-functions, org-export-filter-statistics-cookie-functions, org-export-filter-subscript-functions, org-export-filter-superscript-functions, org-export-filter-target-functions, org-export-filter-time-stamp-functions, org-export-filter-verbatim-functions): Fix docstring. (org-export-filter-bold-functions, org-export-filter-code-functions, org-export-filter-italic-functions, org-export-filter-strike-through-functions, org-export-filter-underline-functions): New variables. (org-export-filter-emphasis-functions): Remove variable. * testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
"Alist of LaTeX expressions to convert text markup.
The key must be a symbol among `bold', `code', `italic',
`strike-through', `underline' and `verbatim'. The value is
a formatting string to wrap fontified text with.
Value can also be set to the following symbols: `verb' and
`protectedtexttt'. For the former, Org will use \"\\verb\" to
create a format string and select a delimiter character that
isn't in the string. For the latter, Org will use \"\\texttt\"
to typeset and try to protect special characters.
If no association can be found for a given markup, text will be
returned as-is."
:group 'org-export-latex
org-element: Define new objects (bold, code, italic, ...) * contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo. (org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through, org-e-ascii-underline): New functions. (org-e-ascii-emphasis): Remove function. * contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable renamed from `org-e-html-emphasis-alist'. Change value type. (org-e-html-bold, org-e-html-italic, org-e-html-strike-through, org-e-html-underline): New functions. (org-e-html-verbatim): Update function. (org-e-html-emphasis): Remove function. * contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist): Variable renamed from `org-e-latex-emphasis-alist'. Change value type. (org-e-latex-center-block): Fix docstring. (org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code, org-e-latex-italic, org-e-latex-strike-through, org-e-latex-underline): New functions. (org-e-latex-verbatim): Update function. (org-e-latex-emphasis): Remove function. * contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code, org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline): New functions. (org-e-odt-verbatim): Update function. (org-e-odt-center-block): Fix docstring. (org-e-odt-emphasis): Remove function. * contrib/lisp/org-element.el (org-element-bold-parser): (org-element-bold-interpreter, org-element-code-parser, org-element-code-interpreter, org-element-italic-parser, org-element-italic-interpreter, org-element-strike-through-parser, org-element-strike-through-interpreter, org-element-underline-parser, org-element-underline-interpreter): New functions. (org-element-emphasis-parser, org-element-emphasis-interpreter): Remove functions. (org-element-verbatim-parser, org-element-verbatim-interpreter, org-element-text-markup-successor): Update function. (org-element-object-successor-alist): Add associations for new object types. (org-element-recursive-objects): Add `bold', `italic', `strike-through' and `underline' as recursive types. (org-element-object-restrictions): Add restrictions for new recursive object types. * contrib/lisp/org-export.el (org-export-filters-alist): Add filters for new object types. (org-export-with-todo-keywords): Add missing keywords. (org-export-filter-center-block-functions, org-export-filter-drawer-functions, org-export-filter-dynamic-block-functions, org-export-filter-headline-functions, org-export-filter-inlinetask-functions, org-export-filter-plain-list-functions, org-export-filter-item-functions, org-export-filter-comment-functions, org-export-filter-comment-block-functions, org-export-filter-example-block-functions, org-export-filter-export-block-functions, org-export-filter-fixed-width-functions, org-export-filter-footnote-definition-functions, org-export-filter-horizontal-rule-functions, org-export-filter-keyword-functions, org-export-filter-latex-environment-functions, org-export-filter-babel-call-functions, org-export-filter-paragraph-functions, org-export-filter-property-drawer-functions, org-export-filter-quote-section-functions, org-export-filter-quote-block-functions, org-export-filter-section-functions, org-export-filter-special-block-functions, org-export-filter-src-block-functions, org-export-filter-table-functions, org-export-filter-table-cell-functions, org-export-filter-table-row-functions, org-export-filter-verse-block-functions, org-export-filter-entity-functions, org-export-filter-export-snippet-functions, org-export-filter-footnote-reference-functions, org-export-filter-inline-babel-call-functions, org-export-filter-inline-src-block-functions, org-export-filter-latex-fragment-functions, org-export-filter-line-break-functions, org-export-filter-link-functions, org-export-filter-macro-functions, org-export-filter-radio-target-functions, org-export-filter-statistics-cookie-functions, org-export-filter-subscript-functions, org-export-filter-superscript-functions, org-export-filter-target-functions, org-export-filter-time-stamp-functions, org-export-filter-verbatim-functions): Fix docstring. (org-export-filter-bold-functions, org-export-filter-code-functions, org-export-filter-italic-functions, org-export-filter-strike-through-functions, org-export-filter-underline-functions): New variables. (org-export-filter-emphasis-functions): Remove variable. * testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
:type 'alist
:options '(bold code italic strike-through underline verbatim))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Drawers
Fix errors reported by cus-test.el * ox.el (org-export-async-init-file): Use :set to set the default value. * ox-texinfo.el (org-texinfo-filename): Fix default value. (org-texinfo-format-headline-function): Use 'ignore as the default value. (org-texinfo-format-drawer-function): Use a function as the default value. Update docstring. (org-texinfo-drawer): Always use `org-texinfo-format-drawer-function' as it is now a function by default. (org-texinfo-headline): Compare `org-texinfo-format-headline-function' against 'ignore. (org-texinfo-inlinetask): Compare `org-texinfo-format-inlinetask-function' against 'ignore. * ox-odt.el (org-odt-format-drawer-function): Use a function as the default value. Update docstring. (org-odt-format-headline-function) (org-odt-format-inlinetask-function): Fix default value. (org-odt-with-latex): Use :set to set the default value. (org-odt-drawer): Always use `org-odt-format-drawer-function' as it is now a function by default. (org-odt-format-headline--wrap): Compare `org-odt-format-headline-function' against 'ignore. * ox-latex.el (org-latex-format-drawer-function): Use a function as the default value. Update docstring. (org-latex-format-inlinetask-function): Fix default value. (org-latex-drawer): Always use `org-latex-format-drawer-function' as it is now a function by default. (org-latex-inlinetask): Compare `org-latex-format-inlinetask-function' against 'ignore. * ox-html.el (org-html-format-drawer-function): Use a function as the default value. Update docstring. (org-html-format-headline-function) (org-html-format-inlinetask-function): Fix default value. (org-html-with-latex): Use :set to set the default value. (org-html--format-toc-headline) (org-html-format-headline--wrap): Compare `org-html-format-headline-function' against 'ignore. (org-html-inlinetask): Compare `org-html-format-inlinetask-function' against 'ignore. * ox-ascii.el (org-ascii-format-drawer-function): Use a function as the default value. Update docstring. (org-ascii-drawer): Always use `org-ascii-format-drawer-function' as it is now a function by default. (org-ascii-format-inlinetask-default): New function. (org-ascii-format-inlinetask-function): Use `org-ascii-format-inlinetask-default' as the default. * org.el (org-mouse-1-follows-link): Use :set to set the default value. Update custom type. (org-log-note-headings): Fix order or list items in the custom type. (orgstruct-heading-prefix-regexp): Use an empty string as the default value. Use 'regexp as the custom type. (orgstruct-make-binding): Tiny docstring enhancement. Assume `orgstruct-heading-prefix-regexp' is a string. * org-agenda.el (org-agenda-search-view-max-outline-level): Set default value to 0. Update docstring. (org-agenda-deadline-leaders): Fix custom type. (org-search-view): Assume `org-agenda-search-view-max-outline-level' is a number. * ob-ruby.el (org-babel-ruby-nil-to): Fix custom type. * ob-python.el (org-babel-python-mode): Use :set to set the default value. (org-babel-python-None-to): Fix custom type. * ob-plantuml.el (org-plantuml-jar-path): Fix default value. (org-babel-execute:plantuml): Assume `org-plantuml-jar-path' is a string. * ob-latex.el (org-babel-latex-htlatex): Fix default value. (org-babel-latex-htlatex-packages): Fix custom type. (org-babel-execute:latex): Assume `org-babel-latex-htlatex' is a string. Thanks to Glenn Morris for reporting this.
2013-11-14 13:05:18 +00:00
(defcustom org-latex-format-drawer-function
(lambda (name contents) contents)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Function called to format a drawer in LaTeX code.
The function must accept two parameters:
NAME the drawer name, like \"LOGBOOK\"
CONTENTS the contents of the drawer.
The function should return the string to be exported.
Fix errors reported by cus-test.el * ox.el (org-export-async-init-file): Use :set to set the default value. * ox-texinfo.el (org-texinfo-filename): Fix default value. (org-texinfo-format-headline-function): Use 'ignore as the default value. (org-texinfo-format-drawer-function): Use a function as the default value. Update docstring. (org-texinfo-drawer): Always use `org-texinfo-format-drawer-function' as it is now a function by default. (org-texinfo-headline): Compare `org-texinfo-format-headline-function' against 'ignore. (org-texinfo-inlinetask): Compare `org-texinfo-format-inlinetask-function' against 'ignore. * ox-odt.el (org-odt-format-drawer-function): Use a function as the default value. Update docstring. (org-odt-format-headline-function) (org-odt-format-inlinetask-function): Fix default value. (org-odt-with-latex): Use :set to set the default value. (org-odt-drawer): Always use `org-odt-format-drawer-function' as it is now a function by default. (org-odt-format-headline--wrap): Compare `org-odt-format-headline-function' against 'ignore. * ox-latex.el (org-latex-format-drawer-function): Use a function as the default value. Update docstring. (org-latex-format-inlinetask-function): Fix default value. (org-latex-drawer): Always use `org-latex-format-drawer-function' as it is now a function by default. (org-latex-inlinetask): Compare `org-latex-format-inlinetask-function' against 'ignore. * ox-html.el (org-html-format-drawer-function): Use a function as the default value. Update docstring. (org-html-format-headline-function) (org-html-format-inlinetask-function): Fix default value. (org-html-with-latex): Use :set to set the default value. (org-html--format-toc-headline) (org-html-format-headline--wrap): Compare `org-html-format-headline-function' against 'ignore. (org-html-inlinetask): Compare `org-html-format-inlinetask-function' against 'ignore. * ox-ascii.el (org-ascii-format-drawer-function): Use a function as the default value. Update docstring. (org-ascii-drawer): Always use `org-ascii-format-drawer-function' as it is now a function by default. (org-ascii-format-inlinetask-default): New function. (org-ascii-format-inlinetask-function): Use `org-ascii-format-inlinetask-default' as the default. * org.el (org-mouse-1-follows-link): Use :set to set the default value. Update custom type. (org-log-note-headings): Fix order or list items in the custom type. (orgstruct-heading-prefix-regexp): Use an empty string as the default value. Use 'regexp as the custom type. (orgstruct-make-binding): Tiny docstring enhancement. Assume `orgstruct-heading-prefix-regexp' is a string. * org-agenda.el (org-agenda-search-view-max-outline-level): Set default value to 0. Update docstring. (org-agenda-deadline-leaders): Fix custom type. (org-search-view): Assume `org-agenda-search-view-max-outline-level' is a number. * ob-ruby.el (org-babel-ruby-nil-to): Fix custom type. * ob-python.el (org-babel-python-mode): Use :set to set the default value. (org-babel-python-None-to): Fix custom type. * ob-plantuml.el (org-plantuml-jar-path): Fix default value. (org-babel-execute:plantuml): Assume `org-plantuml-jar-path' is a string. * ob-latex.el (org-babel-latex-htlatex): Fix default value. (org-babel-latex-htlatex-packages): Fix custom type. (org-babel-execute:latex): Assume `org-babel-latex-htlatex' is a string. Thanks to Glenn Morris for reporting this.
2013-11-14 13:05:18 +00:00
The default function simply returns the value of CONTENTS."
:group 'org-export-latex
Fix errors reported by cus-test.el * ox.el (org-export-async-init-file): Use :set to set the default value. * ox-texinfo.el (org-texinfo-filename): Fix default value. (org-texinfo-format-headline-function): Use 'ignore as the default value. (org-texinfo-format-drawer-function): Use a function as the default value. Update docstring. (org-texinfo-drawer): Always use `org-texinfo-format-drawer-function' as it is now a function by default. (org-texinfo-headline): Compare `org-texinfo-format-headline-function' against 'ignore. (org-texinfo-inlinetask): Compare `org-texinfo-format-inlinetask-function' against 'ignore. * ox-odt.el (org-odt-format-drawer-function): Use a function as the default value. Update docstring. (org-odt-format-headline-function) (org-odt-format-inlinetask-function): Fix default value. (org-odt-with-latex): Use :set to set the default value. (org-odt-drawer): Always use `org-odt-format-drawer-function' as it is now a function by default. (org-odt-format-headline--wrap): Compare `org-odt-format-headline-function' against 'ignore. * ox-latex.el (org-latex-format-drawer-function): Use a function as the default value. Update docstring. (org-latex-format-inlinetask-function): Fix default value. (org-latex-drawer): Always use `org-latex-format-drawer-function' as it is now a function by default. (org-latex-inlinetask): Compare `org-latex-format-inlinetask-function' against 'ignore. * ox-html.el (org-html-format-drawer-function): Use a function as the default value. Update docstring. (org-html-format-headline-function) (org-html-format-inlinetask-function): Fix default value. (org-html-with-latex): Use :set to set the default value. (org-html--format-toc-headline) (org-html-format-headline--wrap): Compare `org-html-format-headline-function' against 'ignore. (org-html-inlinetask): Compare `org-html-format-inlinetask-function' against 'ignore. * ox-ascii.el (org-ascii-format-drawer-function): Use a function as the default value. Update docstring. (org-ascii-drawer): Always use `org-ascii-format-drawer-function' as it is now a function by default. (org-ascii-format-inlinetask-default): New function. (org-ascii-format-inlinetask-function): Use `org-ascii-format-inlinetask-default' as the default. * org.el (org-mouse-1-follows-link): Use :set to set the default value. Update custom type. (org-log-note-headings): Fix order or list items in the custom type. (orgstruct-heading-prefix-regexp): Use an empty string as the default value. Use 'regexp as the custom type. (orgstruct-make-binding): Tiny docstring enhancement. Assume `orgstruct-heading-prefix-regexp' is a string. * org-agenda.el (org-agenda-search-view-max-outline-level): Set default value to 0. Update docstring. (org-agenda-deadline-leaders): Fix custom type. (org-search-view): Assume `org-agenda-search-view-max-outline-level' is a number. * ob-ruby.el (org-babel-ruby-nil-to): Fix custom type. * ob-python.el (org-babel-python-mode): Use :set to set the default value. (org-babel-python-None-to): Fix custom type. * ob-plantuml.el (org-plantuml-jar-path): Fix default value. (org-babel-execute:plantuml): Assume `org-plantuml-jar-path' is a string. * ob-latex.el (org-babel-latex-htlatex): Fix default value. (org-babel-latex-htlatex-packages): Fix custom type. (org-babel-execute:latex): Assume `org-babel-latex-htlatex' is a string. Thanks to Glenn Morris for reporting this.
2013-11-14 13:05:18 +00:00
:version "24.4"
:package-version '(Org . "8.3")
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
:type 'function)
;;;; Inlinetasks
(defcustom org-latex-format-inlinetask-function
'org-latex-format-inlinetask-default-function
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Function called to format an inlinetask in LaTeX code.
The function must accept seven parameters:
TODO the todo keyword (string or nil)
TODO-TYPE the todo type (symbol: `todo', `done', nil)
PRIORITY the inlinetask priority (integer or nil)
NAME the inlinetask name (string)
TAGS the inlinetask tags (list of strings or nil)
CONTENTS the contents of the inlinetask (string or nil)
INFO the export options (plist)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
The function should return the string to be exported."
:group 'org-export-latex
:type 'function
:version "25.1"
:package-version '(Org . "8.3"))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;; Src blocks
(defcustom org-latex-listings nil
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Non-nil means export source code using the listings package.
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
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', for
example using customize, or with something like:
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
\(require 'ox-latex)
\(add-to-list 'org-latex-packages-alist '(\"\" \"listings\"))
\(add-to-list 'org-latex-packages-alist '(\"\" \"color\"))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
Alternatively,
\(setq org-latex-listings 'minted)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
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 example
using customize, or with
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
\(require 'ox-latex)
\(add-to-list 'org-latex-packages-alist '(\"\" \"minted\"))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
In addition, it is necessary to install pygments
\(http://pygments.org), and to configure the variable
`org-latex-pdf-process' so that the -shell-escape option is
passed to pdflatex.
The minted choice has possible repercussions on the preview of
latex fragments (see `org-preview-latex-fragment'). If you run
into previewing problems, please consult
http://orgmode.org/worg/org-tutorials/org-latex-preview.html"
:group 'org-export-latex
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
:type '(choice
2011-12-09 13:38:36 +00:00
(const :tag "Use listings" t)
(const :tag "Use minted" minted)
(const :tag "Export verbatim" nil))
:safe (lambda (s) (memq s '(t nil minted))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(defcustom org-latex-listings-langs
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
'((emacs-lisp "Lisp") (lisp "Lisp") (clojure "Lisp")
(c "C") (cc "C++")
(fortran "fortran")
(perl "Perl") (cperl "Perl") (python "Python") (ruby "Ruby")
(html "HTML") (xml "XML")
(tex "TeX") (latex "[LaTeX]TeX")
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(shell-script "bash")
(gnuplot "Gnuplot")
(ocaml "Caml") (caml "Caml")
(sql "SQL") (sqlite "sql")
(makefile "make"))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Alist mapping languages to their listing language counterpart.
The key is a symbol, the major mode symbol without the \"-mode\".
The value is the string that should be inserted as the language
parameter for the listings package. If the mode name and the
listings name are the same, the language does not need an entry
in this list - but it does not hurt if it is present."
:group 'org-export-latex
:version "24.4"
:package-version '(Org . "8.3")
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
:type '(repeat
2011-12-09 13:38:36 +00:00
(list
(symbol :tag "Major mode ")
(string :tag "Listings language"))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(defcustom org-latex-listings-options nil
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Association list of options for the latex listings package.
These options are supplied as a comma-separated list to the
\\lstset command. Each element of the association list should be
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
a list containing two strings: the name of the option, and the
value. For example,
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
\(setq org-latex-listings-options
'((\"basicstyle\" \"\\\\small\")
\(\"keywordstyle\" \"\\\\color{black}\\\\bfseries\\\\underbar\")))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
will typeset the code in a small size font with underlined, bold
black keywords.
Note that the same options will be applied to blocks of all
languages. If you need block-specific options, you may use the
following syntax:
#+ATTR_LATEX: :options key1=value1,key2=value2
#+BEGIN_SRC <LANG>
...
#+END_SRC"
:group 'org-export-latex
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
:type '(repeat
2011-12-09 13:38:36 +00:00
(list
(string :tag "Listings option name ")
(string :tag "Listings option value"))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(defcustom org-latex-minted-langs
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
'((emacs-lisp "common-lisp")
(cc "c++")
(cperl "perl")
(shell-script "bash")
(caml "ocaml"))
"Alist mapping languages to their minted language counterpart.
The key is a symbol, the major mode symbol without the \"-mode\".
The value is the string that should be inserted as the language
parameter for the minted package. If the mode name and the
listings name are the same, the language does not need an entry
in this list - but it does not hurt if it is present.
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
Note that minted uses all lower case for language identifiers,
and that the full list of language identifiers can be obtained
with:
pygmentize -L lexers"
:group 'org-export-latex
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
:type '(repeat
2011-12-09 13:38:36 +00:00
(list
(symbol :tag "Major mode ")
(string :tag "Minted language"))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(defcustom org-latex-minted-options nil
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Association list of options for the latex minted package.
These options are supplied within square brackets in
\\begin{minted} environments. Each element of the alist should
be a list containing two strings: the name of the option, and the
value. For example,
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
\(setq org-latex-minted-options
'\((\"bgcolor\" \"bg\") \(\"frame\" \"lines\")))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
will result in src blocks being exported with
\\begin{minted}[bgcolor=bg,frame=lines]{<LANG>}
as the start of the minted environment. Note that the same
options will be applied to blocks of all languages. If you need
block-specific options, you may use the following syntax:
#+ATTR_LATEX: :options key1=value1,key2=value2
#+BEGIN_SRC <LANG>
...
#+END_SRC"
:group 'org-export-latex
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
:type '(repeat
2011-12-09 13:38:36 +00:00
(list
(string :tag "Minted option name ")
(string :tag "Minted option value"))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(defvar org-latex-custom-lang-environments nil
"Alist mapping languages to language-specific LaTeX environments.
2012-01-17 19:54:08 +00:00
It is used during export of src blocks by the listings and minted
latex packages. For example,
\(setq org-latex-custom-lang-environments
'\(\(python \"pythoncode\"\)\)\)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
would have the effect that if org encounters begin_src python
during latex export it will output
\\begin{pythoncode}
<src block body>
\\end{pythoncode}")
;;;; Compilation
(defcustom org-latex-pdf-process
'("pdflatex -interaction nonstopmode -output-directory %o %f"
"pdflatex -interaction nonstopmode -output-directory %o %f"
"pdflatex -interaction nonstopmode -output-directory %o %f")
"Commands to process a LaTeX file to a PDF file.
This is a list of strings, each of them will be given to the
shell as a command. %f in the command will be replaced by the
full file name, %b by the file base name (i.e. without directory
and extension parts) and %o by the base directory of the file.
The reason why this is a list is that it usually takes several
runs of `pdflatex', maybe mixed with a call to `bibtex'. Org
does not have a clever mechanism to detect which of these
commands have to be run to get to a stable result, and it also
does not do any error checking.
By default, Org uses 3 runs of `pdflatex' to do the processing.
If you have texi2dvi on your system and if that does not cause
the infamous egrep/locale bug:
http://lists.gnu.org/archive/html/bug-texinfo/2010-03/msg00031.html
then `texi2dvi' is the superior choice as it automates the LaTeX
build process by calling the \"correct\" combinations of
auxiliary programs. Org does offer `texi2dvi' as one of the
customize options. Alternatively, `rubber' and `latexmk' also
provide similar functionality. The latter supports `biber' out
of the box.
Alternatively, this may be a Lisp function that does the
processing, so you could use this to apply the machinery of
AUCTeX or the Emacs LaTeX mode. This function should accept the
file name as its single argument."
:group 'org-export-pdf
:type '(choice
(repeat :tag "Shell command sequence"
(string :tag "Shell command"))
(const :tag "2 runs of pdflatex"
("pdflatex -interaction nonstopmode -output-directory %o %f"
"pdflatex -interaction nonstopmode -output-directory %o %f"))
(const :tag "3 runs of pdflatex"
("pdflatex -interaction nonstopmode -output-directory %o %f"
"pdflatex -interaction nonstopmode -output-directory %o %f"
"pdflatex -interaction nonstopmode -output-directory %o %f"))
(const :tag "pdflatex,bibtex,pdflatex,pdflatex"
("pdflatex -interaction nonstopmode -output-directory %o %f"
"bibtex %b"
"pdflatex -interaction nonstopmode -output-directory %o %f"
"pdflatex -interaction nonstopmode -output-directory %o %f"))
(const :tag "2 runs of xelatex"
("xelatex -interaction nonstopmode -output-directory %o %f"
"xelatex -interaction nonstopmode -output-directory %o %f"))
(const :tag "3 runs of xelatex"
("xelatex -interaction nonstopmode -output-directory %o %f"
"xelatex -interaction nonstopmode -output-directory %o %f"
"xelatex -interaction nonstopmode -output-directory %o %f"))
(const :tag "xelatex,bibtex,xelatex,xelatex"
("xelatex -interaction nonstopmode -output-directory %o %f"
"bibtex %b"
"xelatex -interaction nonstopmode -output-directory %o %f"
"xelatex -interaction nonstopmode -output-directory %o %f"))
(const :tag "texi2dvi"
("texi2dvi -p -b -V %f"))
(const :tag "rubber"
("rubber -d --into %o %f"))
(const :tag "latexmk"
("latexmk -g -pdf %f"))
(function)))
(defcustom org-latex-logfiles-extensions
'("aux" "bcf" "blg" "fdb_latexmk" "fls" "figlist" "idx" "log" "nav" "out"
"ptc" "run.xml" "snm" "toc" "vrb" "xdv")
"The list of file extensions to consider as LaTeX logfiles.
The logfiles will be removed if `org-latex-remove-logfiles' is
non-nil."
:group 'org-export-latex
:version "25.1"
:package-version '(Org . "8.3")
:type '(repeat (string :tag "Extension")))
(defcustom org-latex-remove-logfiles t
"Non-nil means remove the logfiles produced by PDF production.
By default, logfiles are files with these extensions: .aux, .idx,
.log, .out, .toc, .nav, .snm and .vrb. To define the set of
logfiles to remove, set `org-latex-logfiles-extensions'."
:group 'org-export-latex
:type 'boolean)
(defcustom org-latex-known-warnings
'(("Reference.*?undefined" . "[undefined reference]")
("Runaway argument" . "[runaway argument]")
("Underfull \\hbox" . "[underfull hbox]")
("Overfull \\hbox" . "[overfull hbox]")
("Citation.*?undefined" . "[undefined citation]")
("Undefined control sequence" . "[undefined control sequence]"))
"Alist of regular expressions and associated messages for the user.
The regular expressions are used to find possible warnings in the
log of a latex-run. These warnings will be reported after
calling `org-latex-compile'."
:group 'org-export-latex
:version "25.1"
:package-version '(Org . "8.3")
:type '(repeat
(cons
(string :tag "Regexp")
(string :tag "Message"))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;; Internal Functions
(defun org-latex--caption-above-p (element info)
"Non nil when caption is expected to be located above ELEMENT.
INFO is a plist holding contextual information."
(let ((above (plist-get info :latex-caption-above)))
(if (symbolp above) above
(let ((type (org-element-type element)))
(memq (if (eq type 'link) 'image type) above)))))
(defun org-latex--caption/label-string (element info)
"Return caption and label LaTeX string for ELEMENT.
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
INFO is a plist holding contextual information. If there's no
caption nor label, return the empty string.
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
For non-floats, see `org-latex--wrap-label'."
(let* ((label (org-element-property :name element))
(label-str (if (not (org-string-nw-p label)) ""
(format "\\label{%s}"
(org-export-solidify-link-text label))))
(main (org-export-get-caption element))
(short (org-export-get-caption element t))
(caption-from-attr-latex (org-export-read-attribute :attr_latex element :caption)))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(cond
((org-string-nw-p caption-from-attr-latex)
(concat caption-from-attr-latex "\n"))
((and (not main) (equal label-str "")) "")
((not main) (concat label-str "\n"))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;; Option caption format with short name.
(short (format "\\caption[%s]{%s%s}\n"
(org-export-data short info)
label-str
(org-export-data main info)))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;; Standard caption format.
(t (format "\\caption{%s%s}\n" label-str (org-export-data main info))))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(defun org-latex-guess-inputenc (header)
"Set the coding system in inputenc to what the buffer is.
HEADER is the LaTeX header string. This function only applies
when specified inputenc option is \"AUTO\".
Return the new header, as a string."
(let* ((cs (or (ignore-errors
(latexenc-coding-system-to-inputenc
(or org-export-coding-system buffer-file-coding-system)))
"utf8")))
(if (not cs) header
;; First translate if that is requested.
(setq cs (or (cdr (assoc cs org-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-guess-babel-language (header info)
"Set Babel's language according to LANGUAGE keyword.
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
HEADER is the LaTeX header string. INFO is the plist used as
a communication channel.
Insertion of guessed language only happens when Babel package has
explicitly been loaded. Then it is added to the rest of
package's options.
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
The argument to Babel may be \"AUTO\" which is then replaced with
the language of the document or `org-export-default-language'
unless language in question is already loaded.
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
Return the new header."
(let ((language-code (plist-get info :language)))
;; If no language is set or Babel package is not loaded, return
;; HEADER as-is.
(if (or (not (stringp language-code))
(not (string-match "\\\\usepackage\\[\\(.*\\)\\]{babel}" header)))
header
(let ((options (save-match-data
(org-split-string (match-string 1 header) ",[ \t]*")))
(language (cdr (assoc language-code
org-latex-babel-language-alist))))
;; If LANGUAGE is already loaded, return header without AUTO.
;; Otherwise, replace AUTO with language or append language if
;; AUTO is not present.
(replace-match
(mapconcat (lambda (option) (if (equal "AUTO" option) language option))
(cond ((member language options) (delete "AUTO" options))
((member "AUTO" options) options)
(t (append options (list language))))
", ")
t nil header 1)))))
(defun org-latex--find-verb-separator (s)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Return a character not used in string S.
This is used to choose a separator for constructs like \\verb."
(let ((ll "~,./?;':\"|!@#%^&-_=+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ<>()[]{}"))
(loop for c across ll
2011-12-09 13:38:36 +00:00
when (not (string-match (regexp-quote (char-to-string c)) s))
return (char-to-string c))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(defun org-latex--make-option-string (options)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"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
nil."
(mapconcat (lambda (pair)
2011-12-09 13:38:36 +00:00
(concat (first pair)
(when (> (length (second pair)) 0)
(concat "=" (second pair)))))
options
","))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(defun org-latex--wrap-label (element output)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Wrap label associated to ELEMENT around OUTPUT, if appropriate.
This function shouldn't be used for floats. See
`org-latex--caption/label-string'."
(let ((label (org-element-property :name element)))
(if (not (and (org-string-nw-p output) (org-string-nw-p label))) output
(concat (format "\\phantomsection\n\\label{%s}\n"
(org-export-solidify-link-text label))
output))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(defun org-latex--text-markup (text markup info)
"Format TEXT depending on MARKUP text markup.
INFO is a plist used as a communication channel. See
`org-latex-text-markup-alist' for details."
(let ((fmt (cdr (assq markup (plist-get info :latex-text-markup-alist)))))
org-element: Define new objects (bold, code, italic, ...) * contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo. (org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through, org-e-ascii-underline): New functions. (org-e-ascii-emphasis): Remove function. * contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable renamed from `org-e-html-emphasis-alist'. Change value type. (org-e-html-bold, org-e-html-italic, org-e-html-strike-through, org-e-html-underline): New functions. (org-e-html-verbatim): Update function. (org-e-html-emphasis): Remove function. * contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist): Variable renamed from `org-e-latex-emphasis-alist'. Change value type. (org-e-latex-center-block): Fix docstring. (org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code, org-e-latex-italic, org-e-latex-strike-through, org-e-latex-underline): New functions. (org-e-latex-verbatim): Update function. (org-e-latex-emphasis): Remove function. * contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code, org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline): New functions. (org-e-odt-verbatim): Update function. (org-e-odt-center-block): Fix docstring. (org-e-odt-emphasis): Remove function. * contrib/lisp/org-element.el (org-element-bold-parser): (org-element-bold-interpreter, org-element-code-parser, org-element-code-interpreter, org-element-italic-parser, org-element-italic-interpreter, org-element-strike-through-parser, org-element-strike-through-interpreter, org-element-underline-parser, org-element-underline-interpreter): New functions. (org-element-emphasis-parser, org-element-emphasis-interpreter): Remove functions. (org-element-verbatim-parser, org-element-verbatim-interpreter, org-element-text-markup-successor): Update function. (org-element-object-successor-alist): Add associations for new object types. (org-element-recursive-objects): Add `bold', `italic', `strike-through' and `underline' as recursive types. (org-element-object-restrictions): Add restrictions for new recursive object types. * contrib/lisp/org-export.el (org-export-filters-alist): Add filters for new object types. (org-export-with-todo-keywords): Add missing keywords. (org-export-filter-center-block-functions, org-export-filter-drawer-functions, org-export-filter-dynamic-block-functions, org-export-filter-headline-functions, org-export-filter-inlinetask-functions, org-export-filter-plain-list-functions, org-export-filter-item-functions, org-export-filter-comment-functions, org-export-filter-comment-block-functions, org-export-filter-example-block-functions, org-export-filter-export-block-functions, org-export-filter-fixed-width-functions, org-export-filter-footnote-definition-functions, org-export-filter-horizontal-rule-functions, org-export-filter-keyword-functions, org-export-filter-latex-environment-functions, org-export-filter-babel-call-functions, org-export-filter-paragraph-functions, org-export-filter-property-drawer-functions, org-export-filter-quote-section-functions, org-export-filter-quote-block-functions, org-export-filter-section-functions, org-export-filter-special-block-functions, org-export-filter-src-block-functions, org-export-filter-table-functions, org-export-filter-table-cell-functions, org-export-filter-table-row-functions, org-export-filter-verse-block-functions, org-export-filter-entity-functions, org-export-filter-export-snippet-functions, org-export-filter-footnote-reference-functions, org-export-filter-inline-babel-call-functions, org-export-filter-inline-src-block-functions, org-export-filter-latex-fragment-functions, org-export-filter-line-break-functions, org-export-filter-link-functions, org-export-filter-macro-functions, org-export-filter-radio-target-functions, org-export-filter-statistics-cookie-functions, org-export-filter-subscript-functions, org-export-filter-superscript-functions, org-export-filter-target-functions, org-export-filter-time-stamp-functions, org-export-filter-verbatim-functions): Fix docstring. (org-export-filter-bold-functions, org-export-filter-code-functions, org-export-filter-italic-functions, org-export-filter-strike-through-functions, org-export-filter-underline-functions): New variables. (org-export-filter-emphasis-functions): Remove variable. * testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
(cond
;; No format string: Return raw text.
((not fmt) text)
;; Handle the `verb' special case: Find an appropriate separator
org-element: Define new objects (bold, code, italic, ...) * contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo. (org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through, org-e-ascii-underline): New functions. (org-e-ascii-emphasis): Remove function. * contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable renamed from `org-e-html-emphasis-alist'. Change value type. (org-e-html-bold, org-e-html-italic, org-e-html-strike-through, org-e-html-underline): New functions. (org-e-html-verbatim): Update function. (org-e-html-emphasis): Remove function. * contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist): Variable renamed from `org-e-latex-emphasis-alist'. Change value type. (org-e-latex-center-block): Fix docstring. (org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code, org-e-latex-italic, org-e-latex-strike-through, org-e-latex-underline): New functions. (org-e-latex-verbatim): Update function. (org-e-latex-emphasis): Remove function. * contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code, org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline): New functions. (org-e-odt-verbatim): Update function. (org-e-odt-center-block): Fix docstring. (org-e-odt-emphasis): Remove function. * contrib/lisp/org-element.el (org-element-bold-parser): (org-element-bold-interpreter, org-element-code-parser, org-element-code-interpreter, org-element-italic-parser, org-element-italic-interpreter, org-element-strike-through-parser, org-element-strike-through-interpreter, org-element-underline-parser, org-element-underline-interpreter): New functions. (org-element-emphasis-parser, org-element-emphasis-interpreter): Remove functions. (org-element-verbatim-parser, org-element-verbatim-interpreter, org-element-text-markup-successor): Update function. (org-element-object-successor-alist): Add associations for new object types. (org-element-recursive-objects): Add `bold', `italic', `strike-through' and `underline' as recursive types. (org-element-object-restrictions): Add restrictions for new recursive object types. * contrib/lisp/org-export.el (org-export-filters-alist): Add filters for new object types. (org-export-with-todo-keywords): Add missing keywords. (org-export-filter-center-block-functions, org-export-filter-drawer-functions, org-export-filter-dynamic-block-functions, org-export-filter-headline-functions, org-export-filter-inlinetask-functions, org-export-filter-plain-list-functions, org-export-filter-item-functions, org-export-filter-comment-functions, org-export-filter-comment-block-functions, org-export-filter-example-block-functions, org-export-filter-export-block-functions, org-export-filter-fixed-width-functions, org-export-filter-footnote-definition-functions, org-export-filter-horizontal-rule-functions, org-export-filter-keyword-functions, org-export-filter-latex-environment-functions, org-export-filter-babel-call-functions, org-export-filter-paragraph-functions, org-export-filter-property-drawer-functions, org-export-filter-quote-section-functions, org-export-filter-quote-block-functions, org-export-filter-section-functions, org-export-filter-special-block-functions, org-export-filter-src-block-functions, org-export-filter-table-functions, org-export-filter-table-cell-functions, org-export-filter-table-row-functions, org-export-filter-verse-block-functions, org-export-filter-entity-functions, org-export-filter-export-snippet-functions, org-export-filter-footnote-reference-functions, org-export-filter-inline-babel-call-functions, org-export-filter-inline-src-block-functions, org-export-filter-latex-fragment-functions, org-export-filter-line-break-functions, org-export-filter-link-functions, org-export-filter-macro-functions, org-export-filter-radio-target-functions, org-export-filter-statistics-cookie-functions, org-export-filter-subscript-functions, org-export-filter-superscript-functions, org-export-filter-target-functions, org-export-filter-time-stamp-functions, org-export-filter-verbatim-functions): Fix docstring. (org-export-filter-bold-functions, org-export-filter-code-functions, org-export-filter-italic-functions, org-export-filter-strike-through-functions, org-export-filter-underline-functions): New variables. (org-export-filter-emphasis-functions): Remove variable. * testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
;; and use "\\verb" command.
((eq 'verb fmt)
(let ((separator (org-latex--find-verb-separator text)))
(concat "\\verb" separator
(replace-regexp-in-string "\n" " " text)
separator)))
org-element: Define new objects (bold, code, italic, ...) * contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo. (org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through, org-e-ascii-underline): New functions. (org-e-ascii-emphasis): Remove function. * contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable renamed from `org-e-html-emphasis-alist'. Change value type. (org-e-html-bold, org-e-html-italic, org-e-html-strike-through, org-e-html-underline): New functions. (org-e-html-verbatim): Update function. (org-e-html-emphasis): Remove function. * contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist): Variable renamed from `org-e-latex-emphasis-alist'. Change value type. (org-e-latex-center-block): Fix docstring. (org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code, org-e-latex-italic, org-e-latex-strike-through, org-e-latex-underline): New functions. (org-e-latex-verbatim): Update function. (org-e-latex-emphasis): Remove function. * contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code, org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline): New functions. (org-e-odt-verbatim): Update function. (org-e-odt-center-block): Fix docstring. (org-e-odt-emphasis): Remove function. * contrib/lisp/org-element.el (org-element-bold-parser): (org-element-bold-interpreter, org-element-code-parser, org-element-code-interpreter, org-element-italic-parser, org-element-italic-interpreter, org-element-strike-through-parser, org-element-strike-through-interpreter, org-element-underline-parser, org-element-underline-interpreter): New functions. (org-element-emphasis-parser, org-element-emphasis-interpreter): Remove functions. (org-element-verbatim-parser, org-element-verbatim-interpreter, org-element-text-markup-successor): Update function. (org-element-object-successor-alist): Add associations for new object types. (org-element-recursive-objects): Add `bold', `italic', `strike-through' and `underline' as recursive types. (org-element-object-restrictions): Add restrictions for new recursive object types. * contrib/lisp/org-export.el (org-export-filters-alist): Add filters for new object types. (org-export-with-todo-keywords): Add missing keywords. (org-export-filter-center-block-functions, org-export-filter-drawer-functions, org-export-filter-dynamic-block-functions, org-export-filter-headline-functions, org-export-filter-inlinetask-functions, org-export-filter-plain-list-functions, org-export-filter-item-functions, org-export-filter-comment-functions, org-export-filter-comment-block-functions, org-export-filter-example-block-functions, org-export-filter-export-block-functions, org-export-filter-fixed-width-functions, org-export-filter-footnote-definition-functions, org-export-filter-horizontal-rule-functions, org-export-filter-keyword-functions, org-export-filter-latex-environment-functions, org-export-filter-babel-call-functions, org-export-filter-paragraph-functions, org-export-filter-property-drawer-functions, org-export-filter-quote-section-functions, org-export-filter-quote-block-functions, org-export-filter-section-functions, org-export-filter-special-block-functions, org-export-filter-src-block-functions, org-export-filter-table-functions, org-export-filter-table-cell-functions, org-export-filter-table-row-functions, org-export-filter-verse-block-functions, org-export-filter-entity-functions, org-export-filter-export-snippet-functions, org-export-filter-footnote-reference-functions, org-export-filter-inline-babel-call-functions, org-export-filter-inline-src-block-functions, org-export-filter-latex-fragment-functions, org-export-filter-line-break-functions, org-export-filter-link-functions, org-export-filter-macro-functions, org-export-filter-radio-target-functions, org-export-filter-statistics-cookie-functions, org-export-filter-subscript-functions, org-export-filter-superscript-functions, org-export-filter-target-functions, org-export-filter-time-stamp-functions, org-export-filter-verbatim-functions): Fix docstring. (org-export-filter-bold-functions, org-export-filter-code-functions, org-export-filter-italic-functions, org-export-filter-strike-through-functions, org-export-filter-underline-functions): New variables. (org-export-filter-emphasis-functions): Remove variable. * testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
;; Handle the `protectedtexttt' special case: Protect some
;; special chars and use "\texttt{%s}" format string.
((eq 'protectedtexttt fmt)
(let ((start 0)
(trans '(("\\" . "\\textbackslash{}")
("~" . "\\textasciitilde{}")
("^" . "\\textasciicircum{}")))
(rtn "")
char)
(while (string-match "[\\{}$%&_#~^]" text)
(setq char (match-string 0 text))
(if (> (match-beginning 0) 0)
(setq rtn (concat rtn (substring text 0 (match-beginning 0)))))
org-element: Define new objects (bold, code, italic, ...) * contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo. (org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through, org-e-ascii-underline): New functions. (org-e-ascii-emphasis): Remove function. * contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable renamed from `org-e-html-emphasis-alist'. Change value type. (org-e-html-bold, org-e-html-italic, org-e-html-strike-through, org-e-html-underline): New functions. (org-e-html-verbatim): Update function. (org-e-html-emphasis): Remove function. * contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist): Variable renamed from `org-e-latex-emphasis-alist'. Change value type. (org-e-latex-center-block): Fix docstring. (org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code, org-e-latex-italic, org-e-latex-strike-through, org-e-latex-underline): New functions. (org-e-latex-verbatim): Update function. (org-e-latex-emphasis): Remove function. * contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code, org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline): New functions. (org-e-odt-verbatim): Update function. (org-e-odt-center-block): Fix docstring. (org-e-odt-emphasis): Remove function. * contrib/lisp/org-element.el (org-element-bold-parser): (org-element-bold-interpreter, org-element-code-parser, org-element-code-interpreter, org-element-italic-parser, org-element-italic-interpreter, org-element-strike-through-parser, org-element-strike-through-interpreter, org-element-underline-parser, org-element-underline-interpreter): New functions. (org-element-emphasis-parser, org-element-emphasis-interpreter): Remove functions. (org-element-verbatim-parser, org-element-verbatim-interpreter, org-element-text-markup-successor): Update function. (org-element-object-successor-alist): Add associations for new object types. (org-element-recursive-objects): Add `bold', `italic', `strike-through' and `underline' as recursive types. (org-element-object-restrictions): Add restrictions for new recursive object types. * contrib/lisp/org-export.el (org-export-filters-alist): Add filters for new object types. (org-export-with-todo-keywords): Add missing keywords. (org-export-filter-center-block-functions, org-export-filter-drawer-functions, org-export-filter-dynamic-block-functions, org-export-filter-headline-functions, org-export-filter-inlinetask-functions, org-export-filter-plain-list-functions, org-export-filter-item-functions, org-export-filter-comment-functions, org-export-filter-comment-block-functions, org-export-filter-example-block-functions, org-export-filter-export-block-functions, org-export-filter-fixed-width-functions, org-export-filter-footnote-definition-functions, org-export-filter-horizontal-rule-functions, org-export-filter-keyword-functions, org-export-filter-latex-environment-functions, org-export-filter-babel-call-functions, org-export-filter-paragraph-functions, org-export-filter-property-drawer-functions, org-export-filter-quote-section-functions, org-export-filter-quote-block-functions, org-export-filter-section-functions, org-export-filter-special-block-functions, org-export-filter-src-block-functions, org-export-filter-table-functions, org-export-filter-table-cell-functions, org-export-filter-table-row-functions, org-export-filter-verse-block-functions, org-export-filter-entity-functions, org-export-filter-export-snippet-functions, org-export-filter-footnote-reference-functions, org-export-filter-inline-babel-call-functions, org-export-filter-inline-src-block-functions, org-export-filter-latex-fragment-functions, org-export-filter-line-break-functions, org-export-filter-link-functions, org-export-filter-macro-functions, org-export-filter-radio-target-functions, org-export-filter-statistics-cookie-functions, org-export-filter-subscript-functions, org-export-filter-superscript-functions, org-export-filter-target-functions, org-export-filter-time-stamp-functions, org-export-filter-verbatim-functions): Fix docstring. (org-export-filter-bold-functions, org-export-filter-code-functions, org-export-filter-italic-functions, org-export-filter-strike-through-functions, org-export-filter-underline-functions): New variables. (org-export-filter-emphasis-functions): Remove variable. * testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
(setq text (substring text (1+ (match-beginning 0))))
(setq char (or (cdr (assoc char trans)) (concat "\\" char))
rtn (concat rtn char)))
(setq text (concat rtn text)
fmt "\\texttt{%s}")
(while (string-match "--" text)
(setq text (replace-match "-{}-" t t text)))
(format fmt text)))
;; Else use format string.
(t (format fmt text)))))
(defun org-latex--delayed-footnotes-definitions (element info)
"Return footnotes definitions in ELEMENT as a string.
INFO is a plist used as a communication channel.
Footnotes definitions are returned within \"\\footnotetxt{}\"
commands.
This function is used within constructs that don't support
\"\\footnote{}\" command (i.e. an item's tag). In that case,
\"\\footnotemark\" is used within the construct and the function
just outside of it."
(mapconcat
(lambda (ref)
(format
"\\footnotetext[%s]{%s}"
(org-export-get-footnote-number ref info)
(org-trim
(org-export-data
(org-export-get-footnote-definition ref info) info))))
;; Find every footnote reference in ELEMENT.
(let* (all-refs
search-refs ; For byte-compiler.
(search-refs
(function
(lambda (data)
;; Return a list of all footnote references never seen
;; before in DATA.
(org-element-map data 'footnote-reference
(lambda (ref)
(when (org-export-footnote-first-reference-p ref info)
(push ref all-refs)
(when (eq (org-element-property :type ref) 'standard)
(funcall search-refs
(org-export-get-footnote-definition ref info)))))
info)
(reverse all-refs)))))
(funcall search-refs element))
""))
(defun org-latex--translate (s info)
"Translate string S according to specified language.
INFO is a plist used as a communication channel."
(org-export-translate s :latex info))
(defun org-latex--format-spec (info)
"Create a format-spec for document meta-data.
INFO is a plist used as a communication channel."
(let ((language (let ((lang (plist-get info :language)))
(or (cdr (assoc lang org-latex-babel-language-alist))
lang))))
`((?a . ,(org-export-data (plist-get info :author) info))
(?t . ,(org-export-data (plist-get info :title) info))
(?k . ,(org-export-data (org-latex--wrap-latex-math-block
(plist-get info :keywords) info)
info))
(?d . ,(org-export-data (org-latex--wrap-latex-math-block
(plist-get info :description) info)
info))
(?c . ,(plist-get info :creator))
(?l . ,language)
(?L . ,(capitalize language))
(?D . ,(org-export-get-date info)))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;; Template
(defun org-latex-template (contents info)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Return complete document string after LaTeX conversion.
CONTENTS is the transcoded contents string. INFO is a plist
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
holding export options."
(let ((title (org-export-data (plist-get info :title) info))
(spec (org-latex--format-spec info)))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(concat
;; Time-stamp.
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(and (plist-get info :time-stamp-file)
2011-12-09 13:38:36 +00:00
(format-time-string "%% Created %Y-%m-%d %a %H:%M\n"))
;; Document class and packages.
(let* ((class (plist-get info :latex-class))
(class-options (plist-get info :latex-class-options))
(header (nth 1 (assoc class (plist-get info :latex-classes))))
(document-class-string
(and (stringp header)
(if (not class-options) header
(replace-regexp-in-string
"^[ \t]*\\\\documentclass\\(\\(\\[[^]]*\\]\\)?\\)"
class-options header t nil 1)))))
(if (not document-class-string)
(user-error "Unknown LaTeX class `%s'" class)
(org-latex-guess-babel-language
(org-latex-guess-inputenc
(org-element-normalize-string
(org-splice-latex-header
document-class-string
org-latex-default-packages-alist
org-latex-packages-alist nil
(concat (org-element-normalize-string
(plist-get info :latex-header))
(plist-get info :latex-header-extra)))))
info)))
;; Possibly limit depth for headline numbering.
(let ((sec-num (plist-get info :section-numbers)))
(when (integerp sec-num)
(format "\\setcounter{secnumdepth}{%d}\n" sec-num)))
;; Author.
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(let ((author (and (plist-get info :with-author)
2011-12-09 13:38:36 +00:00
(let ((auth (plist-get info :author)))
org-export: Secondary strings are transcoded with `org-export-data' * contrib/lisp/org-export.el (org-export-transcoder): New function. (org-export-data): Also export secondary strings. Refactored. (org-export-secondary-string): Remove function. (org-export-expand): Fix code indentation. (org-export-expand-macro): Use `org-export-data' instead of `org-export-secondary-string'. * contrib/lisp/org-e-ascii.el (org-e-ascii--build-title, org-e-ascii--build-caption, org-e-ascii--list-listings, org-e-ascii--list-tables, org-e-ascii--describe-links, org-e-ascii-template--document-title, org-e-ascii-inlinetask, org-e-ascii-item, org-e-ascii-link, org-e-ascii-quote-section, org-e-ascii--table-cell-width): Use `org-export-data' instead of `org-export-secondary-string'. * contrib/lisp/org-e-html.el (org-e-html-footnote-section, org-e-html--caption/label-string, org-e-html-meta-info, org-e-html-preamble, org-e-html-template, org-e-html-format-headline--wrap, org-e-html-headline, org-e-html-item, org-e-html-link): Use `org-export-data' instead of `org-export-secondary-string'. * contrib/lisp/org-e-latex.el (org-e-latex--caption/label-string, org-e-latex-template, org-e-latex-footnote-reference, org-e-latex-headline, org-e-latex-inlinetask, org-e-latex-item, org-e-latex-link, org-e-latex-src-block): Use `org-export-data' instead of `org-export-secondary-string'. * contrib/lisp/org-e-odt.el (org-e-odt-format-preamble, org-e-odt-format-label, org-e-odt-update-meta-file, org-e-odt--caption/label-string, org-e-odt-footnote-def, org-e-odt-format-headline--wrap, org-e-odt-headline, org-e-odt-item, org-e-odt-latex-environment, org-e-odt-link, org-e-odt-src-block): Use `org-export-data' instead of `org-export-secondary-string'.
2012-04-30 00:04:03 +00:00
(and auth (org-export-data auth info)))))
2011-12-09 13:38:36 +00:00
(email (and (plist-get info :with-email)
org-export: Secondary strings are transcoded with `org-export-data' * contrib/lisp/org-export.el (org-export-transcoder): New function. (org-export-data): Also export secondary strings. Refactored. (org-export-secondary-string): Remove function. (org-export-expand): Fix code indentation. (org-export-expand-macro): Use `org-export-data' instead of `org-export-secondary-string'. * contrib/lisp/org-e-ascii.el (org-e-ascii--build-title, org-e-ascii--build-caption, org-e-ascii--list-listings, org-e-ascii--list-tables, org-e-ascii--describe-links, org-e-ascii-template--document-title, org-e-ascii-inlinetask, org-e-ascii-item, org-e-ascii-link, org-e-ascii-quote-section, org-e-ascii--table-cell-width): Use `org-export-data' instead of `org-export-secondary-string'. * contrib/lisp/org-e-html.el (org-e-html-footnote-section, org-e-html--caption/label-string, org-e-html-meta-info, org-e-html-preamble, org-e-html-template, org-e-html-format-headline--wrap, org-e-html-headline, org-e-html-item, org-e-html-link): Use `org-export-data' instead of `org-export-secondary-string'. * contrib/lisp/org-e-latex.el (org-e-latex--caption/label-string, org-e-latex-template, org-e-latex-footnote-reference, org-e-latex-headline, org-e-latex-inlinetask, org-e-latex-item, org-e-latex-link, org-e-latex-src-block): Use `org-export-data' instead of `org-export-secondary-string'. * contrib/lisp/org-e-odt.el (org-e-odt-format-preamble, org-e-odt-format-label, org-e-odt-update-meta-file, org-e-odt--caption/label-string, org-e-odt-footnote-def, org-e-odt-format-headline--wrap, org-e-odt-headline, org-e-odt-item, org-e-odt-latex-environment, org-e-odt-link, org-e-odt-src-block): Use `org-export-data' instead of `org-export-secondary-string'.
2012-04-30 00:04:03 +00:00
(org-export-data (plist-get info :email) info))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(cond ((and author email (not (string= "" email)))
2011-12-09 13:38:36 +00:00
(format "\\author{%s\\thanks{%s}}\n" author email))
((or author email) (format "\\author{%s}\n" (or author email)))))
;; Date.
(let ((date (and (plist-get info :with-date) (org-export-get-date info))))
(format "\\date{%s}\n" (org-export-data date info)))
;; Title and subtitle.
(let* ((subtitle (plist-get info :subtitle))
(formatted-subtitle
(when subtitle
(format (plist-get info :latex-subtitle-format)
(org-export-data subtitle info))))
(separate (plist-get info :latex-subtitle-separate)))
(concat
(format "\\title{%s%s}\n" title
(if separate "" formatted-subtitle))
(when (and separate subtitle)
(concat formatted-subtitle "\n"))))
;; Hyperref options.
(let ((template (plist-get info :latex-hyperref-template)))
(and (stringp template)
(format-spec template spec)))
;; Document start.
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"\\begin{document}\n\n"
;; Title command.
(let* ((title-command (plist-get info :latex-title-command))
(command (and (stringp title-command)
(format-spec title-command spec))))
(org-element-normalize-string
(cond ((not (plist-get info :with-title)) nil)
((string= "" title) nil)
((not (stringp command)) nil)
((string-match "\\(?:[^%]\\|^\\)%s" command)
(format command title))
(t command))))
;; Table of contents.
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(let ((depth (plist-get info :with-toc)))
(when depth
2011-12-09 13:38:36 +00:00
(concat (when (wholenump depth)
(format "\\setcounter{tocdepth}{%d}\n" depth))
(plist-get info :latex-toc-command))))
;; Document's body.
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
contents
;; Creator.
(and (plist-get info :with-creator)
(concat (plist-get info :creator) "\n"))
;; Document end.
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"\\end{document}")))
;;; Transcode Functions
org-element: Define new objects (bold, code, italic, ...) * contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo. (org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through, org-e-ascii-underline): New functions. (org-e-ascii-emphasis): Remove function. * contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable renamed from `org-e-html-emphasis-alist'. Change value type. (org-e-html-bold, org-e-html-italic, org-e-html-strike-through, org-e-html-underline): New functions. (org-e-html-verbatim): Update function. (org-e-html-emphasis): Remove function. * contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist): Variable renamed from `org-e-latex-emphasis-alist'. Change value type. (org-e-latex-center-block): Fix docstring. (org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code, org-e-latex-italic, org-e-latex-strike-through, org-e-latex-underline): New functions. (org-e-latex-verbatim): Update function. (org-e-latex-emphasis): Remove function. * contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code, org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline): New functions. (org-e-odt-verbatim): Update function. (org-e-odt-center-block): Fix docstring. (org-e-odt-emphasis): Remove function. * contrib/lisp/org-element.el (org-element-bold-parser): (org-element-bold-interpreter, org-element-code-parser, org-element-code-interpreter, org-element-italic-parser, org-element-italic-interpreter, org-element-strike-through-parser, org-element-strike-through-interpreter, org-element-underline-parser, org-element-underline-interpreter): New functions. (org-element-emphasis-parser, org-element-emphasis-interpreter): Remove functions. (org-element-verbatim-parser, org-element-verbatim-interpreter, org-element-text-markup-successor): Update function. (org-element-object-successor-alist): Add associations for new object types. (org-element-recursive-objects): Add `bold', `italic', `strike-through' and `underline' as recursive types. (org-element-object-restrictions): Add restrictions for new recursive object types. * contrib/lisp/org-export.el (org-export-filters-alist): Add filters for new object types. (org-export-with-todo-keywords): Add missing keywords. (org-export-filter-center-block-functions, org-export-filter-drawer-functions, org-export-filter-dynamic-block-functions, org-export-filter-headline-functions, org-export-filter-inlinetask-functions, org-export-filter-plain-list-functions, org-export-filter-item-functions, org-export-filter-comment-functions, org-export-filter-comment-block-functions, org-export-filter-example-block-functions, org-export-filter-export-block-functions, org-export-filter-fixed-width-functions, org-export-filter-footnote-definition-functions, org-export-filter-horizontal-rule-functions, org-export-filter-keyword-functions, org-export-filter-latex-environment-functions, org-export-filter-babel-call-functions, org-export-filter-paragraph-functions, org-export-filter-property-drawer-functions, org-export-filter-quote-section-functions, org-export-filter-quote-block-functions, org-export-filter-section-functions, org-export-filter-special-block-functions, org-export-filter-src-block-functions, org-export-filter-table-functions, org-export-filter-table-cell-functions, org-export-filter-table-row-functions, org-export-filter-verse-block-functions, org-export-filter-entity-functions, org-export-filter-export-snippet-functions, org-export-filter-footnote-reference-functions, org-export-filter-inline-babel-call-functions, org-export-filter-inline-src-block-functions, org-export-filter-latex-fragment-functions, org-export-filter-line-break-functions, org-export-filter-link-functions, org-export-filter-macro-functions, org-export-filter-radio-target-functions, org-export-filter-statistics-cookie-functions, org-export-filter-subscript-functions, org-export-filter-superscript-functions, org-export-filter-target-functions, org-export-filter-time-stamp-functions, org-export-filter-verbatim-functions): Fix docstring. (org-export-filter-bold-functions, org-export-filter-code-functions, org-export-filter-italic-functions, org-export-filter-strike-through-functions, org-export-filter-underline-functions): New variables. (org-export-filter-emphasis-functions): Remove variable. * testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
;;;; Bold
(defun org-latex-bold (bold contents info)
org-element: Define new objects (bold, code, italic, ...) * contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo. (org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through, org-e-ascii-underline): New functions. (org-e-ascii-emphasis): Remove function. * contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable renamed from `org-e-html-emphasis-alist'. Change value type. (org-e-html-bold, org-e-html-italic, org-e-html-strike-through, org-e-html-underline): New functions. (org-e-html-verbatim): Update function. (org-e-html-emphasis): Remove function. * contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist): Variable renamed from `org-e-latex-emphasis-alist'. Change value type. (org-e-latex-center-block): Fix docstring. (org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code, org-e-latex-italic, org-e-latex-strike-through, org-e-latex-underline): New functions. (org-e-latex-verbatim): Update function. (org-e-latex-emphasis): Remove function. * contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code, org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline): New functions. (org-e-odt-verbatim): Update function. (org-e-odt-center-block): Fix docstring. (org-e-odt-emphasis): Remove function. * contrib/lisp/org-element.el (org-element-bold-parser): (org-element-bold-interpreter, org-element-code-parser, org-element-code-interpreter, org-element-italic-parser, org-element-italic-interpreter, org-element-strike-through-parser, org-element-strike-through-interpreter, org-element-underline-parser, org-element-underline-interpreter): New functions. (org-element-emphasis-parser, org-element-emphasis-interpreter): Remove functions. (org-element-verbatim-parser, org-element-verbatim-interpreter, org-element-text-markup-successor): Update function. (org-element-object-successor-alist): Add associations for new object types. (org-element-recursive-objects): Add `bold', `italic', `strike-through' and `underline' as recursive types. (org-element-object-restrictions): Add restrictions for new recursive object types. * contrib/lisp/org-export.el (org-export-filters-alist): Add filters for new object types. (org-export-with-todo-keywords): Add missing keywords. (org-export-filter-center-block-functions, org-export-filter-drawer-functions, org-export-filter-dynamic-block-functions, org-export-filter-headline-functions, org-export-filter-inlinetask-functions, org-export-filter-plain-list-functions, org-export-filter-item-functions, org-export-filter-comment-functions, org-export-filter-comment-block-functions, org-export-filter-example-block-functions, org-export-filter-export-block-functions, org-export-filter-fixed-width-functions, org-export-filter-footnote-definition-functions, org-export-filter-horizontal-rule-functions, org-export-filter-keyword-functions, org-export-filter-latex-environment-functions, org-export-filter-babel-call-functions, org-export-filter-paragraph-functions, org-export-filter-property-drawer-functions, org-export-filter-quote-section-functions, org-export-filter-quote-block-functions, org-export-filter-section-functions, org-export-filter-special-block-functions, org-export-filter-src-block-functions, org-export-filter-table-functions, org-export-filter-table-cell-functions, org-export-filter-table-row-functions, org-export-filter-verse-block-functions, org-export-filter-entity-functions, org-export-filter-export-snippet-functions, org-export-filter-footnote-reference-functions, org-export-filter-inline-babel-call-functions, org-export-filter-inline-src-block-functions, org-export-filter-latex-fragment-functions, org-export-filter-line-break-functions, org-export-filter-link-functions, org-export-filter-macro-functions, org-export-filter-radio-target-functions, org-export-filter-statistics-cookie-functions, org-export-filter-subscript-functions, org-export-filter-superscript-functions, org-export-filter-target-functions, org-export-filter-time-stamp-functions, org-export-filter-verbatim-functions): Fix docstring. (org-export-filter-bold-functions, org-export-filter-code-functions, org-export-filter-italic-functions, org-export-filter-strike-through-functions, org-export-filter-underline-functions): New variables. (org-export-filter-emphasis-functions): Remove variable. * testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
"Transcode BOLD from Org to LaTeX.
CONTENTS is the text with bold markup. INFO is a plist holding
contextual information."
(org-latex--text-markup contents 'bold info))
org-element: Define new objects (bold, code, italic, ...) * contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo. (org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through, org-e-ascii-underline): New functions. (org-e-ascii-emphasis): Remove function. * contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable renamed from `org-e-html-emphasis-alist'. Change value type. (org-e-html-bold, org-e-html-italic, org-e-html-strike-through, org-e-html-underline): New functions. (org-e-html-verbatim): Update function. (org-e-html-emphasis): Remove function. * contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist): Variable renamed from `org-e-latex-emphasis-alist'. Change value type. (org-e-latex-center-block): Fix docstring. (org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code, org-e-latex-italic, org-e-latex-strike-through, org-e-latex-underline): New functions. (org-e-latex-verbatim): Update function. (org-e-latex-emphasis): Remove function. * contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code, org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline): New functions. (org-e-odt-verbatim): Update function. (org-e-odt-center-block): Fix docstring. (org-e-odt-emphasis): Remove function. * contrib/lisp/org-element.el (org-element-bold-parser): (org-element-bold-interpreter, org-element-code-parser, org-element-code-interpreter, org-element-italic-parser, org-element-italic-interpreter, org-element-strike-through-parser, org-element-strike-through-interpreter, org-element-underline-parser, org-element-underline-interpreter): New functions. (org-element-emphasis-parser, org-element-emphasis-interpreter): Remove functions. (org-element-verbatim-parser, org-element-verbatim-interpreter, org-element-text-markup-successor): Update function. (org-element-object-successor-alist): Add associations for new object types. (org-element-recursive-objects): Add `bold', `italic', `strike-through' and `underline' as recursive types. (org-element-object-restrictions): Add restrictions for new recursive object types. * contrib/lisp/org-export.el (org-export-filters-alist): Add filters for new object types. (org-export-with-todo-keywords): Add missing keywords. (org-export-filter-center-block-functions, org-export-filter-drawer-functions, org-export-filter-dynamic-block-functions, org-export-filter-headline-functions, org-export-filter-inlinetask-functions, org-export-filter-plain-list-functions, org-export-filter-item-functions, org-export-filter-comment-functions, org-export-filter-comment-block-functions, org-export-filter-example-block-functions, org-export-filter-export-block-functions, org-export-filter-fixed-width-functions, org-export-filter-footnote-definition-functions, org-export-filter-horizontal-rule-functions, org-export-filter-keyword-functions, org-export-filter-latex-environment-functions, org-export-filter-babel-call-functions, org-export-filter-paragraph-functions, org-export-filter-property-drawer-functions, org-export-filter-quote-section-functions, org-export-filter-quote-block-functions, org-export-filter-section-functions, org-export-filter-special-block-functions, org-export-filter-src-block-functions, org-export-filter-table-functions, org-export-filter-table-cell-functions, org-export-filter-table-row-functions, org-export-filter-verse-block-functions, org-export-filter-entity-functions, org-export-filter-export-snippet-functions, org-export-filter-footnote-reference-functions, org-export-filter-inline-babel-call-functions, org-export-filter-inline-src-block-functions, org-export-filter-latex-fragment-functions, org-export-filter-line-break-functions, org-export-filter-link-functions, org-export-filter-macro-functions, org-export-filter-radio-target-functions, org-export-filter-statistics-cookie-functions, org-export-filter-subscript-functions, org-export-filter-superscript-functions, org-export-filter-target-functions, org-export-filter-time-stamp-functions, org-export-filter-verbatim-functions): Fix docstring. (org-export-filter-bold-functions, org-export-filter-code-functions, org-export-filter-italic-functions, org-export-filter-strike-through-functions, org-export-filter-underline-functions): New variables. (org-export-filter-emphasis-functions): Remove variable. * testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
;;;; Center Block
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(defun org-latex-center-block (center-block contents info)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Transcode a CENTER-BLOCK element from Org to LaTeX.
org-element: Define new objects (bold, code, italic, ...) * contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo. (org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through, org-e-ascii-underline): New functions. (org-e-ascii-emphasis): Remove function. * contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable renamed from `org-e-html-emphasis-alist'. Change value type. (org-e-html-bold, org-e-html-italic, org-e-html-strike-through, org-e-html-underline): New functions. (org-e-html-verbatim): Update function. (org-e-html-emphasis): Remove function. * contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist): Variable renamed from `org-e-latex-emphasis-alist'. Change value type. (org-e-latex-center-block): Fix docstring. (org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code, org-e-latex-italic, org-e-latex-strike-through, org-e-latex-underline): New functions. (org-e-latex-verbatim): Update function. (org-e-latex-emphasis): Remove function. * contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code, org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline): New functions. (org-e-odt-verbatim): Update function. (org-e-odt-center-block): Fix docstring. (org-e-odt-emphasis): Remove function. * contrib/lisp/org-element.el (org-element-bold-parser): (org-element-bold-interpreter, org-element-code-parser, org-element-code-interpreter, org-element-italic-parser, org-element-italic-interpreter, org-element-strike-through-parser, org-element-strike-through-interpreter, org-element-underline-parser, org-element-underline-interpreter): New functions. (org-element-emphasis-parser, org-element-emphasis-interpreter): Remove functions. (org-element-verbatim-parser, org-element-verbatim-interpreter, org-element-text-markup-successor): Update function. (org-element-object-successor-alist): Add associations for new object types. (org-element-recursive-objects): Add `bold', `italic', `strike-through' and `underline' as recursive types. (org-element-object-restrictions): Add restrictions for new recursive object types. * contrib/lisp/org-export.el (org-export-filters-alist): Add filters for new object types. (org-export-with-todo-keywords): Add missing keywords. (org-export-filter-center-block-functions, org-export-filter-drawer-functions, org-export-filter-dynamic-block-functions, org-export-filter-headline-functions, org-export-filter-inlinetask-functions, org-export-filter-plain-list-functions, org-export-filter-item-functions, org-export-filter-comment-functions, org-export-filter-comment-block-functions, org-export-filter-example-block-functions, org-export-filter-export-block-functions, org-export-filter-fixed-width-functions, org-export-filter-footnote-definition-functions, org-export-filter-horizontal-rule-functions, org-export-filter-keyword-functions, org-export-filter-latex-environment-functions, org-export-filter-babel-call-functions, org-export-filter-paragraph-functions, org-export-filter-property-drawer-functions, org-export-filter-quote-section-functions, org-export-filter-quote-block-functions, org-export-filter-section-functions, org-export-filter-special-block-functions, org-export-filter-src-block-functions, org-export-filter-table-functions, org-export-filter-table-cell-functions, org-export-filter-table-row-functions, org-export-filter-verse-block-functions, org-export-filter-entity-functions, org-export-filter-export-snippet-functions, org-export-filter-footnote-reference-functions, org-export-filter-inline-babel-call-functions, org-export-filter-inline-src-block-functions, org-export-filter-latex-fragment-functions, org-export-filter-line-break-functions, org-export-filter-link-functions, org-export-filter-macro-functions, org-export-filter-radio-target-functions, org-export-filter-statistics-cookie-functions, org-export-filter-subscript-functions, org-export-filter-superscript-functions, org-export-filter-target-functions, org-export-filter-time-stamp-functions, org-export-filter-verbatim-functions): Fix docstring. (org-export-filter-bold-functions, org-export-filter-code-functions, org-export-filter-italic-functions, org-export-filter-strike-through-functions, org-export-filter-underline-functions): New variables. (org-export-filter-emphasis-functions): Remove variable. * testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
CONTENTS holds the contents of the center block. INFO is a plist
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
holding contextual information."
(org-latex--wrap-label
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
center-block
(format "\\begin{center}\n%s\\end{center}" contents)))
;;;; Clock
(defun org-latex-clock (clock contents info)
"Transcode a CLOCK element from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual
information."
(concat
"\\noindent"
(format "\\textbf{%s} " org-clock-string)
(format (plist-get info :latex-inactive-timestamp-format)
(concat (org-timestamp-translate (org-element-property :value clock))
(let ((time (org-element-property :duration clock)))
(and time (format " (%s)" time)))))
"\\\\"))
org-element: Define new objects (bold, code, italic, ...) * contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo. (org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through, org-e-ascii-underline): New functions. (org-e-ascii-emphasis): Remove function. * contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable renamed from `org-e-html-emphasis-alist'. Change value type. (org-e-html-bold, org-e-html-italic, org-e-html-strike-through, org-e-html-underline): New functions. (org-e-html-verbatim): Update function. (org-e-html-emphasis): Remove function. * contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist): Variable renamed from `org-e-latex-emphasis-alist'. Change value type. (org-e-latex-center-block): Fix docstring. (org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code, org-e-latex-italic, org-e-latex-strike-through, org-e-latex-underline): New functions. (org-e-latex-verbatim): Update function. (org-e-latex-emphasis): Remove function. * contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code, org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline): New functions. (org-e-odt-verbatim): Update function. (org-e-odt-center-block): Fix docstring. (org-e-odt-emphasis): Remove function. * contrib/lisp/org-element.el (org-element-bold-parser): (org-element-bold-interpreter, org-element-code-parser, org-element-code-interpreter, org-element-italic-parser, org-element-italic-interpreter, org-element-strike-through-parser, org-element-strike-through-interpreter, org-element-underline-parser, org-element-underline-interpreter): New functions. (org-element-emphasis-parser, org-element-emphasis-interpreter): Remove functions. (org-element-verbatim-parser, org-element-verbatim-interpreter, org-element-text-markup-successor): Update function. (org-element-object-successor-alist): Add associations for new object types. (org-element-recursive-objects): Add `bold', `italic', `strike-through' and `underline' as recursive types. (org-element-object-restrictions): Add restrictions for new recursive object types. * contrib/lisp/org-export.el (org-export-filters-alist): Add filters for new object types. (org-export-with-todo-keywords): Add missing keywords. (org-export-filter-center-block-functions, org-export-filter-drawer-functions, org-export-filter-dynamic-block-functions, org-export-filter-headline-functions, org-export-filter-inlinetask-functions, org-export-filter-plain-list-functions, org-export-filter-item-functions, org-export-filter-comment-functions, org-export-filter-comment-block-functions, org-export-filter-example-block-functions, org-export-filter-export-block-functions, org-export-filter-fixed-width-functions, org-export-filter-footnote-definition-functions, org-export-filter-horizontal-rule-functions, org-export-filter-keyword-functions, org-export-filter-latex-environment-functions, org-export-filter-babel-call-functions, org-export-filter-paragraph-functions, org-export-filter-property-drawer-functions, org-export-filter-quote-section-functions, org-export-filter-quote-block-functions, org-export-filter-section-functions, org-export-filter-special-block-functions, org-export-filter-src-block-functions, org-export-filter-table-functions, org-export-filter-table-cell-functions, org-export-filter-table-row-functions, org-export-filter-verse-block-functions, org-export-filter-entity-functions, org-export-filter-export-snippet-functions, org-export-filter-footnote-reference-functions, org-export-filter-inline-babel-call-functions, org-export-filter-inline-src-block-functions, org-export-filter-latex-fragment-functions, org-export-filter-line-break-functions, org-export-filter-link-functions, org-export-filter-macro-functions, org-export-filter-radio-target-functions, org-export-filter-statistics-cookie-functions, org-export-filter-subscript-functions, org-export-filter-superscript-functions, org-export-filter-target-functions, org-export-filter-time-stamp-functions, org-export-filter-verbatim-functions): Fix docstring. (org-export-filter-bold-functions, org-export-filter-code-functions, org-export-filter-italic-functions, org-export-filter-strike-through-functions, org-export-filter-underline-functions): New variables. (org-export-filter-emphasis-functions): Remove variable. * testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
;;;; Code
(defun org-latex-code (code contents info)
org-element: Define new objects (bold, code, italic, ...) * contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo. (org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through, org-e-ascii-underline): New functions. (org-e-ascii-emphasis): Remove function. * contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable renamed from `org-e-html-emphasis-alist'. Change value type. (org-e-html-bold, org-e-html-italic, org-e-html-strike-through, org-e-html-underline): New functions. (org-e-html-verbatim): Update function. (org-e-html-emphasis): Remove function. * contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist): Variable renamed from `org-e-latex-emphasis-alist'. Change value type. (org-e-latex-center-block): Fix docstring. (org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code, org-e-latex-italic, org-e-latex-strike-through, org-e-latex-underline): New functions. (org-e-latex-verbatim): Update function. (org-e-latex-emphasis): Remove function. * contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code, org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline): New functions. (org-e-odt-verbatim): Update function. (org-e-odt-center-block): Fix docstring. (org-e-odt-emphasis): Remove function. * contrib/lisp/org-element.el (org-element-bold-parser): (org-element-bold-interpreter, org-element-code-parser, org-element-code-interpreter, org-element-italic-parser, org-element-italic-interpreter, org-element-strike-through-parser, org-element-strike-through-interpreter, org-element-underline-parser, org-element-underline-interpreter): New functions. (org-element-emphasis-parser, org-element-emphasis-interpreter): Remove functions. (org-element-verbatim-parser, org-element-verbatim-interpreter, org-element-text-markup-successor): Update function. (org-element-object-successor-alist): Add associations for new object types. (org-element-recursive-objects): Add `bold', `italic', `strike-through' and `underline' as recursive types. (org-element-object-restrictions): Add restrictions for new recursive object types. * contrib/lisp/org-export.el (org-export-filters-alist): Add filters for new object types. (org-export-with-todo-keywords): Add missing keywords. (org-export-filter-center-block-functions, org-export-filter-drawer-functions, org-export-filter-dynamic-block-functions, org-export-filter-headline-functions, org-export-filter-inlinetask-functions, org-export-filter-plain-list-functions, org-export-filter-item-functions, org-export-filter-comment-functions, org-export-filter-comment-block-functions, org-export-filter-example-block-functions, org-export-filter-export-block-functions, org-export-filter-fixed-width-functions, org-export-filter-footnote-definition-functions, org-export-filter-horizontal-rule-functions, org-export-filter-keyword-functions, org-export-filter-latex-environment-functions, org-export-filter-babel-call-functions, org-export-filter-paragraph-functions, org-export-filter-property-drawer-functions, org-export-filter-quote-section-functions, org-export-filter-quote-block-functions, org-export-filter-section-functions, org-export-filter-special-block-functions, org-export-filter-src-block-functions, org-export-filter-table-functions, org-export-filter-table-cell-functions, org-export-filter-table-row-functions, org-export-filter-verse-block-functions, org-export-filter-entity-functions, org-export-filter-export-snippet-functions, org-export-filter-footnote-reference-functions, org-export-filter-inline-babel-call-functions, org-export-filter-inline-src-block-functions, org-export-filter-latex-fragment-functions, org-export-filter-line-break-functions, org-export-filter-link-functions, org-export-filter-macro-functions, org-export-filter-radio-target-functions, org-export-filter-statistics-cookie-functions, org-export-filter-subscript-functions, org-export-filter-superscript-functions, org-export-filter-target-functions, org-export-filter-time-stamp-functions, org-export-filter-verbatim-functions): Fix docstring. (org-export-filter-bold-functions, org-export-filter-code-functions, org-export-filter-italic-functions, org-export-filter-strike-through-functions, org-export-filter-underline-functions): New variables. (org-export-filter-emphasis-functions): Remove variable. * testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
"Transcode a CODE object from Org to LaTeX.
CONTENTS is nil. INFO is a plist used as a communication
channel."
(org-latex--text-markup (org-element-property :value code) 'code info))
org-element: Define new objects (bold, code, italic, ...) * contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo. (org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through, org-e-ascii-underline): New functions. (org-e-ascii-emphasis): Remove function. * contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable renamed from `org-e-html-emphasis-alist'. Change value type. (org-e-html-bold, org-e-html-italic, org-e-html-strike-through, org-e-html-underline): New functions. (org-e-html-verbatim): Update function. (org-e-html-emphasis): Remove function. * contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist): Variable renamed from `org-e-latex-emphasis-alist'. Change value type. (org-e-latex-center-block): Fix docstring. (org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code, org-e-latex-italic, org-e-latex-strike-through, org-e-latex-underline): New functions. (org-e-latex-verbatim): Update function. (org-e-latex-emphasis): Remove function. * contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code, org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline): New functions. (org-e-odt-verbatim): Update function. (org-e-odt-center-block): Fix docstring. (org-e-odt-emphasis): Remove function. * contrib/lisp/org-element.el (org-element-bold-parser): (org-element-bold-interpreter, org-element-code-parser, org-element-code-interpreter, org-element-italic-parser, org-element-italic-interpreter, org-element-strike-through-parser, org-element-strike-through-interpreter, org-element-underline-parser, org-element-underline-interpreter): New functions. (org-element-emphasis-parser, org-element-emphasis-interpreter): Remove functions. (org-element-verbatim-parser, org-element-verbatim-interpreter, org-element-text-markup-successor): Update function. (org-element-object-successor-alist): Add associations for new object types. (org-element-recursive-objects): Add `bold', `italic', `strike-through' and `underline' as recursive types. (org-element-object-restrictions): Add restrictions for new recursive object types. * contrib/lisp/org-export.el (org-export-filters-alist): Add filters for new object types. (org-export-with-todo-keywords): Add missing keywords. (org-export-filter-center-block-functions, org-export-filter-drawer-functions, org-export-filter-dynamic-block-functions, org-export-filter-headline-functions, org-export-filter-inlinetask-functions, org-export-filter-plain-list-functions, org-export-filter-item-functions, org-export-filter-comment-functions, org-export-filter-comment-block-functions, org-export-filter-example-block-functions, org-export-filter-export-block-functions, org-export-filter-fixed-width-functions, org-export-filter-footnote-definition-functions, org-export-filter-horizontal-rule-functions, org-export-filter-keyword-functions, org-export-filter-latex-environment-functions, org-export-filter-babel-call-functions, org-export-filter-paragraph-functions, org-export-filter-property-drawer-functions, org-export-filter-quote-section-functions, org-export-filter-quote-block-functions, org-export-filter-section-functions, org-export-filter-special-block-functions, org-export-filter-src-block-functions, org-export-filter-table-functions, org-export-filter-table-cell-functions, org-export-filter-table-row-functions, org-export-filter-verse-block-functions, org-export-filter-entity-functions, org-export-filter-export-snippet-functions, org-export-filter-footnote-reference-functions, org-export-filter-inline-babel-call-functions, org-export-filter-inline-src-block-functions, org-export-filter-latex-fragment-functions, org-export-filter-line-break-functions, org-export-filter-link-functions, org-export-filter-macro-functions, org-export-filter-radio-target-functions, org-export-filter-statistics-cookie-functions, org-export-filter-subscript-functions, org-export-filter-superscript-functions, org-export-filter-target-functions, org-export-filter-time-stamp-functions, org-export-filter-verbatim-functions): Fix docstring. (org-export-filter-bold-functions, org-export-filter-code-functions, org-export-filter-italic-functions, org-export-filter-strike-through-functions, org-export-filter-underline-functions): New variables. (org-export-filter-emphasis-functions): Remove variable. * testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Drawer
(defun org-latex-drawer (drawer contents info)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"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-property :drawer-name drawer))
(output (funcall (plist-get info :latex-format-drawer-function)
Fix errors reported by cus-test.el * ox.el (org-export-async-init-file): Use :set to set the default value. * ox-texinfo.el (org-texinfo-filename): Fix default value. (org-texinfo-format-headline-function): Use 'ignore as the default value. (org-texinfo-format-drawer-function): Use a function as the default value. Update docstring. (org-texinfo-drawer): Always use `org-texinfo-format-drawer-function' as it is now a function by default. (org-texinfo-headline): Compare `org-texinfo-format-headline-function' against 'ignore. (org-texinfo-inlinetask): Compare `org-texinfo-format-inlinetask-function' against 'ignore. * ox-odt.el (org-odt-format-drawer-function): Use a function as the default value. Update docstring. (org-odt-format-headline-function) (org-odt-format-inlinetask-function): Fix default value. (org-odt-with-latex): Use :set to set the default value. (org-odt-drawer): Always use `org-odt-format-drawer-function' as it is now a function by default. (org-odt-format-headline--wrap): Compare `org-odt-format-headline-function' against 'ignore. * ox-latex.el (org-latex-format-drawer-function): Use a function as the default value. Update docstring. (org-latex-format-inlinetask-function): Fix default value. (org-latex-drawer): Always use `org-latex-format-drawer-function' as it is now a function by default. (org-latex-inlinetask): Compare `org-latex-format-inlinetask-function' against 'ignore. * ox-html.el (org-html-format-drawer-function): Use a function as the default value. Update docstring. (org-html-format-headline-function) (org-html-format-inlinetask-function): Fix default value. (org-html-with-latex): Use :set to set the default value. (org-html--format-toc-headline) (org-html-format-headline--wrap): Compare `org-html-format-headline-function' against 'ignore. (org-html-inlinetask): Compare `org-html-format-inlinetask-function' against 'ignore. * ox-ascii.el (org-ascii-format-drawer-function): Use a function as the default value. Update docstring. (org-ascii-drawer): Always use `org-ascii-format-drawer-function' as it is now a function by default. (org-ascii-format-inlinetask-default): New function. (org-ascii-format-inlinetask-function): Use `org-ascii-format-inlinetask-default' as the default. * org.el (org-mouse-1-follows-link): Use :set to set the default value. Update custom type. (org-log-note-headings): Fix order or list items in the custom type. (orgstruct-heading-prefix-regexp): Use an empty string as the default value. Use 'regexp as the custom type. (orgstruct-make-binding): Tiny docstring enhancement. Assume `orgstruct-heading-prefix-regexp' is a string. * org-agenda.el (org-agenda-search-view-max-outline-level): Set default value to 0. Update docstring. (org-agenda-deadline-leaders): Fix custom type. (org-search-view): Assume `org-agenda-search-view-max-outline-level' is a number. * ob-ruby.el (org-babel-ruby-nil-to): Fix custom type. * ob-python.el (org-babel-python-mode): Use :set to set the default value. (org-babel-python-None-to): Fix custom type. * ob-plantuml.el (org-plantuml-jar-path): Fix default value. (org-babel-execute:plantuml): Assume `org-plantuml-jar-path' is a string. * ob-latex.el (org-babel-latex-htlatex): Fix default value. (org-babel-latex-htlatex-packages): Fix custom type. (org-babel-execute:latex): Assume `org-babel-latex-htlatex' is a string. Thanks to Glenn Morris for reporting this.
2013-11-14 13:05:18 +00:00
name contents)))
(org-latex--wrap-label drawer output)))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Dynamic Block
(defun org-latex-dynamic-block (dynamic-block contents info)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Transcode a DYNAMIC-BLOCK element from Org to LaTeX.
CONTENTS holds the contents of the block. INFO is a plist
org-export: Remove unnecessary back-end arguments * contrib/lisp/org-e-ascii.el (org-e-ascii--build-title, org-e-ascii--build-caption, org-e-ascii--list-listings, org-e-ascii--list-tables, org-e-ascii--describe-links, org-e-ascii-template--document-title, org-e-ascii-dynamic-block, org-e-ascii-inlinetask, org-e-ascii-item, org-e-ascii-link, org-e-ascii-quote-section, org-e-ascii--table-cell-width): Do not provide back-end symbol. * contrib/lisp/org-e-html.el (org-e-html--caption/label-string, org-e-html-footnote-section, org-e-html-template, org-e-html-dynamic-block, org-e-html-format-headline--wrap, org-e-html-headline, org-e-html-item, org-e-html-link, org-e-html-time-stamp): Do not provide back-end symbol. * contrib/lisp/org-e-latex.el (org-e-latex--caption/label-string, org-e-latex-template, org-e-latex-dynamic-block, org-e-latex-footnote-reference, org-e-latex-headline, org-e-latex-inlinetask, org-e-latex-item, org-e-latex-link, org-e-latex-src-block): Do not provide back-end symbol. * contrib/lisp/org-e-odt.el (org-e-odt-format-preamble, org-e-odt-format-label, org-e-odt-write-manifest-file, org-e-odt--caption/label-string, org-e-odt-dynamic-block, org-e-odt-format-headline--wrap, org-e-odt-headline, org-e-odt-item, org-e-odt-latex-environment, org-e-odt-link, org-e-odt-src-block, org-e-odt-time-stamp): Do not provide back-end symbol. * contrib/lisp/org-export.el (org-export-get-environment): Provide back-end symbol under `:back-end' property. (org-export-collect-tree-properties, org-export-data, org-export-filter-verbatim-functions, org-export-install-filters, org-export-as, org-export-expand-macro, org-export-filter-apply-functions, org-export-secondary-string): Remove back-end references. * testing/lisp/test-org-export.el: Update tests. Back-end can be found in communication channel with (plist-get info :back-end). Hence back-ends do not have to hard-code their name in any transcoder. It will allow to derive a back-end from another one.
2012-04-28 09:33:16 +00:00
holding contextual information. See `org-export-data'."
(org-latex--wrap-label dynamic-block contents))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Entity
(defun org-latex-entity (entity contents info)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Transcode an ENTITY object from Org to LaTeX.
CONTENTS are the definition itself. INFO is a plist holding
contextual information."
(org-element-property :latex entity))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Example Block
(defun org-latex-example-block (example-block contents info)
"Transcode an EXAMPLE-BLOCK element from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual
information."
(when (org-string-nw-p (org-element-property :value example-block))
(org-latex--wrap-label
example-block
(format "\\begin{verbatim}\n%s\\end{verbatim}"
(org-export-format-code-default example-block info)))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Export Block
(defun org-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 (member (org-element-property :type export-block) '("LATEX" "TEX"))
(org-remove-indentation (org-element-property :value export-block))))
2012-05-23 14:29:16 +00:00
;;;; Export Snippet
(defun org-latex-export-snippet (export-snippet contents info)
2012-05-23 14:29:16 +00:00
"Transcode a EXPORT-SNIPPET object from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual information."
(when (eq (org-export-snippet-backend export-snippet) 'latex)
2012-05-23 14:29:16 +00:00
(org-element-property :value export-snippet)))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Fixed Width
(defun org-latex-fixed-width (fixed-width contents info)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Transcode a FIXED-WIDTH element from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual information."
(org-latex--wrap-label
fixed-width
(format "\\begin{verbatim}\n%s\\end{verbatim}"
(org-remove-indentation
(org-element-property :value fixed-width)))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Footnote Reference
(defun org-latex-footnote-reference (footnote-reference contents info)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Transcode a FOOTNOTE-REFERENCE element from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual information."
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(concat
;; Insert separator between two footnotes in a row.
(let ((prev (org-export-get-previous-element footnote-reference info)))
(when (eq (org-element-type prev) 'footnote-reference)
(plist-get info :latex-footnote-separator)))
(cond
;; Use \footnotemark if the footnote has already been defined.
((not (org-export-footnote-first-reference-p footnote-reference info))
(format "\\footnotemark[%s]{}"
(org-export-get-footnote-number footnote-reference info)))
;; Use \footnotemark if reference is within another footnote
;; reference, footnote definition or table cell.
((org-element-lineage footnote-reference
'(footnote-reference footnote-definition table-cell))
"\\footnotemark")
;; Otherwise, define it with \footnote command.
(t
(let ((def (org-export-get-footnote-definition footnote-reference info)))
(concat
org-export: Remove unnecessary back-end arguments * contrib/lisp/org-e-ascii.el (org-e-ascii--build-title, org-e-ascii--build-caption, org-e-ascii--list-listings, org-e-ascii--list-tables, org-e-ascii--describe-links, org-e-ascii-template--document-title, org-e-ascii-dynamic-block, org-e-ascii-inlinetask, org-e-ascii-item, org-e-ascii-link, org-e-ascii-quote-section, org-e-ascii--table-cell-width): Do not provide back-end symbol. * contrib/lisp/org-e-html.el (org-e-html--caption/label-string, org-e-html-footnote-section, org-e-html-template, org-e-html-dynamic-block, org-e-html-format-headline--wrap, org-e-html-headline, org-e-html-item, org-e-html-link, org-e-html-time-stamp): Do not provide back-end symbol. * contrib/lisp/org-e-latex.el (org-e-latex--caption/label-string, org-e-latex-template, org-e-latex-dynamic-block, org-e-latex-footnote-reference, org-e-latex-headline, org-e-latex-inlinetask, org-e-latex-item, org-e-latex-link, org-e-latex-src-block): Do not provide back-end symbol. * contrib/lisp/org-e-odt.el (org-e-odt-format-preamble, org-e-odt-format-label, org-e-odt-write-manifest-file, org-e-odt--caption/label-string, org-e-odt-dynamic-block, org-e-odt-format-headline--wrap, org-e-odt-headline, org-e-odt-item, org-e-odt-latex-environment, org-e-odt-link, org-e-odt-src-block, org-e-odt-time-stamp): Do not provide back-end symbol. * contrib/lisp/org-export.el (org-export-get-environment): Provide back-end symbol under `:back-end' property. (org-export-collect-tree-properties, org-export-data, org-export-filter-verbatim-functions, org-export-install-filters, org-export-as, org-export-expand-macro, org-export-filter-apply-functions, org-export-secondary-string): Remove back-end references. * testing/lisp/test-org-export.el: Update tests. Back-end can be found in communication channel with (plist-get info :back-end). Hence back-ends do not have to hard-code their name in any transcoder. It will allow to derive a back-end from another one.
2012-04-28 09:33:16 +00:00
(format "\\footnote{%s}" (org-trim (org-export-data def info)))
;; Retrieve all footnote references within the footnote and
;; add their definition after it, since LaTeX doesn't support
;; them inside.
(org-latex--delayed-footnotes-definitions def info)))))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Headline
(defun org-latex-headline (headline contents info)
"Transcode a HEADLINE element from Org to LaTeX.
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
CONTENTS holds the contents of the headline. INFO is a plist
holding contextual information."
(unless (org-element-property :footnote-section-p headline)
(let* ((class (plist-get info :latex-class))
(level (org-export-get-relative-level headline info))
(numberedp (org-export-numbered-headline-p headline info))
(class-sectioning (assoc class (plist-get info :latex-classes)))
;; Section formatting will set two placeholders: one for
;; the title and the other for the contents.
(section-fmt
(let ((sec (if (functionp (nth 2 class-sectioning))
(funcall (nth 2 class-sectioning) level numberedp)
(nth (1+ level) class-sectioning))))
(cond
;; No section available for that LEVEL.
((not sec) nil)
;; Section format directly returned by a function. Add
;; placeholder for contents.
((stringp sec) (concat sec "\n%s"))
;; (numbered-section . unnumbered-section)
((not (consp (cdr sec)))
(concat (funcall (if numberedp #'car #'cdr) sec) "\n%s"))
;; (numbered-open numbered-close)
((= (length sec) 2)
(when numberedp (concat (car sec) "\n%s" (nth 1 sec))))
;; (num-in num-out no-num-in no-num-out)
((= (length sec) 4)
(if numberedp (concat (car sec) "\n%s" (nth 1 sec))
(concat (nth 2 sec) "\n%s" (nth 3 sec)))))))
;; Create a temporary export back-end that hard-codes
;; "\underline" within "\section" and alike.
(section-back-end
(org-export-create-backend
:parent 'latex
:transcoders
'((underline . (lambda (o c i) (format "\\underline{%s}" c))))))
(text
(org-export-data-with-backend
(org-element-property :title headline) section-back-end info))
(todo
(and (plist-get info :with-todo-keywords)
(let ((todo (org-element-property :todo-keyword headline)))
(and todo (org-export-data todo info)))))
(todo-type (and todo (org-element-property :todo-type headline)))
(tags (and (plist-get info :with-tags)
(org-export-get-tags headline info)))
(priority (and (plist-get info :with-priority)
(org-element-property :priority headline)))
;; Create the headline text along with a no-tag version.
;; The latter is required to remove tags from toc.
(full-text (funcall (plist-get info :latex-format-headline-function)
todo todo-type priority text tags info))
;; Associate \label to the headline for internal links.
(headline-label
(format "\\label{%s}\n"
(or (and (plist-get info :latex-custom-id-labels)
(org-element-property :CUSTOM_ID headline))
(org-export-get-headline-id headline info))))
(pre-blanks
(make-string (org-element-property :pre-blank headline) 10)))
(if (or (not section-fmt) (org-export-low-level-p headline info))
;; This is a deep sub-tree: export it as a list item. Also
;; export as items headlines for which no section format has
;; been found.
(let ((low-level-body
(concat
;; If headline is the first sibling, start a list.
(when (org-export-first-sibling-p headline info)
(format "\\begin{%s}\n" (if numberedp 'enumerate 'itemize)))
;; Itemize headline
"\\item"
(and full-text (org-string-match-p "\\`[ \t]*\\[" full-text)
"\\relax")
" " full-text "\n"
headline-label
pre-blanks
contents)))
;; If headline is not the last sibling simply return
;; LOW-LEVEL-BODY. Otherwise, also close the list, before
;; any blank line.
(if (not (org-export-last-sibling-p headline info)) low-level-body
(replace-regexp-in-string
"[ \t\n]*\\'"
(format "\n\\\\end{%s}" (if numberedp 'enumerate 'itemize))
low-level-body)))
;; This is a standard headline. Export it as a section. Add
;; an alternative heading when possible, and when this is not
;; identical to the usual heading.
(let ((opt-title
(funcall (plist-get info :latex-format-headline-function)
todo todo-type priority
(org-export-data-with-backend
(org-export-get-alt-title headline info)
section-back-end info)
(and (eq (plist-get info :with-tags) t) tags)
info))
;; Maybe end local TOC (see `org-latex-keyword').
(contents
(concat
contents
(let ((case-fold-search t)
(section
(let ((first (car (org-element-contents headline))))
(and (eq (org-element-type first) 'section) first))))
(org-element-map section 'keyword
(lambda (k)
(and (equal (org-element-property :key k) "TOC")
(let ((v (org-element-property :value k)))
(and (org-string-match-p "\\<headlines\\>" v)
(org-string-match-p "\\<local\\>" v)
(format "\\stopcontents[level-%d]" level)))))
info t)))))
(if (and numberedp opt-title
(not (equal opt-title full-text))
(string-match "\\`\\\\\\(.*?[^*]\\){" section-fmt))
(format (replace-match "\\1[%s]" nil nil section-fmt 1)
;; Replace square brackets with parenthesis
;; since square brackets are not supported in
;; optional arguments.
(replace-regexp-in-string
"\\[" "(" (replace-regexp-in-string "\\]" ")" opt-title))
full-text
(concat headline-label pre-blanks contents))
;; Impossible to add an alternative heading. Fallback to
;; regular sectioning format string.
(format section-fmt full-text
(concat headline-label pre-blanks contents))))))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(defun org-latex-format-headline-default-function
(todo todo-type priority text tags info)
"Default format function for a headline.
See `org-latex-format-headline-function' for details."
(concat
(and todo (format "{\\bfseries\\sffamily %s} " todo))
(and priority (format "\\framebox{\\#%c} " priority))
text
(and tags
(format "\\hfill{}\\textsc{%s}"
(mapconcat (lambda (tag) (org-latex-plain-text tag info))
tags ":")))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Horizontal Rule
(defun org-latex-horizontal-rule (horizontal-rule contents info)
"Transcode an HORIZONTAL-RULE object from Org to LaTeX.
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
CONTENTS is nil. INFO is a plist holding contextual information."
(let ((attr (org-export-read-attribute :attr_latex horizontal-rule))
(prev (org-export-get-previous-element horizontal-rule info)))
(concat
;; Make sure the rule doesn't start at the end of the current
;; line by separating it with a blank line from previous element.
(when (and prev
(let ((prev-blank (org-element-property :post-blank prev)))
(or (not prev-blank) (zerop prev-blank))))
"\n")
(org-latex--wrap-label
horizontal-rule
(format "\\rule{%s}{%s}"
(or (plist-get attr :width) "\\linewidth")
(or (plist-get attr :thickness) "0.5pt"))))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Inline Src Block
(defun org-latex-inline-src-block (inline-src-block contents info)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"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-property :value inline-src-block))
(separator (org-latex--find-verb-separator code)))
(case (plist-get info :latex-listings)
;; Do not use a special package: transcode it verbatim.
((nil) (concat "\\verb" separator code separator))
;; Use minted package.
(minted
(let* ((org-lang (org-element-property :language inline-src-block))
(mint-lang (or (cadr (assq (intern org-lang)
(plist-get info :latex-minted-langs)))
(downcase org-lang)))
(options (org-latex--make-option-string
(plist-get info :latex-minted-options))))
(concat (format "\\mint%s{%s}"
(if (string= options "") "" (format "[%s]" options))
mint-lang)
separator code separator)))
;; Use listings package.
(otherwise
;; Maybe translate language's name.
(let* ((org-lang (org-element-property :language inline-src-block))
(lst-lang (or (cadr (assq (intern org-lang)
(plist-get info :latex-listings-langs)))
org-lang))
(options (org-latex--make-option-string
(append (plist-get info :latex-listings-options)
`(("language" ,lst-lang))))))
(concat (format "\\lstinline[%s]" options)
separator code separator))))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Inlinetask
(defun org-latex-inlinetask (inlinetask contents info)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Transcode an INLINETASK element from Org to LaTeX.
CONTENTS holds the contents of the block. INFO is a plist
holding contextual information."
org-export: Secondary strings are transcoded with `org-export-data' * contrib/lisp/org-export.el (org-export-transcoder): New function. (org-export-data): Also export secondary strings. Refactored. (org-export-secondary-string): Remove function. (org-export-expand): Fix code indentation. (org-export-expand-macro): Use `org-export-data' instead of `org-export-secondary-string'. * contrib/lisp/org-e-ascii.el (org-e-ascii--build-title, org-e-ascii--build-caption, org-e-ascii--list-listings, org-e-ascii--list-tables, org-e-ascii--describe-links, org-e-ascii-template--document-title, org-e-ascii-inlinetask, org-e-ascii-item, org-e-ascii-link, org-e-ascii-quote-section, org-e-ascii--table-cell-width): Use `org-export-data' instead of `org-export-secondary-string'. * contrib/lisp/org-e-html.el (org-e-html-footnote-section, org-e-html--caption/label-string, org-e-html-meta-info, org-e-html-preamble, org-e-html-template, org-e-html-format-headline--wrap, org-e-html-headline, org-e-html-item, org-e-html-link): Use `org-export-data' instead of `org-export-secondary-string'. * contrib/lisp/org-e-latex.el (org-e-latex--caption/label-string, org-e-latex-template, org-e-latex-footnote-reference, org-e-latex-headline, org-e-latex-inlinetask, org-e-latex-item, org-e-latex-link, org-e-latex-src-block): Use `org-export-data' instead of `org-export-secondary-string'. * contrib/lisp/org-e-odt.el (org-e-odt-format-preamble, org-e-odt-format-label, org-e-odt-update-meta-file, org-e-odt--caption/label-string, org-e-odt-footnote-def, org-e-odt-format-headline--wrap, org-e-odt-headline, org-e-odt-item, org-e-odt-latex-environment, org-e-odt-link, org-e-odt-src-block): Use `org-export-data' instead of `org-export-secondary-string'.
2012-04-30 00:04:03 +00:00
(let ((title (org-export-data (org-element-property :title inlinetask) info))
2011-12-09 13:38:36 +00:00
(todo (and (plist-get info :with-todo-keywords)
org-export: Secondary strings are transcoded with `org-export-data' * contrib/lisp/org-export.el (org-export-transcoder): New function. (org-export-data): Also export secondary strings. Refactored. (org-export-secondary-string): Remove function. (org-export-expand): Fix code indentation. (org-export-expand-macro): Use `org-export-data' instead of `org-export-secondary-string'. * contrib/lisp/org-e-ascii.el (org-e-ascii--build-title, org-e-ascii--build-caption, org-e-ascii--list-listings, org-e-ascii--list-tables, org-e-ascii--describe-links, org-e-ascii-template--document-title, org-e-ascii-inlinetask, org-e-ascii-item, org-e-ascii-link, org-e-ascii-quote-section, org-e-ascii--table-cell-width): Use `org-export-data' instead of `org-export-secondary-string'. * contrib/lisp/org-e-html.el (org-e-html-footnote-section, org-e-html--caption/label-string, org-e-html-meta-info, org-e-html-preamble, org-e-html-template, org-e-html-format-headline--wrap, org-e-html-headline, org-e-html-item, org-e-html-link): Use `org-export-data' instead of `org-export-secondary-string'. * contrib/lisp/org-e-latex.el (org-e-latex--caption/label-string, org-e-latex-template, org-e-latex-footnote-reference, org-e-latex-headline, org-e-latex-inlinetask, org-e-latex-item, org-e-latex-link, org-e-latex-src-block): Use `org-export-data' instead of `org-export-secondary-string'. * contrib/lisp/org-e-odt.el (org-e-odt-format-preamble, org-e-odt-format-label, org-e-odt-update-meta-file, org-e-odt--caption/label-string, org-e-odt-footnote-def, org-e-odt-format-headline--wrap, org-e-odt-headline, org-e-odt-item, org-e-odt-latex-environment, org-e-odt-link, org-e-odt-src-block): Use `org-export-data' instead of `org-export-secondary-string'.
2012-04-30 00:04:03 +00:00
(let ((todo (org-element-property :todo-keyword inlinetask)))
(and todo (org-export-data todo info)))))
(todo-type (org-element-property :todo-type inlinetask))
2011-12-09 13:38:36 +00:00
(tags (and (plist-get info :with-tags)
(org-export-get-tags inlinetask info)))
2011-12-09 13:38:36 +00:00
(priority (and (plist-get info :with-priority)
(org-element-property :priority inlinetask)))
(contents (concat
(let ((label (org-element-property :CUSTOM_ID inlinetask)))
(and label (format "\\label{%s}\n" label)))
contents)))
(funcall (plist-get info :latex-format-inlinetask-function)
todo todo-type priority title tags contents info)))
(defun org-latex-format-inlinetask-default-function
(todo todo-type priority title tags contents info)
"Default format function for a inlinetasks.
See `org-latex-format-inlinetask-function' for details."
(let ((full-title
(concat (when todo (format "\\textbf{\\textsf{\\textsc{%s}}} " todo))
(when priority (format "\\framebox{\\#%c} " priority))
title
(when tags
(format "\\hfill{}\\textsc{:%s:}"
(mapconcat
(lambda (tag) (org-latex-plain-text tag info))
tags ":"))))))
(concat "\\begin{center}\n"
"\\fbox{\n"
"\\begin{minipage}[c]{.6\\textwidth}\n"
full-title "\n\n"
(and (org-string-nw-p contents)
(concat "\\rule[.8em]{\\textwidth}{2pt}\n\n" contents))
"\\end{minipage}\n"
"}\n"
"\\end{center}")))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
org-element: Define new objects (bold, code, italic, ...) * contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo. (org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through, org-e-ascii-underline): New functions. (org-e-ascii-emphasis): Remove function. * contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable renamed from `org-e-html-emphasis-alist'. Change value type. (org-e-html-bold, org-e-html-italic, org-e-html-strike-through, org-e-html-underline): New functions. (org-e-html-verbatim): Update function. (org-e-html-emphasis): Remove function. * contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist): Variable renamed from `org-e-latex-emphasis-alist'. Change value type. (org-e-latex-center-block): Fix docstring. (org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code, org-e-latex-italic, org-e-latex-strike-through, org-e-latex-underline): New functions. (org-e-latex-verbatim): Update function. (org-e-latex-emphasis): Remove function. * contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code, org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline): New functions. (org-e-odt-verbatim): Update function. (org-e-odt-center-block): Fix docstring. (org-e-odt-emphasis): Remove function. * contrib/lisp/org-element.el (org-element-bold-parser): (org-element-bold-interpreter, org-element-code-parser, org-element-code-interpreter, org-element-italic-parser, org-element-italic-interpreter, org-element-strike-through-parser, org-element-strike-through-interpreter, org-element-underline-parser, org-element-underline-interpreter): New functions. (org-element-emphasis-parser, org-element-emphasis-interpreter): Remove functions. (org-element-verbatim-parser, org-element-verbatim-interpreter, org-element-text-markup-successor): Update function. (org-element-object-successor-alist): Add associations for new object types. (org-element-recursive-objects): Add `bold', `italic', `strike-through' and `underline' as recursive types. (org-element-object-restrictions): Add restrictions for new recursive object types. * contrib/lisp/org-export.el (org-export-filters-alist): Add filters for new object types. (org-export-with-todo-keywords): Add missing keywords. (org-export-filter-center-block-functions, org-export-filter-drawer-functions, org-export-filter-dynamic-block-functions, org-export-filter-headline-functions, org-export-filter-inlinetask-functions, org-export-filter-plain-list-functions, org-export-filter-item-functions, org-export-filter-comment-functions, org-export-filter-comment-block-functions, org-export-filter-example-block-functions, org-export-filter-export-block-functions, org-export-filter-fixed-width-functions, org-export-filter-footnote-definition-functions, org-export-filter-horizontal-rule-functions, org-export-filter-keyword-functions, org-export-filter-latex-environment-functions, org-export-filter-babel-call-functions, org-export-filter-paragraph-functions, org-export-filter-property-drawer-functions, org-export-filter-quote-section-functions, org-export-filter-quote-block-functions, org-export-filter-section-functions, org-export-filter-special-block-functions, org-export-filter-src-block-functions, org-export-filter-table-functions, org-export-filter-table-cell-functions, org-export-filter-table-row-functions, org-export-filter-verse-block-functions, org-export-filter-entity-functions, org-export-filter-export-snippet-functions, org-export-filter-footnote-reference-functions, org-export-filter-inline-babel-call-functions, org-export-filter-inline-src-block-functions, org-export-filter-latex-fragment-functions, org-export-filter-line-break-functions, org-export-filter-link-functions, org-export-filter-macro-functions, org-export-filter-radio-target-functions, org-export-filter-statistics-cookie-functions, org-export-filter-subscript-functions, org-export-filter-superscript-functions, org-export-filter-target-functions, org-export-filter-time-stamp-functions, org-export-filter-verbatim-functions): Fix docstring. (org-export-filter-bold-functions, org-export-filter-code-functions, org-export-filter-italic-functions, org-export-filter-strike-through-functions, org-export-filter-underline-functions): New variables. (org-export-filter-emphasis-functions): Remove variable. * testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
;;;; Italic
(defun org-latex-italic (italic contents info)
org-element: Define new objects (bold, code, italic, ...) * contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo. (org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through, org-e-ascii-underline): New functions. (org-e-ascii-emphasis): Remove function. * contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable renamed from `org-e-html-emphasis-alist'. Change value type. (org-e-html-bold, org-e-html-italic, org-e-html-strike-through, org-e-html-underline): New functions. (org-e-html-verbatim): Update function. (org-e-html-emphasis): Remove function. * contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist): Variable renamed from `org-e-latex-emphasis-alist'. Change value type. (org-e-latex-center-block): Fix docstring. (org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code, org-e-latex-italic, org-e-latex-strike-through, org-e-latex-underline): New functions. (org-e-latex-verbatim): Update function. (org-e-latex-emphasis): Remove function. * contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code, org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline): New functions. (org-e-odt-verbatim): Update function. (org-e-odt-center-block): Fix docstring. (org-e-odt-emphasis): Remove function. * contrib/lisp/org-element.el (org-element-bold-parser): (org-element-bold-interpreter, org-element-code-parser, org-element-code-interpreter, org-element-italic-parser, org-element-italic-interpreter, org-element-strike-through-parser, org-element-strike-through-interpreter, org-element-underline-parser, org-element-underline-interpreter): New functions. (org-element-emphasis-parser, org-element-emphasis-interpreter): Remove functions. (org-element-verbatim-parser, org-element-verbatim-interpreter, org-element-text-markup-successor): Update function. (org-element-object-successor-alist): Add associations for new object types. (org-element-recursive-objects): Add `bold', `italic', `strike-through' and `underline' as recursive types. (org-element-object-restrictions): Add restrictions for new recursive object types. * contrib/lisp/org-export.el (org-export-filters-alist): Add filters for new object types. (org-export-with-todo-keywords): Add missing keywords. (org-export-filter-center-block-functions, org-export-filter-drawer-functions, org-export-filter-dynamic-block-functions, org-export-filter-headline-functions, org-export-filter-inlinetask-functions, org-export-filter-plain-list-functions, org-export-filter-item-functions, org-export-filter-comment-functions, org-export-filter-comment-block-functions, org-export-filter-example-block-functions, org-export-filter-export-block-functions, org-export-filter-fixed-width-functions, org-export-filter-footnote-definition-functions, org-export-filter-horizontal-rule-functions, org-export-filter-keyword-functions, org-export-filter-latex-environment-functions, org-export-filter-babel-call-functions, org-export-filter-paragraph-functions, org-export-filter-property-drawer-functions, org-export-filter-quote-section-functions, org-export-filter-quote-block-functions, org-export-filter-section-functions, org-export-filter-special-block-functions, org-export-filter-src-block-functions, org-export-filter-table-functions, org-export-filter-table-cell-functions, org-export-filter-table-row-functions, org-export-filter-verse-block-functions, org-export-filter-entity-functions, org-export-filter-export-snippet-functions, org-export-filter-footnote-reference-functions, org-export-filter-inline-babel-call-functions, org-export-filter-inline-src-block-functions, org-export-filter-latex-fragment-functions, org-export-filter-line-break-functions, org-export-filter-link-functions, org-export-filter-macro-functions, org-export-filter-radio-target-functions, org-export-filter-statistics-cookie-functions, org-export-filter-subscript-functions, org-export-filter-superscript-functions, org-export-filter-target-functions, org-export-filter-time-stamp-functions, org-export-filter-verbatim-functions): Fix docstring. (org-export-filter-bold-functions, org-export-filter-code-functions, org-export-filter-italic-functions, org-export-filter-strike-through-functions, org-export-filter-underline-functions): New variables. (org-export-filter-emphasis-functions): Remove variable. * testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
"Transcode ITALIC from Org to LaTeX.
CONTENTS is the text with italic markup. INFO is a plist holding
contextual information."
(org-latex--text-markup contents 'italic info))
org-element: Define new objects (bold, code, italic, ...) * contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo. (org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through, org-e-ascii-underline): New functions. (org-e-ascii-emphasis): Remove function. * contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable renamed from `org-e-html-emphasis-alist'. Change value type. (org-e-html-bold, org-e-html-italic, org-e-html-strike-through, org-e-html-underline): New functions. (org-e-html-verbatim): Update function. (org-e-html-emphasis): Remove function. * contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist): Variable renamed from `org-e-latex-emphasis-alist'. Change value type. (org-e-latex-center-block): Fix docstring. (org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code, org-e-latex-italic, org-e-latex-strike-through, org-e-latex-underline): New functions. (org-e-latex-verbatim): Update function. (org-e-latex-emphasis): Remove function. * contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code, org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline): New functions. (org-e-odt-verbatim): Update function. (org-e-odt-center-block): Fix docstring. (org-e-odt-emphasis): Remove function. * contrib/lisp/org-element.el (org-element-bold-parser): (org-element-bold-interpreter, org-element-code-parser, org-element-code-interpreter, org-element-italic-parser, org-element-italic-interpreter, org-element-strike-through-parser, org-element-strike-through-interpreter, org-element-underline-parser, org-element-underline-interpreter): New functions. (org-element-emphasis-parser, org-element-emphasis-interpreter): Remove functions. (org-element-verbatim-parser, org-element-verbatim-interpreter, org-element-text-markup-successor): Update function. (org-element-object-successor-alist): Add associations for new object types. (org-element-recursive-objects): Add `bold', `italic', `strike-through' and `underline' as recursive types. (org-element-object-restrictions): Add restrictions for new recursive object types. * contrib/lisp/org-export.el (org-export-filters-alist): Add filters for new object types. (org-export-with-todo-keywords): Add missing keywords. (org-export-filter-center-block-functions, org-export-filter-drawer-functions, org-export-filter-dynamic-block-functions, org-export-filter-headline-functions, org-export-filter-inlinetask-functions, org-export-filter-plain-list-functions, org-export-filter-item-functions, org-export-filter-comment-functions, org-export-filter-comment-block-functions, org-export-filter-example-block-functions, org-export-filter-export-block-functions, org-export-filter-fixed-width-functions, org-export-filter-footnote-definition-functions, org-export-filter-horizontal-rule-functions, org-export-filter-keyword-functions, org-export-filter-latex-environment-functions, org-export-filter-babel-call-functions, org-export-filter-paragraph-functions, org-export-filter-property-drawer-functions, org-export-filter-quote-section-functions, org-export-filter-quote-block-functions, org-export-filter-section-functions, org-export-filter-special-block-functions, org-export-filter-src-block-functions, org-export-filter-table-functions, org-export-filter-table-cell-functions, org-export-filter-table-row-functions, org-export-filter-verse-block-functions, org-export-filter-entity-functions, org-export-filter-export-snippet-functions, org-export-filter-footnote-reference-functions, org-export-filter-inline-babel-call-functions, org-export-filter-inline-src-block-functions, org-export-filter-latex-fragment-functions, org-export-filter-line-break-functions, org-export-filter-link-functions, org-export-filter-macro-functions, org-export-filter-radio-target-functions, org-export-filter-statistics-cookie-functions, org-export-filter-subscript-functions, org-export-filter-superscript-functions, org-export-filter-target-functions, org-export-filter-time-stamp-functions, org-export-filter-verbatim-functions): Fix docstring. (org-export-filter-bold-functions, org-export-filter-code-functions, org-export-filter-italic-functions, org-export-filter-strike-through-functions, org-export-filter-underline-functions): New variables. (org-export-filter-emphasis-functions): Remove variable. * testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Item
(defun org-latex-item (item contents info)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Transcode an ITEM element from Org to LaTeX.
CONTENTS holds the contents of the item. INFO is a plist holding
contextual information."
(let* ((counter
(let ((count (org-element-property :counter item))
(level
;; Determine level of current item to determine the
;; correct LaTeX counter to use (enumi, enumii...).
(let ((parent item) (level 0))
(while (memq (org-element-type
(setq parent (org-export-get-parent parent)))
'(plain-list item))
(when (and (eq (org-element-type parent) 'plain-list)
(eq (org-element-property :type parent)
'ordered))
(incf level)))
level)))
(and count
(< level 5)
(format "\\setcounter{enum%s}{%s}\n"
(nth (1- level) '("i" "ii" "iii" "iv"))
(1- count)))))
(checkbox (case (org-element-property :checkbox item)
(on "$\\boxtimes$ ")
(off "$\\square$ ")
(trans "$\\boxminus$ ")))
(tag (let ((tag (org-element-property :tag item)))
;; Check-boxes must belong to the tag.
(and tag (format "[{%s}] "
(concat checkbox
(org-export-data tag info)))))))
(concat counter
"\\item"
(cond
(tag)
(checkbox (concat " " checkbox))
;; Without a tag or a check-box, if CONTENTS starts with
;; an opening square bracket, add "\relax" to "\item",
;; unless the brackets comes from an initial export
;; snippet (i.e. it is inserted willingly by the user).
((and contents
(org-string-match-p "\\`[ \t]*\\[" contents)
(not (let ((e (car (org-element-contents item))))
(and (eq (org-element-type e) 'paragraph)
(let ((o (car (org-element-contents e))))
(and (eq (org-element-type o) 'export-snippet)
(eq (org-export-snippet-backend o)
'latex)))))))
"\\relax ")
(t " "))
(and contents (org-trim contents))
;; If there are footnotes references in tag, be sure to
;; add their definition at the end of the item. This
;; workaround is necessary since "\footnote{}" command is
;; not supported in tags.
(and tag
(org-latex--delayed-footnotes-definitions
(org-element-property :tag item) info)))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Keyword
(defun org-latex-keyword (keyword contents info)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Transcode a KEYWORD element from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual information."
(let ((key (org-element-property :key keyword))
(value (org-element-property :value keyword)))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(cond
((string= key "LATEX") value)
((string= key "INDEX") (format "\\index{%s}" value))
((string= key "TOC")
(let ((case-fold-search t))
2011-12-09 13:38:36 +00:00
(cond
((org-string-match-p "\\<headlines\\>" value)
(let* ((localp (org-string-match-p "\\<local\\>" value))
(parent (org-element-lineage keyword '(headline)))
(level (if (not (and localp parent)) 0
(org-export-get-relative-level parent info)))
(depth
(and (string-match "\\<[0-9]+\\>" value)
(format
"\\setcounter{tocdepth}{%d}"
(+ (string-to-number (match-string 0 value)) level)))))
(if (and localp parent)
;; Start local TOC, assuming package "titletoc" is
;; required.
(format "\\startcontents[level-%d]
\\printcontents[level-%d]{}{0}{%s}"
level level (or depth ""))
(concat depth (and depth "\n") "\\tableofcontents"))))
((org-string-match-p "\\<tables\\>" value) "\\listoftables")
((org-string-match-p "\\<listings\\>" value)
(case (plist-get info :latex-listings)
((nil) "\\listoffigures")
(minted "\\listoflistings")
(otherwise "\\lstlistoflistings")))))))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Latex Environment
(defun org-latex-latex-environment (latex-environment contents info)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Transcode a LATEX-ENVIRONMENT element from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual information."
(when (plist-get info :with-latex)
(let ((label (org-element-property :name latex-environment))
(value (org-remove-indentation
(org-element-property :value latex-environment))))
(if (not (org-string-nw-p label)) value
;; Environment is labeled: label must be within the environment
;; (otherwise, a reference pointing to that element will count
;; the section instead).
(with-temp-buffer
(insert value)
(goto-char (point-min))
(forward-line)
(insert
(format "\\label{%s}\n" (org-export-solidify-link-text label)))
(buffer-string))))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Latex Fragment
(defun org-latex-latex-fragment (latex-fragment contents info)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Transcode a LATEX-FRAGMENT object from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual information."
(let ((value (org-element-property :value latex-fragment)))
;; Trim math markers since the fragment is enclosed within
;; a latex-math-block object anyway.
(cond ((string-match "\\`\\(\\$\\{1,2\\}\\)\\([^\000]*\\)\\1\\'" value)
(match-string 2 value))
((string-match "\\`\\\\(\\([^\000]*\\)\\\\)\\'" value)
(match-string 1 value))
(t value))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Line Break
(defun org-latex-line-break (line-break contents info)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Transcode a LINE-BREAK object from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual information."
"\\\\\n")
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Link
(defun org-latex--inline-image (link info)
"Return LaTeX code for an inline image.
LINK is the link pointing to the inline image. INFO is a plist
used as a communication channel."
org-export: Rewrite topology functions * contrib/lisp/org-export.el (org-export-get-genealogy, org-export-get-parent, org-export-get-parent-headline, org-export-get-parent-table): Rewrite function to use :parent property. Remove communication channel from signature. (org-export-get-parent-element): Rename from `org-export-get-parent-paragraph'. (org-export-data, org-export-table-row-is-special-p) org-export-table-row-group, org-export-table-cell-starts-colgroup-p, org-export-table-cell-ends-colgroup-p, org-export-table-row-starts-header-p, org-export-table-row-ends-header-p, org-export-table-cell-address, org-export-first-sibling-p, org-export-last-sibling-p, org-export-resolve-fuzzy-link, org-export-get-ordinal): Apply signature change. (org-export--skip-p, org-export-table-cell-width, org-export-table-cell-alignment, org-export-table-cell-borders): Refactor code. Apply signature change. * contrib/lisp/org-e-ascii.el (org-e-ascii--current-text-width, org-e-ascii--unique-links, org-e-ascii-inlinetask, org-e-ascii-item, org-e-ascii-paragraph, org-e-ascii-quote-section, org-e-ascii-section, org-e-ascii--table-cell-width): Apply signature change. * contrib/lisp/org-e-html.el (org-e-html-link, org-e-html-link--inline-image): Use new function and apply signature change. (org-e-html-item, org-e-html-standalone-image-p, org-e-html-paragraph, org-e-html-section, org-e-html-table-cell, org-e-html-table-row, org-e-html-footnote-reference): Apply signature change. * contrib/lisp/org-e-latex.el (org-e-latex-link--inline-image): Use new function and apply signature change. (org-e-latex-footnote-reference, org-e-latex-item, org-e-latex-table-cell, org-e-latex-table-row): Apply signature change. * contrib/lisp/org-e-odt.el (org-e-odt-format-formula, org-e-odt-format-label, org-e-odt-link--inline-image): Use new function and apply signature change. (org-e-odt-item, org-e-odt-standalone-image-p, org-e-odt-paragraph, org-e-odt-plain-list, org-e-odt-table-style-spec, org-e-odt-get-table-cell-styles, org-e-odt-table-cell, org-e-odt-table-row, org-e-odt-table, org-e-odt-footnote-reference, org-e-odt-enumerate-element): Apply signature change.
2012-06-08 19:00:47 +00:00
(let* ((parent (org-export-get-parent-element link))
(path (let ((raw-path (org-element-property :path link)))
(if (not (file-name-absolute-p raw-path)) raw-path
(expand-file-name raw-path))))
(filetype (file-name-extension path))
(caption (org-latex--caption/label-string parent info))
(caption-above-p (org-latex--caption-above-p link info))
2011-12-09 13:38:36 +00:00
;; Retrieve latex attributes from the element around.
(attr (org-export-read-attribute :attr_latex parent))
(float (let ((float (plist-get attr :float)))
(cond ((and (not float) (plist-member attr :float)) nil)
((string= float "wrap") 'wrap)
((string= float "sideways") 'sideways)
((string= float "multicolumn") 'multicolumn)
((or float
(org-element-property :caption parent)
(org-string-nw-p (plist-get attr :caption)))
'figure))))
2011-12-09 13:38:36 +00:00
(placement
(let ((place (plist-get attr :placement)))
(cond
(place (format "%s" place))
((eq float 'wrap) "{l}{0.5\\textwidth}")
((eq float 'figure)
(format "[%s]" (plist-get info :latex-default-figure-position)))
(t ""))))
(comment-include (if (plist-get attr :comment-include) "%" ""))
;; It is possible to specify width and height in the
;; ATTR_LATEX line, and also via default variables.
(width (cond ((plist-get attr :width))
((plist-get attr :height) "")
((eq float 'wrap) "0.48\\textwidth")
(t (plist-get info :latex-image-default-width))))
(height (cond ((plist-get attr :height))
((or (plist-get attr :width)
(memq float '(figure wrap))) "")
(t (plist-get info :latex-image-default-height))))
(options (let ((opt (or (plist-get attr :options)
(plist-get info :latex-image-default-option))))
(if (not (string-match "\\`\\[\\(.*\\)\\]\\'" opt)) opt
(match-string 1 opt))))
image-code)
(if (member filetype '("tikz" "pgf"))
;; For tikz images:
;; - use \input to read in image file.
;; - if options are present, wrap in a tikzpicture environment.
;; - if width or height are present, use \resizebox to change
;; the image size.
(progn
(setq image-code (format "\\input{%s}" path))
(when (org-string-nw-p options)
(setq image-code
(format "\\begin{tikzpicture}[%s]\n%s\n\\end{tikzpicture}"
options
image-code)))
(when (or (org-string-nw-p width) (org-string-nw-p height))
(setq image-code (format "\\resizebox{%s}{%s}{%s}"
(if (org-string-nw-p width) width "!")
(if (org-string-nw-p height) height "!")
image-code))))
;; For other images:
;; - add width and height to options.
;; - include the image with \includegraphics.
(when (org-string-nw-p width)
(setq options (concat options ",width=" width)))
(when (org-string-nw-p height)
(setq options (concat options ",height=" height)))
(let ((search-option (org-element-property :search-option link)))
(when (and search-option
(equal filetype "pdf")
(org-string-match-p "\\`[0-9]+\\'" search-option)
(not (org-string-match-p "page=" options)))
(setq options (concat options ",page=" search-option))))
(setq image-code
(format "\\includegraphics%s{%s}"
(cond ((not (org-string-nw-p options)) "")
((= (aref options 0) ?,)
(format "[%s]"(substring options 1)))
(t (format "[%s]" options)))
path))
(when (equal filetype "svg")
(setq image-code (replace-regexp-in-string "^\\\\includegraphics"
"\\includesvg"
image-code
nil t))
(setq image-code (replace-regexp-in-string "\\.svg}"
"}"
image-code
nil t))))
;; Return proper string, depending on FLOAT.
(case float
(wrap (format "\\begin{wrapfigure}%s
%s\\centering
%s%s
%s\\end{wrapfigure}"
placement
(if caption-above-p caption "")
comment-include image-code
(if caption-above-p "" caption)))
(sideways (format "\\begin{sidewaysfigure}
%s\\centering
%s%s
%s\\end{sidewaysfigure}"
(if caption-above-p caption "")
comment-include image-code
(if caption-above-p "" caption)))
(multicolumn (format "\\begin{figure*}%s
%s\\centering
%s%s
%s\\end{figure*}"
placement
(if caption-above-p caption "")
comment-include image-code
(if caption-above-p "" caption)))
(figure (format "\\begin{figure}%s
%s\\centering
%s%s
%s\\end{figure}"
placement
(if caption-above-p caption "")
comment-include image-code
(if caption-above-p "" caption)))
(otherwise image-code))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(defun org-latex-link (link desc info)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Transcode a LINK object from Org to LaTeX.
DESC is the description part of the link, or the empty string.
INFO is a plist holding contextual information. See
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
`org-export-data'."
(let* ((type (org-element-property :type link))
(raw-path (replace-regexp-in-string
"%" "\\%" (org-element-property :path link) nil t))
2011-12-09 13:38:36 +00:00
;; Ensure DESC really exists, or set it to nil.
(desc (and (not (string= desc "")) desc))
(imagep (org-export-inline-image-p
link (plist-get info :latex-inline-image-rules)))
2011-12-09 13:38:36 +00:00
(path (cond
((member type '("http" "https" "ftp" "mailto" "doi"))
(concat type ":" raw-path))
((and (string= type "file") (file-name-absolute-p raw-path))
(concat "file:" raw-path))
(t raw-path))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(cond
;; Link type is handled by a special function.
((org-export-custom-protocol-maybe link desc 'latex))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;; Image file.
(imagep (org-latex--inline-image link info))
;; Radio link: Transcode target's contents and use them as link's
;; description.
((string= type "radio")
(let ((destination (org-export-resolve-radio-link link info)))
(if (not destination) desc
(format "\\hyperref[%s]{%s}"
(org-export-solidify-link-text
(org-element-property :value destination))
desc))))
;; Links pointing to a headline: Find destination and build
;; appropriate referencing command.
((member type '("custom-id" "fuzzy" "id"))
(let ((destination (if (string= type "fuzzy")
(org-export-resolve-fuzzy-link link info)
(org-export-resolve-id-link link info))))
(case (org-element-type destination)
;; Id link points to an external file.
(plain-text
(if desc (format "\\href{%s}{%s}" destination desc)
(format "\\url{%s}" destination)))
;; Fuzzy link points nowhere.
('nil
(format (plist-get info :latex-link-with-unknown-path-format)
(or desc
org-export: Secondary strings are transcoded with `org-export-data' * contrib/lisp/org-export.el (org-export-transcoder): New function. (org-export-data): Also export secondary strings. Refactored. (org-export-secondary-string): Remove function. (org-export-expand): Fix code indentation. (org-export-expand-macro): Use `org-export-data' instead of `org-export-secondary-string'. * contrib/lisp/org-e-ascii.el (org-e-ascii--build-title, org-e-ascii--build-caption, org-e-ascii--list-listings, org-e-ascii--list-tables, org-e-ascii--describe-links, org-e-ascii-template--document-title, org-e-ascii-inlinetask, org-e-ascii-item, org-e-ascii-link, org-e-ascii-quote-section, org-e-ascii--table-cell-width): Use `org-export-data' instead of `org-export-secondary-string'. * contrib/lisp/org-e-html.el (org-e-html-footnote-section, org-e-html--caption/label-string, org-e-html-meta-info, org-e-html-preamble, org-e-html-template, org-e-html-format-headline--wrap, org-e-html-headline, org-e-html-item, org-e-html-link): Use `org-export-data' instead of `org-export-secondary-string'. * contrib/lisp/org-e-latex.el (org-e-latex--caption/label-string, org-e-latex-template, org-e-latex-footnote-reference, org-e-latex-headline, org-e-latex-inlinetask, org-e-latex-item, org-e-latex-link, org-e-latex-src-block): Use `org-export-data' instead of `org-export-secondary-string'. * contrib/lisp/org-e-odt.el (org-e-odt-format-preamble, org-e-odt-format-label, org-e-odt-update-meta-file, org-e-odt--caption/label-string, org-e-odt-footnote-def, org-e-odt-format-headline--wrap, org-e-odt-headline, org-e-odt-item, org-e-odt-latex-environment, org-e-odt-link, org-e-odt-src-block): Use `org-export-data' instead of `org-export-secondary-string'.
2012-04-30 00:04:03 +00:00
(org-export-data
org-export: Remove unnecessary back-end arguments * contrib/lisp/org-e-ascii.el (org-e-ascii--build-title, org-e-ascii--build-caption, org-e-ascii--list-listings, org-e-ascii--list-tables, org-e-ascii--describe-links, org-e-ascii-template--document-title, org-e-ascii-dynamic-block, org-e-ascii-inlinetask, org-e-ascii-item, org-e-ascii-link, org-e-ascii-quote-section, org-e-ascii--table-cell-width): Do not provide back-end symbol. * contrib/lisp/org-e-html.el (org-e-html--caption/label-string, org-e-html-footnote-section, org-e-html-template, org-e-html-dynamic-block, org-e-html-format-headline--wrap, org-e-html-headline, org-e-html-item, org-e-html-link, org-e-html-time-stamp): Do not provide back-end symbol. * contrib/lisp/org-e-latex.el (org-e-latex--caption/label-string, org-e-latex-template, org-e-latex-dynamic-block, org-e-latex-footnote-reference, org-e-latex-headline, org-e-latex-inlinetask, org-e-latex-item, org-e-latex-link, org-e-latex-src-block): Do not provide back-end symbol. * contrib/lisp/org-e-odt.el (org-e-odt-format-preamble, org-e-odt-format-label, org-e-odt-write-manifest-file, org-e-odt--caption/label-string, org-e-odt-dynamic-block, org-e-odt-format-headline--wrap, org-e-odt-headline, org-e-odt-item, org-e-odt-latex-environment, org-e-odt-link, org-e-odt-src-block, org-e-odt-time-stamp): Do not provide back-end symbol. * contrib/lisp/org-export.el (org-export-get-environment): Provide back-end symbol under `:back-end' property. (org-export-collect-tree-properties, org-export-data, org-export-filter-verbatim-functions, org-export-install-filters, org-export-as, org-export-expand-macro, org-export-filter-apply-functions, org-export-secondary-string): Remove back-end references. * testing/lisp/test-org-export.el: Update tests. Back-end can be found in communication channel with (plist-get info :back-end). Hence back-ends do not have to hard-code their name in any transcoder. It will allow to derive a back-end from another one.
2012-04-28 09:33:16 +00:00
(org-element-property :raw-link link) info))))
;; LINK points to a headline. If headlines are numbered
;; and the link has no description, display headline's
;; number. Otherwise, display description or headline's
;; title.
(headline
(let* ((custom-label
(and (plist-get info :latex-custom-id-labels)
(org-element-property :CUSTOM_ID destination)))
(label (or custom-label
(org-export-get-headline-id destination info))))
(if (and (not desc)
(org-export-numbered-headline-p destination info))
(format "\\ref{%s}" label)
(format "\\hyperref[%s]{%s}" label
(or desc
org-export: Secondary strings are transcoded with `org-export-data' * contrib/lisp/org-export.el (org-export-transcoder): New function. (org-export-data): Also export secondary strings. Refactored. (org-export-secondary-string): Remove function. (org-export-expand): Fix code indentation. (org-export-expand-macro): Use `org-export-data' instead of `org-export-secondary-string'. * contrib/lisp/org-e-ascii.el (org-e-ascii--build-title, org-e-ascii--build-caption, org-e-ascii--list-listings, org-e-ascii--list-tables, org-e-ascii--describe-links, org-e-ascii-template--document-title, org-e-ascii-inlinetask, org-e-ascii-item, org-e-ascii-link, org-e-ascii-quote-section, org-e-ascii--table-cell-width): Use `org-export-data' instead of `org-export-secondary-string'. * contrib/lisp/org-e-html.el (org-e-html-footnote-section, org-e-html--caption/label-string, org-e-html-meta-info, org-e-html-preamble, org-e-html-template, org-e-html-format-headline--wrap, org-e-html-headline, org-e-html-item, org-e-html-link): Use `org-export-data' instead of `org-export-secondary-string'. * contrib/lisp/org-e-latex.el (org-e-latex--caption/label-string, org-e-latex-template, org-e-latex-footnote-reference, org-e-latex-headline, org-e-latex-inlinetask, org-e-latex-item, org-e-latex-link, org-e-latex-src-block): Use `org-export-data' instead of `org-export-secondary-string'. * contrib/lisp/org-e-odt.el (org-e-odt-format-preamble, org-e-odt-format-label, org-e-odt-update-meta-file, org-e-odt--caption/label-string, org-e-odt-footnote-def, org-e-odt-format-headline--wrap, org-e-odt-headline, org-e-odt-item, org-e-odt-latex-environment, org-e-odt-link, org-e-odt-src-block): Use `org-export-data' instead of `org-export-secondary-string'.
2012-04-30 00:04:03 +00:00
(org-export-data
org-export: Remove unnecessary back-end arguments * contrib/lisp/org-e-ascii.el (org-e-ascii--build-title, org-e-ascii--build-caption, org-e-ascii--list-listings, org-e-ascii--list-tables, org-e-ascii--describe-links, org-e-ascii-template--document-title, org-e-ascii-dynamic-block, org-e-ascii-inlinetask, org-e-ascii-item, org-e-ascii-link, org-e-ascii-quote-section, org-e-ascii--table-cell-width): Do not provide back-end symbol. * contrib/lisp/org-e-html.el (org-e-html--caption/label-string, org-e-html-footnote-section, org-e-html-template, org-e-html-dynamic-block, org-e-html-format-headline--wrap, org-e-html-headline, org-e-html-item, org-e-html-link, org-e-html-time-stamp): Do not provide back-end symbol. * contrib/lisp/org-e-latex.el (org-e-latex--caption/label-string, org-e-latex-template, org-e-latex-dynamic-block, org-e-latex-footnote-reference, org-e-latex-headline, org-e-latex-inlinetask, org-e-latex-item, org-e-latex-link, org-e-latex-src-block): Do not provide back-end symbol. * contrib/lisp/org-e-odt.el (org-e-odt-format-preamble, org-e-odt-format-label, org-e-odt-write-manifest-file, org-e-odt--caption/label-string, org-e-odt-dynamic-block, org-e-odt-format-headline--wrap, org-e-odt-headline, org-e-odt-item, org-e-odt-latex-environment, org-e-odt-link, org-e-odt-src-block, org-e-odt-time-stamp): Do not provide back-end symbol. * contrib/lisp/org-export.el (org-export-get-environment): Provide back-end symbol under `:back-end' property. (org-export-collect-tree-properties, org-export-data, org-export-filter-verbatim-functions, org-export-install-filters, org-export-as, org-export-expand-macro, org-export-filter-apply-functions, org-export-secondary-string): Remove back-end references. * testing/lisp/test-org-export.el: Update tests. Back-end can be found in communication channel with (plist-get info :back-end). Hence back-ends do not have to hard-code their name in any transcoder. It will allow to derive a back-end from another one.
2012-04-28 09:33:16 +00:00
(org-element-property :title destination) info))))))
;; Fuzzy link points to a target. Do as above.
(otherwise
(let ((path (org-export-solidify-link-text path)))
(if (not desc) (format "\\ref{%s}" path)
(format "\\hyperref[%s]{%s}" path desc)))))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;; Coderef: replace link with the reference name or the
;; equivalent line number.
((string= type "coderef")
(format (org-export-get-coderef-format path desc)
(org-export-resolve-coderef path info)))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;; External link with a description part.
((and path desc) (format "\\href{%s}{%s}" path desc))
;; External link without a description part.
(path (format "\\url{%s}" path))
;; No path, only description. Try to do something useful.
(t (format (plist-get info :latex-link-with-unknown-path-format) desc)))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Node Property
(defun org-latex-node-property (node-property contents info)
"Transcode a NODE-PROPERTY element from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual
information."
(format "%s:%s"
(org-element-property :key node-property)
(let ((value (org-element-property :value node-property)))
(if value (concat " " value) ""))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Paragraph
(defun org-latex-paragraph (paragraph contents info)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"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."
contents)
;;;; Plain List
(defun org-latex-plain-list (plain-list contents info)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Transcode a PLAIN-LIST element from Org to LaTeX.
CONTENTS is the contents of the list. INFO is a plist holding
contextual information."
(let* ((type (org-element-property :type plain-list))
(attr (org-export-read-attribute :attr_latex plain-list))
(latex-type (let ((env (plist-get attr :environment)))
(cond (env (format "%s" env))
((eq type 'ordered) "enumerate")
((eq type 'descriptive) "description")
(t "itemize")))))
(org-latex--wrap-label
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
plain-list
(format "\\begin{%s}%s\n%s\\end{%s}"
2011-12-09 13:38:36 +00:00
latex-type
(or (plist-get attr :options) "")
2011-12-09 13:38:36 +00:00
contents
latex-type))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Plain Text
(defun org-latex-plain-text (text info)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Transcode a TEXT string from Org to LaTeX.
TEXT is the string to transcode. INFO is a plist holding
contextual information."
(let* ((specialp (plist-get info :with-special-strings))
(output
;; Turn LaTeX into \LaTeX{} and TeX into \TeX{}.
(let ((case-fold-search nil))
(replace-regexp-in-string
"\\<\\(?:La\\)?TeX\\>" "\\\\\\&{}"
;; Protect ^, ~, %, #, &, $, _, { and }. Also protect \.
;; However, if special strings are used, be careful not
;; to protect "\" in "\-" constructs.
(replace-regexp-in-string
(concat "[%$#&{}_~^]\\|\\\\" (and specialp "\\(?:[^-]\\|$\\)"))
(lambda (m)
(case (aref m 0)
(?\\ "$\\\\backslash$")
(?~ "\\\\textasciitilde{}")
(?^ "\\\\^{}")
(t "\\\\\\&")))
text)))))
2012-10-26 22:36:00 +00:00
;; Activate smart quotes. Be sure to provide original TEXT string
;; since OUTPUT may have been modified.
(when (plist-get info :with-smart-quotes)
(setq output (org-export-activate-smart-quotes output :latex info text)))
;; Convert special strings.
(when specialp
(setq output (replace-regexp-in-string "\\.\\.\\." "\\\\ldots{}" output)))
;; Handle break preservation if required.
(when (plist-get info :preserve-breaks)
2012-10-26 22:36:00 +00:00
(setq output (replace-regexp-in-string
"\\(?:[ \t]*\\\\\\\\\\)?[ \t]*\n" "\\\\\n" output nil t)))
;; Return value.
2012-10-26 22:36:00 +00:00
output))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Planning
(defun org-latex-planning (planning contents info)
"Transcode a PLANNING element from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual
information."
(concat
"\\noindent"
(mapconcat
'identity
(delq nil
(list
(let ((closed (org-element-property :closed planning)))
(when closed
(concat
(format "\\textbf{%s} " org-closed-string)
(format (plist-get info :latex-inactive-timestamp-format)
(org-timestamp-translate closed)))))
(let ((deadline (org-element-property :deadline planning)))
(when deadline
(concat
(format "\\textbf{%s} " org-deadline-string)
(format (plist-get info :latex-active-timestamp-format)
(org-timestamp-translate deadline)))))
(let ((scheduled (org-element-property :scheduled planning)))
(when scheduled
(concat
(format "\\textbf{%s} " org-scheduled-string)
(format (plist-get info :latex-active-timestamp-format)
(org-timestamp-translate scheduled)))))))
" ")
"\\\\"))
;;;; Property Drawer
(defun org-latex-property-drawer (property-drawer contents info)
"Transcode a PROPERTY-DRAWER element from Org to LaTeX.
CONTENTS holds the contents of the drawer. INFO is a plist
holding contextual information."
(and (org-string-nw-p contents)
(format "\\begin{verbatim}\n%s\\end{verbatim}" contents)))
;;;; Pseudo Element: LaTeX Matrices
;; `latex-matrices' elements have the following properties:
;; `:caption', `:post-blank' and `:markup' (`inline', `equation' or
;; `math').
(defun org-latex--wrap-latex-matrices (data info)
"Merge contiguous tables with the same mode within a pseudo-element.
DATA is a parse tree or a secondary string. INFO is a plist
containing export options. Modify DATA by side-effect and return
it."
(org-element-map data 'table
(lambda (table)
(when (eq (org-element-property :type table) 'org)
(let ((mode (or (org-export-read-attribute :attr_latex table :mode)
(plist-get info :latex-default-table-mode))))
(when (and (member mode '("inline-math" "math"))
;; Do not wrap twice the same table.
(not (eq (org-element-type
(org-element-property :parent table))
'latex-matrices)))
(let* ((caption (and (not (string= mode "inline-math"))
(org-element-property :caption table)))
(matrices
(list 'latex-matrices
(list :caption caption
:markup
(cond ((string= mode "inline-math") 'inline)
(caption 'equation)
(t 'math)))))
(previous table)
(next (org-export-get-next-element table info)))
(org-element-insert-before matrices table)
;; Swallow all contiguous tables sharing the same mode.
(while (and
(zerop (or (org-element-property :post-blank previous) 0))
(setq next (org-export-get-next-element previous info))
(eq (org-element-type next) 'table)
(eq (org-element-property :type next) 'org)
(string= (or (org-export-read-attribute
:attr_latex next :mode)
(plist-get info :latex-default-table-mode))
mode))
(org-element-extract-element previous)
(org-element-adopt-elements matrices previous)
(setq previous next))
(org-element-put-property
matrices :post-blank (org-element-property :post-blank previous))
(org-element-extract-element previous)
(org-element-adopt-elements matrices previous))))))
info)
data)
(defun org-latex-matrices (matrices contents info)
"Transcode a MATRICES element from Org to LaTeX.
CONTENTS is a string. INFO is a plist used as a communication
channel."
(format (case (org-element-property :markup matrices)
(inline "\\(%s\\)")
(equation "\\begin{equation}\n%s\\end{equation}")
(t "\\[\n%s\\]"))
contents))
(defun org-latex-matrices-tree-filter (tree backend info)
(org-latex--wrap-latex-matrices tree info))
;;;; Pseudo Object: LaTeX Math Block
;; `latex-math-block' objects have the following property:
;; `:post-blank'.
(defun org-latex--wrap-latex-math-block (data info)
"Merge contiguous math objects in a pseudo-object container.
DATA is a parse tree or a secondary string. INFO is a plist
containing export options. Modify DATA by side-effect and return it."
(let ((valid-object-p
(function
;; Non-nil when OBJ can be added to the latex math block.
(lambda (obj)
(case (org-element-type obj)
(entity (org-element-property :latex-math-p obj))
(latex-fragment
(let ((value (org-element-property :value obj)))
(or (org-string-match-p "\\`\\\\([^\000]*\\\\)\\'" value)
(org-string-match-p "\\`\\$[^\000]*\\$\\'" value))))
((subscript superscript) t))))))
(org-element-map data '(entity latex-fragment subscript superscript)
(lambda (object)
;; Skip objects already wrapped.
(when (and (not (eq (org-element-type
(org-element-property :parent object))
'latex-math-block))
(funcall valid-object-p object))
(let ((math-block (list 'latex-math-block nil))
(next-elements (org-export-get-next-element object info t))
(last object))
;; Wrap MATH-BLOCK around OBJECT in DATA.
(org-element-insert-before math-block object)
(org-element-extract-element object)
(org-element-adopt-elements math-block object)
(when (zerop (or (org-element-property :post-blank object) 0))
;; MATH-BLOCK swallows consecutive math objects.
(catch 'exit
(dolist (next next-elements)
(if (not (funcall valid-object-p next)) (throw 'exit nil)
(org-element-extract-element next)
(org-element-adopt-elements math-block next)
;; Eschew the case: \beta$x$ -> \(\betax\).
(unless (memq (org-element-type next)
'(subscript superscript))
(org-element-put-property last :post-blank 1))
(setq last next)
(when (> (or (org-element-property :post-blank next) 0) 0)
(throw 'exit nil))))))
(org-element-put-property
math-block :post-blank (org-element-property :post-blank last)))))
info nil '(subscript superscript latex-math-block) t)
;; Return updated DATA.
data))
(defun org-latex-math-block-tree-filter (tree backend info)
(org-latex--wrap-latex-math-block tree info))
(defun org-latex-math-block-options-filter (info backend)
(dolist (prop '(:author :date :title) info)
(plist-put info prop
(org-latex--wrap-latex-math-block (plist-get info prop) info))))
(defun org-latex-math-block (math-block contents info)
"Transcode a MATH-BLOCK object from Org to LaTeX.
CONTENTS is a string. INFO is a plist used as a communication
channel."
(when (org-string-nw-p contents)
(format "\\(%s\\)" (org-trim contents))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Quote Block
(defun org-latex-quote-block (quote-block contents info)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"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
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
quote-block
(format "\\begin{quote}\n%s\\end{quote}" contents)))
;;;; Radio Target
(defun org-latex-radio-target (radio-target text info)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Transcode a RADIO-TARGET object from Org to LaTeX.
TEXT is the text of the target. INFO is a plist holding
contextual information."
(format "\\label{%s}%s"
2011-12-09 13:38:36 +00:00
(org-export-solidify-link-text
(org-element-property :value radio-target))
2011-12-09 13:38:36 +00:00
text))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
2012-05-23 14:29:16 +00:00
;;;; Section
(defun org-latex-section (section contents info)
2012-05-23 14:29:16 +00:00
"Transcode a SECTION element from Org to LaTeX.
CONTENTS holds the contents of the section. INFO is a plist
holding contextual information."
contents)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Special Block
(defun org-latex-special-block (special-block contents info)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"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 (org-element-property :type special-block))
(opt (org-export-read-attribute :attr_latex special-block :options))
(caption (org-latex--caption/label-string special-block info))
(caption-above-p (org-latex--caption-above-p special-block info)))
(concat (format "\\begin{%s}%s\n" type (or opt ""))
(and caption-above-p caption)
contents
(and (not caption-above-p) caption)
(format "\\end{%s}" type))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Src Block
(defun org-latex-src-block (src-block contents info)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Transcode a SRC-BLOCK element from Org to LaTeX.
CONTENTS holds the contents of the item. INFO is a plist holding
contextual information."
(when (org-string-nw-p (org-element-property :value src-block))
(let* ((lang (org-element-property :language src-block))
(caption (org-element-property :caption src-block))
(caption-above-p (org-latex--caption-above-p src-block info))
(label (org-element-property :name src-block))
(custom-env (and lang
(cadr (assq (intern lang)
org-latex-custom-lang-environments))))
(num-start (case (org-element-property :number-lines src-block)
(continued (org-export-get-loc src-block info))
(new 0)))
(retain-labels (org-element-property :retain-labels src-block))
(attributes (org-export-read-attribute :attr_latex src-block))
(float (plist-get attributes :float))
(listings (plist-get info :latex-listings)))
(cond
;; Case 1. No source fontification.
((not listings)
(let* ((caption-str (org-latex--caption/label-string src-block info))
(float-env
(cond ((and (not float) (plist-member attributes :float)) "%s")
((string= "multicolumn" float)
(format "\\begin{figure*}[%s]\n%s%%s\n%s\\end{figure*}"
(plist-get info :latex-default-figure-position)
(if caption-above-p caption-str "")
(if caption-above-p "" caption-str)))
((or caption float)
(format "\\begin{figure}[H]\n%%s\n%s\\end{figure}"
caption-str))
(t "%s"))))
(format
float-env
(concat (format "\\begin{verbatim}\n%s\\end{verbatim}"
(org-export-format-code-default src-block info))))))
;; Case 2. Custom environment.
(custom-env
(let ((caption-str (org-latex--caption/label-string src-block info)))
(format "\\begin{%s}\n%s\\end{%s}\n"
custom-env
(concat (and caption-above-p caption-str)
(org-export-format-code-default src-block info)
(and (not caption-above-p) caption-str))
custom-env)))
;; Case 3. Use minted package.
((eq listings 'minted)
(let* ((caption-str (org-latex--caption/label-string src-block info))
(float-env
(cond
((and (not float) (plist-member attributes :float) caption)
(let ((caption
(replace-regexp-in-string
"\\\\caption" "\\captionof{listing}" caption-str
t t)))
(concat (and caption-above-p caption)
"%%s"
(and (not caption-above-p) (concat "\n" caption)))))
((and (not float) (plist-member attributes :float)) "%s")
((string= "multicolumn" float)
(format "\\begin{listing*}\n%s%%s\n%s\\end{listing*}"
(if caption-above-p caption-str "")
(if caption-above-p "" caption-str)))
((or caption float)
(format "\\begin{listing}[H]\n%s%%s\n%s\\end{listing}"
(if caption-above-p caption-str "")
(if caption-above-p "" caption-str)))
(t "%s")))
(options (plist-get info :latex-minted-options))
(body
(format
"\\begin{minted}[%s]{%s}\n%s\\end{minted}"
;; Options.
(concat
(org-latex--make-option-string
(if (or (not num-start) (assoc "linenos" options))
options
(append
`(("linenos")
("firstnumber" ,(number-to-string (1+ num-start))))
options)))
(let ((local-options (plist-get attributes :options)))
(and local-options (concat "," local-options))))
;; Language.
(or (cadr (assq (intern lang)
(plist-get info :latex-minted-langs)))
(downcase lang))
;; Source code.
(let* ((code-info (org-export-unravel-code src-block))
(max-width
(apply 'max
(mapcar 'length
(org-split-string (car code-info)
"\n")))))
(org-export-format-code
(car code-info)
(lambda (loc num ref)
(concat
loc
(when ref
;; Ensure references are flushed to the right,
;; separated with 6 spaces from the widest line
;; of code.
(concat (make-string (+ (- max-width (length loc)) 6)
?\s)
(format "(%s)" ref)))))
nil (and retain-labels (cdr code-info)))))))
;; Return value.
(format float-env body)))
;; Case 4. Use listings package.
(t
(let ((lst-lang
(or (cadr (assq (intern lang)
(plist-get info :latex-listings-langs)))
lang))
(caption-str
(when caption
(let ((main (org-export-get-caption src-block))
(secondary (org-export-get-caption src-block t)))
(if (not secondary)
(format "{%s}" (org-export-data main info))
(format "{[%s]%s}"
(org-export-data secondary info)
(org-export-data main info))))))
(lst-opt (plist-get info :latex-listings-options)))
(concat
;; Options.
(format
"\\lstset{%s}\n"
(concat
(org-latex--make-option-string
(append
lst-opt
(cond
((and (not float) (plist-member attributes :float)) nil)
((string= "multicolumn" float) '(("float" "*")))
((and float (not (assoc "float" lst-opt)))
`(("float" ,(plist-get info :latex-default-figure-position)))))
`(("language" ,lst-lang))
(if label `(("label" ,label)) '(("label" " ")))
(if caption-str `(("caption" ,caption-str)) '(("caption" " ")))
`(("captionpos" ,(if caption-above-p "t" "b")))
(cond ((assoc "numbers" lst-opt) nil)
((not num-start) '(("numbers" "none")))
((zerop num-start) '(("numbers" "left")))
(t `(("firstnumber" ,(number-to-string (1+ num-start)))
("numbers" "left"))))))
(let ((local-options (plist-get attributes :options)))
(and local-options (concat "," local-options)))))
;; Source code.
(format
"\\begin{lstlisting}\n%s\\end{lstlisting}"
(let* ((code-info (org-export-unravel-code src-block))
(max-width
(apply 'max
(mapcar 'length
(org-split-string (car code-info) "\n")))))
(org-export-format-code
(car code-info)
(lambda (loc num ref)
(concat
loc
(when ref
;; Ensure references are flushed to the right,
;; separated with 6 spaces from the widest line of
;; code
(concat (make-string (+ (- max-width (length loc)) 6) ? )
(format "(%s)" ref)))))
nil (and retain-labels (cdr code-info))))))))))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Statistics Cookie
(defun org-latex-statistics-cookie (statistics-cookie contents info)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Transcode a STATISTICS-COOKIE object from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual information."
(replace-regexp-in-string
"%" "\\%" (org-element-property :value statistics-cookie) nil t))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
org-element: Define new objects (bold, code, italic, ...) * contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo. (org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through, org-e-ascii-underline): New functions. (org-e-ascii-emphasis): Remove function. * contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable renamed from `org-e-html-emphasis-alist'. Change value type. (org-e-html-bold, org-e-html-italic, org-e-html-strike-through, org-e-html-underline): New functions. (org-e-html-verbatim): Update function. (org-e-html-emphasis): Remove function. * contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist): Variable renamed from `org-e-latex-emphasis-alist'. Change value type. (org-e-latex-center-block): Fix docstring. (org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code, org-e-latex-italic, org-e-latex-strike-through, org-e-latex-underline): New functions. (org-e-latex-verbatim): Update function. (org-e-latex-emphasis): Remove function. * contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code, org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline): New functions. (org-e-odt-verbatim): Update function. (org-e-odt-center-block): Fix docstring. (org-e-odt-emphasis): Remove function. * contrib/lisp/org-element.el (org-element-bold-parser): (org-element-bold-interpreter, org-element-code-parser, org-element-code-interpreter, org-element-italic-parser, org-element-italic-interpreter, org-element-strike-through-parser, org-element-strike-through-interpreter, org-element-underline-parser, org-element-underline-interpreter): New functions. (org-element-emphasis-parser, org-element-emphasis-interpreter): Remove functions. (org-element-verbatim-parser, org-element-verbatim-interpreter, org-element-text-markup-successor): Update function. (org-element-object-successor-alist): Add associations for new object types. (org-element-recursive-objects): Add `bold', `italic', `strike-through' and `underline' as recursive types. (org-element-object-restrictions): Add restrictions for new recursive object types. * contrib/lisp/org-export.el (org-export-filters-alist): Add filters for new object types. (org-export-with-todo-keywords): Add missing keywords. (org-export-filter-center-block-functions, org-export-filter-drawer-functions, org-export-filter-dynamic-block-functions, org-export-filter-headline-functions, org-export-filter-inlinetask-functions, org-export-filter-plain-list-functions, org-export-filter-item-functions, org-export-filter-comment-functions, org-export-filter-comment-block-functions, org-export-filter-example-block-functions, org-export-filter-export-block-functions, org-export-filter-fixed-width-functions, org-export-filter-footnote-definition-functions, org-export-filter-horizontal-rule-functions, org-export-filter-keyword-functions, org-export-filter-latex-environment-functions, org-export-filter-babel-call-functions, org-export-filter-paragraph-functions, org-export-filter-property-drawer-functions, org-export-filter-quote-section-functions, org-export-filter-quote-block-functions, org-export-filter-section-functions, org-export-filter-special-block-functions, org-export-filter-src-block-functions, org-export-filter-table-functions, org-export-filter-table-cell-functions, org-export-filter-table-row-functions, org-export-filter-verse-block-functions, org-export-filter-entity-functions, org-export-filter-export-snippet-functions, org-export-filter-footnote-reference-functions, org-export-filter-inline-babel-call-functions, org-export-filter-inline-src-block-functions, org-export-filter-latex-fragment-functions, org-export-filter-line-break-functions, org-export-filter-link-functions, org-export-filter-macro-functions, org-export-filter-radio-target-functions, org-export-filter-statistics-cookie-functions, org-export-filter-subscript-functions, org-export-filter-superscript-functions, org-export-filter-target-functions, org-export-filter-time-stamp-functions, org-export-filter-verbatim-functions): Fix docstring. (org-export-filter-bold-functions, org-export-filter-code-functions, org-export-filter-italic-functions, org-export-filter-strike-through-functions, org-export-filter-underline-functions): New variables. (org-export-filter-emphasis-functions): Remove variable. * testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
;;;; Strike-Through
(defun org-latex-strike-through (strike-through contents info)
org-element: Define new objects (bold, code, italic, ...) * contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo. (org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through, org-e-ascii-underline): New functions. (org-e-ascii-emphasis): Remove function. * contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable renamed from `org-e-html-emphasis-alist'. Change value type. (org-e-html-bold, org-e-html-italic, org-e-html-strike-through, org-e-html-underline): New functions. (org-e-html-verbatim): Update function. (org-e-html-emphasis): Remove function. * contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist): Variable renamed from `org-e-latex-emphasis-alist'. Change value type. (org-e-latex-center-block): Fix docstring. (org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code, org-e-latex-italic, org-e-latex-strike-through, org-e-latex-underline): New functions. (org-e-latex-verbatim): Update function. (org-e-latex-emphasis): Remove function. * contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code, org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline): New functions. (org-e-odt-verbatim): Update function. (org-e-odt-center-block): Fix docstring. (org-e-odt-emphasis): Remove function. * contrib/lisp/org-element.el (org-element-bold-parser): (org-element-bold-interpreter, org-element-code-parser, org-element-code-interpreter, org-element-italic-parser, org-element-italic-interpreter, org-element-strike-through-parser, org-element-strike-through-interpreter, org-element-underline-parser, org-element-underline-interpreter): New functions. (org-element-emphasis-parser, org-element-emphasis-interpreter): Remove functions. (org-element-verbatim-parser, org-element-verbatim-interpreter, org-element-text-markup-successor): Update function. (org-element-object-successor-alist): Add associations for new object types. (org-element-recursive-objects): Add `bold', `italic', `strike-through' and `underline' as recursive types. (org-element-object-restrictions): Add restrictions for new recursive object types. * contrib/lisp/org-export.el (org-export-filters-alist): Add filters for new object types. (org-export-with-todo-keywords): Add missing keywords. (org-export-filter-center-block-functions, org-export-filter-drawer-functions, org-export-filter-dynamic-block-functions, org-export-filter-headline-functions, org-export-filter-inlinetask-functions, org-export-filter-plain-list-functions, org-export-filter-item-functions, org-export-filter-comment-functions, org-export-filter-comment-block-functions, org-export-filter-example-block-functions, org-export-filter-export-block-functions, org-export-filter-fixed-width-functions, org-export-filter-footnote-definition-functions, org-export-filter-horizontal-rule-functions, org-export-filter-keyword-functions, org-export-filter-latex-environment-functions, org-export-filter-babel-call-functions, org-export-filter-paragraph-functions, org-export-filter-property-drawer-functions, org-export-filter-quote-section-functions, org-export-filter-quote-block-functions, org-export-filter-section-functions, org-export-filter-special-block-functions, org-export-filter-src-block-functions, org-export-filter-table-functions, org-export-filter-table-cell-functions, org-export-filter-table-row-functions, org-export-filter-verse-block-functions, org-export-filter-entity-functions, org-export-filter-export-snippet-functions, org-export-filter-footnote-reference-functions, org-export-filter-inline-babel-call-functions, org-export-filter-inline-src-block-functions, org-export-filter-latex-fragment-functions, org-export-filter-line-break-functions, org-export-filter-link-functions, org-export-filter-macro-functions, org-export-filter-radio-target-functions, org-export-filter-statistics-cookie-functions, org-export-filter-subscript-functions, org-export-filter-superscript-functions, org-export-filter-target-functions, org-export-filter-time-stamp-functions, org-export-filter-verbatim-functions): Fix docstring. (org-export-filter-bold-functions, org-export-filter-code-functions, org-export-filter-italic-functions, org-export-filter-strike-through-functions, org-export-filter-underline-functions): New variables. (org-export-filter-emphasis-functions): Remove variable. * testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
"Transcode STRIKE-THROUGH from Org to LaTeX.
CONTENTS is the text with strike-through markup. INFO is a plist
holding contextual information."
(org-latex--text-markup contents 'strike-through info))
org-element: Define new objects (bold, code, italic, ...) * contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo. (org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through, org-e-ascii-underline): New functions. (org-e-ascii-emphasis): Remove function. * contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable renamed from `org-e-html-emphasis-alist'. Change value type. (org-e-html-bold, org-e-html-italic, org-e-html-strike-through, org-e-html-underline): New functions. (org-e-html-verbatim): Update function. (org-e-html-emphasis): Remove function. * contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist): Variable renamed from `org-e-latex-emphasis-alist'. Change value type. (org-e-latex-center-block): Fix docstring. (org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code, org-e-latex-italic, org-e-latex-strike-through, org-e-latex-underline): New functions. (org-e-latex-verbatim): Update function. (org-e-latex-emphasis): Remove function. * contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code, org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline): New functions. (org-e-odt-verbatim): Update function. (org-e-odt-center-block): Fix docstring. (org-e-odt-emphasis): Remove function. * contrib/lisp/org-element.el (org-element-bold-parser): (org-element-bold-interpreter, org-element-code-parser, org-element-code-interpreter, org-element-italic-parser, org-element-italic-interpreter, org-element-strike-through-parser, org-element-strike-through-interpreter, org-element-underline-parser, org-element-underline-interpreter): New functions. (org-element-emphasis-parser, org-element-emphasis-interpreter): Remove functions. (org-element-verbatim-parser, org-element-verbatim-interpreter, org-element-text-markup-successor): Update function. (org-element-object-successor-alist): Add associations for new object types. (org-element-recursive-objects): Add `bold', `italic', `strike-through' and `underline' as recursive types. (org-element-object-restrictions): Add restrictions for new recursive object types. * contrib/lisp/org-export.el (org-export-filters-alist): Add filters for new object types. (org-export-with-todo-keywords): Add missing keywords. (org-export-filter-center-block-functions, org-export-filter-drawer-functions, org-export-filter-dynamic-block-functions, org-export-filter-headline-functions, org-export-filter-inlinetask-functions, org-export-filter-plain-list-functions, org-export-filter-item-functions, org-export-filter-comment-functions, org-export-filter-comment-block-functions, org-export-filter-example-block-functions, org-export-filter-export-block-functions, org-export-filter-fixed-width-functions, org-export-filter-footnote-definition-functions, org-export-filter-horizontal-rule-functions, org-export-filter-keyword-functions, org-export-filter-latex-environment-functions, org-export-filter-babel-call-functions, org-export-filter-paragraph-functions, org-export-filter-property-drawer-functions, org-export-filter-quote-section-functions, org-export-filter-quote-block-functions, org-export-filter-section-functions, org-export-filter-special-block-functions, org-export-filter-src-block-functions, org-export-filter-table-functions, org-export-filter-table-cell-functions, org-export-filter-table-row-functions, org-export-filter-verse-block-functions, org-export-filter-entity-functions, org-export-filter-export-snippet-functions, org-export-filter-footnote-reference-functions, org-export-filter-inline-babel-call-functions, org-export-filter-inline-src-block-functions, org-export-filter-latex-fragment-functions, org-export-filter-line-break-functions, org-export-filter-link-functions, org-export-filter-macro-functions, org-export-filter-radio-target-functions, org-export-filter-statistics-cookie-functions, org-export-filter-subscript-functions, org-export-filter-superscript-functions, org-export-filter-target-functions, org-export-filter-time-stamp-functions, org-export-filter-verbatim-functions): Fix docstring. (org-export-filter-bold-functions, org-export-filter-code-functions, org-export-filter-italic-functions, org-export-filter-strike-through-functions, org-export-filter-underline-functions): New variables. (org-export-filter-emphasis-functions): Remove variable. * testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Subscript
(defun org-latex--script-size (object info)
"Transcode a subscript or superscript object.
OBJECT is an Org object. INFO is a plist used as a communication
channel."
(let ((type (org-element-type object))
(output ""))
(org-element-map (org-element-contents object)
(cons 'plain-text org-element-all-objects)
(lambda (obj)
(case (org-element-type obj)
((entity latex-fragment)
(let ((data (org-trim (org-export-data obj info))))
(string-match
"\\`\\(?:\\\\[([]\\|\\$+\\)?\\(.*?\\)\\(?:\\\\[])]\\|\\$+\\)?\\'"
data)
(setq output
(concat output
(match-string 1 data)
(let ((blank (org-element-property :post-blank obj)))
(and blank (> blank 0) "\\ "))))))
(plain-text
(setq output
(format "%s\\text{%s}" output (org-export-data obj info))))
(otherwise
(setq output
(concat output
(org-export-data obj info)
(let ((blank (org-element-property :post-blank obj)))
(and blank (> blank 0) "\\ ")))))))
info nil org-element-recursive-objects)
;; Result. Do not wrap into curly brackets if OUTPUT is a single
;; character.
(concat (if (eq (org-element-type object) 'subscript) "_" "^")
(and (> (length output) 1) "{")
output
(and (> (length output) 1) "}"))))
(defun org-latex-subscript (subscript contents info)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Transcode a SUBSCRIPT object from Org to LaTeX.
CONTENTS is the contents of the object. INFO is a plist holding
contextual information."
(org-latex--script-size subscript info))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Superscript
(defun org-latex-superscript (superscript contents info)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Transcode a SUPERSCRIPT object from Org to LaTeX.
CONTENTS is the contents of the object. INFO is a plist holding
contextual information."
(org-latex--script-size superscript info))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Table
;;
;; `org-latex-table' is the entry point for table transcoding. It
;; takes care of tables with a "verbatim" mode. Otherwise, it
;; delegates the job to either `org-latex--table.el-table',
;; `org-latex--org-table' or `org-latex--math-table' functions,
;; depending of the type of the table and the mode requested.
;;
;; `org-latex--align-string' is a subroutine used to build alignment
;; string for Org tables.
(defun org-latex-table (table contents info)
"Transcode a TABLE element from Org to LaTeX.
CONTENTS is the contents of the table. INFO is a plist holding
contextual information."
(if (eq (org-element-property :type table) 'table.el)
;; "table.el" table. Convert it using appropriate tools.
(org-latex--table.el-table table info)
(let ((type (or (org-export-read-attribute :attr_latex table :mode)
(plist-get info :latex-default-table-mode))))
(cond
;; Case 1: Verbatim table.
((string= type "verbatim")
(format "\\begin{verbatim}\n%s\n\\end{verbatim}"
;; Re-create table, without affiliated keywords.
(org-trim (org-element-interpret-data
`(table nil ,@(org-element-contents table))))))
;; Case 2: Matrix.
((or (string= type "math") (string= type "inline-math"))
(org-latex--math-table table info))
;; Case 3: Standard table.
(t (concat (org-latex--org-table table contents info)
;; When there are footnote references within the
;; table, insert their definition just after it.
(org-latex--delayed-footnotes-definitions table info)))))))
(defun org-latex--align-string (table info)
"Return an appropriate LaTeX alignment string.
TABLE is the considered table. INFO is a plist used as
a communication channel."
(or (org-export-read-attribute :attr_latex table :align)
(let (align)
;; Extract column groups and alignment from first (non-rule)
;; row.
(org-element-map
(org-element-map table 'table-row
(lambda (row)
(and (eq (org-element-property :type row) 'standard) row))
info 'first-match)
'table-cell
(lambda (cell)
(let ((borders (org-export-table-cell-borders cell info)))
;; Check left border for the first cell only.
(when (and (memq 'left borders) (not align))
(push "|" align))
(push (case (org-export-table-cell-alignment cell info)
(left "l")
(right "r")
(center "c"))
align)
(when (memq 'right borders) (push "|" align))))
info)
(apply 'concat (nreverse align)))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(defun org-latex--org-table (table contents info)
"Return appropriate LaTeX code for an Org table.
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
TABLE is the table type element to transcode. CONTENTS is its
contents, as a string. INFO is a plist used as a communication
channel.
This function assumes TABLE has `org' as its `:type' property and
`table' as its `:mode' attribute."
(let* ((caption (org-latex--caption/label-string table info))
(attr (org-export-read-attribute :attr_latex table))
2011-12-09 13:38:36 +00:00
;; Determine alignment string.
(alignment (org-latex--align-string table info))
2011-12-09 13:38:36 +00:00
;; Determine environment for the table: longtable, tabular...
(table-env (or (plist-get attr :environment)
(plist-get info :latex-default-table-environment)))
;; If table is a float, determine environment: table, table*
;; or sidewaystable.
(float-env (unless (member table-env '("longtable" "longtabu"))
(let ((float (plist-get attr :float)))
(cond
((and (not float) (plist-member attr :float)) nil)
((or (string= float "sidewaystable")
(string= float "sideways")) "sidewaystable")
((string= float "multicolumn") "table*")
((or float
(org-element-property :caption table)
(org-string-nw-p (plist-get attr :caption)))
"table")))))
2011-12-09 13:38:36 +00:00
;; Extract others display options.
(fontsize (let ((font (plist-get attr :font)))
(and font (concat font "\n"))))
;; "tabular" environment doesn't allow to define a width.
(width (and (not (equal table-env "tabular")) (plist-get attr :width)))
(spreadp (plist-get attr :spread))
(placement
(or (plist-get attr :placement)
(format "[%s]" (plist-get info :latex-default-figure-position))))
(centerp (if (plist-member attr :center) (plist-get attr :center)
(plist-get info :latex-tables-centered)))
(caption-above-p (org-latex--caption-above-p table info)))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;; Prepare the final format string for the table.
(cond
;; Longtable.
((equal "longtable" table-env)
(concat (and fontsize (concat "{" fontsize))
(format "\\begin{longtable}{%s}\n" alignment)
(and caption-above-p
(org-string-nw-p caption)
(concat caption "\\\\\n"))
contents
(and (not caption-above-p)
(org-string-nw-p caption)
(concat caption "\\\\\n"))
"\\end{longtable}\n"
(and fontsize "}")))
;; Longtabu
((equal "longtabu" table-env)
(concat (and fontsize (concat "{" fontsize))
(format "\\begin{longtabu}%s{%s}\n"
(if width
(format " %s %s "
(if spreadp "spread" "to") width) "")
alignment)
(and caption-above-p
(org-string-nw-p caption)
(concat caption "\\\\\n"))
contents
(and (not caption-above-p)
(org-string-nw-p caption)
(concat caption "\\\\\n"))
"\\end{longtabu}\n"
(and fontsize "}")))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;; Others.
(t (concat (cond
(float-env
(concat (format "\\begin{%s}%s\n" float-env placement)
(if caption-above-p caption "")
(when centerp "\\centering\n")
fontsize))
(centerp (concat "\\begin{center}\n" fontsize))
(fontsize (concat "{" fontsize)))
(cond ((equal "tabu" table-env)
(format "\\begin{tabu}%s{%s}\n%s\\end{tabu}"
(if width (format
(if spreadp " spread %s " " to %s ")
width) "")
alignment
contents))
(t (format "\\begin{%s}%s{%s}\n%s\\end{%s}"
table-env
(if width (format "{%s}" width) "")
alignment
contents
table-env)))
(cond
(float-env
(concat (if caption-above-p "" caption)
(format "\n\\end{%s}" float-env)))
(centerp "\n\\end{center}")
(fontsize "}")))))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(defun org-latex--table.el-table (table info)
"Return appropriate LaTeX code for a table.el table.
TABLE is the table type element to transcode. INFO is a plist
used as a communication channel.
This function assumes TABLE has `table.el' as its `:type'
property."
(require 'table)
;; Ensure "*org-export-table*" buffer is empty.
(with-current-buffer (get-buffer-create "*org-export-table*")
(erase-buffer))
(let ((output (with-temp-buffer
(insert (org-element-property :value table))
(goto-char 1)
(re-search-forward "^[ \t]*|[^|]" nil t)
(table-generate-source 'latex "*org-export-table*")
(with-current-buffer "*org-export-table*"
(org-trim (buffer-string))))))
(kill-buffer (get-buffer "*org-export-table*"))
;; Remove left out comments.
(while (string-match "^%.*\n" output)
(setq output (replace-match "" t t output)))
(let ((attr (org-export-read-attribute :attr_latex table)))
(when (plist-get attr :rmlines)
;; When the "rmlines" attribute is provided, remove all hlines
;; but the the one separating heading from the table body.
(let ((n 0) (pos 0))
(while (and (< (length output) pos)
(setq pos (string-match "^\\\\hline\n?" output pos)))
(incf n)
(unless (= n 2) (setq output (replace-match "" nil nil output))))))
(let ((centerp (if (plist-member attr :center) (plist-get attr :center)
(plist-get info :latex-tables-centered))))
(if (not centerp) output
(format "\\begin{center}\n%s\n\\end{center}" output))))))
(defun org-latex--math-table (table info)
"Return appropriate LaTeX code for a matrix.
TABLE is the table type element to transcode. INFO is a plist
used as a communication channel.
This function assumes TABLE has `org' as its `:type' property and
`inline-math' or `math' as its `:mode' attribute."
(let* ((attr (org-export-read-attribute :attr_latex table))
(env (or (plist-get attr :environment)
(plist-get info :latex-default-table-environment)))
(contents
(mapconcat
(lambda (row)
;; Ignore horizontal rules.
(when (eq (org-element-property :type row) 'standard)
;; Return each cell unmodified.
(concat
(mapconcat
(lambda (cell)
(substring (org-element-interpret-data cell) 0 -1))
(org-element-map row 'table-cell #'identity info) "&")
(or (cdr (assoc env org-latex-table-matrix-macros)) "\\\\")
"\n")))
(org-element-map table 'table-row #'identity info) "")))
(concat
;; Prefix.
(plist-get attr :math-prefix)
;; Environment. Also treat special cases.
(cond ((member env '("array" "tabular"))
(let ((align (make-string
(cdr (org-export-table-dimensions table info)) ?c)))
(format "\\begin{%s}{%s}\n%s\\end{%s}" env align contents env)))
((assoc env org-latex-table-matrix-macros)
(format "\\%s%s{\n%s}"
env
(or (plist-get attr :math-arguments) "")
contents))
(t (format "\\begin{%s}\n%s\\end{%s}" env contents env)))
;; Suffix.
(plist-get attr :math-suffix))))
;;;; Table Cell
(defun org-latex-table-cell (table-cell contents info)
"Transcode a TABLE-CELL element from Org to LaTeX.
CONTENTS is the cell contents. INFO is a plist used as
a communication channel."
(concat
(let ((scientific-format (plist-get info :latex-table-scientific-notation)))
(if (and contents
scientific-format
(string-match orgtbl-exp-regexp contents))
;; Use appropriate format string for scientific
;; notation.
(format scientific-format
(match-string 1 contents)
(match-string 2 contents))
contents))
(when (org-export-get-next-element table-cell info) " & ")))
;;;; Table Row
(defun org-latex-table-row (table-row contents info)
"Transcode a TABLE-ROW element from Org to LaTeX.
CONTENTS is the contents of the row. INFO is a plist used as
a communication channel."
(let* ((attr (org-export-read-attribute :attr_latex
(org-export-get-parent table-row)))
(booktabsp (if (plist-member attr :booktabs) (plist-get attr :booktabs)
(plist-get info :latex-tables-booktabs)))
(longtablep
(member (or (plist-get attr :environment)
(plist-get info :latex-default-table-environment))
'("longtable" "longtabu"))))
(if (eq (org-element-property :type table-row) 'rule)
(cond
((not booktabsp) "\\hline")
((not (org-export-get-previous-element table-row info)) "\\toprule")
((not (org-export-get-next-element table-row info)) "\\bottomrule")
((and longtablep
(org-export-table-row-ends-header-p
(org-export-get-previous-element table-row info) info))
"")
(t "\\midrule"))
(concat
;; When BOOKTABS are activated enforce top-rule even when no
;; hline was specifically marked.
(and booktabsp (not (org-export-get-previous-element table-row info))
"\\toprule\n")
contents "\\\\\n"
(cond
;; Special case for long tables. Define header and footers.
((and longtablep (org-export-table-row-ends-header-p table-row info))
(let ((columns (cdr (org-export-table-dimensions
(org-export-get-parent-table table-row) info))))
(format "%s
\\endfirsthead
\\multicolumn{%d}{l}{%s} \\\\
%s
%s \\\\\n
%s
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
\\endhead
%s\\multicolumn{%d}{r}{%s} \\\\
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
\\endfoot
\\endlastfoot"
(if booktabsp "\\midrule" "\\hline")
columns
(org-latex--translate "Continued from previous page" info)
(cond
((not (org-export-table-row-starts-header-p table-row info))
"")
(booktabsp "\\toprule\n")
(t "\\hline\n"))
contents
(if booktabsp "\\midrule" "\\hline")
(if booktabsp "\\midrule" "\\hline")
columns
(org-latex--translate "Continued on next page" info))))
;; When BOOKTABS are activated enforce bottom rule even when
;; no hline was specifically marked.
((and booktabsp (not (org-export-get-next-element table-row info)))
"\\bottomrule"))))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Target
(defun org-latex-target (target contents info)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Transcode a TARGET object from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual
information."
(format "\\label{%s}"
(org-export-solidify-link-text (org-element-property :value target))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Timestamp
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
(defun org-latex-timestamp (timestamp contents info)
"Transcode a TIMESTAMP object from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual
information."
(let ((value (org-latex-plain-text (org-timestamp-translate timestamp) info)))
(format
(plist-get info
(case (org-element-property :type timestamp)
((active active-range) :latex-active-timestamp-format)
((inactive inactive-range) :latex-inactive-timestamp-format)
(otherwise :latex-diary-timestamp-format)))
value)))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
org-element: Define new objects (bold, code, italic, ...) * contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo. (org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through, org-e-ascii-underline): New functions. (org-e-ascii-emphasis): Remove function. * contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable renamed from `org-e-html-emphasis-alist'. Change value type. (org-e-html-bold, org-e-html-italic, org-e-html-strike-through, org-e-html-underline): New functions. (org-e-html-verbatim): Update function. (org-e-html-emphasis): Remove function. * contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist): Variable renamed from `org-e-latex-emphasis-alist'. Change value type. (org-e-latex-center-block): Fix docstring. (org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code, org-e-latex-italic, org-e-latex-strike-through, org-e-latex-underline): New functions. (org-e-latex-verbatim): Update function. (org-e-latex-emphasis): Remove function. * contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code, org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline): New functions. (org-e-odt-verbatim): Update function. (org-e-odt-center-block): Fix docstring. (org-e-odt-emphasis): Remove function. * contrib/lisp/org-element.el (org-element-bold-parser): (org-element-bold-interpreter, org-element-code-parser, org-element-code-interpreter, org-element-italic-parser, org-element-italic-interpreter, org-element-strike-through-parser, org-element-strike-through-interpreter, org-element-underline-parser, org-element-underline-interpreter): New functions. (org-element-emphasis-parser, org-element-emphasis-interpreter): Remove functions. (org-element-verbatim-parser, org-element-verbatim-interpreter, org-element-text-markup-successor): Update function. (org-element-object-successor-alist): Add associations for new object types. (org-element-recursive-objects): Add `bold', `italic', `strike-through' and `underline' as recursive types. (org-element-object-restrictions): Add restrictions for new recursive object types. * contrib/lisp/org-export.el (org-export-filters-alist): Add filters for new object types. (org-export-with-todo-keywords): Add missing keywords. (org-export-filter-center-block-functions, org-export-filter-drawer-functions, org-export-filter-dynamic-block-functions, org-export-filter-headline-functions, org-export-filter-inlinetask-functions, org-export-filter-plain-list-functions, org-export-filter-item-functions, org-export-filter-comment-functions, org-export-filter-comment-block-functions, org-export-filter-example-block-functions, org-export-filter-export-block-functions, org-export-filter-fixed-width-functions, org-export-filter-footnote-definition-functions, org-export-filter-horizontal-rule-functions, org-export-filter-keyword-functions, org-export-filter-latex-environment-functions, org-export-filter-babel-call-functions, org-export-filter-paragraph-functions, org-export-filter-property-drawer-functions, org-export-filter-quote-section-functions, org-export-filter-quote-block-functions, org-export-filter-section-functions, org-export-filter-special-block-functions, org-export-filter-src-block-functions, org-export-filter-table-functions, org-export-filter-table-cell-functions, org-export-filter-table-row-functions, org-export-filter-verse-block-functions, org-export-filter-entity-functions, org-export-filter-export-snippet-functions, org-export-filter-footnote-reference-functions, org-export-filter-inline-babel-call-functions, org-export-filter-inline-src-block-functions, org-export-filter-latex-fragment-functions, org-export-filter-line-break-functions, org-export-filter-link-functions, org-export-filter-macro-functions, org-export-filter-radio-target-functions, org-export-filter-statistics-cookie-functions, org-export-filter-subscript-functions, org-export-filter-superscript-functions, org-export-filter-target-functions, org-export-filter-time-stamp-functions, org-export-filter-verbatim-functions): Fix docstring. (org-export-filter-bold-functions, org-export-filter-code-functions, org-export-filter-italic-functions, org-export-filter-strike-through-functions, org-export-filter-underline-functions): New variables. (org-export-filter-emphasis-functions): Remove variable. * testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
;;;; Underline
(defun org-latex-underline (underline contents info)
org-element: Define new objects (bold, code, italic, ...) * contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo. (org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through, org-e-ascii-underline): New functions. (org-e-ascii-emphasis): Remove function. * contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable renamed from `org-e-html-emphasis-alist'. Change value type. (org-e-html-bold, org-e-html-italic, org-e-html-strike-through, org-e-html-underline): New functions. (org-e-html-verbatim): Update function. (org-e-html-emphasis): Remove function. * contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist): Variable renamed from `org-e-latex-emphasis-alist'. Change value type. (org-e-latex-center-block): Fix docstring. (org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code, org-e-latex-italic, org-e-latex-strike-through, org-e-latex-underline): New functions. (org-e-latex-verbatim): Update function. (org-e-latex-emphasis): Remove function. * contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code, org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline): New functions. (org-e-odt-verbatim): Update function. (org-e-odt-center-block): Fix docstring. (org-e-odt-emphasis): Remove function. * contrib/lisp/org-element.el (org-element-bold-parser): (org-element-bold-interpreter, org-element-code-parser, org-element-code-interpreter, org-element-italic-parser, org-element-italic-interpreter, org-element-strike-through-parser, org-element-strike-through-interpreter, org-element-underline-parser, org-element-underline-interpreter): New functions. (org-element-emphasis-parser, org-element-emphasis-interpreter): Remove functions. (org-element-verbatim-parser, org-element-verbatim-interpreter, org-element-text-markup-successor): Update function. (org-element-object-successor-alist): Add associations for new object types. (org-element-recursive-objects): Add `bold', `italic', `strike-through' and `underline' as recursive types. (org-element-object-restrictions): Add restrictions for new recursive object types. * contrib/lisp/org-export.el (org-export-filters-alist): Add filters for new object types. (org-export-with-todo-keywords): Add missing keywords. (org-export-filter-center-block-functions, org-export-filter-drawer-functions, org-export-filter-dynamic-block-functions, org-export-filter-headline-functions, org-export-filter-inlinetask-functions, org-export-filter-plain-list-functions, org-export-filter-item-functions, org-export-filter-comment-functions, org-export-filter-comment-block-functions, org-export-filter-example-block-functions, org-export-filter-export-block-functions, org-export-filter-fixed-width-functions, org-export-filter-footnote-definition-functions, org-export-filter-horizontal-rule-functions, org-export-filter-keyword-functions, org-export-filter-latex-environment-functions, org-export-filter-babel-call-functions, org-export-filter-paragraph-functions, org-export-filter-property-drawer-functions, org-export-filter-quote-section-functions, org-export-filter-quote-block-functions, org-export-filter-section-functions, org-export-filter-special-block-functions, org-export-filter-src-block-functions, org-export-filter-table-functions, org-export-filter-table-cell-functions, org-export-filter-table-row-functions, org-export-filter-verse-block-functions, org-export-filter-entity-functions, org-export-filter-export-snippet-functions, org-export-filter-footnote-reference-functions, org-export-filter-inline-babel-call-functions, org-export-filter-inline-src-block-functions, org-export-filter-latex-fragment-functions, org-export-filter-line-break-functions, org-export-filter-link-functions, org-export-filter-macro-functions, org-export-filter-radio-target-functions, org-export-filter-statistics-cookie-functions, org-export-filter-subscript-functions, org-export-filter-superscript-functions, org-export-filter-target-functions, org-export-filter-time-stamp-functions, org-export-filter-verbatim-functions): Fix docstring. (org-export-filter-bold-functions, org-export-filter-code-functions, org-export-filter-italic-functions, org-export-filter-strike-through-functions, org-export-filter-underline-functions): New variables. (org-export-filter-emphasis-functions): Remove variable. * testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
"Transcode UNDERLINE from Org to LaTeX.
CONTENTS is the text with underline markup. INFO is a plist
holding contextual information."
(org-latex--text-markup contents 'underline info))
org-element: Define new objects (bold, code, italic, ...) * contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo. (org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through, org-e-ascii-underline): New functions. (org-e-ascii-emphasis): Remove function. * contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable renamed from `org-e-html-emphasis-alist'. Change value type. (org-e-html-bold, org-e-html-italic, org-e-html-strike-through, org-e-html-underline): New functions. (org-e-html-verbatim): Update function. (org-e-html-emphasis): Remove function. * contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist): Variable renamed from `org-e-latex-emphasis-alist'. Change value type. (org-e-latex-center-block): Fix docstring. (org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code, org-e-latex-italic, org-e-latex-strike-through, org-e-latex-underline): New functions. (org-e-latex-verbatim): Update function. (org-e-latex-emphasis): Remove function. * contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code, org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline): New functions. (org-e-odt-verbatim): Update function. (org-e-odt-center-block): Fix docstring. (org-e-odt-emphasis): Remove function. * contrib/lisp/org-element.el (org-element-bold-parser): (org-element-bold-interpreter, org-element-code-parser, org-element-code-interpreter, org-element-italic-parser, org-element-italic-interpreter, org-element-strike-through-parser, org-element-strike-through-interpreter, org-element-underline-parser, org-element-underline-interpreter): New functions. (org-element-emphasis-parser, org-element-emphasis-interpreter): Remove functions. (org-element-verbatim-parser, org-element-verbatim-interpreter, org-element-text-markup-successor): Update function. (org-element-object-successor-alist): Add associations for new object types. (org-element-recursive-objects): Add `bold', `italic', `strike-through' and `underline' as recursive types. (org-element-object-restrictions): Add restrictions for new recursive object types. * contrib/lisp/org-export.el (org-export-filters-alist): Add filters for new object types. (org-export-with-todo-keywords): Add missing keywords. (org-export-filter-center-block-functions, org-export-filter-drawer-functions, org-export-filter-dynamic-block-functions, org-export-filter-headline-functions, org-export-filter-inlinetask-functions, org-export-filter-plain-list-functions, org-export-filter-item-functions, org-export-filter-comment-functions, org-export-filter-comment-block-functions, org-export-filter-example-block-functions, org-export-filter-export-block-functions, org-export-filter-fixed-width-functions, org-export-filter-footnote-definition-functions, org-export-filter-horizontal-rule-functions, org-export-filter-keyword-functions, org-export-filter-latex-environment-functions, org-export-filter-babel-call-functions, org-export-filter-paragraph-functions, org-export-filter-property-drawer-functions, org-export-filter-quote-section-functions, org-export-filter-quote-block-functions, org-export-filter-section-functions, org-export-filter-special-block-functions, org-export-filter-src-block-functions, org-export-filter-table-functions, org-export-filter-table-cell-functions, org-export-filter-table-row-functions, org-export-filter-verse-block-functions, org-export-filter-entity-functions, org-export-filter-export-snippet-functions, org-export-filter-footnote-reference-functions, org-export-filter-inline-babel-call-functions, org-export-filter-inline-src-block-functions, org-export-filter-latex-fragment-functions, org-export-filter-line-break-functions, org-export-filter-link-functions, org-export-filter-macro-functions, org-export-filter-radio-target-functions, org-export-filter-statistics-cookie-functions, org-export-filter-subscript-functions, org-export-filter-superscript-functions, org-export-filter-target-functions, org-export-filter-time-stamp-functions, org-export-filter-verbatim-functions): Fix docstring. (org-export-filter-bold-functions, org-export-filter-code-functions, org-export-filter-italic-functions, org-export-filter-strike-through-functions, org-export-filter-underline-functions): New variables. (org-export-filter-emphasis-functions): Remove variable. * testing/lisp/test-org-element.el: Add tests.
2012-04-28 16:00:50 +00:00
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Verbatim
(defun org-latex-verbatim (verbatim contents info)
"Transcode a VERBATIM object from Org to LaTeX.
CONTENTS is nil. INFO is a plist used as a communication
channel."
(org-latex--text-markup
(org-element-property :value verbatim) 'verbatim info))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;;; Verse Block
(defun org-latex-verse-block (verse-block contents info)
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
"Transcode a VERSE-BLOCK element from Org to LaTeX.
CONTENTS is verse block contents. INFO is a plist holding
contextual information."
(org-latex--wrap-label
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
verse-block
;; In a verse environment, add a line break to each newline
;; character and change each white space at beginning of a line
;; into a space of 1 em. Also change each blank line with
;; a vertical space of 1 em.
(format "\\begin{verse}\n%s\\end{verse}"
(replace-regexp-in-string
"^[ \t]+" (lambda (m) (format "\\hspace*{%dem}" (length m)))
(replace-regexp-in-string
"^[ \t]*\\\\\\\\$" "\\vspace*{1em}"
(replace-regexp-in-string
"\\([ \t]*\\\\\\\\\\)?[ \t]*\n" "\\\\\n"
contents nil t) nil t) nil t))))
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter * EXPERIMENTAL/org-latex.el (org-latex-option-alist, org-latex-default-class, org-latex-classes org-latex-inputenc-alist, org-latex-date-format, org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist, org-latex-footnote-separator, org-latex-active-timestamp-format, org-latex-inactive-timestamp-format, org-latex-diary-timestamp-format, org-latex-image-default-option, org-latex-default-figure-position, org-latex-inline-image-extensions, org-latex-default-table-environment, org-latex-tables-centered, org-latex-tables-verbatim, org-latex-table-caption-above, org-latex-format-drawer-function, org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs, org-latex-listings-options, org-latex-minted-langs, org-latex-minted-options, org-latex-quotes, org-latex-custom-lang-environments): New variables. (org-latex--caption/label-string, org-latex--guess-inputenc, org-latex--find-verb-separator, org-latex--make-option-string, org-latex--quotation-marks, org-latex--wrap-label, org-latex-template, org-latex-center-block, org-latex-drawer, org-latex-dynamic-block, org-latex-emphasis, org-latex-entity, org-latex-example-block, org-latex-export-snippet, org-latex-export-block, org-latex-fixed-width, org-latex-footnote-reference, org-latex-headline, org-latex-horizontal-rule, org-latex-inline-src-block, org-latex-inlinetask, org-latex-item, org-latex-keyword, org-latex-latex-environment, org-latex-latex-fragment, org-latex-line-break, org-latex-link--inline-image, org-latex-link, org-latex-macro, org-latex-paragraph, org-latex-plain-list, org-latex-plain-text, org-latex-property-drawer, org-latex-quote-block, org-latex-quote-section, org-latex-radio-target, org-latex-special-block, org-latex-src-block, org-latex-statistics-cookie, org-latex-subscript, org-latex-superscript, org-latex-table--format-string, org-latex-table--align-string, org-latex-table, org-latex-target, org-latex-time-stamp, org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 22:36:51 +00:00
;;; End-user functions
;;;###autoload
(defun org-latex-export-as-latex
(&optional async subtreep visible-only body-only ext-plist)
"Export current buffer as a LaTeX buffer.
If narrowing is active in the current buffer, only export its
narrowed part.
If a region is active, export that region.
A non-nil optional argument ASYNC means the process should happen
asynchronously. The resulting buffer should be accessible
through the `org-export-stack' interface.
When optional argument SUBTREEP is non-nil, export the sub-tree
at point, extracting information from the headline properties
first.
When optional argument VISIBLE-ONLY is non-nil, don't export
contents of hidden elements.
When optional argument BODY-ONLY is non-nil, only write code
between \"\\begin{document}\" and \"\\end{document}\".
EXT-PLIST, when provided, is a property list with external
parameters overriding Org default settings, but still inferior to
file-local settings.
Export is done in a buffer named \"*Org LATEX Export*\", which
will be displayed when `org-export-show-temporary-export-buffer'
is non-nil."
(interactive)
Export back-ends: Apply changes to export functions * contrib/lisp/ox-confluence.el (org-confluence-export-as-confluence): * contrib/lisp/ox-deck.el (org-deck-export-as-html, org-deck-export-to-html): * contrib/lisp/ox-freemind.el (org-freemind-export-to-freemind): * contrib/lisp/ox-groff.el (org-groff-export-to-groff, org-groff-export-to-pdf): * contrib/lisp/ox-koma-letter.el (org-koma-letter-export-as-latex, org-koma-letter-export-to-latex, org-koma-letter-export-to-pdf): * contrib/lisp/ox-rss.el (org-rss-export-as-rss, org-rss-export-to-rss): * contrib/lisp/ox-s5.el (org-s5-export-as-html, org-s5-export-to-html): * contrib/lisp/ox-taskjuggler.el (org-taskjuggler-export): * lisp/ob-haskell.el: * lisp/ox-ascii.el (org-ascii-export-as-ascii, org-ascii-export-to-ascii): * lisp/ox-beamer.el (org-beamer-export-as-latex, org-beamer-export-to-latex, org-beamer-export-to-pdf): * lisp/ox-html.el (org-html-export-as-html, org-html-export-to-html): * lisp/ox-icalendar.el (org-icalendar-export-to-ics): * lisp/ox-latex.el (org-latex-export-as-latex, org-latex-export-to-pdf): * lisp/ox-man.el (org-man-export-to-man, org-man-export-to-pdf): * lisp/ox-md.el (org-md-export-as-markdown, org-md-export-to-markdown): * lisp/ox-odt.el (org-odt-export-to-odt): * lisp/ox-org.el (org-org-export-as-org, org-org-export-to-org): * lisp/ox-publish.el (org-publish-org-to): * lisp/ox-texinfo.el (org-texinfo-export-to-texinfo, org-texinfo-export-to-info): * testing/lisp/test-ob-exp.el (test-ob-exp/org-babel-exp-src-blocks/w-no-file):
2013-08-07 08:35:42 +00:00
(org-export-to-buffer 'latex "*Org LATEX Export*"
async subtreep visible-only body-only ext-plist (lambda () (LaTeX-mode))))
;;;###autoload
(defun org-latex-convert-region-to-latex ()
"Assume the current region has org-mode syntax, and convert it to LaTeX.
This can be used in any buffer. For example, you can write an
itemized list in org-mode syntax in an LaTeX buffer and use this
command to convert it."
(interactive)
(org-export-replace-region-by 'latex))
;;;###autoload
(defun org-latex-export-to-latex
(&optional async subtreep visible-only body-only ext-plist)
"Export current buffer to a LaTeX file.
If narrowing is active in the current buffer, only export its
narrowed part.
If a region is active, export that region.
A non-nil optional argument ASYNC means the process should happen
asynchronously. The resulting file should be accessible through
the `org-export-stack' interface.
When optional argument SUBTREEP is non-nil, export the sub-tree
at point, extracting information from the headline properties
first.
When optional argument VISIBLE-ONLY is non-nil, don't export
contents of hidden elements.
When optional argument BODY-ONLY is non-nil, only write code
between \"\\begin{document}\" and \"\\end{document}\".
EXT-PLIST, when provided, is a property list with external
parameters overriding Org default settings, but still inferior to
Export back-ends: Apply changes to export functions * contrib/lisp/ox-confluence.el (org-confluence-export-as-confluence): * contrib/lisp/ox-deck.el (org-deck-export-as-html, org-deck-export-to-html): * contrib/lisp/ox-freemind.el (org-freemind-export-to-freemind): * contrib/lisp/ox-groff.el (org-groff-export-to-groff, org-groff-export-to-pdf): * contrib/lisp/ox-koma-letter.el (org-koma-letter-export-as-latex, org-koma-letter-export-to-latex, org-koma-letter-export-to-pdf): * contrib/lisp/ox-rss.el (org-rss-export-as-rss, org-rss-export-to-rss): * contrib/lisp/ox-s5.el (org-s5-export-as-html, org-s5-export-to-html): * contrib/lisp/ox-taskjuggler.el (org-taskjuggler-export): * lisp/ob-haskell.el: * lisp/ox-ascii.el (org-ascii-export-as-ascii, org-ascii-export-to-ascii): * lisp/ox-beamer.el (org-beamer-export-as-latex, org-beamer-export-to-latex, org-beamer-export-to-pdf): * lisp/ox-html.el (org-html-export-as-html, org-html-export-to-html): * lisp/ox-icalendar.el (org-icalendar-export-to-ics): * lisp/ox-latex.el (org-latex-export-as-latex, org-latex-export-to-pdf): * lisp/ox-man.el (org-man-export-to-man, org-man-export-to-pdf): * lisp/ox-md.el (org-md-export-as-markdown, org-md-export-to-markdown): * lisp/ox-odt.el (org-odt-export-to-odt): * lisp/ox-org.el (org-org-export-as-org, org-org-export-to-org): * lisp/ox-publish.el (org-publish-org-to): * lisp/ox-texinfo.el (org-texinfo-export-to-texinfo, org-texinfo-export-to-info): * testing/lisp/test-ob-exp.el (test-ob-exp/org-babel-exp-src-blocks/w-no-file):
2013-08-07 08:35:42 +00:00
file-local settings."
(interactive)
(let ((outfile (org-export-output-file-name ".tex" subtreep)))
Export back-ends: Apply changes to export functions * contrib/lisp/ox-confluence.el (org-confluence-export-as-confluence): * contrib/lisp/ox-deck.el (org-deck-export-as-html, org-deck-export-to-html): * contrib/lisp/ox-freemind.el (org-freemind-export-to-freemind): * contrib/lisp/ox-groff.el (org-groff-export-to-groff, org-groff-export-to-pdf): * contrib/lisp/ox-koma-letter.el (org-koma-letter-export-as-latex, org-koma-letter-export-to-latex, org-koma-letter-export-to-pdf): * contrib/lisp/ox-rss.el (org-rss-export-as-rss, org-rss-export-to-rss): * contrib/lisp/ox-s5.el (org-s5-export-as-html, org-s5-export-to-html): * contrib/lisp/ox-taskjuggler.el (org-taskjuggler-export): * lisp/ob-haskell.el: * lisp/ox-ascii.el (org-ascii-export-as-ascii, org-ascii-export-to-ascii): * lisp/ox-beamer.el (org-beamer-export-as-latex, org-beamer-export-to-latex, org-beamer-export-to-pdf): * lisp/ox-html.el (org-html-export-as-html, org-html-export-to-html): * lisp/ox-icalendar.el (org-icalendar-export-to-ics): * lisp/ox-latex.el (org-latex-export-as-latex, org-latex-export-to-pdf): * lisp/ox-man.el (org-man-export-to-man, org-man-export-to-pdf): * lisp/ox-md.el (org-md-export-as-markdown, org-md-export-to-markdown): * lisp/ox-odt.el (org-odt-export-to-odt): * lisp/ox-org.el (org-org-export-as-org, org-org-export-to-org): * lisp/ox-publish.el (org-publish-org-to): * lisp/ox-texinfo.el (org-texinfo-export-to-texinfo, org-texinfo-export-to-info): * testing/lisp/test-ob-exp.el (test-ob-exp/org-babel-exp-src-blocks/w-no-file):
2013-08-07 08:35:42 +00:00
(org-export-to-file 'latex outfile
async subtreep visible-only body-only ext-plist)))
;;;###autoload
(defun org-latex-export-to-pdf
(&optional async subtreep visible-only body-only ext-plist)
"Export current buffer to LaTeX then process through to PDF.
If narrowing is active in the current buffer, only export its
narrowed part.
If a region is active, export that region.
A non-nil optional argument ASYNC means the process should happen
asynchronously. The resulting file should be accessible through
the `org-export-stack' interface.
When optional argument SUBTREEP is non-nil, export the sub-tree
at point, extracting information from the headline properties
first.
When optional argument VISIBLE-ONLY is non-nil, don't export
contents of hidden elements.
When optional argument BODY-ONLY is non-nil, only write code
between \"\\begin{document}\" and \"\\end{document}\".
EXT-PLIST, when provided, is a property list with external
parameters overriding Org default settings, but still inferior to
file-local settings.
Return PDF file's name."
(interactive)
Export back-ends: Apply changes to export functions * contrib/lisp/ox-confluence.el (org-confluence-export-as-confluence): * contrib/lisp/ox-deck.el (org-deck-export-as-html, org-deck-export-to-html): * contrib/lisp/ox-freemind.el (org-freemind-export-to-freemind): * contrib/lisp/ox-groff.el (org-groff-export-to-groff, org-groff-export-to-pdf): * contrib/lisp/ox-koma-letter.el (org-koma-letter-export-as-latex, org-koma-letter-export-to-latex, org-koma-letter-export-to-pdf): * contrib/lisp/ox-rss.el (org-rss-export-as-rss, org-rss-export-to-rss): * contrib/lisp/ox-s5.el (org-s5-export-as-html, org-s5-export-to-html): * contrib/lisp/ox-taskjuggler.el (org-taskjuggler-export): * lisp/ob-haskell.el: * lisp/ox-ascii.el (org-ascii-export-as-ascii, org-ascii-export-to-ascii): * lisp/ox-beamer.el (org-beamer-export-as-latex, org-beamer-export-to-latex, org-beamer-export-to-pdf): * lisp/ox-html.el (org-html-export-as-html, org-html-export-to-html): * lisp/ox-icalendar.el (org-icalendar-export-to-ics): * lisp/ox-latex.el (org-latex-export-as-latex, org-latex-export-to-pdf): * lisp/ox-man.el (org-man-export-to-man, org-man-export-to-pdf): * lisp/ox-md.el (org-md-export-as-markdown, org-md-export-to-markdown): * lisp/ox-odt.el (org-odt-export-to-odt): * lisp/ox-org.el (org-org-export-as-org, org-org-export-to-org): * lisp/ox-publish.el (org-publish-org-to): * lisp/ox-texinfo.el (org-texinfo-export-to-texinfo, org-texinfo-export-to-info): * testing/lisp/test-ob-exp.el (test-ob-exp/org-babel-exp-src-blocks/w-no-file):
2013-08-07 08:35:42 +00:00
(let ((outfile (org-export-output-file-name ".tex" subtreep)))
(org-export-to-file 'latex outfile
async subtreep visible-only body-only ext-plist
(lambda (file) (org-latex-compile file)))))
(defun org-latex-compile (texfile &optional snippet)
"Compile a TeX file.
TEXFILE is the name of the file being compiled. Processing is
done through the command specified in `org-latex-pdf-process'.
When optional argument SNIPPET is non-nil, TEXFILE is a temporary
file used to preview a LaTeX snippet. In this case, do not
create a log buffer and do not bother removing log files.
Return PDF file name or an error if it couldn't be produced."
(let* ((base-name (file-name-sans-extension (file-name-nondirectory texfile)))
(full-name (file-truename texfile))
(out-dir (file-name-directory texfile))
;; Properly set working directory for compilation.
(default-directory (if (file-name-absolute-p texfile)
(file-name-directory full-name)
default-directory))
(time (current-time))
warnings)
2013-04-06 14:49:10 +00:00
(unless snippet (message (format "Processing LaTeX file %s..." texfile)))
(save-window-excursion
(cond
;; A function is provided: Apply it.
((functionp org-latex-pdf-process)
(funcall org-latex-pdf-process (shell-quote-argument texfile)))
;; A list is provided: Replace %b, %f and %o with appropriate
;; values in each command before applying it. Output is
;; redirected to "*Org PDF LaTeX Output*" buffer.
((consp org-latex-pdf-process)
(let ((outbuf (and (not snippet)
(get-buffer-create "*Org PDF LaTeX Output*"))))
(dolist (command org-latex-pdf-process)
(shell-command
(replace-regexp-in-string
"%b" (shell-quote-argument base-name)
(replace-regexp-in-string
"%f" (shell-quote-argument full-name)
(replace-regexp-in-string
"%o" (shell-quote-argument out-dir) command t t) t t) t t)
outbuf))
;; Collect standard errors from output buffer.
(setq warnings (and (not snippet)
(org-latex--collect-warnings outbuf)))))
(t (error "No valid command to process to PDF")))
(let ((pdffile (concat out-dir base-name ".pdf")))
;; Check for process failure. Provide collected errors if
;; possible.
(if (or (not (file-exists-p pdffile))
(time-less-p (nth 5 (file-attributes pdffile)) time))
(error (format "PDF file %s wasn't produced" pdffile))
;; Else remove log files, when specified, and signal end of
;; process to user, along with any error encountered.
(unless snippet
(when org-latex-remove-logfiles
(dolist (file (directory-files
out-dir t
(concat (regexp-quote base-name)
"\\(?:\\.[0-9]+\\)?"
"\\."
(regexp-opt org-latex-logfiles-extensions))))
(delete-file file)))
(message (concat "PDF file produced"
(cond
((eq warnings 'error) " with errors.")
(warnings (concat " with warnings: " warnings))
(t "."))))))
;; Return output file name.
pdffile))))
(defun org-latex--collect-warnings (buffer)
"Collect some warnings from \"pdflatex\" command output.
BUFFER is the buffer containing output. Return collected
warnings types as a string, `error' if a LaTeX error was
encountered or nil if there was none."
(with-current-buffer buffer
(save-excursion
(goto-char (point-max))
(when (re-search-backward "^[ \t]*This is .*?TeX.*?Version" nil t)
(if (re-search-forward "^!" nil t) 'error
(let ((case-fold-search t)
(warnings ""))
(dolist (warning org-latex-known-warnings)
(when (save-excursion (re-search-forward (car warning) nil t))
(setq warnings (concat warnings " " (cdr warning)))))
(org-string-nw-p (org-trim warnings))))))))
;;;###autoload
(defun org-latex-publish-to-latex (plist filename pub-dir)
"Publish an Org file to LaTeX.
FILENAME is the filename of the Org file to be published. PLIST
is the property list for the given project. PUB-DIR is the
publishing directory.
Return output file name."
(org-publish-org-to 'latex filename ".tex" plist pub-dir))
;;;###autoload
(defun org-latex-publish-to-pdf (plist filename pub-dir)
"Publish an Org file to PDF (via LaTeX).
FILENAME is the filename of the Org file to be published. PLIST
is the property list for the given project. PUB-DIR is the
publishing directory.
Return output file name."
;; Unlike to `org-latex-publish-to-latex', PDF file is generated
;; in working directory and then moved to publishing directory.
(org-publish-attachment
plist
(org-latex-compile
(org-publish-org-to
'latex filename ".tex" plist (file-name-directory filename)))
pub-dir))
(provide 'ox-latex)
;; Local variables:
;; generated-autoload-file: "org-loaddefs.el"
;; End:
;;; ox-latex.el ends here