2013-01-27 22:11:34 +00:00
|
|
|
|
;;; 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
|
|
|
|
|
2013-01-01 15:04:24 +00:00
|
|
|
|
;; Copyright (C) 2011-2013 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
|
|
|
|
|
|
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:
|
2012-04-29 00:11:22 +00:00
|
|
|
|
;;
|
2013-04-16 10:54:05 +00:00
|
|
|
|
;; 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))
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(require 'ox)
|
|
|
|
|
(require 'ox-publish)
|
2012-03-19 20:38:12 +00:00
|
|
|
|
|
2013-02-02 19:58:39 +00:00
|
|
|
|
(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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-18 08:18:42 +00:00
|
|
|
|
;;; Define Back-End
|
|
|
|
|
|
2013-03-19 15:24:40 +00:00
|
|
|
|
(org-export-define-backend 'latex
|
|
|
|
|
'((bold . org-latex-bold)
|
|
|
|
|
(center-block . org-latex-center-block)
|
|
|
|
|
(clock . org-latex-clock)
|
|
|
|
|
(code . org-latex-code)
|
|
|
|
|
(comment . (lambda (&rest args) ""))
|
|
|
|
|
(comment-block . (lambda (&rest args) ""))
|
|
|
|
|
(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)
|
|
|
|
|
(paragraph . org-latex-paragraph)
|
|
|
|
|
(plain-list . org-latex-plain-list)
|
|
|
|
|
(plain-text . org-latex-plain-text)
|
|
|
|
|
(planning . org-latex-planning)
|
|
|
|
|
(property-drawer . (lambda (&rest args) ""))
|
|
|
|
|
(quote-block . org-latex-quote-block)
|
|
|
|
|
(quote-section . org-latex-quote-section)
|
|
|
|
|
(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))
|
|
|
|
|
:export-block '("LATEX" "TEX")
|
2012-09-09 11:08:52 +00:00
|
|
|
|
:menu-entry
|
2013-03-19 15:24:40 +00:00
|
|
|
|
'(?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)))))))
|
2013-04-02 21:59:00 +00:00
|
|
|
|
:options-alist '((:latex-class "LATEX_CLASS" nil org-latex-default-class t)
|
2013-03-19 15:24:40 +00:00
|
|
|
|
(: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)
|
|
|
|
|
(:latex-hyperref-p nil "texht" org-latex-with-hyperref t)
|
|
|
|
|
;; Redefine regular options.
|
2013-04-16 09:39:41 +00:00
|
|
|
|
(:date "DATE" nil "\\today" 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
|
|
|
|
|
|
|
|
|
|
2012-06-14 10:57:35 +00:00
|
|
|
|
|
|
|
|
|
;;; Internal Variables
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defconst org-latex-babel-language-alist
|
2012-06-14 10:57:35 +00:00
|
|
|
|
'(("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")
|
|
|
|
|
("no-no" . "nynorsk")
|
|
|
|
|
("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.")
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defconst org-latex-table-matrix-macros '(("bordermatrix" . "\\cr")
|
2012-11-20 23:18:07 +00:00
|
|
|
|
("qbordermatrix" . "\\cr")
|
|
|
|
|
("kbordermatrix" . "\\\\"))
|
|
|
|
|
"Alist between matrix macros and their row ending.")
|
|
|
|
|
|
2012-06-14 10:57:35 +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
|
|
|
|
|
|
|
|
|
;;; User Configurable Variables
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Preamble
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
: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"))
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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.
|
2013-04-11 22:00:37 +00:00
|
|
|
|
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
|
2013-04-11 22:00:37 +00:00
|
|
|
|
\(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
|
|
|
|
|
-----------------
|
|
|
|
|
|
2012-03-19 20:38:12 +00:00
|
|
|
|
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
|
|
|
|
|
2012-03-19 20:38:12 +00:00
|
|
|
|
- Calls to \\usepackage for all packages mentioned in the
|
2013-02-02 19:58:39 +00:00
|
|
|
|
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
|
|
|
|
|
2013-04-11 22:00:37 +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
|
|
|
|
|
2012-03-19 20:38:12 +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
|
2013-04-15 21:24:53 +00:00
|
|
|
|
[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]
|
|
|
|
|
|
2012-03-19 20:38:12 +00:00
|
|
|
|
will omit the default packages, and will include the
|
2013-04-11 22:00:37 +00:00
|
|
|
|
#+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'.
|
2012-03-19 20:38:12 +00:00
|
|
|
|
|
2013-02-02 19:58:39 +00:00
|
|
|
|
If your header, `org-latex-default-packages-alist' or
|
2013-05-31 22:20:18 +00:00
|
|
|
|
`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
|
2013-02-02 19:58:39 +00:00
|
|
|
|
`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
|
|
|
|
|
2013-05-31 22:20:18 +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
|
|
|
|
|
------------------------
|
|
|
|
|
|
2012-03-19 20:38:12 +00:00
|
|
|
|
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
|
|
|
|
|
2013-04-11 22:00:37 +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,
|
|
|
|
|
|
2013-04-11 22:00:37 +00:00
|
|
|
|
\(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
|
|
|
|
|
|
2013-04-11 22:00:37 +00:00
|
|
|
|
\(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
|
|
|
|
|
2012-03-19 20:38:12 +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
|
|
|
|
|
2012-03-19 20:38:12 +00:00
|
|
|
|
Instead of a list of sectioning commands, you can also specify
|
|
|
|
|
a function name. That function will be called with two
|
2013-04-11 22:00:37 +00:00
|
|
|
|
parameters, the (reduced) level of the headline, and a predicate
|
2012-03-19 20:38:12 +00:00
|
|
|
|
non-nil when the headline should be numbered. It must return
|
|
|
|
|
a format string in which the section title will be added."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
: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
|
|
|
|
|
2013-01-27 22:11:34 +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."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
: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
|
|
|
|
|
2013-01-27 22:11:34 +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}.
|
|
|
|
|
If this string contains the formatting specification \"%s\" then
|
|
|
|
|
it will be used as a formatting string, passing the title as an
|
|
|
|
|
argument."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
: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)
|
|
|
|
|
|
2013-02-23 12:33:36 +00:00
|
|
|
|
(defcustom org-latex-toc-command "\\tableofcontents\n\n"
|
2013-03-04 19:08:39 +00:00
|
|
|
|
"LaTeX command to set the table of contents, list of figures, etc.
|
2012-09-12 14:29:30 +00:00
|
|
|
|
This command only applies to the table of contents generated with
|
2013-03-04 19:08:39 +00:00
|
|
|
|
the toc:nil option, not to those generated with #+TOC keyword."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
:group 'org-export-latex
|
2012-09-12 14:29:30 +00:00
|
|
|
|
: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
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-latex-with-hyperref t
|
|
|
|
|
"Toggle insertion of \\hypersetup{...} in the preamble."
|
|
|
|
|
:group 'org-export-latex
|
2013-01-11 00:06:18 +00:00
|
|
|
|
:type 'boolean)
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
2013-02-23 12:40:47 +00:00
|
|
|
|
(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 5 arguments:
|
org-element: Internally store headline/inlinetask's tags as a list of strings
* contrib/lisp/org-element.el (org-element-headline-parser,
org-element-headline-interpreter, org-element-inlinetask-parser,
org-element-inlinetask-interpreter): Store headline/inlinetask's
tags as a list of strings.
* contrib/lisp/org-export.el (org-export--selected-trees,
org-export--skip-p): Use new tag representation.
* contrib/lisp/org-e-ascii.el (org-e-ascii--build-title,
org-e-ascii-format-inlinetask-function, org-e-ascii-inlinetask): Use
new tag representation.
* contrib/lisp/org-e-html.el (org-e-html-format-headline-function,
org-e-html-format-inlinetask-function, org-e-html--tags): Use new
tag representation.
* contrib/lisp/org-e-latex.el (org-e-latex-format-headline-function,
org-e-latex-format-inlinetask-function, org-e-latex-headline,
org-e-latex-inlinetask): Use new tag representation.
* contrib/lisp/org-e-odt.el (org-e-odt-format-org-tags): Use new tag
representation.
* testing/lisp/test-org-element.el: Update test.
2012-05-01 12:10:12 +00:00
|
|
|
|
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 as a list of strings (list of strings or 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
|
|
|
|
|
|
|
|
|
The function result will be used in the section format string.
|
|
|
|
|
|
2013-02-23 12:40:47 +00:00
|
|
|
|
Use `org-latex-format-headline-default-function' by default,
|
|
|
|
|
which format headlines like for Org version prior to 8.0."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
:group 'org-export-latex
|
2013-02-26 17:21:28 +00:00
|
|
|
|
: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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Footnotes
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
: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)
|
|
|
|
|
|
|
|
|
|
|
2012-04-29 00:23:09 +00:00
|
|
|
|
;;;; 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
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-latex-active-timestamp-format "\\textit{%s}"
|
2012-04-29 00:23:09 +00:00
|
|
|
|
"A printf format string to be applied to active timestamps."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
: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)
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-latex-inactive-timestamp-format "\\textit{%s}"
|
2012-04-29 00:23:09 +00:00
|
|
|
|
"A printf format string to be applied to inactive timestamps."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
: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)
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-latex-diary-timestamp-format "\\textit{%s}"
|
2012-04-29 00:23:09 +00:00
|
|
|
|
"A printf format string to be applied to diary timestamps."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
: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
|
|
|
|
|
|
2013-03-06 04:04:42 +00:00
|
|
|
|
(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."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
:group 'org-export-latex
|
2013-03-06 04:04:42 +00:00
|
|
|
|
:version "24.4"
|
|
|
|
|
:package-version '(Org . "8.0")
|
|
|
|
|
:type 'string)
|
|
|
|
|
|
|
|
|
|
(defcustom org-latex-image-default-width ".9\\linewidth"
|
2013-03-08 10:31:45 +00:00
|
|
|
|
"Default width for images.
|
|
|
|
|
This value will not be used if a height is provided."
|
2013-03-06 04:04:42 +00:00
|
|
|
|
:group 'org-export-latex
|
|
|
|
|
:version "24.4"
|
|
|
|
|
:package-version '(Org . "8.0")
|
|
|
|
|
:type 'string)
|
|
|
|
|
|
|
|
|
|
(defcustom org-latex-image-default-height ""
|
2013-03-08 10:31:45 +00:00
|
|
|
|
"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."
|
2013-03-06 04:04:42 +00:00
|
|
|
|
: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)
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
: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)
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-latex-inline-image-rules
|
2013-05-20 10:11:33 +00:00
|
|
|
|
'(("file" . "\\.\\(pdf\\|jpeg\\|jpg\\|png\\|ps\\|eps\\|tikz\\|pgf\\)\\'"))
|
2012-03-19 20:38:12 +00:00
|
|
|
|
"Rules characterizing image files that can be inlined into LaTeX.
|
2012-02-15 10:08:10 +00:00
|
|
|
|
|
2012-03-19 20:38:12 +00:00
|
|
|
|
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."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
:group 'org-export-latex
|
Export framework: Add :version and :package-version informations to defcustoms
* lisp/ox-beamer.el (org-beamer-column-view-format, org-beamer-theme,
org-beamer-environments-extra): Add :version and :package-version.
* lisp/ox-html.el (org-html-with-latex, org-html-inline-image-rules):
Add :version and :package-version.
* lisp/ox-latex.el (org-latex-inline-image-rules,
org-latex-default-table-environment, org-latex-default-table-mode,
org-latex-tables-booktabs, org-latex-table-scientific-notation,
org-latex-known-errors): Add :version and :package-version.
* lisp/ox-md.el (org-md-headline-style): Add :version
and :package-version.
* lisp/ox-odt.el (org-odt-with-latex): Add :version
and :package-version.
* lisp/ox.el (org-export-with-drawers, org-export-with-latex,
org-export-with-inlinetasks, org-export-with-planning,
org-export-with-smart-quotes, org-export-with-statistics-cookies,
org-export-allow-bind-keywords, org-export-async-init-file):
Add :version and :package-version.
2013-03-06 13:45:12 +00:00
|
|
|
|
:version "24.4"
|
|
|
|
|
:package-version '(Org . "8.0")
|
2012-03-19 20:38:12 +00:00
|
|
|
|
: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
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-latex-link-with-unknown-path-format "\\texttt{%s}"
|
2012-05-18 10:42:32 +00:00
|
|
|
|
"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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
:group 'org-export-latex
|
Export framework: Add :version and :package-version informations to defcustoms
* lisp/ox-beamer.el (org-beamer-column-view-format, org-beamer-theme,
org-beamer-environments-extra): Add :version and :package-version.
* lisp/ox-html.el (org-html-with-latex, org-html-inline-image-rules):
Add :version and :package-version.
* lisp/ox-latex.el (org-latex-inline-image-rules,
org-latex-default-table-environment, org-latex-default-table-mode,
org-latex-tables-booktabs, org-latex-table-scientific-notation,
org-latex-known-errors): Add :version and :package-version.
* lisp/ox-md.el (org-md-headline-style): Add :version
and :package-version.
* lisp/ox-odt.el (org-odt-with-latex): Add :version
and :package-version.
* lisp/ox.el (org-export-with-drawers, org-export-with-latex,
org-export-with-inlinetasks, org-export-with-planning,
org-export-with-smart-quotes, org-export-with-statistics-cookies,
org-export-allow-bind-keywords, org-export-async-init-file):
Add :version and :package-version.
2013-03-06 13:45:12 +00:00
|
|
|
|
: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)
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-latex-default-table-mode 'table
|
2012-11-20 23:18:07 +00:00
|
|
|
|
"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
|
2013-01-27 22:11:34 +00:00
|
|
|
|
`org-latex-default-table-environment' accordingly."
|
|
|
|
|
:group 'org-export-latex
|
Export framework: Add :version and :package-version informations to defcustoms
* lisp/ox-beamer.el (org-beamer-column-view-format, org-beamer-theme,
org-beamer-environments-extra): Add :version and :package-version.
* lisp/ox-html.el (org-html-with-latex, org-html-inline-image-rules):
Add :version and :package-version.
* lisp/ox-latex.el (org-latex-inline-image-rules,
org-latex-default-table-environment, org-latex-default-table-mode,
org-latex-tables-booktabs, org-latex-table-scientific-notation,
org-latex-known-errors): Add :version and :package-version.
* lisp/ox-md.el (org-md-headline-style): Add :version
and :package-version.
* lisp/ox-odt.el (org-odt-with-latex): Add :version
and :package-version.
* lisp/ox.el (org-export-with-drawers, org-export-with-latex,
org-export-with-inlinetasks, org-export-with-planning,
org-export-with-smart-quotes, org-export-with-statistics-cookies,
org-export-allow-bind-keywords, org-export-async-init-file):
Add :version and :package-version.
2013-03-06 13:45:12 +00:00
|
|
|
|
:version "24.4"
|
|
|
|
|
:package-version '(Org . "8.0")
|
2012-11-20 23:18:07 +00:00
|
|
|
|
:type '(choice (const :tag "Table" table)
|
|
|
|
|
(const :tag "Matrix" math)
|
|
|
|
|
(const :tag "Inline matrix" inline-math)
|
|
|
|
|
(const :tag "Verbatim" 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
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-latex-tables-centered t
|
2012-11-20 23:18:07 +00:00
|
|
|
|
"When non-nil, tables are exported in a center environment."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
:group 'org-export-latex
|
2012-03-19 20:38:12 +00:00
|
|
|
|
:type 'boolean)
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-latex-tables-booktabs nil
|
2012-03-19 20:38:12 +00:00
|
|
|
|
"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
|
2012-11-20 23:18:07 +00:00
|
|
|
|
locally with \":booktabs t\" and \":booktabs nil\" LaTeX
|
2012-03-19 20:38:12 +00:00
|
|
|
|
attributes."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
:group 'org-export-latex
|
Export framework: Add :version and :package-version informations to defcustoms
* lisp/ox-beamer.el (org-beamer-column-view-format, org-beamer-theme,
org-beamer-environments-extra): Add :version and :package-version.
* lisp/ox-html.el (org-html-with-latex, org-html-inline-image-rules):
Add :version and :package-version.
* lisp/ox-latex.el (org-latex-inline-image-rules,
org-latex-default-table-environment, org-latex-default-table-mode,
org-latex-tables-booktabs, org-latex-table-scientific-notation,
org-latex-known-errors): Add :version and :package-version.
* lisp/ox-md.el (org-md-headline-style): Add :version
and :package-version.
* lisp/ox-odt.el (org-odt-with-latex): Add :version
and :package-version.
* lisp/ox.el (org-export-with-drawers, org-export-with-latex,
org-export-with-inlinetasks, org-export-with-planning,
org-export-with-smart-quotes, org-export-with-statistics-cookies,
org-export-allow-bind-keywords, org-export-async-init-file):
Add :version and :package-version.
2013-03-06 13:45:12 +00:00
|
|
|
|
:version "24.4"
|
|
|
|
|
:package-version '(Org . "8.0")
|
2012-02-08 21:34:53 +00:00
|
|
|
|
:type 'boolean)
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-latex-table-caption-above 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
|
|
|
|
"When non-nil, place caption string at the beginning of the table.
|
|
|
|
|
Otherwise, place it near the end."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
: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 'boolean)
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-latex-table-scientific-notation "%s\\,(%s)"
|
2012-04-12 21:48:23 +00:00
|
|
|
|
"Format string to display numbers in scientific notation.
|
|
|
|
|
The format should have \"%s\" twice, for mantissa and exponent
|
2013-03-05 13:37:47 +00:00
|
|
|
|
\(i.e., \"%s\\\\times10^{%s}\").
|
2012-04-12 21:48:23 +00:00
|
|
|
|
|
|
|
|
|
When nil, no transformation is made."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
:group 'org-export-latex
|
Export framework: Add :version and :package-version informations to defcustoms
* lisp/ox-beamer.el (org-beamer-column-view-format, org-beamer-theme,
org-beamer-environments-extra): Add :version and :package-version.
* lisp/ox-html.el (org-html-with-latex, org-html-inline-image-rules):
Add :version and :package-version.
* lisp/ox-latex.el (org-latex-inline-image-rules,
org-latex-default-table-environment, org-latex-default-table-mode,
org-latex-tables-booktabs, org-latex-table-scientific-notation,
org-latex-known-errors): Add :version and :package-version.
* lisp/ox-md.el (org-md-headline-style): Add :version
and :package-version.
* lisp/ox-odt.el (org-odt-with-latex): Add :version
and :package-version.
* lisp/ox.el (org-export-with-drawers, org-export-with-latex,
org-export-with-inlinetasks, org-export-with-planning,
org-export-with-smart-quotes, org-export-with-statistics-cookies,
org-export-allow-bind-keywords, org-export-async-init-file):
Add :version and :package-version.
2013-03-06 13:45:12 +00:00
|
|
|
|
:version "24.4"
|
|
|
|
|
:package-version '(Org . "8.0")
|
2012-04-12 21:48:23 +00:00
|
|
|
|
:type '(choice
|
|
|
|
|
(string :tag "Format string")
|
|
|
|
|
(const :tag "No formatting")))
|
|
|
|
|
|
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
|
|
|
|
;;;; Text markup
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-latex-text-markup-alist '((bold . "\\textbf{%s}")
|
|
|
|
|
(code . verb)
|
|
|
|
|
(italic . "\\emph{%s}")
|
2013-06-14 17:46:15 +00:00
|
|
|
|
(strike-through . "\\sout{%s}")
|
|
|
|
|
(underline . "\\uline{%s}")
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
: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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-latex-format-drawer-function 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
|
|
|
|
"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.
|
|
|
|
|
|
|
|
|
|
For example, the variable could be set to the following function
|
|
|
|
|
in order to mimic default behaviour:
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
\(defun org-latex-format-drawer-default \(name 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
|
|
|
|
\"Format a drawer element for LaTeX export.\"
|
|
|
|
|
contents\)"
|
2013-01-27 22:11:34 +00:00
|
|
|
|
: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 'function)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Inlinetasks
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-latex-format-inlinetask-function 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
|
|
|
|
"Function called to format an inlinetask in LaTeX code.
|
|
|
|
|
|
|
|
|
|
The function must accept six parameters:
|
|
|
|
|
TODO the todo keyword, as a string
|
|
|
|
|
TODO-TYPE the todo type, a symbol among `todo', `done' and nil.
|
|
|
|
|
PRIORITY the inlinetask priority, as a string
|
|
|
|
|
NAME the inlinetask name, as a string.
|
org-element: Internally store headline/inlinetask's tags as a list of strings
* contrib/lisp/org-element.el (org-element-headline-parser,
org-element-headline-interpreter, org-element-inlinetask-parser,
org-element-inlinetask-interpreter): Store headline/inlinetask's
tags as a list of strings.
* contrib/lisp/org-export.el (org-export--selected-trees,
org-export--skip-p): Use new tag representation.
* contrib/lisp/org-e-ascii.el (org-e-ascii--build-title,
org-e-ascii-format-inlinetask-function, org-e-ascii-inlinetask): Use
new tag representation.
* contrib/lisp/org-e-html.el (org-e-html-format-headline-function,
org-e-html-format-inlinetask-function, org-e-html--tags): Use new
tag representation.
* contrib/lisp/org-e-latex.el (org-e-latex-format-headline-function,
org-e-latex-format-inlinetask-function, org-e-latex-headline,
org-e-latex-inlinetask): Use new tag representation.
* contrib/lisp/org-e-odt.el (org-e-odt-format-org-tags): Use new tag
representation.
* testing/lisp/test-org-element.el: Update test.
2012-05-01 12:10:12 +00:00
|
|
|
|
TAGS the inlinetask tags, as a list of strings.
|
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 the contents of the inlinetask, as a string.
|
|
|
|
|
|
|
|
|
|
The function should return the string to be exported.
|
|
|
|
|
|
|
|
|
|
For example, the variable could be set to the following function
|
|
|
|
|
in order to mimic default behaviour:
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
\(defun org-latex-format-inlinetask \(todo type priority name tags 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
|
|
|
|
\"Format an inline task element for LaTeX export.\"
|
org-element: Internally store headline/inlinetask's tags as a list of strings
* contrib/lisp/org-element.el (org-element-headline-parser,
org-element-headline-interpreter, org-element-inlinetask-parser,
org-element-inlinetask-interpreter): Store headline/inlinetask's
tags as a list of strings.
* contrib/lisp/org-export.el (org-export--selected-trees,
org-export--skip-p): Use new tag representation.
* contrib/lisp/org-e-ascii.el (org-e-ascii--build-title,
org-e-ascii-format-inlinetask-function, org-e-ascii-inlinetask): Use
new tag representation.
* contrib/lisp/org-e-html.el (org-e-html-format-headline-function,
org-e-html-format-inlinetask-function, org-e-html--tags): Use new
tag representation.
* contrib/lisp/org-e-latex.el (org-e-latex-format-headline-function,
org-e-latex-format-inlinetask-function, org-e-latex-headline,
org-e-latex-inlinetask): Use new tag representation.
* contrib/lisp/org-e-odt.el (org-e-odt-format-org-tags): Use new tag
representation.
* testing/lisp/test-org-element.el: Update test.
2012-05-01 12:10:12 +00:00
|
|
|
|
\(let ((full-title
|
2011-12-09 13:38:36 +00:00
|
|
|
|
\(concat
|
2012-03-19 20:38:12 +00:00
|
|
|
|
\(when todo
|
org-element: Internally store headline/inlinetask's tags as a list of strings
* contrib/lisp/org-element.el (org-element-headline-parser,
org-element-headline-interpreter, org-element-inlinetask-parser,
org-element-inlinetask-interpreter): Store headline/inlinetask's
tags as a list of strings.
* contrib/lisp/org-export.el (org-export--selected-trees,
org-export--skip-p): Use new tag representation.
* contrib/lisp/org-e-ascii.el (org-e-ascii--build-title,
org-e-ascii-format-inlinetask-function, org-e-ascii-inlinetask): Use
new tag representation.
* contrib/lisp/org-e-html.el (org-e-html-format-headline-function,
org-e-html-format-inlinetask-function, org-e-html--tags): Use new
tag representation.
* contrib/lisp/org-e-latex.el (org-e-latex-format-headline-function,
org-e-latex-format-inlinetask-function, org-e-latex-headline,
org-e-latex-inlinetask): Use new tag representation.
* contrib/lisp/org-e-odt.el (org-e-odt-format-org-tags): Use new tag
representation.
* testing/lisp/test-org-element.el: Update test.
2012-05-01 12:10:12 +00:00
|
|
|
|
\(format \"\\\\textbf{\\\\textsf{\\\\textsc{%s}}} \" todo))
|
|
|
|
|
\(when priority (format \"\\\\framebox{\\\\#%c} \" priority))
|
2011-12-09 13:38:36 +00:00
|
|
|
|
title
|
org-element: Internally store headline/inlinetask's tags as a list of strings
* contrib/lisp/org-element.el (org-element-headline-parser,
org-element-headline-interpreter, org-element-inlinetask-parser,
org-element-inlinetask-interpreter): Store headline/inlinetask's
tags as a list of strings.
* contrib/lisp/org-export.el (org-export--selected-trees,
org-export--skip-p): Use new tag representation.
* contrib/lisp/org-e-ascii.el (org-e-ascii--build-title,
org-e-ascii-format-inlinetask-function, org-e-ascii-inlinetask): Use
new tag representation.
* contrib/lisp/org-e-html.el (org-e-html-format-headline-function,
org-e-html-format-inlinetask-function, org-e-html--tags): Use new
tag representation.
* contrib/lisp/org-e-latex.el (org-e-latex-format-headline-function,
org-e-latex-format-inlinetask-function, org-e-latex-headline,
org-e-latex-inlinetask): Use new tag representation.
* contrib/lisp/org-e-odt.el (org-e-odt-format-org-tags): Use new tag
representation.
* testing/lisp/test-org-element.el: Update test.
2012-05-01 12:10:12 +00:00
|
|
|
|
\(when tags
|
|
|
|
|
\(format \"\\\\hfill{}\\\\textsc{:%s:}\"
|
|
|
|
|
\(mapconcat 'identity tags \":\")))))
|
|
|
|
|
\(format (concat \"\\\\begin{center}\\n\"
|
2011-12-09 13:38:36 +00:00
|
|
|
|
\"\\\\fbox{\\n\"
|
|
|
|
|
\"\\\\begin{minipage}[c]{.6\\\\textwidth}\\n\"
|
|
|
|
|
\"%s\\n\\n\"
|
|
|
|
|
\"\\\\rule[.8em]{\\\\textwidth}{2pt}\\n\\n\"
|
|
|
|
|
\"%s\"
|
|
|
|
|
\"\\\\end{minipage}}\"
|
org-element: Internally store headline/inlinetask's tags as a list of strings
* contrib/lisp/org-element.el (org-element-headline-parser,
org-element-headline-interpreter, org-element-inlinetask-parser,
org-element-inlinetask-interpreter): Store headline/inlinetask's
tags as a list of strings.
* contrib/lisp/org-export.el (org-export--selected-trees,
org-export--skip-p): Use new tag representation.
* contrib/lisp/org-e-ascii.el (org-e-ascii--build-title,
org-e-ascii-format-inlinetask-function, org-e-ascii-inlinetask): Use
new tag representation.
* contrib/lisp/org-e-html.el (org-e-html-format-headline-function,
org-e-html-format-inlinetask-function, org-e-html--tags): Use new
tag representation.
* contrib/lisp/org-e-latex.el (org-e-latex-format-headline-function,
org-e-latex-format-inlinetask-function, org-e-latex-headline,
org-e-latex-inlinetask): Use new tag representation.
* contrib/lisp/org-e-odt.el (org-e-odt-format-org-tags): Use new tag
representation.
* testing/lisp/test-org-element.el: Update test.
2012-05-01 12:10:12 +00:00
|
|
|
|
\"\\\\end{center}\")
|
|
|
|
|
full-title contents))"
|
2013-01-27 22:11:34 +00:00
|
|
|
|
: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 'function)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; Src blocks
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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.
|
|
|
|
|
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
|
2013-02-02 19:58:39 +00:00
|
|
|
|
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
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
\(require 'ox-latex)
|
2013-02-02 19:58:39 +00:00
|
|
|
|
\(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,
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
\(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
|
2013-02-02 19:58:39 +00:00
|
|
|
|
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
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
\(require 'ox-latex)
|
2013-02-02 19:58:39 +00:00
|
|
|
|
\(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
|
|
|
|
|
2012-03-19 20:38:12 +00:00
|
|
|
|
In addition, it is necessary to install pygments
|
|
|
|
|
\(http://pygments.org), and to configure the variable
|
2013-01-27 22:11:34 +00:00
|
|
|
|
`org-latex-pdf-process' so that the -shell-escape option is
|
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
|
|
|
|
passed to pdflatex."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
: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)))
|
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
|
|
|
|
|
2013-01-27 22:11:34 +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")
|
2013-05-28 19:18:53 +00:00
|
|
|
|
(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"))
|
|
|
|
|
"Alist mapping languages to their listing language counterpart.
|
|
|
|
|
The key is a symbol, the major mode symbol without the \"-mode\".
|
2012-03-19 20:38:12 +00:00
|
|
|
|
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."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
: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 "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
|
|
|
|
|
2013-01-27 22:11:34 +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
|
2012-03-19 20:38:12 +00:00
|
|
|
|
\\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
|
2012-03-19 20:38:12 +00:00
|
|
|
|
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
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(setq org-latex-listings-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
|
|
|
|
'((\"basicstyle\" \"\\small\")
|
|
|
|
|
(\"keywordstyle\" \"\\color{black}\\bfseries\\underbar\")))
|
|
|
|
|
|
|
|
|
|
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."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
: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
|
|
|
|
|
2013-01-27 22:11:34 +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\".
|
2012-03-19 20:38:12 +00:00
|
|
|
|
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:
|
2012-03-19 20:38:12 +00:00
|
|
|
|
|
|
|
|
|
pygmentize -L lexers"
|
2013-01-27 22:11:34 +00:00
|
|
|
|
: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
|
|
|
|
|
2013-01-27 22:11:34 +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
|
2012-03-19 20:38:12 +00:00
|
|
|
|
\\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
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
\(setq org-latex-minted-options
|
2012-03-19 20:38:12 +00:00
|
|
|
|
'\((\"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."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
: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
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defvar org-latex-custom-lang-environments nil
|
2012-03-19 20:38:12 +00:00
|
|
|
|
"Alist mapping languages to language-specific LaTeX environments.
|
2012-01-17 19:54:08 +00:00
|
|
|
|
|
2012-03-19 20:38:12 +00:00
|
|
|
|
It is used during export of src blocks by the listings and minted
|
|
|
|
|
latex packages. For example,
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
\(setq org-latex-custom-lang-environments
|
2012-03-19 20:38:12 +00:00
|
|
|
|
'\(\(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}")
|
|
|
|
|
|
|
|
|
|
|
2012-03-19 20:38:12 +00:00
|
|
|
|
;;;; Compilation
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-latex-pdf-process
|
2012-03-19 20:38:12 +00:00
|
|
|
|
'("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
|
2012-10-25 12:52:25 +00:00
|
|
|
|
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.
|
2012-03-19 20:38:12 +00:00
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
2013-06-21 15:57:32 +00:00
|
|
|
|
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.
|
2012-03-19 20:38:12 +00:00
|
|
|
|
|
|
|
|
|
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"))
|
2012-09-04 12:19:30 +00:00
|
|
|
|
(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"))
|
2012-03-19 20:38:12 +00:00
|
|
|
|
(const :tag "texi2dvi"
|
2013-06-16 20:48:37 +00:00
|
|
|
|
("texi2dvi -p -b -V %f"))
|
2012-03-19 20:38:12 +00:00
|
|
|
|
(const :tag "rubber"
|
|
|
|
|
("rubber -d --into %o %f"))
|
2013-06-21 15:57:32 +00:00
|
|
|
|
(const :tag "latexmk"
|
|
|
|
|
("latexmk -g -pdf %f"))
|
2012-03-19 20:38:12 +00:00
|
|
|
|
(function)))
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-latex-logfiles-extensions
|
2012-03-19 20:38:12 +00:00
|
|
|
|
'("aux" "idx" "log" "out" "toc" "nav" "snm" "vrb")
|
2013-02-28 07:41:57 +00:00
|
|
|
|
"The list of file extensions to consider as LaTeX logfiles.
|
|
|
|
|
The logfiles will be remove if `org-latex-remove-logfiles' is
|
|
|
|
|
non-nil."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
:group 'org-export-latex
|
2012-03-19 20:38:12 +00:00
|
|
|
|
:type '(repeat (string :tag "Extension")))
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-latex-remove-logfiles t
|
2012-03-19 20:38:12 +00:00
|
|
|
|
"Non-nil means remove the logfiles produced by PDF production.
|
2013-02-28 07:41:57 +00:00
|
|
|
|
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'."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
:group 'org-export-latex
|
2012-03-19 20:38:12 +00:00
|
|
|
|
:type 'boolean)
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defcustom org-latex-known-errors
|
2012-09-15 12:58:49 +00:00
|
|
|
|
'(("Reference.*?undefined" . "[undefined reference]")
|
|
|
|
|
("Citation.*?undefined" . "[undefined citation]")
|
|
|
|
|
("Undefined control sequence" . "[undefined control sequence]")
|
|
|
|
|
("^! LaTeX.*?Error" . "[LaTeX error]")
|
|
|
|
|
("^! Package.*?Error" . "[package error]")
|
|
|
|
|
("Runaway argument" . "Runaway argument"))
|
|
|
|
|
"Alist of regular expressions and associated messages for the user.
|
|
|
|
|
The regular expressions are used to find possible errors in the
|
|
|
|
|
log of a latex-run."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
:group 'org-export-latex
|
Export framework: Add :version and :package-version informations to defcustoms
* lisp/ox-beamer.el (org-beamer-column-view-format, org-beamer-theme,
org-beamer-environments-extra): Add :version and :package-version.
* lisp/ox-html.el (org-html-with-latex, org-html-inline-image-rules):
Add :version and :package-version.
* lisp/ox-latex.el (org-latex-inline-image-rules,
org-latex-default-table-environment, org-latex-default-table-mode,
org-latex-tables-booktabs, org-latex-table-scientific-notation,
org-latex-known-errors): Add :version and :package-version.
* lisp/ox-md.el (org-md-headline-style): Add :version
and :package-version.
* lisp/ox-odt.el (org-odt-with-latex): Add :version
and :package-version.
* lisp/ox.el (org-export-with-drawers, org-export-with-latex,
org-export-with-inlinetasks, org-export-with-planning,
org-export-with-smart-quotes, org-export-with-statistics-cookies,
org-export-allow-bind-keywords, org-export-async-init-file):
Add :version and :package-version.
2013-03-06 13:45:12 +00:00
|
|
|
|
:version "24.4"
|
|
|
|
|
:package-version '(Org . "8.0")
|
2012-09-15 12:58:49 +00:00
|
|
|
|
:type '(repeat
|
|
|
|
|
(cons
|
|
|
|
|
(string :tag "Regexp")
|
|
|
|
|
(string :tag "Message"))))
|
|
|
|
|
|
2012-03-19 20:38:12 +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
|
|
|
|
|
|
|
|
|
;;; Internal Functions
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-latex--caption/label-string (element info)
|
2012-09-13 14:56:15 +00:00
|
|
|
|
"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
|
|
|
|
|
2012-09-13 14:56:15 +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
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
For non-floats, see `org-latex--wrap-label'."
|
2012-09-13 14:56:15 +00:00
|
|
|
|
(let* ((label (org-element-property :name element))
|
2012-09-16 07:24:32 +00:00
|
|
|
|
(label-str (if (not (org-string-nw-p label)) ""
|
|
|
|
|
(format "\\label{%s}"
|
|
|
|
|
(org-export-solidify-link-text label))))
|
2012-09-13 14:56:15 +00:00
|
|
|
|
(main (org-export-get-caption element))
|
2013-06-29 15:04:03 +00:00
|
|
|
|
(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
|
2013-06-29 15:04:03 +00:00
|
|
|
|
((org-string-nw-p caption-from-attr-latex)
|
|
|
|
|
(concat caption-from-attr-latex "\n"))
|
2012-09-16 07:24:32 +00:00
|
|
|
|
((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.
|
2012-09-13 14:56:15 +00:00
|
|
|
|
(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.
|
2012-09-13 14:56:15 +00:00
|
|
|
|
(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
|
|
|
|
|
2013-02-02 19:58:39 +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
|
2013-02-23 10:29:45 +00:00
|
|
|
|
(or org-export-coding-system buffer-file-coding-system)))
|
2013-02-02 19:58:39 +00:00
|
|
|
|
"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)
|
2012-06-14 10:57:35 +00:00
|
|
|
|
"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
|
|
|
|
|
2012-06-14 10:57:35 +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
|
|
|
|
|
2013-05-31 22:20:18 +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."
|
2012-06-14 10:57:35 +00:00
|
|
|
|
(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
|
2013-05-31 22:20:18 +00:00
|
|
|
|
(org-split-string (match-string 1 header) ",[ \t]*")))
|
2012-06-14 10:57:35 +00:00
|
|
|
|
(language (cdr (assoc language-code
|
2013-01-27 22:11:34 +00:00
|
|
|
|
org-latex-babel-language-alist))))
|
2013-05-31 22:20:18 +00:00
|
|
|
|
;; 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)))))
|
2012-06-14 10:57:35 +00:00
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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
|
|
|
|
|
2013-01-27 22:11:34 +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
|
|
|
|
|
2013-01-27 22:11:34 +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.
|
2012-03-19 20:38:12 +00:00
|
|
|
|
This function shouldn't be used for floats. See
|
2013-01-27 22:11:34 +00:00
|
|
|
|
`org-latex--caption/label-string'."
|
2012-03-19 20:38:12 +00:00
|
|
|
|
(let ((label (org-element-property :name element)))
|
2012-09-16 07:24:32 +00:00
|
|
|
|
(if (not (and (org-string-nw-p output) (org-string-nw-p label))) output
|
|
|
|
|
(concat (format "\\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
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-latex--text-markup (text markup)
|
2012-06-18 12:28:47 +00:00
|
|
|
|
"Format TEXT depending on MARKUP text markup.
|
2013-01-27 22:11:34 +00:00
|
|
|
|
See `org-latex-text-markup-alist' for details."
|
|
|
|
|
(let ((fmt (cdr (assq markup org-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 and appropriate separator
|
|
|
|
|
;; and use "\\verb" command.
|
|
|
|
|
((eq 'verb fmt)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(let ((separator (org-latex--find-verb-separator text)))
|
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
|
|
|
|
(concat "\\verb" separator text separator)))
|
|
|
|
|
;; 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)
|
2012-05-05 18:09:02 +00:00
|
|
|
|
(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)))))
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-latex--delayed-footnotes-definitions (element info)
|
2012-06-18 12:28:47 +00:00
|
|
|
|
"Return footnotes definitions in ELEMENT as a string.
|
|
|
|
|
|
|
|
|
|
INFO is a plist used as a communication channel.
|
|
|
|
|
|
|
|
|
|
Footnotes definitions are returned within \"\\footnotetxt{}\"
|
|
|
|
|
commands.
|
|
|
|
|
|
2012-08-22 07:34:24 +00:00
|
|
|
|
This function is used within constructs that don't support
|
2012-06-18 12:28:47 +00:00
|
|
|
|
\"\\footnote{}\" command (i.e. an item's tag). In that case,
|
2012-08-22 07:34:24 +00:00
|
|
|
|
\"\\footnotemark\" is used within the construct and the function
|
|
|
|
|
just outside of it."
|
2012-06-18 12:28:47 +00:00
|
|
|
|
(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.
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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)
|
2012-06-18 12:28:47 +00:00
|
|
|
|
(reverse all-refs)))))
|
|
|
|
|
(funcall search-refs 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;; Template
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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.
|
2012-03-19 20:38:12 +00:00
|
|
|
|
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."
|
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 (plist-get info :title) 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
|
2012-06-30 14:21:31 +00:00
|
|
|
|
;; 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"))
|
2012-06-30 14:21:31 +00:00
|
|
|
|
;; Document class and 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
|
|
|
|
(let ((class (plist-get info :latex-class))
|
2011-12-09 13:38:36 +00:00
|
|
|
|
(class-options (plist-get info :latex-class-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
|
|
|
|
(org-element-normalize-string
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(let* ((header (nth 1 (assoc class org-latex-classes)))
|
2011-12-09 13:38:36 +00:00
|
|
|
|
(document-class-string
|
|
|
|
|
(and (stringp header)
|
2012-08-30 13:54:33 +00:00
|
|
|
|
(if (not class-options) header
|
|
|
|
|
(replace-regexp-in-string
|
2013-02-20 19:26:08 +00:00
|
|
|
|
"^[ \t]*\\\\documentclass\\(\\(\\[[^]]*\\]\\)?\\)"
|
2012-08-30 13:54:33 +00:00
|
|
|
|
class-options header t nil 1)))))
|
2013-02-06 18:47:35 +00:00
|
|
|
|
(if (not document-class-string)
|
2013-02-15 13:18:59 +00:00
|
|
|
|
(user-error "Unknown LaTeX class `%s'" class)
|
2013-02-02 19:58:39 +00:00
|
|
|
|
(org-latex-guess-babel-language
|
|
|
|
|
(org-latex-guess-inputenc
|
2012-06-14 10:57:35 +00:00
|
|
|
|
(org-splice-latex-header
|
|
|
|
|
document-class-string
|
2013-02-02 19:58:39 +00:00
|
|
|
|
org-latex-default-packages-alist
|
|
|
|
|
org-latex-packages-alist nil
|
2013-03-07 07:59:23 +00:00
|
|
|
|
(concat (plist-get info :latex-header)
|
|
|
|
|
(plist-get info :latex-header-extra))))
|
2012-06-14 10:57:35 +00:00
|
|
|
|
info)))))
|
2012-06-30 14:21:31 +00:00
|
|
|
|
;; Possibly limit depth for headline numbering.
|
2012-03-19 20:38:12 +00:00
|
|
|
|
(let ((sec-num (plist-get info :section-numbers)))
|
|
|
|
|
(when (integerp sec-num)
|
|
|
|
|
(format "\\setcounter{secnumdepth}{%d}\n" sec-num)))
|
2012-06-30 14:21:31 +00:00
|
|
|
|
;; 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))
|
2012-11-01 07:09:29 +00:00
|
|
|
|
((or author email) (format "\\author{%s}\n" (or author email)))))
|
2012-06-30 14:21:31 +00:00
|
|
|
|
;; Date.
|
2013-04-02 21:59:00 +00:00
|
|
|
|
(let ((date (and (plist-get info :with-date) (org-export-get-date info))))
|
|
|
|
|
(format "\\date{%s}\n" (org-export-data date info)))
|
2012-06-30 14:21:31 +00:00
|
|
|
|
;; 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
|
|
|
|
(format "\\title{%s}\n" title)
|
2012-06-30 14:21:31 +00:00
|
|
|
|
;; Hyperref options.
|
2013-01-11 00:06:18 +00:00
|
|
|
|
(when (plist-get info :latex-hyperref-p)
|
|
|
|
|
(format "\\hypersetup{\n pdfkeywords={%s},\n pdfsubject={%s},\n pdfcreator={%s}}\n"
|
|
|
|
|
(or (plist-get info :keywords) "")
|
|
|
|
|
(or (plist-get info :description) "")
|
|
|
|
|
(if (not (plist-get info :with-creator)) ""
|
|
|
|
|
(plist-get info :creator))))
|
2012-06-30 14:21:31 +00:00
|
|
|
|
;; 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"
|
2012-06-30 14:21:31 +00:00
|
|
|
|
;; Title command.
|
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-normalize-string
|
|
|
|
|
(cond ((string= "" title) nil)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
((not (stringp org-latex-title-command)) nil)
|
2011-12-09 13:38:36 +00:00
|
|
|
|
((string-match "\\(?:[^%]\\|^\\)%s"
|
2013-01-27 22:11:34 +00:00
|
|
|
|
org-latex-title-command)
|
|
|
|
|
(format org-latex-title-command title))
|
|
|
|
|
(t org-latex-title-command)))
|
2012-06-30 14:21:31 +00:00
|
|
|
|
;; 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))
|
2013-01-27 22:11:34 +00:00
|
|
|
|
org-latex-toc-command)))
|
2012-06-30 14:21:31 +00:00
|
|
|
|
;; 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
|
2012-06-30 14:21:31 +00:00
|
|
|
|
;; Creator.
|
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 ((creator-info (plist-get info :with-creator)))
|
|
|
|
|
(cond
|
2012-03-19 20:38:12 +00:00
|
|
|
|
((not creator-info) "")
|
2011-12-09 13:38:36 +00:00
|
|
|
|
((eq creator-info 'comment)
|
|
|
|
|
(format "%% %s\n" (plist-get info :creator)))
|
|
|
|
|
(t (concat (plist-get info :creator) "\n"))))
|
2012-06-30 14:21:31 +00:00
|
|
|
|
;; 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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-latex--text-markup contents 'bold))
|
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
|
|
|
|
|
2013-01-27 22:11:34 +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."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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)))
|
|
|
|
|
|
|
|
|
|
|
2012-04-29 00:11:22 +00:00
|
|
|
|
;;;; Clock
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-latex-clock (clock contents info)
|
2012-04-29 00:11:22 +00:00
|
|
|
|
"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)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(format org-latex-inactive-timestamp-format
|
2012-10-30 20:59:50 +00:00
|
|
|
|
(concat (org-translate-time
|
|
|
|
|
(org-element-property :raw-value
|
|
|
|
|
(org-element-property :value clock)))
|
|
|
|
|
(let ((time (org-element-property :duration clock)))
|
2012-04-29 00:11:22 +00:00
|
|
|
|
(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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-latex--text-markup (org-element-property :value code) 'code))
|
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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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."
|
2012-03-19 20:38:12 +00:00
|
|
|
|
(let* ((name (org-element-property :drawer-name drawer))
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(output (if (functionp org-latex-format-drawer-function)
|
|
|
|
|
(funcall org-latex-format-drawer-function
|
2011-12-09 13:38:36 +00:00
|
|
|
|
name contents)
|
|
|
|
|
;; If there's no user defined function: simply
|
|
|
|
|
;; display contents of the drawer.
|
|
|
|
|
contents)))
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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'."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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."
|
2012-03-19 20:38:12 +00:00
|
|
|
|
(let ((ent (org-element-property :latex entity)))
|
|
|
|
|
(if (org-element-property :latex-math-p entity) (format "$%s$" ent) ent)))
|
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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-latex-example-block (example-block contents info)
|
2012-03-19 20:38:12 +00:00
|
|
|
|
"Transcode an EXAMPLE-BLOCK element from Org to LaTeX.
|
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual
|
|
|
|
|
information."
|
2013-02-07 13:35:52 +00:00
|
|
|
|
(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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-latex-export-block (export-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 EXPORT-BLOCK element from Org to LaTeX.
|
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual information."
|
2012-09-12 08:45:02 +00:00
|
|
|
|
(when (member (org-element-property :type export-block) '("LATEX" "TEX"))
|
2012-03-19 20:38:12 +00:00
|
|
|
|
(org-remove-indentation (org-element-property :value export-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
|
|
|
|
|
|
|
|
|
|
2012-05-23 14:29:16 +00:00
|
|
|
|
;;;; Export Snippet
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-latex--wrap-label
|
2012-05-02 15:18:14 +00:00
|
|
|
|
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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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.
|
2012-03-19 20:38:12 +00:00
|
|
|
|
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.
|
2012-07-27 14:13:57 +00:00
|
|
|
|
(let ((prev (org-export-get-previous-element footnote-reference info)))
|
2012-03-19 20:38:12 +00:00
|
|
|
|
(when (eq (org-element-type prev) 'footnote-reference)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
org-latex-footnote-separator))
|
2011-12-23 15:08:45 +00:00
|
|
|
|
(cond
|
2012-03-19 20:38:12 +00:00
|
|
|
|
;; Use \footnotemark if the footnote has already been defined.
|
2011-12-23 15:08:45 +00:00
|
|
|
|
((not (org-export-footnote-first-reference-p footnote-reference info))
|
2012-03-19 20:38:12 +00:00
|
|
|
|
(format "\\footnotemark[%s]{}"
|
2011-12-23 15:08:45 +00:00
|
|
|
|
(org-export-get-footnote-number footnote-reference info)))
|
2012-06-18 16:37:56 +00:00
|
|
|
|
;; Use \footnotemark if reference is within another footnote
|
2012-11-12 20:14:43 +00:00
|
|
|
|
;; reference, footnote definition or table cell.
|
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
|
|
|
|
((loop for parent in (org-export-get-genealogy footnote-reference)
|
2012-03-19 20:38:12 +00:00
|
|
|
|
thereis (memq (org-element-type parent)
|
2012-11-12 20:14:43 +00:00
|
|
|
|
'(footnote-reference footnote-definition table-cell)))
|
2012-06-23 08:46:37 +00:00
|
|
|
|
"\\footnotemark")
|
2013-01-30 13:17:30 +00:00
|
|
|
|
;; Otherwise, define it with \footnote command.
|
2011-12-23 15:08:45 +00:00
|
|
|
|
(t
|
2013-01-30 13:17:30 +00:00
|
|
|
|
(let ((def (org-export-get-footnote-definition footnote-reference info)))
|
2012-03-19 20:38:12 +00:00
|
|
|
|
(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)))
|
2012-03-19 20:38:12 +00:00
|
|
|
|
;; Retrieve all footnote references within the footnote and
|
|
|
|
|
;; add their definition after it, since LaTeX doesn't support
|
|
|
|
|
;; them inside.
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-latex-headline (headline contents info)
|
2013-02-23 12:40:47 +00:00
|
|
|
|
"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."
|
2013-02-23 21:02:37 +00:00
|
|
|
|
(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-sectionning (assoc class org-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-sectionning))
|
|
|
|
|
(funcall (nth 2 class-sectionning) level numberedp)
|
|
|
|
|
(nth (1+ level) class-sectionning))))
|
|
|
|
|
(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)))))))
|
|
|
|
|
(text (org-export-data (org-element-property :title headline) 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 org-latex-format-headline-function
|
|
|
|
|
todo todo-type priority text tags))
|
|
|
|
|
;; Associate \label to the headline for internal links.
|
|
|
|
|
(headline-label
|
|
|
|
|
(format "\\label{sec-%s}\n"
|
|
|
|
|
(mapconcat 'number-to-string
|
|
|
|
|
(org-export-get-headline-number 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 " 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
|
2013-05-02 04:36:44 +00:00
|
|
|
|
;; an alternative heading when possible, and when this is not
|
|
|
|
|
;; identical to the usual heading.
|
2013-02-23 21:02:37 +00:00
|
|
|
|
(let ((opt-title
|
|
|
|
|
(funcall org-latex-format-headline-function
|
|
|
|
|
todo todo-type priority
|
|
|
|
|
(org-export-data
|
2013-02-26 23:00:33 +00:00
|
|
|
|
(org-export-get-alt-title headline info) info)
|
2013-02-23 21:02:37 +00:00
|
|
|
|
(and (eq (plist-get info :with-tags) t) tags))))
|
2013-03-04 20:18:34 +00:00
|
|
|
|
(if (and numberedp opt-title
|
2013-05-02 04:36:44 +00:00
|
|
|
|
(not (equal opt-title full-text))
|
2013-03-04 20:18:34 +00:00
|
|
|
|
(string-match "\\`\\\\\\(.*?[^*]\\){" section-fmt))
|
2013-02-23 21:02:37 +00:00
|
|
|
|
(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
|
|
|
|
|
2013-02-23 21:40:12 +00:00
|
|
|
|
(defun org-latex-format-headline-default-function
|
|
|
|
|
(todo todo-type priority text tags)
|
|
|
|
|
"Default format function for a headline.
|
|
|
|
|
See `org-latex-format-headline-function' for details."
|
|
|
|
|
(concat
|
2013-03-01 10:06:00 +00:00
|
|
|
|
(and todo (format "{\\bfseries\\sffamily %s} " todo))
|
2013-02-23 21:40:12 +00:00
|
|
|
|
(and priority (format "\\framebox{\\#%c} " priority))
|
|
|
|
|
text
|
|
|
|
|
(and tags
|
|
|
|
|
(format "\\hfill{}\\textsc{%s}" (mapconcat 'identity 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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-latex-horizontal-rule (horizontal-rule contents info)
|
2013-02-12 21:21:46 +00:00
|
|
|
|
"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."
|
2012-08-21 16:53:14 +00:00
|
|
|
|
(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")
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-latex--wrap-label
|
2012-08-21 16:53:14 +00:00
|
|
|
|
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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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."
|
2012-03-19 20:38:12 +00:00
|
|
|
|
(let* ((code (org-element-property :value inline-src-block))
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(separator (org-latex--find-verb-separator 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
|
|
|
|
(cond
|
|
|
|
|
;; Do not use a special package: transcode it verbatim.
|
2013-01-27 22:11:34 +00:00
|
|
|
|
((not org-latex-listings)
|
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 "\\verb" separator code separator))
|
|
|
|
|
;; Use minted package.
|
2013-01-27 22:11:34 +00:00
|
|
|
|
((eq org-latex-listings 'minted)
|
2012-03-19 20:38:12 +00:00
|
|
|
|
(let* ((org-lang (org-element-property :language inline-src-block))
|
2011-12-09 13:38:36 +00:00
|
|
|
|
(mint-lang (or (cadr (assq (intern org-lang)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
org-latex-minted-langs))
|
2011-12-09 13:38:36 +00:00
|
|
|
|
org-lang))
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(options (org-latex--make-option-string
|
|
|
|
|
org-latex-minted-options)))
|
2011-12-09 13:38:36 +00:00
|
|
|
|
(concat (format "\\mint%s{%s}"
|
|
|
|
|
(if (string= options "") "" (format "[%s]" options))
|
|
|
|
|
mint-lang)
|
|
|
|
|
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
|
|
|
|
;; Use listings package.
|
|
|
|
|
(t
|
|
|
|
|
;; Maybe translate language's name.
|
2012-03-19 20:38:12 +00:00
|
|
|
|
(let* ((org-lang (org-element-property :language inline-src-block))
|
2011-12-09 13:38:36 +00:00
|
|
|
|
(lst-lang (or (cadr (assq (intern org-lang)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
org-latex-listings-langs))
|
2011-12-09 13:38:36 +00:00
|
|
|
|
org-lang))
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(options (org-latex--make-option-string
|
|
|
|
|
(append org-latex-listings-options
|
2011-12-09 13:38:36 +00:00
|
|
|
|
`(("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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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)))))
|
2012-03-19 20:38:12 +00:00
|
|
|
|
(todo-type (org-element-property :todo-type inlinetask))
|
2011-12-09 13:38:36 +00:00
|
|
|
|
(tags (and (plist-get info :with-tags)
|
2012-05-26 11:44:13 +00:00
|
|
|
|
(org-export-get-tags inlinetask info)))
|
2011-12-09 13:38:36 +00:00
|
|
|
|
(priority (and (plist-get info :with-priority)
|
2012-03-19 20:38:12 +00:00
|
|
|
|
(org-element-property :priority inlinetask))))
|
2013-01-27 22:11:34 +00:00
|
|
|
|
;; If `org-latex-format-inlinetask-function' is provided, call it
|
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
|
|
|
|
;; with appropriate arguments.
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(if (functionp org-latex-format-inlinetask-function)
|
|
|
|
|
(funcall org-latex-format-inlinetask-function
|
2011-12-09 13:38:36 +00:00
|
|
|
|
todo todo-type priority title tags 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
|
|
|
|
;; Otherwise, use a default template.
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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
|
|
|
|
inlinetask
|
|
|
|
|
(let ((full-title
|
2011-12-09 13:38:36 +00:00
|
|
|
|
(concat
|
|
|
|
|
(when todo (format "\\textbf{\\textsf{\\textsc{%s}}} " todo))
|
|
|
|
|
(when priority (format "\\framebox{\\#%c} " priority))
|
|
|
|
|
title
|
org-element: Internally store headline/inlinetask's tags as a list of strings
* contrib/lisp/org-element.el (org-element-headline-parser,
org-element-headline-interpreter, org-element-inlinetask-parser,
org-element-inlinetask-interpreter): Store headline/inlinetask's
tags as a list of strings.
* contrib/lisp/org-export.el (org-export--selected-trees,
org-export--skip-p): Use new tag representation.
* contrib/lisp/org-e-ascii.el (org-e-ascii--build-title,
org-e-ascii-format-inlinetask-function, org-e-ascii-inlinetask): Use
new tag representation.
* contrib/lisp/org-e-html.el (org-e-html-format-headline-function,
org-e-html-format-inlinetask-function, org-e-html--tags): Use new
tag representation.
* contrib/lisp/org-e-latex.el (org-e-latex-format-headline-function,
org-e-latex-format-inlinetask-function, org-e-latex-headline,
org-e-latex-inlinetask): Use new tag representation.
* contrib/lisp/org-e-odt.el (org-e-odt-format-org-tags): Use new tag
representation.
* testing/lisp/test-org-element.el: Update test.
2012-05-01 12:10:12 +00:00
|
|
|
|
(when tags (format "\\hfill{}\\textsc{:%s:}"
|
|
|
|
|
(mapconcat 'identity tags ":"))))))
|
2011-12-09 13:38:36 +00:00
|
|
|
|
(format (concat "\\begin{center}\n"
|
|
|
|
|
"\\fbox{\n"
|
|
|
|
|
"\\begin{minipage}[c]{.6\\textwidth}\n"
|
|
|
|
|
"%s\n\n"
|
|
|
|
|
"\\rule[.8em]{\\textwidth}{2pt}\n\n"
|
|
|
|
|
"%s"
|
|
|
|
|
"\\end{minipage}\n"
|
|
|
|
|
"}\n"
|
|
|
|
|
"\\end{center}")
|
|
|
|
|
full-title 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
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-latex--text-markup contents 'italic))
|
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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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."
|
2012-05-04 17:44:55 +00:00
|
|
|
|
(let* ((counter
|
|
|
|
|
(let ((count (org-element-property :counter item))
|
|
|
|
|
(level
|
2013-03-04 07:54:51 +00:00
|
|
|
|
;; 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)))
|
2012-05-04 17:44:55 +00:00
|
|
|
|
(and count
|
|
|
|
|
(< level 5)
|
|
|
|
|
(format "\\setcounter{enum%s}{%s}\n"
|
|
|
|
|
(nth (1- level) '("i" "ii" "iii" "iv"))
|
|
|
|
|
(1- count)))))
|
2012-06-09 13:34:27 +00:00
|
|
|
|
(checkbox (case (org-element-property :checkbox item)
|
|
|
|
|
(on "$\\boxtimes$ ")
|
|
|
|
|
(off "$\\Box$ ")
|
|
|
|
|
(trans "$\\boxminus$ ")))
|
2012-03-19 20:38:12 +00:00
|
|
|
|
(tag (let ((tag (org-element-property :tag item)))
|
2012-06-09 13:34:27 +00:00
|
|
|
|
;; Check-boxes must belong to the tag.
|
2013-06-18 20:44:26 +00:00
|
|
|
|
(and tag (format "[{%s}] "
|
2012-06-09 13:34:27 +00:00
|
|
|
|
(concat checkbox
|
|
|
|
|
(org-export-data tag info)))))))
|
2012-06-18 10:39:11 +00:00
|
|
|
|
(concat counter "\\item" (or tag (concat " " checkbox))
|
2012-08-22 14:55:18 +00:00
|
|
|
|
(and contents (org-trim contents))
|
2012-06-18 10:39:11 +00:00
|
|
|
|
;; 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
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-latex--delayed-footnotes-definitions
|
2012-06-18 12:28:47 +00:00
|
|
|
|
(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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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."
|
2012-03-28 12:04:26 +00:00
|
|
|
|
(let ((key (org-element-property :key keyword))
|
2012-03-19 20:38:12 +00:00
|
|
|
|
(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
|
2012-03-28 12:04:26 +00:00
|
|
|
|
((string= key "LATEX") value)
|
|
|
|
|
((string= key "INDEX") (format "\\index{%s}" value))
|
|
|
|
|
((string= key "TOC")
|
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 ((value (downcase value)))
|
2011-12-09 13:38:36 +00:00
|
|
|
|
(cond
|
|
|
|
|
((string-match "\\<headlines\\>" value)
|
|
|
|
|
(let ((depth (or (and (string-match "[0-9]+" value)
|
|
|
|
|
(string-to-number (match-string 0 value)))
|
|
|
|
|
(plist-get info :with-toc))))
|
|
|
|
|
(concat
|
|
|
|
|
(when (wholenump depth)
|
|
|
|
|
(format "\\setcounter{tocdepth}{%s}\n" depth))
|
|
|
|
|
"\\tableofcontents")))
|
|
|
|
|
((string= "tables" value) "\\listoftables")
|
2012-03-19 20:38:12 +00:00
|
|
|
|
((string= "listings" value)
|
|
|
|
|
(cond
|
2013-01-27 22:11:34 +00:00
|
|
|
|
((eq org-latex-listings 'minted) "\\listoflistings")
|
|
|
|
|
(org-latex-listings "\\lstlistoflistings")
|
2012-03-19 20:38:12 +00:00
|
|
|
|
;; At the moment, src blocks with a caption are wrapped
|
|
|
|
|
;; into a figure environment.
|
|
|
|
|
(t "\\listoffigures")))))))))
|
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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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 labelled: 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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(when (plist-get info :with-latex)
|
|
|
|
|
(org-element-property :value latex-fragment)))
|
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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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."
|
2012-12-12 21:48:06 +00:00
|
|
|
|
"\\\\\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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-latex--inline-image (link info)
|
2012-03-19 20:38:12 +00:00
|
|
|
|
"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))
|
2012-03-19 20:38:12 +00:00
|
|
|
|
(path (let ((raw-path (org-element-property :path link)))
|
|
|
|
|
(if (not (file-name-absolute-p raw-path)) raw-path
|
|
|
|
|
(expand-file-name raw-path))))
|
2013-03-06 04:04:42 +00:00
|
|
|
|
(filetype (file-name-extension path))
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(caption (org-latex--caption/label-string parent info))
|
2011-12-09 13:38:36 +00:00
|
|
|
|
;; Retrieve latex attributes from the element around.
|
2012-11-21 15:44:53 +00:00
|
|
|
|
(attr (org-export-read-attribute :attr_latex parent))
|
|
|
|
|
(float (let ((float (plist-get attr :float)))
|
2013-05-20 08:43:18 +00:00
|
|
|
|
(cond ((and (not float) (plist-member attr :float)) nil)
|
|
|
|
|
((string= float "wrap") 'wrap)
|
2012-11-21 15:44:53 +00:00
|
|
|
|
((string= float "multicolumn") 'multicolumn)
|
2013-06-29 15:04:03 +00:00
|
|
|
|
((or float
|
|
|
|
|
(org-element-property :caption parent)
|
|
|
|
|
(org-string-nw-p (plist-get attr :caption)))
|
2012-11-21 15:44:53 +00:00
|
|
|
|
'figure))))
|
2011-12-09 13:38:36 +00:00
|
|
|
|
(placement
|
2012-11-21 15:44:53 +00:00
|
|
|
|
(let ((place (plist-get attr :placement)))
|
|
|
|
|
(cond (place (format "%s" place))
|
|
|
|
|
((eq float 'wrap) "{l}{0.5\\textwidth}")
|
|
|
|
|
((eq float 'figure)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(format "[%s]" org-latex-default-figure-position))
|
2012-11-21 15:44:53 +00:00
|
|
|
|
(t ""))))
|
2013-01-09 00:04:14 +00:00
|
|
|
|
(comment-include (if (plist-get attr :comment-include) "%" ""))
|
2013-03-06 04:04:42 +00:00
|
|
|
|
;; It is possible to specify width and height in the
|
|
|
|
|
;; ATTR_LATEX line, and also via default variables.
|
2013-03-08 23:58:31 +00:00
|
|
|
|
(width (cond ((plist-get attr :width))
|
|
|
|
|
((plist-get attr :height) "")
|
|
|
|
|
((eq float 'wrap) "0.48\\textwidth")
|
|
|
|
|
(t org-latex-image-default-width)))
|
|
|
|
|
(height (cond ((plist-get attr :height))
|
|
|
|
|
((or (plist-get attr :width)
|
|
|
|
|
(memq float '(figure wrap))) "")
|
|
|
|
|
(t org-latex-image-default-height)))
|
|
|
|
|
(options (let ((opt (or (plist-get attr :options)
|
|
|
|
|
org-latex-image-default-option)))
|
2013-03-06 04:04:42 +00:00
|
|
|
|
(if (not (string-match "\\`\\[\\(.*\\)\\]\\'" opt)) opt
|
|
|
|
|
(match-string 1 opt))))
|
|
|
|
|
image-code)
|
2013-05-20 10:11:33 +00:00
|
|
|
|
(if (member filetype '("tikz" "pgf"))
|
2013-03-06 04:04:42 +00:00
|
|
|
|
;; 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)))
|
2013-03-17 21:01:36 +00:00
|
|
|
|
(setq image-code
|
|
|
|
|
(format "\\includegraphics%s{%s}"
|
|
|
|
|
(cond ((not (org-string-nw-p options)) "")
|
2013-03-17 21:17:31 +00:00
|
|
|
|
((= (aref options 0) ?,)
|
|
|
|
|
(format "[%s]"(substring options 1)))
|
|
|
|
|
(t (format "[%s]" options)))
|
2013-03-17 21:01:36 +00:00
|
|
|
|
path)))
|
2012-11-21 15:44:53 +00:00
|
|
|
|
;; Return proper string, depending on FLOAT.
|
|
|
|
|
(case float
|
2012-03-19 20:38:12 +00:00
|
|
|
|
(wrap (format "\\begin{wrapfigure}%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
|
|
|
|
\\centering
|
2013-03-06 04:04:42 +00:00
|
|
|
|
%s%s
|
|
|
|
|
%s\\end{wrapfigure}" placement comment-include image-code caption))
|
2012-05-06 06:27:56 +00:00
|
|
|
|
(multicolumn (format "\\begin{figure*}%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
|
|
|
|
\\centering
|
2013-03-06 04:04:42 +00:00
|
|
|
|
%s%s
|
|
|
|
|
%s\\end{figure*}" placement comment-include image-code caption))
|
2012-11-21 15:44:53 +00:00
|
|
|
|
(figure (format "\\begin{figure}%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
|
|
|
|
\\centering
|
2013-03-06 04:04:42 +00:00
|
|
|
|
%s%s
|
|
|
|
|
%s\\end{figure}" placement comment-include image-code 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
|
|
|
|
|
2013-01-27 22:11:34 +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.
|
2012-03-19 20:38:12 +00:00
|
|
|
|
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'."
|
2012-03-19 20:38:12 +00:00
|
|
|
|
(let* ((type (org-element-property :type link))
|
|
|
|
|
(raw-path (org-element-property :path link))
|
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
|
2013-01-27 22:11:34 +00:00
|
|
|
|
link org-latex-inline-image-rules))
|
2011-12-09 13:38:36 +00:00
|
|
|
|
(path (cond
|
|
|
|
|
((member type '("http" "https" "ftp" "mailto"))
|
|
|
|
|
(concat type ":" raw-path))
|
2012-03-19 20:38:12 +00:00
|
|
|
|
((string= type "file")
|
2013-03-27 22:24:50 +00:00
|
|
|
|
(if (not (file-name-absolute-p raw-path)) raw-path
|
|
|
|
|
(concat "file://" (expand-file-name raw-path))))
|
2011-12-09 13:38:36 +00:00
|
|
|
|
(t raw-path)))
|
|
|
|
|
protocol)
|
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
|
|
|
|
|
;; Image file.
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(imagep (org-latex--inline-image link info))
|
2012-05-18 19:06:12 +00:00
|
|
|
|
;; Radio link: Transcode target's contents and use them as link's
|
|
|
|
|
;; description.
|
2012-03-19 20:38:12 +00:00
|
|
|
|
((string= type "radio")
|
2012-05-18 09:20:00 +00:00
|
|
|
|
(let ((destination (org-export-resolve-radio-link link info)))
|
|
|
|
|
(when destination
|
|
|
|
|
(format "\\hyperref[%s]{%s}"
|
|
|
|
|
(org-export-solidify-link-text path)
|
|
|
|
|
(org-export-data (org-element-contents destination) info)))))
|
2013-02-23 12:40:47 +00:00
|
|
|
|
;; Links pointing to a headline: Find destination and build
|
2012-03-19 20:38:12 +00:00
|
|
|
|
;; 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)
|
2012-06-06 21:39:04 +00:00
|
|
|
|
;; Id link points to an external file.
|
|
|
|
|
(plain-text
|
2013-03-27 22:24:50 +00:00
|
|
|
|
(if desc (format "\\href{%s}{%s}" destination desc)
|
|
|
|
|
(format "\\url{%s}" destination)))
|
2012-03-19 20:38:12 +00:00
|
|
|
|
;; Fuzzy link points nowhere.
|
|
|
|
|
('nil
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(format org-latex-link-with-unknown-path-format
|
2012-03-19 20:38:12 +00:00
|
|
|
|
(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))))
|
2013-02-23 12:40:47 +00:00
|
|
|
|
;; LINK points to a headline. If headlines are numbered
|
2012-03-19 20:38:12 +00:00
|
|
|
|
;; and the link has no description, display headline's
|
|
|
|
|
;; number. Otherwise, display description or headline's
|
|
|
|
|
;; title.
|
|
|
|
|
(headline
|
|
|
|
|
(let ((label
|
|
|
|
|
(format "sec-%s"
|
|
|
|
|
(mapconcat
|
|
|
|
|
'number-to-string
|
|
|
|
|
(org-export-get-headline-number destination info)
|
|
|
|
|
"-"))))
|
|
|
|
|
(if (and (plist-get info :section-numbers) (not desc))
|
|
|
|
|
(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))))))
|
2012-03-19 20:38:12 +00:00
|
|
|
|
;; 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")
|
2012-04-25 20:07:37 +00:00
|
|
|
|
(format (org-export-get-coderef-format path desc)
|
2012-03-19 20:38:12 +00:00
|
|
|
|
(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
|
|
|
|
;; Link type is handled by a special function.
|
|
|
|
|
((functionp (setq protocol (nth 2 (assoc type org-link-protocols))))
|
|
|
|
|
(funcall protocol (org-link-unescape path) desc 'latex))
|
|
|
|
|
;; 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.
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(t (format org-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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Paragraph
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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."
|
2012-03-19 20:38:12 +00:00
|
|
|
|
(let* ((type (org-element-property :type plain-list))
|
2012-11-21 13:54:39 +00:00
|
|
|
|
(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 'unordered) "itemize")
|
|
|
|
|
((eq type 'descriptive) "description")))))
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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
|
2012-11-21 13:54:39 +00:00
|
|
|
|
;; Put optional arguments, if any inside square brackets
|
|
|
|
|
;; when necessary.
|
|
|
|
|
(let ((options (format "%s" (or (plist-get attr :options) ""))))
|
|
|
|
|
(cond ((equal options "") "")
|
|
|
|
|
((string-match "\\`\\[.*\\]\\'" options) options)
|
|
|
|
|
(t (format "[%s]" 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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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."
|
2012-10-26 22:36:00 +00:00
|
|
|
|
(let ((specialp (plist-get info :with-special-strings))
|
|
|
|
|
(output text))
|
2013-05-12 07:56:26 +00:00
|
|
|
|
;; Protect %, #, &, $, _, { and }.
|
|
|
|
|
(while (string-match "\\([^\\]\\|^\\)\\([%$#&{}_]\\)" output)
|
2012-10-26 22:36:00 +00:00
|
|
|
|
(setq output
|
|
|
|
|
(replace-match
|
|
|
|
|
(format "\\%s" (match-string 2 output)) nil t output 2)))
|
2013-05-12 07:56:26 +00:00
|
|
|
|
;; Protect ^.
|
|
|
|
|
(setq output
|
|
|
|
|
(replace-regexp-in-string
|
|
|
|
|
"\\([^\\]\\|^\\)\\(\\^\\)" "\\\\^{}" output nil nil 2))
|
2012-08-27 12:17:27 +00:00
|
|
|
|
;; Protect \. If special strings are used, be careful not to
|
|
|
|
|
;; protect "\" in "\-" constructs.
|
2013-04-01 02:21:09 +00:00
|
|
|
|
(let ((symbols (if specialp "-%$#&{}^_\\" "%$#&{}^_\\")))
|
2012-10-26 22:36:00 +00:00
|
|
|
|
(setq output
|
2012-08-27 12:17:27 +00:00
|
|
|
|
(replace-regexp-in-string
|
|
|
|
|
(format "\\(?:[^\\]\\|^\\)\\(\\\\\\)\\(?:[^%s]\\|$\\)" symbols)
|
2012-10-26 22:36:00 +00:00
|
|
|
|
"$\\backslash$" output nil t 1)))
|
2013-04-01 02:21:09 +00:00
|
|
|
|
;; Protect ~.
|
|
|
|
|
(setq output
|
|
|
|
|
(replace-regexp-in-string
|
|
|
|
|
"\\([^\\]\\|^\\)\\(~\\)" "\\textasciitilde{}" output nil t 2))
|
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)))
|
2012-08-27 12:17:27 +00:00
|
|
|
|
;; LaTeX into \LaTeX{} and TeX into \TeX{}.
|
|
|
|
|
(let ((case-fold-search nil)
|
|
|
|
|
(start 0))
|
2012-10-26 22:36:00 +00:00
|
|
|
|
(while (string-match "\\<\\(\\(?:La\\)?TeX\\)\\>" output start)
|
|
|
|
|
(setq output (replace-match
|
|
|
|
|
(format "\\%s{}" (match-string 1 output)) nil t output)
|
2012-08-27 12:17:27 +00:00
|
|
|
|
start (match-end 0))))
|
|
|
|
|
;; Convert special strings.
|
|
|
|
|
(when specialp
|
2012-10-26 22:36:00 +00:00
|
|
|
|
(setq output
|
|
|
|
|
(replace-regexp-in-string "\\.\\.\\." "\\ldots{}" output nil t)))
|
2012-08-27 12:17:27 +00:00
|
|
|
|
;; 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]*\n" " \\\\\\\\\n" output)))
|
2012-08-27 12:17:27 +00:00
|
|
|
|
;; 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
|
|
|
|
|
|
|
|
|
|
2012-04-29 00:11:22 +00:00
|
|
|
|
;;;; Planning
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-latex-planning (planning contents info)
|
2012-04-29 00:11:22 +00:00
|
|
|
|
"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)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(format org-latex-inactive-timestamp-format
|
2012-10-30 20:59:50 +00:00
|
|
|
|
(org-translate-time
|
|
|
|
|
(org-element-property :raw-value closed))))))
|
2012-04-29 00:11:22 +00:00
|
|
|
|
(let ((deadline (org-element-property :deadline planning)))
|
|
|
|
|
(when deadline
|
|
|
|
|
(concat
|
|
|
|
|
(format "\\textbf{%s} " org-deadline-string)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(format org-latex-active-timestamp-format
|
2012-10-30 20:59:50 +00:00
|
|
|
|
(org-translate-time
|
|
|
|
|
(org-element-property :raw-value deadline))))))
|
2012-04-29 00:11:22 +00:00
|
|
|
|
(let ((scheduled (org-element-property :scheduled planning)))
|
|
|
|
|
(when scheduled
|
|
|
|
|
(concat
|
|
|
|
|
(format "\\textbf{%s} " org-scheduled-string)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(format org-latex-active-timestamp-format
|
2012-10-30 20:59:50 +00:00
|
|
|
|
(org-translate-time
|
|
|
|
|
(org-element-property :raw-value scheduled))))))))
|
2012-04-29 00:11:22 +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
|
|
|
|
;;;; Quote Block
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Quote Section
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-latex-quote-section (quote-section 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-SECTION element from Org to LaTeX.
|
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual information."
|
|
|
|
|
(let ((value (org-remove-indentation
|
2012-03-19 20:38:12 +00:00
|
|
|
|
(org-element-property :value quote-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
|
|
|
|
(when value (format "\\begin{verbatim}\n%s\\end{verbatim}" value))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Radio Target
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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
|
2012-03-28 12:06:39 +00:00
|
|
|
|
(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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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."
|
2013-02-08 21:53:03 +00:00
|
|
|
|
(let ((type (downcase (org-element-property :type special-block)))
|
|
|
|
|
(opt (org-export-read-attribute :attr_latex special-block :options)))
|
|
|
|
|
(concat (format "\\begin{%s}%s\n" type (or opt ""))
|
2012-11-17 13:47:26 +00:00
|
|
|
|
;; Insert any label or caption within the block
|
|
|
|
|
;; (otherwise, a reference pointing to that element will
|
|
|
|
|
;; count the section instead).
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-latex--caption/label-string special-block info)
|
2012-11-17 13:47:26 +00:00
|
|
|
|
contents
|
|
|
|
|
(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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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."
|
2013-02-07 13:35:52 +00:00
|
|
|
|
(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))
|
|
|
|
|
(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)))
|
2013-03-23 21:10:35 +00:00
|
|
|
|
(retain-labels (org-element-property :retain-labels src-block))
|
2013-05-20 08:43:18 +00:00
|
|
|
|
(attributes (org-export-read-attribute :attr_latex src-block))
|
|
|
|
|
(float (plist-get attributes :float)))
|
2013-02-07 13:35:52 +00:00
|
|
|
|
(cond
|
|
|
|
|
;; Case 1. No source fontification.
|
|
|
|
|
((not org-latex-listings)
|
2013-03-23 21:10:35 +00:00
|
|
|
|
(let* ((caption-str (org-latex--caption/label-string src-block info))
|
2013-05-20 08:43:18 +00:00
|
|
|
|
(float-env
|
|
|
|
|
(cond ((and (not float) (plist-member attributes :float)) "%s")
|
|
|
|
|
((string= "multicolumn" float)
|
|
|
|
|
(format "\\begin{figure*}[%s]\n%s%%s\n\\end{figure*}"
|
|
|
|
|
org-latex-default-figure-position
|
|
|
|
|
caption-str))
|
|
|
|
|
((or caption float)
|
|
|
|
|
(format "\\begin{figure}[H]\n%s%%s\n\\end{figure}"
|
|
|
|
|
caption-str))
|
|
|
|
|
(t "%s"))))
|
2013-02-07 13:35:52 +00:00
|
|
|
|
(format
|
2013-05-20 08:43:18 +00:00
|
|
|
|
float-env
|
2013-03-23 21:10:35 +00:00
|
|
|
|
(concat (format "\\begin{verbatim}\n%s\\end{verbatim}"
|
2013-02-07 13:35:52 +00:00
|
|
|
|
(org-export-format-code-default src-block info))))))
|
|
|
|
|
;; Case 2. Custom environment.
|
|
|
|
|
(custom-env (format "\\begin{%s}\n%s\\end{%s}\n"
|
|
|
|
|
custom-env
|
|
|
|
|
(org-export-format-code-default src-block info)
|
|
|
|
|
custom-env))
|
|
|
|
|
;; Case 3. Use minted package.
|
|
|
|
|
((eq org-latex-listings 'minted)
|
2013-05-20 08:43:18 +00:00
|
|
|
|
(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{listing*}\n%%s\n%s\\end{listing*}"
|
|
|
|
|
caption-str))
|
|
|
|
|
((or caption float)
|
|
|
|
|
(format "\\begin{listing}[H]\n%%s\n%s\\end{listing}"
|
|
|
|
|
caption-str))
|
|
|
|
|
(t "%s")))
|
|
|
|
|
(body
|
|
|
|
|
(format
|
|
|
|
|
"\\begin{minted}[%s]{%s}\n%s\\end{minted}"
|
|
|
|
|
;; Options.
|
|
|
|
|
(org-latex--make-option-string
|
|
|
|
|
(if (or (not num-start)
|
|
|
|
|
(assoc "linenos" org-latex-minted-options))
|
|
|
|
|
org-latex-minted-options
|
|
|
|
|
(append
|
|
|
|
|
`(("linenos")
|
|
|
|
|
("firstnumber" ,(number-to-string (1+ num-start))))
|
|
|
|
|
org-latex-minted-options)))
|
|
|
|
|
;; Language.
|
|
|
|
|
(or (cadr (assq (intern lang) org-latex-minted-langs)) 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)))))))
|
2013-02-07 13:35:52 +00:00
|
|
|
|
;; Return value.
|
2013-05-20 08:43:18 +00:00
|
|
|
|
(format float-env body)))
|
2013-02-07 13:35:52 +00:00
|
|
|
|
;; Case 4. Use listings package.
|
|
|
|
|
(t
|
|
|
|
|
(let ((lst-lang
|
|
|
|
|
(or (cadr (assq (intern lang) org-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)))))))
|
|
|
|
|
(concat
|
|
|
|
|
;; Options.
|
2013-05-20 08:43:18 +00:00
|
|
|
|
(format
|
|
|
|
|
"\\lstset{%s}\n"
|
|
|
|
|
(org-latex--make-option-string
|
|
|
|
|
(append
|
|
|
|
|
org-latex-listings-options
|
|
|
|
|
(cond
|
|
|
|
|
((and (not float) (plist-member attributes :float)) nil)
|
|
|
|
|
((string= "multicolumn" float) '(("float" "*")))
|
|
|
|
|
((and float (not (assoc "float" org-latex-listings-options)))
|
|
|
|
|
`(("float" ,org-latex-default-figure-position))))
|
|
|
|
|
`(("language" ,lst-lang))
|
|
|
|
|
(when label `(("label" ,label)))
|
|
|
|
|
(when caption-str `(("caption" ,caption-str)))
|
|
|
|
|
(cond ((assoc "numbers" org-latex-listings-options) nil)
|
|
|
|
|
((not num-start) '(("numbers" "none")))
|
|
|
|
|
((zerop num-start) '(("numbers" "left")))
|
|
|
|
|
(t `(("numbers" "left")
|
|
|
|
|
("firstnumber"
|
|
|
|
|
,(number-to-string (1+ num-start)))))))))
|
2013-02-07 13:35:52 +00:00
|
|
|
|
;; 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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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."
|
2012-08-07 07:24:44 +00:00
|
|
|
|
(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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-latex--text-markup contents 'strike-through))
|
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
|
|
|
|
|
|
2013-04-17 16:43:01 +00:00
|
|
|
|
(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."
|
2013-04-17 18:57:21 +00:00
|
|
|
|
(let ((in-script-p
|
|
|
|
|
;; Non-nil if object is already in a sub/superscript.
|
|
|
|
|
(let ((parent object))
|
|
|
|
|
(catch 'exit
|
|
|
|
|
(while (setq parent (org-export-get-parent parent))
|
|
|
|
|
(let ((type (org-element-type parent)))
|
|
|
|
|
(cond ((memq type '(subscript superscript))
|
|
|
|
|
(throw 'exit t))
|
|
|
|
|
((memq type org-element-all-elements)
|
|
|
|
|
(throw 'exit nil))))))))
|
2013-04-17 22:06:06 +00:00
|
|
|
|
(type (org-element-type object))
|
2013-04-17 18:57:21 +00:00
|
|
|
|
(output ""))
|
2013-04-17 16:43:01 +00:00
|
|
|
|
(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
|
2013-04-17 18:56:32 +00:00
|
|
|
|
(format "%s\\text{%s}" output (org-export-data obj info))))
|
2013-04-17 16:43:01 +00:00
|
|
|
|
(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)
|
2013-04-17 18:57:21 +00:00
|
|
|
|
;; Result. Do not wrap into math mode if already in a subscript
|
|
|
|
|
;; or superscript. Do not wrap into curly brackets if OUTPUT is
|
2013-04-17 22:06:06 +00:00
|
|
|
|
;; a single character. Also merge consecutive subscript and
|
|
|
|
|
;; superscript into the same math snippet.
|
|
|
|
|
(concat (and (not in-script-p)
|
|
|
|
|
(let ((prev (org-export-get-previous-element object info)))
|
|
|
|
|
(or (not prev)
|
|
|
|
|
(not (eq (org-element-type prev)
|
|
|
|
|
(if (eq type 'subscript) 'superscript
|
|
|
|
|
'subscript)))
|
|
|
|
|
(let ((blank (org-element-property :post-blank prev)))
|
|
|
|
|
(and blank (> blank 0)))))
|
|
|
|
|
"$")
|
2013-04-17 16:43:01 +00:00
|
|
|
|
(if (eq (org-element-type object) 'subscript) "_" "^")
|
2013-04-17 18:57:21 +00:00
|
|
|
|
(and (> (length output) 1) "{")
|
|
|
|
|
output
|
|
|
|
|
(and (> (length output) 1) "}")
|
2013-04-17 22:06:06 +00:00
|
|
|
|
(and (not in-script-p)
|
|
|
|
|
(or (let ((blank (org-element-property :post-blank object)))
|
|
|
|
|
(and blank (> blank 0)))
|
|
|
|
|
(not (eq (org-element-type
|
|
|
|
|
(org-export-get-next-element object info))
|
|
|
|
|
(if (eq type 'subscript) 'superscript
|
|
|
|
|
'subscript))))
|
|
|
|
|
"$"))))
|
2013-04-17 16:43:01 +00:00
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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."
|
2013-04-17 16:43:01 +00:00
|
|
|
|
(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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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."
|
2013-04-17 16:43:01 +00:00
|
|
|
|
(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
|
2012-05-07 13:21:25 +00:00
|
|
|
|
;;
|
2013-01-27 22:11:34 +00:00
|
|
|
|
;; `org-latex-table' is the entry point for table transcoding. It
|
2012-11-20 23:18:07 +00:00
|
|
|
|
;; takes care of tables with a "verbatim" mode. Otherwise, it
|
2013-01-27 22:11:34 +00:00
|
|
|
|
;; delegates the job to either `org-latex--table.el-table',
|
|
|
|
|
;; `org-latex--org-table' or `org-latex--math-table' functions,
|
2012-11-20 23:18:07 +00:00
|
|
|
|
;; depending of the type of the table and the mode requested.
|
2012-05-07 13:21:25 +00:00
|
|
|
|
;;
|
2013-01-27 22:11:34 +00:00
|
|
|
|
;; `org-latex--align-string' is a subroutine used to build alignment
|
2012-11-20 23:18:07 +00:00
|
|
|
|
;; string for Org tables.
|
2012-05-07 13:21:25 +00:00
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-latex-table (table contents info)
|
2012-05-07 13:21:25 +00:00
|
|
|
|
"Transcode a TABLE element from Org to LaTeX.
|
2012-05-23 21:21:25 +00:00
|
|
|
|
CONTENTS is the contents of the table. INFO is a plist holding
|
|
|
|
|
contextual information."
|
2012-11-20 23:18:07 +00:00
|
|
|
|
(if (eq (org-element-property :type table) 'table.el)
|
|
|
|
|
;; "table.el" table. Convert it using appropriate tools.
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-latex--table.el-table table info)
|
2012-11-20 23:18:07 +00:00
|
|
|
|
(let ((type (or (org-export-read-attribute :attr_latex table :mode)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
org-latex-default-table-mode)))
|
2012-11-20 23:18:07 +00:00
|
|
|
|
(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"))
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-latex--math-table table info))
|
2012-11-20 23:18:07 +00:00
|
|
|
|
;; Case 3: Standard table.
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(t (concat (org-latex--org-table table contents info)
|
2012-11-20 23:18:07 +00:00
|
|
|
|
;; When there are footnote references within the
|
|
|
|
|
;; table, insert their definition just after it.
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-latex--delayed-footnotes-definitions table info)))))))
|
2012-11-20 23:18:07 +00:00
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-latex--align-string (table info)
|
2012-05-07 13:21:25 +00:00
|
|
|
|
"Return an appropriate LaTeX alignment string.
|
|
|
|
|
TABLE is the considered table. INFO is a plist used as
|
|
|
|
|
a communication channel."
|
2012-11-20 23:18:07 +00:00
|
|
|
|
(or (org-export-read-attribute :attr_latex table :align)
|
|
|
|
|
(let (align)
|
2012-05-07 13:21:25 +00:00
|
|
|
|
;; Extract column groups and alignment from first (non-rule)
|
|
|
|
|
;; row.
|
|
|
|
|
(org-element-map
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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)
|
2012-11-20 23:18:07 +00:00
|
|
|
|
(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
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-latex--org-table (table contents info)
|
2012-05-07 13:21:25 +00:00
|
|
|
|
"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
|
|
|
|
|
2012-05-07 13:21:25 +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.
|
|
|
|
|
|
2012-11-20 23:18:07 +00:00
|
|
|
|
This function assumes TABLE has `org' as its `:type' property and
|
|
|
|
|
`table' as its `:mode' attribute."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(let* ((caption (org-latex--caption/label-string table info))
|
2012-11-20 23:18:07 +00:00
|
|
|
|
(attr (org-export-read-attribute :attr_latex table))
|
2011-12-09 13:38:36 +00:00
|
|
|
|
;; Determine alignment string.
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(alignment (org-latex--align-string table info))
|
2011-12-09 13:38:36 +00:00
|
|
|
|
;; Determine environment for the table: longtable, tabular...
|
2013-03-08 23:58:31 +00:00
|
|
|
|
(table-env (or (plist-get attr :environment)
|
|
|
|
|
org-latex-default-table-environment))
|
2012-03-22 17:15:54 +00:00
|
|
|
|
;; If table is a float, determine environment: table, table*
|
|
|
|
|
;; or sidewaystable.
|
2013-03-26 02:45:30 +00:00
|
|
|
|
(float-env (unless (member table-env '("longtable" "longtabu"))
|
2012-11-20 23:18:07 +00:00
|
|
|
|
(let ((float (plist-get attr :float)))
|
|
|
|
|
(cond
|
2013-05-20 08:43:18 +00:00
|
|
|
|
((and (not float) (plist-member attr :float)) nil)
|
2012-11-20 23:18:07 +00:00
|
|
|
|
((string= float "sidewaystable") "sidewaystable")
|
|
|
|
|
((string= float "multicolumn") "table*")
|
2013-06-29 15:04:03 +00:00
|
|
|
|
((or float
|
|
|
|
|
(org-element-property :caption table)
|
|
|
|
|
(org-string-nw-p (plist-get attr :caption)))
|
2012-11-20 23:18:07 +00:00
|
|
|
|
"table")))))
|
2011-12-09 13:38:36 +00:00
|
|
|
|
;; Extract others display options.
|
2012-11-25 14:10:37 +00:00
|
|
|
|
(fontsize (let ((font (plist-get attr :font)))
|
2013-03-08 23:58:31 +00:00
|
|
|
|
(and font (concat font "\n"))))
|
2012-11-20 23:18:07 +00:00
|
|
|
|
(width (plist-get attr :width))
|
2013-03-26 02:45:30 +00:00
|
|
|
|
(spreadp (plist-get attr :spread))
|
2012-11-20 23:18:07 +00:00
|
|
|
|
(placement (or (plist-get attr :placement)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(format "[%s]" org-latex-default-figure-position)))
|
2012-11-20 23:18:07 +00:00
|
|
|
|
(centerp (if (plist-member attr :center) (plist-get attr :center)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
org-latex-tables-centered)))
|
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.
|
2012-11-20 23:18:07 +00:00
|
|
|
|
((equal "longtable" table-env)
|
2012-11-25 14:10:37 +00:00
|
|
|
|
(concat (and fontsize (concat "{" fontsize))
|
|
|
|
|
(format "\\begin{longtable}{%s}\n" alignment)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(and org-latex-table-caption-above
|
2012-11-25 14:10:37 +00:00
|
|
|
|
(org-string-nw-p caption)
|
|
|
|
|
(concat caption "\\\\\n"))
|
|
|
|
|
contents
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(and (not org-latex-table-caption-above)
|
2012-11-25 14:10:37 +00:00
|
|
|
|
(org-string-nw-p caption)
|
|
|
|
|
(concat caption "\\\\\n"))
|
|
|
|
|
"\\end{longtable}\n"
|
|
|
|
|
(and fontsize "}")))
|
2013-03-26 02:45:30 +00:00
|
|
|
|
;; 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 org-latex-table-caption-above
|
|
|
|
|
(org-string-nw-p caption)
|
|
|
|
|
(concat caption "\\\\\n"))
|
|
|
|
|
contents
|
|
|
|
|
(and (not org-latex-table-caption-above)
|
|
|
|
|
(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.
|
2012-11-20 23:18:07 +00:00
|
|
|
|
(t (concat (cond
|
|
|
|
|
(float-env
|
|
|
|
|
(concat (format "\\begin{%s}%s\n" float-env placement)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(if org-latex-table-caption-above caption "")
|
2012-11-25 14:10:37 +00:00
|
|
|
|
(when centerp "\\centering\n")
|
|
|
|
|
fontsize))
|
|
|
|
|
(centerp (concat "\\begin{center}\n" fontsize))
|
|
|
|
|
(fontsize (concat "{" fontsize)))
|
2013-03-26 02:45:30 +00:00
|
|
|
|
(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)))
|
2012-11-20 23:18:07 +00:00
|
|
|
|
(cond
|
|
|
|
|
(float-env
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(concat (if org-latex-table-caption-above "" caption)
|
2012-11-20 23:18:07 +00:00
|
|
|
|
(format "\n\\end{%s}" float-env)))
|
2012-11-25 14:10:37 +00:00
|
|
|
|
(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
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-latex--table.el-table (table info)
|
2012-05-07 13:21:25 +00:00
|
|
|
|
"Return appropriate LaTeX code for a table.el table.
|
|
|
|
|
|
2012-11-20 23:18:07 +00:00
|
|
|
|
TABLE is the table type element to transcode. INFO is a plist
|
|
|
|
|
used as a communication channel.
|
2012-05-07 13:21:25 +00:00
|
|
|
|
|
|
|
|
|
This function assumes TABLE has `table.el' as its `:type'
|
2012-11-20 23:18:07 +00:00
|
|
|
|
property."
|
2012-05-07 13:21:25 +00:00
|
|
|
|
(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)))
|
2012-11-21 16:31:32 +00:00
|
|
|
|
(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)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
org-latex-tables-centered)))
|
2012-11-21 16:31:32 +00:00
|
|
|
|
(if (not centerp) output
|
|
|
|
|
(format "\\begin{center}\n%s\n\\end{center}" output))))))
|
2012-11-20 23:18:07 +00:00
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-latex--math-table (table info)
|
2012-11-20 23:18:07 +00:00
|
|
|
|
"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.."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(let* ((caption (org-latex--caption/label-string table info))
|
2012-11-20 23:18:07 +00:00
|
|
|
|
(attr (org-export-read-attribute :attr_latex table))
|
2013-04-09 13:46:28 +00:00
|
|
|
|
(inlinep (equal (plist-get attr :mode) "inline-math"))
|
2013-03-08 23:58:31 +00:00
|
|
|
|
(env (or (plist-get attr :environment)
|
|
|
|
|
org-latex-default-table-environment))
|
2012-11-20 23:18:07 +00:00
|
|
|
|
(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) "&")
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(or (cdr (assoc env org-latex-table-matrix-macros)) "\\\\")
|
2012-11-20 23:18:07 +00:00
|
|
|
|
"\n")))
|
2012-11-25 15:16:29 +00:00
|
|
|
|
(org-element-map table 'table-row 'identity info) ""))
|
|
|
|
|
;; Variables related to math clusters (contiguous math tables
|
|
|
|
|
;; of the same type).
|
|
|
|
|
(mode (org-export-read-attribute :attr_latex table :mode))
|
|
|
|
|
(prev (org-export-get-previous-element table info))
|
2012-11-25 15:41:43 +00:00
|
|
|
|
(next (org-export-get-next-element table info))
|
|
|
|
|
(same-mode-p
|
|
|
|
|
(lambda (table)
|
|
|
|
|
;; Non-nil when TABLE has the same mode as current table.
|
|
|
|
|
(string= (or (org-export-read-attribute :attr_latex table :mode)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
org-latex-default-table-mode)
|
2012-11-25 15:41:43 +00:00
|
|
|
|
mode))))
|
2012-11-20 23:18:07 +00:00
|
|
|
|
(concat
|
2012-11-25 15:16:29 +00:00
|
|
|
|
;; Opening string. If TABLE is in the middle of a table cluster,
|
|
|
|
|
;; do not insert any.
|
|
|
|
|
(cond ((and prev
|
|
|
|
|
(eq (org-element-type prev) 'table)
|
|
|
|
|
(memq (org-element-property :post-blank prev) '(0 nil))
|
2012-11-25 15:41:43 +00:00
|
|
|
|
(funcall same-mode-p prev))
|
2012-11-25 15:16:29 +00:00
|
|
|
|
nil)
|
|
|
|
|
(inlinep "\\(")
|
2012-11-20 23:18:07 +00:00
|
|
|
|
((org-string-nw-p caption) (concat "\\begin{equation}\n" caption))
|
|
|
|
|
(t "\\["))
|
2013-03-08 23:58:31 +00:00
|
|
|
|
;; Prefix.
|
|
|
|
|
(or (plist-get attr :math-prefix) "")
|
2012-11-20 23:18:07 +00:00
|
|
|
|
;; Environment. Also treat special cases.
|
|
|
|
|
(cond ((equal env "array")
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(let ((align (org-latex--align-string table info)))
|
2012-11-20 23:18:07 +00:00
|
|
|
|
(format "\\begin{array}{%s}\n%s\\end{array}" align contents)))
|
2013-01-27 22:11:34 +00:00
|
|
|
|
((assoc env org-latex-table-matrix-macros)
|
2013-03-08 23:58:31 +00:00
|
|
|
|
(format "\\%s%s{\n%s}"
|
|
|
|
|
env
|
|
|
|
|
(or (plist-get attr :math-arguments) "")
|
2012-11-20 23:18:07 +00:00
|
|
|
|
contents))
|
|
|
|
|
(t (format "\\begin{%s}\n%s\\end{%s}" env contents env)))
|
2013-03-08 23:58:31 +00:00
|
|
|
|
;; Suffix.
|
|
|
|
|
(or (plist-get attr :math-suffix) "")
|
2012-11-25 15:16:29 +00:00
|
|
|
|
;; Closing string. If TABLE is in the middle of a table cluster,
|
|
|
|
|
;; do not insert any. If it closes such a cluster, be sure to
|
|
|
|
|
;; close the cluster with a string matching the opening string.
|
|
|
|
|
(cond ((and next
|
|
|
|
|
(eq (org-element-type next) 'table)
|
|
|
|
|
(memq (org-element-property :post-blank table) '(0 nil))
|
2012-11-25 15:41:43 +00:00
|
|
|
|
(funcall same-mode-p next))
|
2012-11-25 15:16:29 +00:00
|
|
|
|
nil)
|
|
|
|
|
(inlinep "\\)")
|
|
|
|
|
;; Find cluster beginning to know which environment to use.
|
|
|
|
|
((let ((cluster-beg table) prev)
|
|
|
|
|
(while (and (setq prev (org-export-get-previous-element
|
|
|
|
|
cluster-beg info))
|
|
|
|
|
(memq (org-element-property :post-blank prev)
|
|
|
|
|
'(0 nil))
|
2012-11-25 15:41:43 +00:00
|
|
|
|
(funcall same-mode-p prev))
|
2012-11-25 15:16:29 +00:00
|
|
|
|
(setq cluster-beg prev))
|
|
|
|
|
(and (or (org-element-property :caption cluster-beg)
|
|
|
|
|
(org-element-property :name cluster-beg))
|
|
|
|
|
"\n\\end{equation}")))
|
2012-11-20 23:18:07 +00:00
|
|
|
|
(t "\\]")))))
|
2012-04-12 21:48:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Table Cell
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-latex-table-cell (table-cell contents info)
|
2012-04-12 21:48:23 +00:00
|
|
|
|
"Transcode a TABLE-CELL element from Org to LaTeX.
|
|
|
|
|
CONTENTS is the cell contents. INFO is a plist used as
|
|
|
|
|
a communication channel."
|
|
|
|
|
(concat (if (and contents
|
2013-01-27 22:11:34 +00:00
|
|
|
|
org-latex-table-scientific-notation
|
2012-04-12 21:48:23 +00:00
|
|
|
|
(string-match orgtbl-exp-regexp contents))
|
|
|
|
|
;; Use appropriate format string for scientific
|
|
|
|
|
;; notation.
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(format org-latex-table-scientific-notation
|
2012-04-12 21:48:23 +00:00
|
|
|
|
(match-string 1 contents)
|
|
|
|
|
(match-string 2 contents))
|
|
|
|
|
contents)
|
2012-07-27 14:13:57 +00:00
|
|
|
|
(when (org-export-get-next-element table-cell info) " & ")))
|
2012-04-12 21:48:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Table Row
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-latex-table-row (table-row contents info)
|
2012-04-12 21:48:23 +00:00
|
|
|
|
"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."
|
|
|
|
|
;; Rules are ignored since table separators are deduced from
|
|
|
|
|
;; borders of the current row.
|
|
|
|
|
(when (eq (org-element-property :type table-row) 'standard)
|
2012-11-20 23:18:07 +00:00
|
|
|
|
(let* ((attr (org-export-read-attribute :attr_latex
|
|
|
|
|
(org-export-get-parent table-row)))
|
2013-03-26 02:45:30 +00:00
|
|
|
|
(longtablep (member (or (plist-get attr :environment)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
org-latex-default-table-environment)
|
2013-03-26 02:45:30 +00:00
|
|
|
|
'("longtable" "longtabu")))
|
2012-11-20 23:18:07 +00:00
|
|
|
|
(booktabsp (if (plist-member attr :booktabs)
|
|
|
|
|
(plist-get attr :booktabs)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
org-latex-tables-booktabs))
|
2012-04-12 21:48:23 +00:00
|
|
|
|
;; TABLE-ROW's borders are extracted from its first cell.
|
2012-11-20 23:18:07 +00:00
|
|
|
|
(borders (org-export-table-cell-borders
|
|
|
|
|
(car (org-element-contents table-row)) info)))
|
2012-04-12 21:48:23 +00:00
|
|
|
|
(concat
|
|
|
|
|
;; When BOOKTABS are activated enforce top-rule even when no
|
|
|
|
|
;; hline was specifically marked.
|
|
|
|
|
(cond ((and booktabsp (memq 'top borders)) "\\toprule\n")
|
|
|
|
|
((and (memq 'top borders) (memq 'above borders)) "\\hline\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))
|
|
|
|
|
(format "%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
|
2012-04-12 21:48:23 +00:00
|
|
|
|
%s\\multicolumn{%d}{r}{Continued on next page} \\\\
|
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"
|
2012-04-12 21:48:23 +00:00
|
|
|
|
(if booktabsp "\\midrule" "\\hline")
|
|
|
|
|
(if booktabsp "\\midrule" "\\hline")
|
|
|
|
|
;; Number of columns.
|
|
|
|
|
(cdr (org-export-table-dimensions
|
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
|
|
|
|
(org-export-get-parent-table table-row) info))))
|
2012-04-12 21:48:23 +00:00
|
|
|
|
;; When BOOKTABS are activated enforce bottom rule even when
|
|
|
|
|
;; no hline was specifically marked.
|
|
|
|
|
((and booktabsp (memq 'bottom borders)) "\\bottomrule")
|
|
|
|
|
((and (memq 'bottom borders) (memq 'below borders)) "\\hline")
|
|
|
|
|
((memq 'below borders) (if booktabsp "\\midrule" "\\hline")))))))
|
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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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.
|
2012-03-19 20:38:12 +00:00
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
2012-04-29 00:23:09 +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
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-latex-timestamp (timestamp contents info)
|
2012-04-29 00:23:09 +00:00
|
|
|
|
"Transcode a TIMESTAMP object from Org to LaTeX.
|
2012-03-19 20:38:12 +00:00
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual
|
|
|
|
|
information."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(let ((value (org-latex-plain-text
|
2013-01-10 20:42:21 +00:00
|
|
|
|
(org-timestamp-translate timestamp) info)))
|
2012-07-17 15:03:29 +00:00
|
|
|
|
(case (org-element-property :type timestamp)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
((active active-range) (format org-latex-active-timestamp-format value))
|
2012-11-23 17:43:05 +00:00
|
|
|
|
((inactive inactive-range)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(format org-latex-inactive-timestamp-format value))
|
|
|
|
|
(otherwise (format org-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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-latex--text-markup contents 'underline))
|
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
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-latex-verbatim (verbatim contents info)
|
2012-03-19 20:38:12 +00:00
|
|
|
|
"Transcode a VERBATIM object from Org to LaTeX.
|
|
|
|
|
CONTENTS is nil. INFO is a plist used as a communication
|
|
|
|
|
channel."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-latex--text-markup (org-element-property :value verbatim) '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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Verse Block
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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.
|
2013-03-05 13:37:47 +00:00
|
|
|
|
CONTENTS is verse block contents. INFO is a plist holding
|
2012-04-25 20:15:29 +00:00
|
|
|
|
contextual information."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(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.
|
|
|
|
|
(progn
|
|
|
|
|
(setq contents (replace-regexp-in-string
|
2011-12-09 13:38:36 +00:00
|
|
|
|
"^ *\\\\\\\\$" "\\\\vspace*{1em}"
|
|
|
|
|
(replace-regexp-in-string
|
2012-04-25 20:15:29 +00:00
|
|
|
|
"\\(\\\\\\\\\\)?[ \t]*\n" " \\\\\\\\\n" 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
|
|
|
|
(while (string-match "^[ \t]+" contents)
|
|
|
|
|
(let ((new-str (format "\\hspace*{%dem}"
|
2011-12-09 13:38:36 +00:00
|
|
|
|
(length (match-string 0 contents)))))
|
|
|
|
|
(setq contents (replace-match new-str nil t 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
|
|
|
|
(format "\\begin{verse}\n%s\\end{verse}" contents))))
|
|
|
|
|
|
|
|
|
|
|
2012-03-19 20:38:12 +00:00
|
|
|
|
|
2012-10-08 12:20:56 +00:00
|
|
|
|
;;; End-user functions
|
2012-03-19 20:38:12 +00:00
|
|
|
|
|
2012-07-20 11:11:44 +00:00
|
|
|
|
;;;###autoload
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-latex-export-as-latex
|
2012-12-02 16:24:19 +00:00
|
|
|
|
(&optional async subtreep visible-only body-only ext-plist)
|
2012-07-20 11:11:44 +00:00
|
|
|
|
"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.
|
|
|
|
|
|
2012-12-02 16:24:19 +00:00
|
|
|
|
A non-nil optional argument ASYNC means the process should happen
|
|
|
|
|
asynchronously. The resulting buffer should be accessible
|
|
|
|
|
through the `org-export-stack' interface.
|
|
|
|
|
|
2012-07-20 11:11:44 +00:00
|
|
|
|
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.
|
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
Export is done in a buffer named \"*Org LATEX Export*\", which
|
2012-07-20 11:11:44 +00:00
|
|
|
|
will be displayed when `org-export-show-temporary-export-buffer'
|
|
|
|
|
is non-nil."
|
|
|
|
|
(interactive)
|
2012-12-02 16:24:19 +00:00
|
|
|
|
(if async
|
|
|
|
|
(org-export-async-start
|
|
|
|
|
(lambda (output)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(with-current-buffer (get-buffer-create "*Org LATEX Export*")
|
2012-12-02 16:24:19 +00:00
|
|
|
|
(erase-buffer)
|
|
|
|
|
(insert output)
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(LaTeX-mode)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-export-add-to-stack (current-buffer) 'latex)))
|
|
|
|
|
`(org-export-as 'latex ,subtreep ,visible-only ,body-only
|
2012-12-02 16:24:19 +00:00
|
|
|
|
',ext-plist))
|
|
|
|
|
(let ((outbuf
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-export-to-buffer 'latex "*Org LATEX Export*"
|
2012-12-02 16:24:19 +00:00
|
|
|
|
subtreep visible-only body-only ext-plist)))
|
|
|
|
|
(with-current-buffer outbuf (LaTeX-mode))
|
|
|
|
|
(when org-export-show-temporary-export-buffer
|
|
|
|
|
(switch-to-buffer-other-window outbuf)))))
|
2012-07-20 11:11:44 +00:00
|
|
|
|
|
2013-04-06 17:09:38 +00:00
|
|
|
|
;;;###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))
|
|
|
|
|
|
2012-07-20 11:11:44 +00:00
|
|
|
|
;;;###autoload
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-latex-export-to-latex
|
2012-12-02 16:24:19 +00:00
|
|
|
|
(&optional async subtreep visible-only body-only ext-plist)
|
2012-03-19 20:38:12 +00:00
|
|
|
|
"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.
|
|
|
|
|
|
2012-12-02 16:24:19 +00:00
|
|
|
|
A non-nil optional argument ASYNC means the process should happen
|
|
|
|
|
asynchronously. The resulting file should be accessible through
|
|
|
|
|
the `org-export-stack' interface.
|
|
|
|
|
|
2012-03-19 20:38:12 +00:00
|
|
|
|
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 output file's name."
|
|
|
|
|
(interactive)
|
2012-11-29 20:52:43 +00:00
|
|
|
|
(let ((outfile (org-export-output-file-name ".tex" subtreep)))
|
2012-12-02 16:24:19 +00:00
|
|
|
|
(if async
|
|
|
|
|
(org-export-async-start
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(lambda (f) (org-export-add-to-stack f 'latex))
|
2012-12-02 16:24:19 +00:00
|
|
|
|
`(expand-file-name
|
|
|
|
|
(org-export-to-file
|
2013-01-27 22:11:34 +00:00
|
|
|
|
'latex ,outfile ,subtreep ,visible-only ,body-only ',ext-plist)))
|
2012-12-02 16:24:19 +00:00
|
|
|
|
(org-export-to-file
|
2013-01-27 22:11:34 +00:00
|
|
|
|
'latex outfile subtreep visible-only body-only ext-plist))))
|
2012-03-19 20:38:12 +00:00
|
|
|
|
|
2012-07-20 11:11:44 +00:00
|
|
|
|
;;;###autoload
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-latex-export-to-pdf
|
2012-12-02 16:24:19 +00:00
|
|
|
|
(&optional async subtreep visible-only body-only ext-plist)
|
2012-03-19 20:38:12 +00:00
|
|
|
|
"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.
|
|
|
|
|
|
2012-12-02 16:24:19 +00:00
|
|
|
|
A non-nil optional argument ASYNC means the process should happen
|
|
|
|
|
asynchronously. The resulting file should be accessible through
|
|
|
|
|
the `org-export-stack' interface.
|
|
|
|
|
|
2012-03-19 20:38:12 +00:00
|
|
|
|
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)
|
2012-12-02 16:24:19 +00:00
|
|
|
|
(if async
|
|
|
|
|
(let ((outfile (org-export-output-file-name ".tex" subtreep)))
|
|
|
|
|
(org-export-async-start
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(lambda (f) (org-export-add-to-stack f 'latex))
|
2012-12-02 16:24:19 +00:00
|
|
|
|
`(expand-file-name
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-latex-compile
|
2012-12-02 16:24:19 +00:00
|
|
|
|
(org-export-to-file
|
2013-01-27 22:11:34 +00:00
|
|
|
|
'latex ,outfile ,subtreep ,visible-only ,body-only
|
2012-12-02 16:24:19 +00:00
|
|
|
|
',ext-plist)))))
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-latex-compile
|
|
|
|
|
(org-latex-export-to-latex
|
2012-12-02 16:24:19 +00:00
|
|
|
|
nil subtreep visible-only body-only ext-plist))))
|
2012-03-19 20:38:12 +00:00
|
|
|
|
|
2013-02-26 08:28:59 +00:00
|
|
|
|
(defun org-latex-compile (texfile &optional snippet)
|
2012-03-19 20:38:12 +00:00
|
|
|
|
"Compile a TeX file.
|
|
|
|
|
|
|
|
|
|
TEXFILE is the name of the file being compiled. Processing is
|
2013-01-27 22:11:34 +00:00
|
|
|
|
done through the command specified in `org-latex-pdf-process'.
|
2012-03-19 20:38:12 +00:00
|
|
|
|
|
2013-02-26 08:28:59 +00:00
|
|
|
|
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.
|
|
|
|
|
|
2012-03-19 20:38:12 +00:00
|
|
|
|
Return PDF file name or an error if it couldn't be produced."
|
2012-10-25 12:52:25 +00:00
|
|
|
|
(let* ((base-name (file-name-sans-extension (file-name-nondirectory texfile)))
|
|
|
|
|
(full-name (file-truename texfile))
|
|
|
|
|
(out-dir (file-name-directory texfile))
|
2013-05-30 18:29:34 +00:00
|
|
|
|
;; Properly set working directory for compilation.
|
|
|
|
|
(default-directory (if (file-name-absolute-p texfile)
|
|
|
|
|
(file-name-directory full-name)
|
|
|
|
|
default-directory))
|
2012-03-19 20:38:12 +00:00
|
|
|
|
errors)
|
2013-04-06 14:49:10 +00:00
|
|
|
|
(unless snippet (message (format "Processing LaTeX file %s..." texfile)))
|
2012-10-11 21:46:07 +00:00
|
|
|
|
(save-window-excursion
|
|
|
|
|
(cond
|
|
|
|
|
;; A function is provided: Apply it.
|
2013-01-27 22:11:34 +00:00
|
|
|
|
((functionp org-latex-pdf-process)
|
|
|
|
|
(funcall org-latex-pdf-process (shell-quote-argument texfile)))
|
2012-10-11 21:46:07 +00:00
|
|
|
|
;; 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.
|
2013-01-27 22:11:34 +00:00
|
|
|
|
((consp org-latex-pdf-process)
|
2013-02-26 08:28:59 +00:00
|
|
|
|
(let ((outbuf (and (not snippet)
|
|
|
|
|
(get-buffer-create "*Org PDF LaTeX Output*"))))
|
2012-10-11 21:46:07 +00:00
|
|
|
|
(mapc
|
|
|
|
|
(lambda (command)
|
|
|
|
|
(shell-command
|
|
|
|
|
(replace-regexp-in-string
|
2012-10-25 12:52:25 +00:00
|
|
|
|
"%b" (shell-quote-argument base-name)
|
2012-10-11 21:46:07 +00:00
|
|
|
|
(replace-regexp-in-string
|
2012-10-25 12:52:25 +00:00
|
|
|
|
"%f" (shell-quote-argument full-name)
|
2012-10-11 21:46:07 +00:00
|
|
|
|
(replace-regexp-in-string
|
|
|
|
|
"%o" (shell-quote-argument out-dir) command t t) t t) t t)
|
|
|
|
|
outbuf))
|
2013-01-27 22:11:34 +00:00
|
|
|
|
org-latex-pdf-process)
|
2012-10-11 21:46:07 +00:00
|
|
|
|
;; Collect standard errors from output buffer.
|
2013-02-26 08:28:59 +00:00
|
|
|
|
(setq errors (and (not snippet) (org-latex--collect-errors outbuf)))))
|
2012-10-11 21:46:07 +00:00
|
|
|
|
(t (error "No valid command to process to PDF")))
|
2013-05-30 18:29:48 +00:00
|
|
|
|
(let ((pdffile (concat out-dir base-name ".pdf")))
|
2012-10-11 21:46:07 +00:00
|
|
|
|
;; Check for process failure. Provide collected errors if
|
|
|
|
|
;; possible.
|
|
|
|
|
(if (not (file-exists-p pdffile))
|
|
|
|
|
(error (concat (format "PDF file %s wasn't produced" pdffile)
|
|
|
|
|
(when errors (concat ": " errors))))
|
|
|
|
|
;; Else remove log files, when specified, and signal end of
|
|
|
|
|
;; process to user, along with any error encountered.
|
2013-02-26 08:28:59 +00:00
|
|
|
|
(when (and (not snippet) org-latex-remove-logfiles)
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(dolist (ext org-latex-logfiles-extensions)
|
2012-10-25 12:52:25 +00:00
|
|
|
|
(let ((file (concat out-dir base-name "." ext)))
|
2012-10-11 21:46:07 +00:00
|
|
|
|
(when (file-exists-p file) (delete-file file)))))
|
|
|
|
|
(message (concat "Process completed"
|
|
|
|
|
(if (not errors) "."
|
|
|
|
|
(concat " with errors: " errors)))))
|
|
|
|
|
;; Return output file name.
|
|
|
|
|
pdffile))))
|
2012-03-19 20:38:12 +00:00
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-latex--collect-errors (buffer)
|
2012-03-19 20:38:12 +00:00
|
|
|
|
"Collect some kind of errors from \"pdflatex\" command output.
|
|
|
|
|
|
|
|
|
|
BUFFER is the buffer containing output.
|
|
|
|
|
|
|
|
|
|
Return collected error types as a string, or nil if there was
|
|
|
|
|
none."
|
|
|
|
|
(with-current-buffer buffer
|
|
|
|
|
(save-excursion
|
|
|
|
|
(goto-char (point-max))
|
2012-09-15 12:58:49 +00:00
|
|
|
|
(when (re-search-backward "^[ \t]*This is .*?TeX.*?Version" nil t)
|
2012-03-19 20:38:12 +00:00
|
|
|
|
(let ((case-fold-search t)
|
|
|
|
|
(errors ""))
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(dolist (latex-error org-latex-known-errors)
|
2012-09-15 12:58:49 +00:00
|
|
|
|
(when (save-excursion (re-search-forward (car latex-error) nil t))
|
|
|
|
|
(setq errors (concat errors " " (cdr latex-error)))))
|
2012-03-19 20:38:12 +00:00
|
|
|
|
(and (org-string-nw-p errors) (org-trim errors)))))))
|
|
|
|
|
|
2012-10-08 12:20:56 +00:00
|
|
|
|
;;;###autoload
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-latex-publish-to-latex (plist filename pub-dir)
|
2012-10-08 12:20:56 +00:00
|
|
|
|
"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."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-publish-org-to 'latex filename ".tex" plist pub-dir))
|
2012-10-08 12:20:56 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(defun org-latex-publish-to-pdf (plist filename pub-dir)
|
2012-10-08 12:20:56 +00:00
|
|
|
|
"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."
|
2013-01-27 22:11:34 +00:00
|
|
|
|
;; Unlike to `org-latex-publish-to-latex', PDF file is generated
|
2012-10-08 12:20:56 +00:00
|
|
|
|
;; in working directory and then moved to publishing directory.
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-publish-attachment
|
2012-10-08 12:20:56 +00:00
|
|
|
|
plist
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(org-latex-compile (org-publish-org-to 'latex filename ".tex" plist))
|
2012-10-08 12:20:56 +00:00
|
|
|
|
pub-dir))
|
|
|
|
|
|
2012-03-19 20:38:12 +00:00
|
|
|
|
|
2013-01-27 22:11:34 +00:00
|
|
|
|
(provide 'ox-latex)
|
|
|
|
|
|
|
|
|
|
;; Local variables:
|
|
|
|
|
;; generated-autoload-file: "org-loaddefs.el"
|
|
|
|
|
;; End:
|
|
|
|
|
|
|
|
|
|
;;; ox-latex.el ends here
|