2023-04-20 08:11:19 -04:00
|
|
|
|
;;; ox-latex.el --- LaTeX Backend for Org Export Engine -*- lexical-binding: 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 17:36:51 -05:00
|
|
|
|
|
2023-01-01 05:31:12 -05:00
|
|
|
|
;; Copyright (C) 2011-2023 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 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
;; Author: Nicolas Goaziou <n.goaziou at gmail dot com>
|
2022-04-20 02:32:46 -04:00
|
|
|
|
;; Maintainer: Daniel Fleischer <danflscr@gmail.com>
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
;; Keywords: outlines, hypermedia, calendar, wp
|
|
|
|
|
|
Backport changes from Emacs revs 115081 and 115082
2013-11-12 Stefan Monnier <monnier@iro.umontreal.ca>
Address some byte-compiler warnings.
* ob-abc.el (org-babel-expand-body:abc): Use dolist.
(org-babel-execute:abc): Fix regexp quoting.
* ob-calc.el (org--var-syms): Rename from `var-syms'.
* ob-lilypond.el (ly-compile-lilyfile): Remove redundant let-binding.
* ob-table.el (sbe): Move debug declaration.
* org-clock.el (org--msg-extra): Rename from `msg-extra'.
* org.el (org-version): Avoid var name starting with _.
(org-inhibit-startup, org-called-with-limited-levels)
(org-link-search-inhibit-query, org-time-was-given)
(org-end-time-was-given, org-def, org-defdecode, org-with-time):
* org-colview.el (org-agenda-overriding-columns-format):
* org-agenda.el (org-agenda-multi, org-depend-tag-blocked)
(org-agenda-show-log-scoped):
* ob-python.el (py-which-bufname, python-shell-buffer-name):
* ob-haskell.el (org-export-copy-to-kill-ring):
* ob-exp.el (org-link-search-inhibit-query):
* ob-R.el (ess-eval-visibly-p):
* ob-core.el (org-src-window-setup): Declare before use.
(org-babel-expand-noweb-references): Remove unused `blocks-in-buffer'.
* ox-odt.el (org-odt-hfy-face-to-css):
* org-src.el (org-src-associate-babel-session, org-src-get-lang-mode):
* org-bibtex.el (org-bibtex-get, org-bibtex-ask, org-bibtex)
(org-bibtex-check):
* ob-tangle.el (org-babel-tangle, org-babel-spec-to-string)
(org-babel-tangle-single-block, org-babel-tangle-comment-links):
* ob-table.el (sbe):
* ob-sqlite.el (org-babel-sqlite-expand-vars):
* ob-sql.el (org-babel-sql-expand-vars):
* ob-shen.el (org-babel-execute:shen):
* ob-sh.el (org-babel-execute:sh, org-babel-sh-evaluate):
* ob-scala.el (org-babel-scala-evaluate):
* ob-ruby.el (org-babel-ruby-table-or-string)
(org-babel-ruby-evaluate):
* ob-python.el (org-babel-python-table-or-string)
(org-babel-python-evaluate-external-process)
(org-babel-python-evaluate-session):
* ob-picolisp.el (org-babel-execute:picolisp):
* ob-perl.el (org-babel-perl-evaluate):
* ob-maxima.el (org-babel-execute:maxima):
* ob-lisp.el (org-babel-execute:lisp):
* ob-java.el (org-babel-execute:java):
* ob-io.el (org-babel-io-evaluate):
* ob-haskell.el (org-babel-execute:haskell):
* ob-fortran.el (org-babel-execute:fortran):
* ob-exp.el (org-babel-exp-code):
* ob-emacs-lisp.el (org-babel-execute:emacs-lisp):
* ob-ditaa.el (org-babel-execute:ditaa):
* ob-core.el (org-babel-execute-src-block, org-babel-sha1-hash)
(org-babel-parse-header-arguments, org-babel-reassemble-table)
(org-babel-goto-src-block-head, org-babel-mark-block)
(org-babel-expand-noweb-references, org-babel-script-escape)
(org-babel-process-file-name):
* ob-clojure.el (org-babel-execute:clojure):
* ob-calc.el (org-babel-execute:calc):
* ob-awk.el (org-babel-execute:awk):
* ob-abc.el (org-babel-execute:abc):
* ob-R.el (org-babel-expand-body:R):
* ob-C.el (org-babel-C-execute): Avoid deprecated ((lambda) ...).
2013-11-12 Glenn Morris <rgm@gnu.org>
* ox-html.el (org-html-scripts): Add 2013 to copyright years.
(org-html-infojs-template): Copyright holder to FSF.
2013-11-12 14:57:31 -05:00
|
|
|
|
;; This file is part of GNU Emacs.
|
|
|
|
|
|
2013-02-23 03:56:24 -05: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 17:36:51 -05: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 03:56:24 -05: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 17:36:51 -05: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
|
2017-09-13 18:52:52 -04:00
|
|
|
|
;; along with GNU Emacs. If not, see <https://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 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
;;; Commentary:
|
2012-04-28 20:11:22 -04:00
|
|
|
|
;;
|
2013-04-16 06:54:05 -04: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 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
|
2022-08-04 09:53:05 -04:00
|
|
|
|
(require 'org-macs)
|
|
|
|
|
(org-assert-version)
|
|
|
|
|
|
2016-05-26 05:03:11 -04:00
|
|
|
|
(require 'cl-lib)
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(require 'ox)
|
|
|
|
|
(require 'ox-publish)
|
2012-03-19 16:38:12 -04:00
|
|
|
|
|
2020-01-13 21:07:53 -05:00
|
|
|
|
;;; Function Declarations
|
|
|
|
|
|
2013-02-02 14:58:39 -05:00
|
|
|
|
(defvar org-latex-default-packages-alist)
|
|
|
|
|
(defvar org-latex-packages-alist)
|
2012-07-01 16:29:23 -04: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 17:36:51 -05:00
|
|
|
|
|
2021-11-21 07:04:12 -05:00
|
|
|
|
(declare-function engrave-faces-latex-gen-preamble "ext:engrave-faces-latex")
|
|
|
|
|
(declare-function engrave-faces-latex-buffer "ext:engrave-faces-latex")
|
2022-06-16 01:10:38 -04:00
|
|
|
|
(declare-function engrave-faces-latex-gen-preamble-line "ext:engrave-faces-latex")
|
|
|
|
|
(declare-function engrave-faces-get-theme "ext:engrave-faces")
|
|
|
|
|
|
|
|
|
|
(defvar engrave-faces-latex-output-style)
|
|
|
|
|
(defvar engrave-faces-current-preset-style)
|
|
|
|
|
(defvar engrave-faces-latex-mathescape)
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
|
2023-04-20 08:11:19 -04:00
|
|
|
|
;;; Define Backend
|
2012-05-18 04:18:42 -04:00
|
|
|
|
|
2013-03-19 11:24:40 -04:00
|
|
|
|
(org-export-define-backend 'latex
|
|
|
|
|
'((bold . org-latex-bold)
|
|
|
|
|
(center-block . org-latex-center-block)
|
|
|
|
|
(clock . org-latex-clock)
|
|
|
|
|
(code . org-latex-code)
|
|
|
|
|
(drawer . org-latex-drawer)
|
|
|
|
|
(dynamic-block . org-latex-dynamic-block)
|
|
|
|
|
(entity . org-latex-entity)
|
|
|
|
|
(example-block . org-latex-example-block)
|
2014-09-08 05:57:27 -04:00
|
|
|
|
(export-block . org-latex-export-block)
|
2013-03-19 11:24:40 -04:00
|
|
|
|
(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)
|
2013-09-25 15:27:29 -04:00
|
|
|
|
(node-property . org-latex-node-property)
|
2013-03-19 11:24:40 -04:00
|
|
|
|
(paragraph . org-latex-paragraph)
|
|
|
|
|
(plain-list . org-latex-plain-list)
|
|
|
|
|
(plain-text . org-latex-plain-text)
|
|
|
|
|
(planning . org-latex-planning)
|
2013-09-25 15:27:29 -04:00
|
|
|
|
(property-drawer . org-latex-property-drawer)
|
2013-03-19 11:24:40 -04:00
|
|
|
|
(quote-block . org-latex-quote-block)
|
|
|
|
|
(radio-target . org-latex-radio-target)
|
|
|
|
|
(section . org-latex-section)
|
|
|
|
|
(special-block . org-latex-special-block)
|
|
|
|
|
(src-block . org-latex-src-block)
|
|
|
|
|
(statistics-cookie . org-latex-statistics-cookie)
|
|
|
|
|
(strike-through . org-latex-strike-through)
|
|
|
|
|
(subscript . org-latex-subscript)
|
|
|
|
|
(superscript . org-latex-superscript)
|
|
|
|
|
(table . org-latex-table)
|
|
|
|
|
(table-cell . org-latex-table-cell)
|
|
|
|
|
(table-row . org-latex-table-row)
|
|
|
|
|
(target . org-latex-target)
|
|
|
|
|
(template . org-latex-template)
|
|
|
|
|
(timestamp . org-latex-timestamp)
|
|
|
|
|
(underline . org-latex-underline)
|
|
|
|
|
(verbatim . org-latex-verbatim)
|
2013-11-09 12:26:47 -05:00
|
|
|
|
(verse-block . org-latex-verse-block)
|
2014-10-17 11:16:28 -04:00
|
|
|
|
;; Pseudo objects and elements.
|
|
|
|
|
(latex-math-block . org-latex-math-block)
|
|
|
|
|
(latex-matrices . org-latex-matrices))
|
2012-09-09 07:08:52 -04:00
|
|
|
|
:menu-entry
|
2013-03-19 11:24:40 -04: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-12-25 04:43:19 -05:00
|
|
|
|
:filters-alist '((:filter-options . org-latex-math-block-options-filter)
|
2017-01-18 17:30:01 -05:00
|
|
|
|
(:filter-paragraph . org-latex-clean-invalid-line-breaks)
|
2014-10-17 11:16:28 -04:00
|
|
|
|
(:filter-parse-tree org-latex-math-block-tree-filter
|
2016-12-17 05:36:49 -05:00
|
|
|
|
org-latex-matrices-tree-filter
|
2017-01-18 17:36:54 -05:00
|
|
|
|
org-latex-image-link-filter)
|
2017-01-18 17:30:01 -05:00
|
|
|
|
(:filter-verse-block . org-latex-clean-invalid-line-breaks))
|
2014-05-21 03:06:59 -04:00
|
|
|
|
:options-alist
|
|
|
|
|
'((:latex-class "LATEX_CLASS" nil org-latex-default-class t)
|
|
|
|
|
(:latex-class-options "LATEX_CLASS_OPTIONS" nil nil t)
|
|
|
|
|
(:latex-header "LATEX_HEADER" nil nil newline)
|
|
|
|
|
(:latex-header-extra "LATEX_HEADER_EXTRA" nil nil newline)
|
2015-04-09 04:04:29 -04:00
|
|
|
|
(:description "DESCRIPTION" nil nil parse)
|
|
|
|
|
(:keywords "KEYWORDS" nil nil parse)
|
|
|
|
|
(:subtitle "SUBTITLE" nil nil parse)
|
2014-05-21 03:06:59 -04:00
|
|
|
|
;; Other variables.
|
|
|
|
|
(:latex-active-timestamp-format nil nil org-latex-active-timestamp-format)
|
2014-10-17 11:19:30 -04:00
|
|
|
|
(:latex-caption-above nil nil org-latex-caption-above)
|
2014-05-21 03:06:59 -04:00
|
|
|
|
(:latex-classes nil nil org-latex-classes)
|
|
|
|
|
(:latex-default-figure-position nil nil org-latex-default-figure-position)
|
|
|
|
|
(:latex-default-table-environment nil nil org-latex-default-table-environment)
|
2021-05-26 17:58:05 -04:00
|
|
|
|
(:latex-default-quote-environment nil nil org-latex-default-quote-environment)
|
2014-05-21 03:06:59 -04:00
|
|
|
|
(:latex-default-table-mode nil nil org-latex-default-table-mode)
|
|
|
|
|
(:latex-diary-timestamp-format nil nil org-latex-diary-timestamp-format)
|
2021-11-21 07:04:12 -05:00
|
|
|
|
(:latex-engraved-options nil nil org-latex-engraved-options)
|
|
|
|
|
(:latex-engraved-preamble nil nil org-latex-engraved-preamble)
|
2022-05-07 14:01:34 -04:00
|
|
|
|
(:latex-engraved-theme "LATEX_ENGRAVED_THEME" nil org-latex-engraved-theme)
|
2016-05-22 14:33:06 -04:00
|
|
|
|
(:latex-footnote-defined-format nil nil org-latex-footnote-defined-format)
|
2014-05-21 03:06:59 -04:00
|
|
|
|
(:latex-footnote-separator nil nil org-latex-footnote-separator)
|
|
|
|
|
(:latex-format-drawer-function nil nil org-latex-format-drawer-function)
|
|
|
|
|
(:latex-format-headline-function nil nil org-latex-format-headline-function)
|
|
|
|
|
(:latex-format-inlinetask-function nil nil org-latex-format-inlinetask-function)
|
2014-05-28 09:06:31 -04:00
|
|
|
|
(:latex-hyperref-template nil nil org-latex-hyperref-template t)
|
2019-04-20 04:25:24 -04:00
|
|
|
|
(:latex-image-default-scale nil nil org-latex-image-default-scale)
|
2014-05-21 03:06:59 -04:00
|
|
|
|
(:latex-image-default-height nil nil org-latex-image-default-height)
|
|
|
|
|
(:latex-image-default-option nil nil org-latex-image-default-option)
|
|
|
|
|
(:latex-image-default-width nil nil org-latex-image-default-width)
|
2016-07-25 17:22:01 -04:00
|
|
|
|
(:latex-images-centered nil nil org-latex-images-centered)
|
2014-05-21 03:06:59 -04:00
|
|
|
|
(:latex-inactive-timestamp-format nil nil org-latex-inactive-timestamp-format)
|
|
|
|
|
(:latex-inline-image-rules nil nil org-latex-inline-image-rules)
|
|
|
|
|
(:latex-link-with-unknown-path-format nil nil org-latex-link-with-unknown-path-format)
|
ox-latex: Replace `org-latex-listings'
* lisp/ox-latex.el (org-latex-src-block, org-latex-keyword,
org-latex-inline-src-block, org-latex-template,
org-latex--caption/label-string, org-latex-engraved-preamble,
org-latex-listings): Replace `org-latex-listings' with
`org-latex-src-block-backend', which now can be set to listings/verbatim
and no longer advertises t/nil as valid values.
* lisp/ox-beamer.el (org-beamer-template): Update in the same manner as
`org-latex-template'.
* lisp/org-compat.el: Make `org-latex-listings' an obsolete alias for
`org-latex-src-block-backend'.
* testing/lisp/test-ox.el: Replace `org-latex-listings' reference with
`org-latex-src-block-backend'.
* doc/org-manual.org (Footnotes, LaTeX specific properties, Literal
Examples): Replace references to `org-latex-listings' with
`org-latex-src-block-backend'.
* etc/ORG-NEWS: Add a news entry noting this change.
The variable `org-latex-listings' originally indicated whether source
blocks should use the listings LaTeX package, or not. This usage has
evolved over the years, and now it sets one of four different
fontification backends. This renaming should make the variable name a
bit less misleading.
2022-05-07 02:46:28 -04:00
|
|
|
|
(:latex-src-block-backend nil nil org-latex-src-block-backend)
|
2014-05-21 03:06:59 -04:00
|
|
|
|
(:latex-listings-langs nil nil org-latex-listings-langs)
|
|
|
|
|
(:latex-listings-options nil nil org-latex-listings-options)
|
2022-12-18 08:14:14 -05:00
|
|
|
|
(:latex-listings-src-omit-language nil nil org-latex-listings-src-omit-language)
|
2014-05-21 03:06:59 -04:00
|
|
|
|
(:latex-minted-langs nil nil org-latex-minted-langs)
|
|
|
|
|
(:latex-minted-options nil nil org-latex-minted-options)
|
2015-04-13 05:53:59 -04:00
|
|
|
|
(:latex-prefer-user-labels nil nil org-latex-prefer-user-labels)
|
ox: Add #+SUBTITLE property in some backends
* ox-texinfo.el (texinfo, org-texinfo-template): Parse subtitle.
* ox-s5.el (org-s5-title-slide-template):
* ox-deck.el (org-deck-title-slide-template):
* ox-odt.el (odt, org-odt-template):
* ox-latex.el (latex, org-latex-template):
* ox-html.el (html, org-html-format-spec, org-html-template):
* ox-ascii.el (ascii, org-ascii-template--document-title):
* ox-beamer.el (beamer, org-beamer-template): Support #+SUBTITLE.
* ox-html.el (org-html-postamble-format)
(org-html-preamble-format):
* ox-latex.el (org-latex-title-command)
(org-latex-hyperref-template): Update docstring.
* ox-html.el (org-html-style-default): New .subtitle css property.
* ox-beamer.el (org-beamer-subtitle-format):
* ox-latex.el (org-latex-subtitle-format)
(org-latex-subtitle-separate): New variable.
* org.texi (ASCII/Latin-1/UTF-8 export)
(Beamer specific export settings)
(HTML Specific export settings)
(@LaTeX{} specific export settings, CSS support)
(ODT specific export settings)
(Texinfo specific export settings, Document preamble)
(Publishing options, Publishing options): Document #+SUBTITLE.
The patch adds a #+SUBTITLE keyword to ox-ascii, ox-latex, ox-html and
ox-odt.
2015-03-01 16:09:19 -05:00
|
|
|
|
(:latex-subtitle-format nil nil org-latex-subtitle-format)
|
|
|
|
|
(:latex-subtitle-separate nil nil org-latex-subtitle-separate)
|
2014-05-21 03:06:59 -04:00
|
|
|
|
(:latex-table-scientific-notation nil nil org-latex-table-scientific-notation)
|
|
|
|
|
(:latex-tables-booktabs nil nil org-latex-tables-booktabs)
|
|
|
|
|
(:latex-tables-centered nil nil org-latex-tables-centered)
|
|
|
|
|
(:latex-text-markup-alist nil nil org-latex-text-markup-alist)
|
|
|
|
|
(:latex-title-command nil nil org-latex-title-command)
|
|
|
|
|
(:latex-toc-command nil nil org-latex-toc-command)
|
2015-09-13 12:09:03 -04:00
|
|
|
|
(:latex-compiler "LATEX_COMPILER" nil org-latex-compiler)
|
2014-05-21 03:06:59 -04:00
|
|
|
|
;; Redefine regular options.
|
2015-04-05 13:00:56 -04:00
|
|
|
|
(:date "DATE" nil "\\today" parse)))
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
|
2012-06-14 06:57:35 -04:00
|
|
|
|
|
|
|
|
|
;;; Internal Variables
|
|
|
|
|
|
2022-07-19 10:51:55 -04:00
|
|
|
|
(defconst org-latex-language-alist
|
2023-09-08 13:33:25 -04:00
|
|
|
|
(let ((de-default-plist '(:babel "ngerman" :babel-ini-alt "german" :polyglossia "german" :polyglossia-variant "german" :lang-name "German" :script "latin" :script-tag "latn"))
|
|
|
|
|
(zh-default-plist '(:babel-ini-only "chinese" :polyglossia "chinese" :polyglossia-variant "simplified" :lang-name "Chinese Simplified" :script "hans" :script-tag "hans")))
|
|
|
|
|
`(("af" :babel "afrikaans" :polyglossia "afrikaans" :lang-name "Afrikaans" :script "latin" :script-tag "latn")
|
|
|
|
|
("am" :babel-ini-only "amharic" :polyglossia "amharic" :lang-name "Amharic" :script "ethiopic" :script-tag "ethi")
|
|
|
|
|
("ar" :babel-ini-only "arabic" :polyglossia "arabic" :lang-name "Arabic" :script "arabic" :script-tag "arab")
|
|
|
|
|
("ast" :babel-ini-only "asturian" :polyglossia "asturian" :lang-name "Asturian" :script "latin" :script-tag "latn")
|
|
|
|
|
("bg" :babel "bulgarian" :polyglossia "bulgarian" :lang-name "Bulgarian" :script "cyrillic" :script-tag "cyrl")
|
|
|
|
|
("bn" :babel-ini-only "bengali" :polyglossia "bengali" :lang-name "Bengali" :script "bengali" :script-tag: "beng")
|
|
|
|
|
("bo" :babel-ini-only "tibetan" :polyglossia "tibetan" :lang-name "Tibetan" :script "tibetan" :script-tag "tib")
|
|
|
|
|
("br" :babel "breton" :polyglossia "breton" :lang-name "Breton" :script "latin" :script-tag "latn")
|
|
|
|
|
("ca" :babel "catalan" :polyglossia "catalan" :lang-name "Catalan" :script "latin" :script-tag "latn")
|
|
|
|
|
("cop" :babel-ini-only "coptic" :polyglossia "coptic" :lang-name "Coptic" :script "coptic" :script-tag "copt")
|
|
|
|
|
("cs" :babel "czech" :polyglossia "czech" :lang-name "Czech" :script "latin" :script-tag "latn")
|
|
|
|
|
("cy" :babel "welsh" :polyglossia "welsh" :lang-name "Welsh" :script "latin" :script-tag "latn")
|
|
|
|
|
("da" :babel "danish" :polyglossia "danish" :lang-name "Danish" :script "latin" :script-tag "latn")
|
|
|
|
|
("de" ,@de-default-plist)
|
|
|
|
|
("de-de" ,@de-default-plist)
|
|
|
|
|
("de-at" :babel "naustrian" :babel-ini-alt "german-austria" :polyglossia "german" :polyglossia-variant "austrian" :lang-name "German" :script "latin" :script-tag "latn")
|
|
|
|
|
("dsb" :babel "lowersorbian" :babel-ini-alt "lsorbian" :polyglossia "sorbian" :polyglossia-variant "lower" :lang-name "Lower Sorbian" :script "latin" :script-tag "latn")
|
|
|
|
|
("dv" :polyglossia "divehi" :lang-name "Dhivehi" :script "latin" :script-tag "latn")
|
|
|
|
|
("el" :babel "greek" :polyglossia "greek" :lang-name "Greek" :script "greek" :script-tag "grek")
|
|
|
|
|
("el-polyton" :babel "polutonikogreek" :babel-ini-alt "polytonicgreek" :polyglossia "greek" :polyglossia-variant "polytonic" :lang-name "Polytonic Greek" :script "greek" :script-tag "grek")
|
|
|
|
|
("grc" :babel "greek.ancient" :babel-ini-alt "ancientgreek" :polyglossia "greek" :polyglossia-variant "ancient" :lang-name "Ancient Greek" :script "greek" :script-tag "grek")
|
|
|
|
|
("en" :babel "english" :polyglossia "english" :polyglossia-variant "usmax" :lang-name "English" :script "latin" :script-tag "latn")
|
|
|
|
|
("en-au" :babel "australian" :polyglossia "english" :polyglossia-variant "australian" :lang-name "English" :script "latin" :script-tag "latn")
|
|
|
|
|
("en-ca" :babel "canadian" :polyglossia "english" :polyglossia-variant "canadian" :lang-name "English" :script "latin" :script-tag "latn")
|
|
|
|
|
("en-gb" :babel "british" :polyglossia "english" :polyglossia-variant "uk" :lang-name "English" :script "latin" :script-tag "latn")
|
|
|
|
|
("en-nz" :babel "newzealand" :polyglossia "english" :polyglossia-variant "newzealand" :lang-name "English" :script "latin" :script-tag "latn")
|
|
|
|
|
("en-us" :babel "american" :polyglossia "english" :polyglossia-variant "usmax" :lang-name "English" :script "latin" :script-tag "latn")
|
|
|
|
|
("eo" :babel "esperanto" :polyglossia "esperanto" :lang-name "Esperanto" :script "latin" :script-tag "latn")
|
|
|
|
|
("es" :babel "spanish" :polyglossia "spanish" :lang-name "Spanish" :script "latin" :script-tag "latn")
|
|
|
|
|
("es-mx" :babel "spanishmx" :polyglossia "spanish" :polyglossia-variant "mexican" :lang-name "Spanish" :script "latin" :script-tag "latn")
|
|
|
|
|
("et" :babel "estonian" :polyglossia "estonian" :lang-name "Estonian" :script "latin" :script-tag "latn")
|
|
|
|
|
("eu" :babel "basque" :polyglossia "basque" :lang-name "Basque" :script "latin" :script-tag "latn")
|
|
|
|
|
("fa" :babel "persian" :polyglossia "persian" :lang-name "Persian" :script "arabic" :script-tag "arab")
|
|
|
|
|
("fi" :babel "finnish" :polyglossia "finnish" :lang-name "Finnish" :script "latin" :script-tag "latn")
|
|
|
|
|
("fr" :babel "french" :polyglossia "french" :lang-name "French" :script "latin" :script-tag "latn")
|
|
|
|
|
("fr-ca" :babel "canadien" :babel-ini-alt "canadian" :polyglossia "french" :polyglossia-variant "canadian" :lang-name "French" :script "latin" :script-tag "latn")
|
|
|
|
|
("fur" :babel "friulian" :polyglossia "friulian" :lang-name "Friulian" :script "latin" :script-tag "latn")
|
|
|
|
|
("ga" :babel "irish" :polyglossia "gaelic" :polyglossia-variant "irish" :lang-name "Irish Gaelic" :script "latin" :script-tag "latn")
|
|
|
|
|
("gd" :babel "scottish" :polyglossia "gaelic" :polyglossia-variant "scottish" :lang-name "Scottish Gaelic" :script "latin" :script-tag "latn")
|
|
|
|
|
("gl" :babel "galician" :polyglossia "galician" :lang-name "Galician" :script "latin" :script-tag "latn")
|
|
|
|
|
("he" :babel "hebrew" :polyglossia "hebrew" :lang-name "Hebrew" :script "hebrew" :script-tag "hebr")
|
|
|
|
|
("hi" :babel "hindi" :polyglossia "hindi" :lang-name "Hindi" :script "devanagari" :script-tag "deva")
|
|
|
|
|
("hr" :babel "croatian" :polyglossia "croatian" :lang-name "Croatian" :script "latin" :script-tag "latn")
|
|
|
|
|
("hsb" :babel "uppersorbian" :polyglossia "sorbian" :polyglossia-variant "upper" :lang-name "Upper Sorbian" :script "latin" :script-tag "latn")
|
|
|
|
|
("hu" :babel "magyar" :polyglossia "magyar" :lang-name "Magyar" :script "latin" :script-tag "latn")
|
|
|
|
|
("hy" :babel-ini-only "armenian" :polyglossia "armenian" :lang-name "Armenian" :script "armenian" :script-tag "armn")
|
|
|
|
|
("ia" :babel "interlingua" :polyglossia "interlingua" :lang-name "Interlingua" :script "latin" :script-tag "latn")
|
|
|
|
|
("id" :babel "indonesian" :polyglossia "malay" :polyglossia-variant "indonesian" :lang-name "Indonesian" :script "latin" :script-tag "latn")
|
|
|
|
|
("is" :babel "icelandic" :polyglossia "icelandic" :lang-name "Icelandic" :script "latin" :script-tag "latn")
|
|
|
|
|
("it" :babel "italian" :polyglossia "italian" :lang-name "Italian" :script "latin" :script-tag "latn")
|
|
|
|
|
("kn" :babel-ini-only "kannada" :polyglossia "kannada" :lang-name "Kannada" :script "kannada" :script-tag "knda")
|
|
|
|
|
("la" :babel "latin" :polyglossia "latin" :lang-name "Latin" :script "latin" :script-tag "latn")
|
|
|
|
|
("la-classic" :babel "classiclatin" :polyglossia "latin" :polyglossia-variant "classic" :lang-name "Classic Latin" :script "latin" :script-tag "latn")
|
|
|
|
|
("la-medieval" :babel "medievallatin" :polyglossia "latin" :polyglossia-variant "medieval" :lang-name "Medieval Latin" :script "latin" :script-tag "latn")
|
|
|
|
|
("la-ecclesiastic" :babel "ecclesiasticlatin" :polyglossia "latin" :polyglossia-variant "ecclesiastic" :lang-name "Ecclesiastic Latin" :script "latin" :script-tag "latn")
|
|
|
|
|
("lo" :babel-ini-only "lao" :polyglossia "lao" :lang-name "Lao" :script "lao" :script-tag "lao")
|
|
|
|
|
("lt" :babel "lithuanian" :polyglossia "lithuanian" :lang-name "Lithuanian" :script "latin" :script-tag "latn")
|
|
|
|
|
("lv" :babel "latvian" :polyglossia "latvian" :lang-name "Latvian" :script "latin" :script-tag "latn")
|
|
|
|
|
("ml" :babel-ini-only "malayalam" :polyglossia "malayalam" :lang-name "Malayalam" :script "malayalam" :script-tag "mlym")
|
|
|
|
|
("mr" :babel-ini-only "marathi" :polyglossia "marathi" :lang-name "Marathi" :script "devanagari" :script-tag "deva")
|
|
|
|
|
("ms" :babel "malay" :polyglossia "malay" :polyglossia-variant "malaysian" :lang-name "Malay" :script "latin" :script-tag "latn")
|
|
|
|
|
("nb" :babel "norsk" :polyglossia "norwegian" :polyglossia-variant "bokmal" :lang-name "Norwegian Bokmål" :script "latin" :script-tag "latn")
|
|
|
|
|
("nl" :babel "dutch" :polyglossia "dutch" :lang-name "Dutch" :script "latin" :script-tag "latn")
|
|
|
|
|
("nn" :babel "nynorsk" :polyglossia "norwegian" :polyglossia-variant "nynorsk" :lang-name "Norwegian Nynorsk" :script "latin" :script-tag "latn")
|
|
|
|
|
("no" :babel "norsk" :polyglossia "norsk" :lang-name "Norwegian" :script "latin" :script-tag "latn")
|
|
|
|
|
("oc" :babel "occitan" :polyglossia "occitan" :lang-name "Occitan" :script "latin" :script-tag "latn")
|
|
|
|
|
("pl" :babel "polish" :polyglossia "polish" :lang-name "Polish" :script "latin" :script-tag "latn")
|
|
|
|
|
("pms" :babel "piedmontese" :polyglossia "piedmontese" :lang-name "Piedmontese" :script "latin" :script-tag "latn")
|
|
|
|
|
("pt" :babel "portuges" :polyglossia "portuges" :lang-name "Portuges" :script "latin" :script-tag "latn")
|
|
|
|
|
("pt-br" :babel "brazilian" :polyglossia "brazilian" :lang-name "Portuges" :script "latin" :script-tag "latn")
|
|
|
|
|
("rm" :babel-ini-only "romansh" :polyglossia "romansh" :lang-name "Romansh" :script "latin" :script-tag "latn")
|
|
|
|
|
("ro" :babel "romanian" :polyglossia "romanian" :lang-name "Romanian" :script "latin" :script-tag "latn")
|
|
|
|
|
("ru" :babel "russian" :polyglossia "russian" :lang-name "Russian" :script "cyrillic" :script-tag "cyrl")
|
|
|
|
|
("sa" :babel-ini-only "sanskrit" :polyglossia "sanskrit" :lang-name "Sanskrit" :script "devanagari" :script-tag "deva")
|
|
|
|
|
("sk" :babel "slovak" :polyglossia "slovak" :lang-name "Slovak" :script "latin" :script-tag "latn")
|
|
|
|
|
("sl" :babel "slovene" :polyglossia "slovene" :lang-name "Slovene" :script "latin" :script-tag "latn")
|
|
|
|
|
("sq" :babel "albanian" :polyglossia "albanian" :lang-name "Albanian" :script "latin" :script-tag "latn")
|
|
|
|
|
("sr" :babel "serbian" :polyglossia "serbian" :lang-name "Serbian" :script "latin" :script-tag "latn")
|
|
|
|
|
("sr-cyrl" :babel-ini-only "serbian-cyrl" :polyglossia "serbian" :lang-name "Serbian" :script "cyrillic" :script-tag "cyrl")
|
|
|
|
|
("sr-latn" :babel-ini-only "serbian-latin" :polyglossia "serbian" :lang-name "Serbian" :script "latin" :script-tag "latn")
|
|
|
|
|
("sv" :babel "swedish" :polyglossia "swedish" :lang-name "Swedish" :script "latin" :script-tag "latn")
|
|
|
|
|
("syr" :babel-ini-only "syriac" :polyglossia "syriac" :lang-name "Syriac" :script "syriac" :script-tag "syrc")
|
|
|
|
|
("ta" :babel-ini-only "tamil" :polyglossia "tamil" :lang-name "Tamil" :script "tamil" :script-tag "taml")
|
|
|
|
|
("te" :babel-ini-only "telugu" :polyglossia "telugu" :lang-name "Telugu" :script "telugu" :script-tag "telu")
|
|
|
|
|
("th" :babel "thai" :polyglossia "thai" :lang-name "Thai" :script "thai" :script-tag "thai")
|
|
|
|
|
("tk" :babel "turkmen" :polyglossia "turkmen" :lang-name "Turkmen" :script "latin" :script-tag "latn")
|
|
|
|
|
("tr" :babel "turkish" :polyglossia "turkish" :lang-name "Turkish" :script "latin" :script-tag "latn")
|
|
|
|
|
("uk" :babel "ukrainian" :polyglossia "ukrainian" :lang-name "Ukrainian" :script "cyrillic" :script-tag "cyrl")
|
|
|
|
|
("ur" :babel-ini-only "urdu" :polyglossia "urdu" :lang-name "Urdu" :script "arabic" :script-tag "arab")
|
|
|
|
|
("vi" :babel "vietnamese" :polyglossia "vietnamese" :lang-name "Vietnamese" :script "latin" :script-tag "latn")
|
|
|
|
|
("zh" ,@zh-default-plist)
|
|
|
|
|
("zh-cn" ,@zh-default-plist)
|
|
|
|
|
("zh-tw" :babel-ini-only "chinese-traditional" :polyglossia "chinese" :polyglossia-variant "traditional" :lang-name "Chinese Traditional" :script "hant" :script-tag "hant")))
|
2022-08-04 05:54:01 -04:00
|
|
|
|
"Alist between language code and its properties for LaTeX export.
|
|
|
|
|
|
2023-09-08 13:33:25 -04:00
|
|
|
|
In each element of the list car is always the language code and
|
|
|
|
|
cdr is a property list. Valid keywords for this list can be:
|
2022-08-04 05:54:01 -04:00
|
|
|
|
|
|
|
|
|
- `:babel' the name of the language loaded by the Babel LaTeX package
|
|
|
|
|
|
|
|
|
|
- `:polyglossia' the name of the language loaded by the Polyglossia
|
|
|
|
|
LaTeX package
|
|
|
|
|
|
|
|
|
|
- `:babel-ini-only' the name of the language loaded by Babel
|
|
|
|
|
exclusively through the new ini files method. See
|
|
|
|
|
`http://mirrors.ctan.org/macros/latex/required/babel/base/babel.pdf'
|
|
|
|
|
|
2023-09-08 13:33:25 -04:00
|
|
|
|
- `:babel-ini-alt' an alternative language name when it is loaded
|
|
|
|
|
using ini files
|
|
|
|
|
|
2022-08-04 05:54:01 -04:00
|
|
|
|
- `:polyglossia-variant' the language variant loaded by Polyglossia
|
|
|
|
|
|
2023-09-08 13:33:25 -04:00
|
|
|
|
- `:lang-name' the actual name of the language
|
|
|
|
|
|
|
|
|
|
- `:script' the script name
|
|
|
|
|
|
|
|
|
|
- `:script-tag' the script otf tag.")
|
|
|
|
|
|
2022-08-04 05:54:01 -04:00
|
|
|
|
|
2022-10-18 23:48:26 -04:00
|
|
|
|
(defconst org-latex-line-break-safe "\\\\[0pt]"
|
2022-10-07 04:24:32 -04:00
|
|
|
|
"Linebreak protecting the following [...].
|
2015-07-08 08:12:21 -04:00
|
|
|
|
|
2022-10-18 23:48:26 -04:00
|
|
|
|
Without \"[0pt]\" it would be interpreted as an optional argument to
|
2022-10-07 04:24:32 -04:00
|
|
|
|
the \\\\.
|
|
|
|
|
|
|
|
|
|
This constant, for example, makes the below code not err:
|
|
|
|
|
|
|
|
|
|
\\begin{tabular}{c|c}
|
2022-10-18 23:48:26 -04:00
|
|
|
|
[t] & s\\\\[0pt]
|
|
|
|
|
[I] & A\\\\[0pt]
|
2022-10-07 04:24:32 -04:00
|
|
|
|
[m] & kg
|
|
|
|
|
\\end{tabular}")
|
|
|
|
|
|
|
|
|
|
(defconst org-latex-table-matrix-macros `(("bordermatrix" . "\\cr")
|
2014-10-18 04:15:29 -04:00
|
|
|
|
("qbordermatrix" . "\\cr")
|
2022-10-07 04:24:32 -04:00
|
|
|
|
("kbordermatrix" . ,org-latex-line-break-safe))
|
2012-11-20 18:18:07 -05:00
|
|
|
|
"Alist between matrix macros and their row ending.")
|
|
|
|
|
|
2015-04-20 09:06:55 -04:00
|
|
|
|
(defconst org-latex-math-environments-re
|
|
|
|
|
(format
|
|
|
|
|
"\\`[ \t]*\\\\begin{%s\\*?}"
|
|
|
|
|
(regexp-opt
|
2021-09-29 03:22:47 -04:00
|
|
|
|
'("equation" "eqnarray" "math" "displaymath"
|
|
|
|
|
"align" "gather" "multline" "flalign" "alignat"
|
|
|
|
|
"xalignat" "xxalignat"
|
|
|
|
|
"subequations"
|
|
|
|
|
;; breqn
|
|
|
|
|
"dmath" "dseries" "dgroup" "darray"
|
|
|
|
|
;; empheq
|
|
|
|
|
"empheq")))
|
2015-04-20 09:06:55 -04:00
|
|
|
|
"Regexp of LaTeX math environments.")
|
2012-06-14 06:57:35 -04: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 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
;;; User Configurable Variables
|
|
|
|
|
|
2013-01-27 17:11:34 -05: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 17:36:51 -05:00
|
|
|
|
"Options for exporting Org mode files to LaTeX."
|
|
|
|
|
:tag "Org Export LaTeX"
|
|
|
|
|
:group 'org-export)
|
|
|
|
|
|
2014-10-17 11:19:30 -04:00
|
|
|
|
;;;; Generic
|
|
|
|
|
|
2014-10-24 18:10:02 -04:00
|
|
|
|
(defcustom org-latex-caption-above '(table)
|
2014-10-17 11:19:30 -04:00
|
|
|
|
"When non-nil, place caption string at the beginning of elements.
|
|
|
|
|
Otherwise, place it near the end. When value is a list of
|
|
|
|
|
symbols, put caption above selected elements only. Allowed
|
|
|
|
|
symbols are: `image', `table', `src-block' and `special-block'."
|
|
|
|
|
:group 'org-export-latex
|
2017-01-25 23:39:18 -05:00
|
|
|
|
:version "26.1"
|
2014-10-29 17:18:00 -04:00
|
|
|
|
:package-version '(Org . "8.3")
|
2014-10-17 11:19:30 -04:00
|
|
|
|
:type '(choice
|
|
|
|
|
(const :tag "For all elements" t)
|
|
|
|
|
(const :tag "For no element" nil)
|
|
|
|
|
(set :tag "For the following elements only" :greedy t
|
|
|
|
|
(const :tag "Images" image)
|
|
|
|
|
(const :tag "Tables" table)
|
|
|
|
|
(const :tag "Source code" src-block)
|
|
|
|
|
(const :tag "Special blocks" special-block))))
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
|
2015-04-13 05:53:59 -04:00
|
|
|
|
(defcustom org-latex-prefer-user-labels nil
|
2021-09-29 03:22:47 -04:00
|
|
|
|
"Use user-provided labels instead of internal ones when non-nil.
|
2015-04-13 05:53:59 -04:00
|
|
|
|
|
|
|
|
|
When this variable is non-nil, Org will use the value of
|
2015-04-19 09:12:27 -04:00
|
|
|
|
CUSTOM_ID property, NAME keyword or Org target as the key for the
|
|
|
|
|
\\label commands generated.
|
2015-04-13 05:53:59 -04:00
|
|
|
|
|
|
|
|
|
By default, Org generates its own internal labels during LaTeX
|
|
|
|
|
export. This process ensures that the \\label keys are unique
|
|
|
|
|
and valid, but it means the keys are not available in advance of
|
|
|
|
|
the export process.
|
|
|
|
|
|
|
|
|
|
Setting this variable gives you control over how Org generates
|
|
|
|
|
labels during LaTeX export, so that you may know their keys in
|
|
|
|
|
advance. One reason to do this is that it allows you to refer to
|
|
|
|
|
various elements using a single label both in Org's link syntax
|
|
|
|
|
and in embedded LaTeX code.
|
|
|
|
|
|
|
|
|
|
For example, when this variable is non-nil, a headline like this:
|
|
|
|
|
|
|
|
|
|
** Some section
|
|
|
|
|
:PROPERTIES:
|
|
|
|
|
:CUSTOM_ID: sec:foo
|
|
|
|
|
:END:
|
|
|
|
|
This is section [[#sec:foo]].
|
2015-02-03 10:16:54 -05:00
|
|
|
|
#+BEGIN_EXPORT latex
|
2015-04-13 05:53:59 -04:00
|
|
|
|
And this is still section \\ref{sec:foo}.
|
2015-02-03 10:16:54 -05:00
|
|
|
|
#+END_EXPORT
|
2015-04-13 05:53:59 -04:00
|
|
|
|
|
|
|
|
|
will be exported to LaTeX as:
|
|
|
|
|
|
|
|
|
|
\\subsection{Some section}
|
|
|
|
|
\\label{sec:foo}
|
|
|
|
|
This is section \\ref{sec:foo}.
|
|
|
|
|
And this is still section \\ref{sec:foo}.
|
|
|
|
|
|
2021-06-06 14:13:18 -04:00
|
|
|
|
A non-default value of `org-latex-reference-command' will change the
|
|
|
|
|
command (\\ref by default) used to create label references.
|
|
|
|
|
|
2015-04-13 05:53:59 -04:00
|
|
|
|
Note, however, that setting this variable introduces a limitation
|
|
|
|
|
on the possible values for CUSTOM_ID and NAME. When this
|
|
|
|
|
variable is non-nil, Org passes their value to \\label unchanged.
|
|
|
|
|
You are responsible for ensuring that the value is a valid LaTeX
|
|
|
|
|
\\label key, and that no other \\label commands with the same key
|
|
|
|
|
appear elsewhere in your document. (Keys may contain letters,
|
2019-11-11 13:30:13 -05:00
|
|
|
|
numbers, and the following punctuation: `_' `.' `-' `:'.) There
|
2015-04-13 05:53:59 -04:00
|
|
|
|
are no such limitations on CUSTOM_ID and NAME when this variable
|
|
|
|
|
is nil.
|
|
|
|
|
|
|
|
|
|
For headlines that do not define the CUSTOM_ID property or
|
|
|
|
|
elements without a NAME, Org will continue to use its default
|
|
|
|
|
labeling scheme to generate labels and resolve links into proper
|
|
|
|
|
references."
|
|
|
|
|
:group 'org-export-latex
|
|
|
|
|
:type 'boolean
|
2017-01-25 23:39:18 -05:00
|
|
|
|
:version "26.1"
|
2015-04-13 05:53:59 -04:00
|
|
|
|
:package-version '(Org . "8.3"))
|
|
|
|
|
|
2021-06-06 14:13:18 -04:00
|
|
|
|
(defcustom org-latex-reference-command "\\ref{%s}"
|
|
|
|
|
"Format string that takes a reference to produce a LaTeX reference command.
|
|
|
|
|
|
|
|
|
|
The reference is a label such as sec:intro. A format string of \"\\ref{%s}\"
|
|
|
|
|
produces numbered references and will always work. It may be desirable to make
|
|
|
|
|
use of a package such as hyperref or cleveref and then change the format string
|
|
|
|
|
to \"\\autoref{%s}\" or \"\\cref{%s}\" for example."
|
|
|
|
|
:group 'org-export-latex
|
|
|
|
|
:type 'string
|
2021-06-13 16:28:10 -04:00
|
|
|
|
:package-version '(Org . "9.5")
|
2021-10-02 13:37:42 -04:00
|
|
|
|
:safe #'stringp)
|
2021-06-06 14:13:18 -04: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 17:36:51 -05:00
|
|
|
|
;;;; Preamble
|
|
|
|
|
|
2013-01-27 17:11:34 -05: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 17:36:51 -05:00
|
|
|
|
"The default LaTeX class."
|
2013-01-27 17:11:34 -05: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 17:36:51 -05:00
|
|
|
|
:type '(string :tag "LaTeX class"))
|
|
|
|
|
|
2013-01-27 17:11:34 -05: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 17:36:51 -05: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 18:00:37 -04: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 17:36:51 -05:00
|
|
|
|
associated information. Here is the structure of each cell:
|
|
|
|
|
|
2015-09-17 19:08:20 -04:00
|
|
|
|
(class-name
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
header-string
|
2015-09-17 19:08:20 -04:00
|
|
|
|
(numbered-section . unnumbered-section)
|
2013-04-11 18:00:37 -04: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 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
The header string
|
|
|
|
|
-----------------
|
|
|
|
|
|
2012-03-19 16:38:12 -04: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 17:36:51 -05:00
|
|
|
|
|
2012-03-19 16:38:12 -04:00
|
|
|
|
- Calls to \\usepackage for all packages mentioned in the
|
2013-02-02 14:58:39 -05: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 17:36:51 -05:00
|
|
|
|
|
2013-04-11 18:00:37 -04: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 17:36:51 -05:00
|
|
|
|
|
2012-03-19 16:38:12 -04: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 17:36:51 -05: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 17:24:53 -04: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 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
So a header like
|
|
|
|
|
|
|
|
|
|
\\documentclass{article}
|
|
|
|
|
[NO-DEFAULT-PACKAGES]
|
|
|
|
|
[EXTRA]
|
|
|
|
|
\\providecommand{\\alert}[1]{\\textbf{#1}}
|
|
|
|
|
[PACKAGES]
|
|
|
|
|
|
2012-03-19 16:38:12 -04:00
|
|
|
|
will omit the default packages, and will include the
|
2013-04-11 18:00:37 -04: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 16:38:12 -04:00
|
|
|
|
|
2013-02-02 14:58:39 -05:00
|
|
|
|
If your header, `org-latex-default-packages-alist' or
|
2013-05-31 18:20:18 -04: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 14:58:39 -05: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 17:36:51 -05:00
|
|
|
|
|
2015-07-31 07:42:02 -04:00
|
|
|
|
Likewise, if your header contains \"\\usepackage[AUTO]{babel}\"
|
|
|
|
|
or \"\\usepackage[AUTO]{polyglossia}\", AUTO will be replaced
|
|
|
|
|
with the language related to the language code specified by
|
|
|
|
|
`org-export-default-language'. Note that constructions such as
|
|
|
|
|
\"\\usepackage[french,AUTO,english]{babel}\" are permitted. For
|
|
|
|
|
Polyglossia the language will be set via the macros
|
|
|
|
|
\"\\setmainlanguage\" and \"\\setotherlanguage\". See also
|
|
|
|
|
`org-latex-guess-babel-language' and
|
|
|
|
|
`org-latex-guess-polyglossia-language'.
|
2013-05-31 18:20:18 -04: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 17:36:51 -05:00
|
|
|
|
The sectioning structure
|
|
|
|
|
------------------------
|
|
|
|
|
|
2012-03-19 16:38:12 -04: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 17:36:51 -05:00
|
|
|
|
|
2013-04-11 18:00:37 -04: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 17:36:51 -05:00
|
|
|
|
provide a list of 2 or 4 elements,
|
|
|
|
|
|
2015-09-17 19:08:20 -04: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 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
or
|
|
|
|
|
|
2015-09-17 19:08:20 -04: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 17:36:51 -05:00
|
|
|
|
|
2012-03-19 16:38:12 -04: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 17:36:51 -05:00
|
|
|
|
|
2012-03-19 16:38:12 -04: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 18:00:37 -04:00
|
|
|
|
parameters, the (reduced) level of the headline, and a predicate
|
2012-03-19 16:38:12 -04: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 17:11:34 -05: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 17:36:51 -05:00
|
|
|
|
:type '(repeat
|
2011-12-09 08:38:36 -05: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 17:36:51 -05:00
|
|
|
|
|
2013-01-27 17:11:34 -05: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 17:36:51 -05: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 17:11:34 -05: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 17:36:51 -05:00
|
|
|
|
:type '(repeat
|
2011-12-09 08:38:36 -05: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 17:36:51 -05:00
|
|
|
|
|
2013-01-27 17:11:34 -05: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 17:36:51 -05:00
|
|
|
|
"The command used to insert the title just after \\begin{document}.
|
2015-02-10 20:18:09 -05:00
|
|
|
|
|
|
|
|
|
This format string may contain these elements:
|
|
|
|
|
|
|
|
|
|
%a for AUTHOR keyword
|
|
|
|
|
%t for TITLE keyword
|
ox: Add #+SUBTITLE property in some backends
* ox-texinfo.el (texinfo, org-texinfo-template): Parse subtitle.
* ox-s5.el (org-s5-title-slide-template):
* ox-deck.el (org-deck-title-slide-template):
* ox-odt.el (odt, org-odt-template):
* ox-latex.el (latex, org-latex-template):
* ox-html.el (html, org-html-format-spec, org-html-template):
* ox-ascii.el (ascii, org-ascii-template--document-title):
* ox-beamer.el (beamer, org-beamer-template): Support #+SUBTITLE.
* ox-html.el (org-html-postamble-format)
(org-html-preamble-format):
* ox-latex.el (org-latex-title-command)
(org-latex-hyperref-template): Update docstring.
* ox-html.el (org-html-style-default): New .subtitle css property.
* ox-beamer.el (org-beamer-subtitle-format):
* ox-latex.el (org-latex-subtitle-format)
(org-latex-subtitle-separate): New variable.
* org.texi (ASCII/Latin-1/UTF-8 export)
(Beamer specific export settings)
(HTML Specific export settings)
(@LaTeX{} specific export settings, CSS support)
(ODT specific export settings)
(Texinfo specific export settings, Document preamble)
(Publishing options, Publishing options): Document #+SUBTITLE.
The patch adds a #+SUBTITLE keyword to ox-ascii, ox-latex, ox-html and
ox-odt.
2015-03-01 16:09:19 -05:00
|
|
|
|
%s for SUBTITLE keyword
|
2015-02-10 20:18:09 -05:00
|
|
|
|
%k for KEYWORDS line
|
|
|
|
|
%d for DESCRIPTION line
|
|
|
|
|
%c for CREATOR line
|
|
|
|
|
%l for Language keyword
|
|
|
|
|
%L for capitalized language keyword
|
|
|
|
|
%D for DATE keyword
|
|
|
|
|
|
|
|
|
|
If you need to use a \"%\" character, you need to escape it
|
|
|
|
|
like that: \"%%\".
|
|
|
|
|
|
|
|
|
|
Setting :latex-title-command in publishing projects will take
|
|
|
|
|
precedence over this variable."
|
2013-01-27 17:11:34 -05:00
|
|
|
|
:group 'org-export-latex
|
2015-02-10 20:18:09 -05:00
|
|
|
|
:type '(string :tag "Format string"))
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
|
ox: Add #+SUBTITLE property in some backends
* ox-texinfo.el (texinfo, org-texinfo-template): Parse subtitle.
* ox-s5.el (org-s5-title-slide-template):
* ox-deck.el (org-deck-title-slide-template):
* ox-odt.el (odt, org-odt-template):
* ox-latex.el (latex, org-latex-template):
* ox-html.el (html, org-html-format-spec, org-html-template):
* ox-ascii.el (ascii, org-ascii-template--document-title):
* ox-beamer.el (beamer, org-beamer-template): Support #+SUBTITLE.
* ox-html.el (org-html-postamble-format)
(org-html-preamble-format):
* ox-latex.el (org-latex-title-command)
(org-latex-hyperref-template): Update docstring.
* ox-html.el (org-html-style-default): New .subtitle css property.
* ox-beamer.el (org-beamer-subtitle-format):
* ox-latex.el (org-latex-subtitle-format)
(org-latex-subtitle-separate): New variable.
* org.texi (ASCII/Latin-1/UTF-8 export)
(Beamer specific export settings)
(HTML Specific export settings)
(@LaTeX{} specific export settings, CSS support)
(ODT specific export settings)
(Texinfo specific export settings, Document preamble)
(Publishing options, Publishing options): Document #+SUBTITLE.
The patch adds a #+SUBTITLE keyword to ox-ascii, ox-latex, ox-html and
ox-odt.
2015-03-01 16:09:19 -05:00
|
|
|
|
(defcustom org-latex-subtitle-format "\\\\\\medskip\n\\large %s"
|
|
|
|
|
"Format string used for transcoded subtitle.
|
|
|
|
|
The format string should have at most one \"%s\"-expression,
|
|
|
|
|
which is replaced with the subtitle."
|
|
|
|
|
:group 'org-export-latex
|
2017-01-25 23:39:18 -05:00
|
|
|
|
:version "26.1"
|
ox: Add #+SUBTITLE property in some backends
* ox-texinfo.el (texinfo, org-texinfo-template): Parse subtitle.
* ox-s5.el (org-s5-title-slide-template):
* ox-deck.el (org-deck-title-slide-template):
* ox-odt.el (odt, org-odt-template):
* ox-latex.el (latex, org-latex-template):
* ox-html.el (html, org-html-format-spec, org-html-template):
* ox-ascii.el (ascii, org-ascii-template--document-title):
* ox-beamer.el (beamer, org-beamer-template): Support #+SUBTITLE.
* ox-html.el (org-html-postamble-format)
(org-html-preamble-format):
* ox-latex.el (org-latex-title-command)
(org-latex-hyperref-template): Update docstring.
* ox-html.el (org-html-style-default): New .subtitle css property.
* ox-beamer.el (org-beamer-subtitle-format):
* ox-latex.el (org-latex-subtitle-format)
(org-latex-subtitle-separate): New variable.
* org.texi (ASCII/Latin-1/UTF-8 export)
(Beamer specific export settings)
(HTML Specific export settings)
(@LaTeX{} specific export settings, CSS support)
(ODT specific export settings)
(Texinfo specific export settings, Document preamble)
(Publishing options, Publishing options): Document #+SUBTITLE.
The patch adds a #+SUBTITLE keyword to ox-ascii, ox-latex, ox-html and
ox-odt.
2015-03-01 16:09:19 -05:00
|
|
|
|
:package-version '(Org . "8.3")
|
|
|
|
|
:type '(string :tag "Format string"))
|
|
|
|
|
|
|
|
|
|
(defcustom org-latex-subtitle-separate nil
|
|
|
|
|
"Non-nil means the subtitle is not typeset as part of title."
|
|
|
|
|
:group 'org-export-latex
|
2017-01-25 23:39:18 -05:00
|
|
|
|
:version "26.1"
|
ox: Add #+SUBTITLE property in some backends
* ox-texinfo.el (texinfo, org-texinfo-template): Parse subtitle.
* ox-s5.el (org-s5-title-slide-template):
* ox-deck.el (org-deck-title-slide-template):
* ox-odt.el (odt, org-odt-template):
* ox-latex.el (latex, org-latex-template):
* ox-html.el (html, org-html-format-spec, org-html-template):
* ox-ascii.el (ascii, org-ascii-template--document-title):
* ox-beamer.el (beamer, org-beamer-template): Support #+SUBTITLE.
* ox-html.el (org-html-postamble-format)
(org-html-preamble-format):
* ox-latex.el (org-latex-title-command)
(org-latex-hyperref-template): Update docstring.
* ox-html.el (org-html-style-default): New .subtitle css property.
* ox-beamer.el (org-beamer-subtitle-format):
* ox-latex.el (org-latex-subtitle-format)
(org-latex-subtitle-separate): New variable.
* org.texi (ASCII/Latin-1/UTF-8 export)
(Beamer specific export settings)
(HTML Specific export settings)
(@LaTeX{} specific export settings, CSS support)
(ODT specific export settings)
(Texinfo specific export settings, Document preamble)
(Publishing options, Publishing options): Document #+SUBTITLE.
The patch adds a #+SUBTITLE keyword to ox-ascii, ox-latex, ox-html and
ox-odt.
2015-03-01 16:09:19 -05:00
|
|
|
|
:package-version '(Org . "8.3")
|
|
|
|
|
:type 'boolean)
|
|
|
|
|
|
2013-02-23 07:33:36 -05:00
|
|
|
|
(defcustom org-latex-toc-command "\\tableofcontents\n\n"
|
2013-03-04 14:08:39 -05:00
|
|
|
|
"LaTeX command to set the table of contents, list of figures, etc.
|
2012-09-12 10:29:30 -04:00
|
|
|
|
This command only applies to the table of contents generated with
|
2013-03-04 14:08:39 -05:00
|
|
|
|
the toc:nil option, not to those generated with #+TOC keyword."
|
2013-01-27 17:11:34 -05:00
|
|
|
|
:group 'org-export-latex
|
2012-09-12 10:29:30 -04: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 17:36:51 -05:00
|
|
|
|
|
2014-02-28 03:40:37 -05:00
|
|
|
|
(defcustom org-latex-hyperref-template
|
2015-02-10 20:18:09 -05:00
|
|
|
|
"\\hypersetup{\n pdfauthor={%a},\n pdftitle={%t},\n pdfkeywords={%k},
|
|
|
|
|
pdfsubject={%d},\n pdfcreator={%c}, \n pdflang={%L}}\n"
|
2014-02-28 03:40:37 -05:00
|
|
|
|
"Template for hyperref package options.
|
|
|
|
|
|
2015-02-10 20:18:09 -05:00
|
|
|
|
This format string may contain these elements:
|
2014-02-28 03:40:37 -05:00
|
|
|
|
|
2015-02-10 20:18:09 -05:00
|
|
|
|
%a for AUTHOR keyword
|
|
|
|
|
%t for TITLE keyword
|
ox: Add #+SUBTITLE property in some backends
* ox-texinfo.el (texinfo, org-texinfo-template): Parse subtitle.
* ox-s5.el (org-s5-title-slide-template):
* ox-deck.el (org-deck-title-slide-template):
* ox-odt.el (odt, org-odt-template):
* ox-latex.el (latex, org-latex-template):
* ox-html.el (html, org-html-format-spec, org-html-template):
* ox-ascii.el (ascii, org-ascii-template--document-title):
* ox-beamer.el (beamer, org-beamer-template): Support #+SUBTITLE.
* ox-html.el (org-html-postamble-format)
(org-html-preamble-format):
* ox-latex.el (org-latex-title-command)
(org-latex-hyperref-template): Update docstring.
* ox-html.el (org-html-style-default): New .subtitle css property.
* ox-beamer.el (org-beamer-subtitle-format):
* ox-latex.el (org-latex-subtitle-format)
(org-latex-subtitle-separate): New variable.
* org.texi (ASCII/Latin-1/UTF-8 export)
(Beamer specific export settings)
(HTML Specific export settings)
(@LaTeX{} specific export settings, CSS support)
(ODT specific export settings)
(Texinfo specific export settings, Document preamble)
(Publishing options, Publishing options): Document #+SUBTITLE.
The patch adds a #+SUBTITLE keyword to ox-ascii, ox-latex, ox-html and
ox-odt.
2015-03-01 16:09:19 -05:00
|
|
|
|
%s for SUBTITLE keyword
|
2014-02-28 03:40:37 -05:00
|
|
|
|
%k for KEYWORDS line
|
|
|
|
|
%d for DESCRIPTION line
|
|
|
|
|
%c for CREATOR line
|
2015-02-10 20:18:09 -05:00
|
|
|
|
%l for Language keyword
|
|
|
|
|
%L for capitalized language keyword
|
|
|
|
|
%D for DATE keyword
|
|
|
|
|
|
|
|
|
|
If you need to use a \"%\" character, you need to escape it
|
|
|
|
|
like that: \"%%\".
|
2014-02-28 03:40:37 -05:00
|
|
|
|
|
2015-08-19 10:49:36 -04:00
|
|
|
|
As a special case, a nil value prevents template from being
|
|
|
|
|
inserted.
|
|
|
|
|
|
2015-02-10 20:18:09 -05:00
|
|
|
|
Setting :latex-hyperref-template in publishing projects will take
|
|
|
|
|
precedence over this variable."
|
2013-01-27 17:11:34 -05:00
|
|
|
|
:group 'org-export-latex
|
2017-01-25 23:39:18 -05:00
|
|
|
|
:version "26.1"
|
2014-03-26 12:59:39 -04:00
|
|
|
|
:package-version '(Org . "8.3")
|
2015-08-19 10:49:36 -04:00
|
|
|
|
:type '(choice (const :tag "No template" nil)
|
|
|
|
|
(string :tag "Format string")))
|
2013-01-10 19:06:18 -05: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 17:36:51 -05:00
|
|
|
|
;;;; Headline
|
|
|
|
|
|
2013-02-23 07:40:47 -05: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 17:36:51 -05:00
|
|
|
|
|
2014-08-25 08:36:49 -04:00
|
|
|
|
This function will be called with six arguments:
|
|
|
|
|
TODO the todo keyword (string or nil)
|
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 08:10:12 -04:00
|
|
|
|
TODO-TYPE the type of todo (symbol: `todo', `done', nil)
|
|
|
|
|
PRIORITY the priority of the headline (integer or nil)
|
2014-08-25 08:36:49 -04:00
|
|
|
|
TEXT the main headline text (string)
|
|
|
|
|
TAGS the tags (list of strings or nil)
|
|
|
|
|
INFO the export options (plist)
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
|
2014-08-25 08:36:49 -04:00
|
|
|
|
The function result will be used in the section format string."
|
2013-01-27 17:11:34 -05:00
|
|
|
|
:group 'org-export-latex
|
2013-02-26 12:21:28 -05: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 17:36:51 -05:00
|
|
|
|
:type 'function)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Footnotes
|
|
|
|
|
|
2013-01-27 17:11:34 -05: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 17:36:51 -05:00
|
|
|
|
"Text used to separate footnotes."
|
2013-01-27 17:11:34 -05: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 17:36:51 -05:00
|
|
|
|
:type 'string)
|
|
|
|
|
|
2016-05-22 14:33:06 -04:00
|
|
|
|
(defcustom org-latex-footnote-defined-format "\\textsuperscript{\\ref{%s}}"
|
|
|
|
|
"Format string used to format reference to footnote already defined.
|
|
|
|
|
%s will be replaced by the label of the referred footnote."
|
|
|
|
|
:group 'org-export-latex
|
|
|
|
|
:type '(choice
|
|
|
|
|
(const :tag "Use plain superscript (default)" "\\textsuperscript{\\ref{%s}}")
|
|
|
|
|
(const :tag "Use Memoir/KOMA-Script footref" "\\footref{%s}")
|
|
|
|
|
(string :tag "Other format string"))
|
2017-01-25 23:39:18 -05:00
|
|
|
|
:version "26.1"
|
2016-05-22 14:33:06 -04:00
|
|
|
|
:package-version '(Org . "9.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 17:36:51 -05:00
|
|
|
|
|
2012-04-28 20:23:09 -04: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 17:36:51 -05:00
|
|
|
|
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(defcustom org-latex-active-timestamp-format "\\textit{%s}"
|
2012-04-28 20:23:09 -04:00
|
|
|
|
"A printf format string to be applied to active timestamps."
|
2013-01-27 17:11:34 -05: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 17:36:51 -05:00
|
|
|
|
:type 'string)
|
|
|
|
|
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(defcustom org-latex-inactive-timestamp-format "\\textit{%s}"
|
2012-04-28 20:23:09 -04:00
|
|
|
|
"A printf format string to be applied to inactive timestamps."
|
2013-01-27 17:11:34 -05: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 17:36:51 -05:00
|
|
|
|
:type 'string)
|
|
|
|
|
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(defcustom org-latex-diary-timestamp-format "\\textit{%s}"
|
2012-04-28 20:23:09 -04:00
|
|
|
|
"A printf format string to be applied to diary timestamps."
|
2013-01-27 17:11:34 -05: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 17:36:51 -05:00
|
|
|
|
:type 'string)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Links
|
|
|
|
|
|
2016-07-25 17:22:01 -04:00
|
|
|
|
(defcustom org-latex-images-centered t
|
|
|
|
|
"When non-nil, images are centered."
|
|
|
|
|
:group 'org-export-latex
|
2017-01-25 23:39:18 -05:00
|
|
|
|
:version "26.1"
|
2016-07-25 17:22:01 -04:00
|
|
|
|
:package-version '(Org . "9.0")
|
|
|
|
|
:type 'boolean
|
|
|
|
|
:safe #'booleanp)
|
|
|
|
|
|
2013-03-05 23:04:42 -05: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 17:36:51 -05:00
|
|
|
|
"Default option for images."
|
2013-01-27 17:11:34 -05:00
|
|
|
|
:group 'org-export-latex
|
2013-03-05 23:04:42 -05:00
|
|
|
|
:version "24.4"
|
|
|
|
|
:package-version '(Org . "8.0")
|
|
|
|
|
:type 'string)
|
|
|
|
|
|
|
|
|
|
(defcustom org-latex-image-default-width ".9\\linewidth"
|
2013-03-08 05:31:45 -05:00
|
|
|
|
"Default width for images.
|
|
|
|
|
This value will not be used if a height is provided."
|
2013-03-05 23:04:42 -05:00
|
|
|
|
:group 'org-export-latex
|
|
|
|
|
:version "24.4"
|
|
|
|
|
:package-version '(Org . "8.0")
|
|
|
|
|
:type 'string)
|
|
|
|
|
|
2019-04-20 04:25:24 -04:00
|
|
|
|
(defcustom org-latex-image-default-scale ""
|
|
|
|
|
"Default scale for images.
|
|
|
|
|
This value will not be used if a width or a scale is provided,
|
|
|
|
|
or if the image is wrapped within a \"wrapfigure\" environment.
|
|
|
|
|
Scale overrides width and height."
|
|
|
|
|
:group 'org-export-latex
|
|
|
|
|
:package-version '(Org . "9.3")
|
|
|
|
|
:type 'string
|
|
|
|
|
:safe #'stringp)
|
|
|
|
|
|
2013-03-05 23:04:42 -05:00
|
|
|
|
(defcustom org-latex-image-default-height ""
|
2013-03-08 05:31:45 -05: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-05 23:04:42 -05: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 17:36:51 -05:00
|
|
|
|
:type 'string)
|
|
|
|
|
|
2016-10-02 03:53:18 -04:00
|
|
|
|
(defcustom org-latex-default-figure-position "htbp"
|
|
|
|
|
"Default position for LaTeX figures."
|
2013-01-27 17:11:34 -05:00
|
|
|
|
:group 'org-export-latex
|
2016-10-02 03:53:18 -04:00
|
|
|
|
:type 'string
|
2017-01-25 23:39:18 -05:00
|
|
|
|
:version "26.1"
|
2016-10-02 03:53:18 -04:00
|
|
|
|
:package-version '(Org . "9.0")
|
|
|
|
|
:safe #'stringp)
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(defcustom org-latex-inline-image-rules
|
2020-08-16 06:01:20 -04:00
|
|
|
|
`(("file" . ,(rx "."
|
2022-01-29 10:49:52 -05:00
|
|
|
|
(or "pdf" "jpeg" "jpg" "png" "ps" "eps" "tikz" "pgf" "svg")
|
|
|
|
|
eos))
|
|
|
|
|
("https" . ,(rx "."
|
|
|
|
|
(or "jpeg" "jpg" "png" "ps" "eps" "tikz" "pgf" "svg")
|
|
|
|
|
eos)))
|
2012-03-19 16:38:12 -04:00
|
|
|
|
"Rules characterizing image files that can be inlined into LaTeX.
|
2012-02-15 05:08:10 -05:00
|
|
|
|
|
2012-03-19 16:38:12 -04: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 17:11:34 -05:00
|
|
|
|
:group 'org-export-latex
|
2022-11-13 02:29:15 -05:00
|
|
|
|
:package-version '(Org . "9.6")
|
2012-03-19 16:38:12 -04: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 17:36:51 -05:00
|
|
|
|
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(defcustom org-latex-link-with-unknown-path-format "\\texttt{%s}"
|
2012-05-18 06:42:32 -04: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 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
;;;; Tables
|
|
|
|
|
|
2013-01-27 17:11:34 -05: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 17:36:51 -05:00
|
|
|
|
"Default environment used to build tables."
|
2013-01-27 17:11:34 -05: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 08:45:12 -05: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 17:36:51 -05:00
|
|
|
|
:type 'string)
|
|
|
|
|
|
2021-05-26 17:58:05 -04:00
|
|
|
|
(defcustom org-latex-default-quote-environment "quote"
|
|
|
|
|
"Default environment used to `quote' blocks."
|
|
|
|
|
:group 'org-export-latex
|
|
|
|
|
:package-version '(Org . "9.5")
|
|
|
|
|
:type 'string
|
2021-10-02 13:37:42 -04:00
|
|
|
|
:safe #'stringp)
|
2021-05-26 17:58:05 -04:00
|
|
|
|
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(defcustom org-latex-default-table-mode 'table
|
2012-11-20 18:18:07 -05: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 17:11:34 -05: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 08:45:12 -05:00
|
|
|
|
:version "24.4"
|
|
|
|
|
:package-version '(Org . "8.0")
|
2012-11-20 18:18:07 -05:00
|
|
|
|
:type '(choice (const :tag "Table" table)
|
|
|
|
|
(const :tag "Matrix" math)
|
|
|
|
|
(const :tag "Inline matrix" inline-math)
|
2013-10-28 16:19:01 -04:00
|
|
|
|
(const :tag "Verbatim" verbatim))
|
|
|
|
|
:safe (lambda (s) (memq s '(table math inline-math verbatim))))
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(defcustom org-latex-tables-centered t
|
2012-11-20 18:18:07 -05:00
|
|
|
|
"When non-nil, tables are exported in a center environment."
|
2013-01-27 17:11:34 -05:00
|
|
|
|
:group 'org-export-latex
|
2013-10-28 16:19:01 -04:00
|
|
|
|
:type 'boolean
|
|
|
|
|
:safe #'booleanp)
|
2012-03-19 16:38:12 -04:00
|
|
|
|
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(defcustom org-latex-tables-booktabs nil
|
2012-03-19 16:38:12 -04: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 18:18:07 -05:00
|
|
|
|
locally with \":booktabs t\" and \":booktabs nil\" LaTeX
|
2012-03-19 16:38:12 -04:00
|
|
|
|
attributes."
|
2013-01-27 17:11:34 -05: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 08:45:12 -05:00
|
|
|
|
:version "24.4"
|
|
|
|
|
:package-version '(Org . "8.0")
|
2013-10-28 16:19:01 -04:00
|
|
|
|
:type 'boolean
|
|
|
|
|
:safe #'booleanp)
|
2012-02-08 16:34:53 -05:00
|
|
|
|
|
2018-03-30 16:16:56 -04:00
|
|
|
|
(defcustom org-latex-table-scientific-notation nil
|
2012-04-12 17:48:23 -04:00
|
|
|
|
"Format string to display numbers in scientific notation.
|
2018-03-30 16:16:56 -04:00
|
|
|
|
|
2012-04-12 17:48:23 -04:00
|
|
|
|
The format should have \"%s\" twice, for mantissa and exponent
|
2013-03-05 08:37:47 -05:00
|
|
|
|
\(i.e., \"%s\\\\times10^{%s}\").
|
2012-04-12 17:48:23 -04:00
|
|
|
|
|
|
|
|
|
When nil, no transformation is made."
|
2013-01-27 17:11:34 -05: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 08:45:12 -05:00
|
|
|
|
:version "24.4"
|
|
|
|
|
:package-version '(Org . "8.0")
|
2012-04-12 17:48:23 -04:00
|
|
|
|
:type '(choice
|
|
|
|
|
(string :tag "Format string")
|
2014-07-28 09:25:50 -04:00
|
|
|
|
(const :tag "No formatting" nil)))
|
2012-04-12 17:48:23 -04: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 12:00:50 -04:00
|
|
|
|
;;;; Text markup
|
|
|
|
|
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(defcustom org-latex-text-markup-alist '((bold . "\\textbf{%s}")
|
2015-06-06 19:13:51 -04:00
|
|
|
|
(code . protectedtexttt)
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(italic . "\\emph{%s}")
|
2013-06-14 13:46:15 -04:00
|
|
|
|
(strike-through . "\\sout{%s}")
|
2014-03-22 10:15:25 -04:00
|
|
|
|
(underline . "\\uline{%s}")
|
2013-01-27 17:11:34 -05: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 12:00:50 -04: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 17:11:34 -05:00
|
|
|
|
:group 'org-export-latex
|
2017-01-25 23:39:18 -05:00
|
|
|
|
:version "26.1"
|
2015-06-06 19:13:51 -04:00
|
|
|
|
:package-version '(Org . "8.3")
|
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 12:00:50 -04: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 17:36:51 -05:00
|
|
|
|
;;;; Drawers
|
|
|
|
|
|
2015-10-29 14:03:52 -04:00
|
|
|
|
(defcustom org-latex-format-drawer-function (lambda (_ contents) contents)
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05: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.
|
|
|
|
|
|
2013-11-14 08:05:18 -05:00
|
|
|
|
The default function simply returns the value of CONTENTS."
|
2013-01-27 17:11:34 -05:00
|
|
|
|
:group 'org-export-latex
|
2017-09-07 16:56:11 -04:00
|
|
|
|
:version "26.1"
|
2013-11-14 08:05:18 -05:00
|
|
|
|
:package-version '(Org . "8.3")
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
:type 'function)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Inlinetasks
|
|
|
|
|
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(defcustom org-latex-format-inlinetask-function
|
|
|
|
|
'org-latex-format-inlinetask-default-function
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
"Function called to format an inlinetask in LaTeX code.
|
|
|
|
|
|
2014-08-25 08:36:49 -04:00
|
|
|
|
The function must accept seven parameters:
|
|
|
|
|
TODO the todo keyword (string or nil)
|
|
|
|
|
TODO-TYPE the todo type (symbol: `todo', `done', nil)
|
|
|
|
|
PRIORITY the inlinetask priority (integer or nil)
|
|
|
|
|
NAME the inlinetask name (string)
|
|
|
|
|
TAGS the inlinetask tags (list of strings or nil)
|
|
|
|
|
CONTENTS the contents of the inlinetask (string or nil)
|
|
|
|
|
INFO the export options (plist)
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
|
2014-08-25 08:36:49 -04:00
|
|
|
|
The function should return the string to be exported."
|
2013-01-27 17:11:34 -05:00
|
|
|
|
:group 'org-export-latex
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
:type 'function
|
2017-01-25 23:39:18 -05:00
|
|
|
|
:version "26.1"
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
:package-version '(Org . "8.3"))
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; Src blocks
|
|
|
|
|
|
ox-latex: Replace `org-latex-listings'
* lisp/ox-latex.el (org-latex-src-block, org-latex-keyword,
org-latex-inline-src-block, org-latex-template,
org-latex--caption/label-string, org-latex-engraved-preamble,
org-latex-listings): Replace `org-latex-listings' with
`org-latex-src-block-backend', which now can be set to listings/verbatim
and no longer advertises t/nil as valid values.
* lisp/ox-beamer.el (org-beamer-template): Update in the same manner as
`org-latex-template'.
* lisp/org-compat.el: Make `org-latex-listings' an obsolete alias for
`org-latex-src-block-backend'.
* testing/lisp/test-ox.el: Replace `org-latex-listings' reference with
`org-latex-src-block-backend'.
* doc/org-manual.org (Footnotes, LaTeX specific properties, Literal
Examples): Replace references to `org-latex-listings' with
`org-latex-src-block-backend'.
* etc/ORG-NEWS: Add a news entry noting this change.
The variable `org-latex-listings' originally indicated whether source
blocks should use the listings LaTeX package, or not. This usage has
evolved over the years, and now it sets one of four different
fontification backends. This renaming should make the variable name a
bit less misleading.
2022-05-07 02:46:28 -04:00
|
|
|
|
(defcustom org-latex-src-block-backend 'verbatim
|
|
|
|
|
"Backend used to generate source code listings.
|
2013-07-05 07:57:46 -04:00
|
|
|
|
|
2022-11-30 10:59:41 -05:00
|
|
|
|
This sets the behavior for fontifying source code, possibly even with
|
ox-latex: Replace `org-latex-listings'
* lisp/ox-latex.el (org-latex-src-block, org-latex-keyword,
org-latex-inline-src-block, org-latex-template,
org-latex--caption/label-string, org-latex-engraved-preamble,
org-latex-listings): Replace `org-latex-listings' with
`org-latex-src-block-backend', which now can be set to listings/verbatim
and no longer advertises t/nil as valid values.
* lisp/ox-beamer.el (org-beamer-template): Update in the same manner as
`org-latex-template'.
* lisp/org-compat.el: Make `org-latex-listings' an obsolete alias for
`org-latex-src-block-backend'.
* testing/lisp/test-ox.el: Replace `org-latex-listings' reference with
`org-latex-src-block-backend'.
* doc/org-manual.org (Footnotes, LaTeX specific properties, Literal
Examples): Replace references to `org-latex-listings' with
`org-latex-src-block-backend'.
* etc/ORG-NEWS: Add a news entry noting this change.
The variable `org-latex-listings' originally indicated whether source
blocks should use the listings LaTeX package, or not. This usage has
evolved over the years, and now it sets one of four different
fontification backends. This renaming should make the variable name a
bit less misleading.
2022-05-07 02:46:28 -04:00
|
|
|
|
color. There are four implementations of this functionality you may
|
2021-11-21 07:04:12 -05:00
|
|
|
|
choose from (ordered from least to most capable):
|
ox-latex: Replace `org-latex-listings'
* lisp/ox-latex.el (org-latex-src-block, org-latex-keyword,
org-latex-inline-src-block, org-latex-template,
org-latex--caption/label-string, org-latex-engraved-preamble,
org-latex-listings): Replace `org-latex-listings' with
`org-latex-src-block-backend', which now can be set to listings/verbatim
and no longer advertises t/nil as valid values.
* lisp/ox-beamer.el (org-beamer-template): Update in the same manner as
`org-latex-template'.
* lisp/org-compat.el: Make `org-latex-listings' an obsolete alias for
`org-latex-src-block-backend'.
* testing/lisp/test-ox.el: Replace `org-latex-listings' reference with
`org-latex-src-block-backend'.
* doc/org-manual.org (Footnotes, LaTeX specific properties, Literal
Examples): Replace references to `org-latex-listings' with
`org-latex-src-block-backend'.
* etc/ORG-NEWS: Add a news entry noting this change.
The variable `org-latex-listings' originally indicated whether source
blocks should use the listings LaTeX package, or not. This usage has
evolved over the years, and now it sets one of four different
fontification backends. This renaming should make the variable name a
bit less misleading.
2022-05-07 02:46:28 -04:00
|
|
|
|
1. Verbatim
|
|
|
|
|
2. Listings
|
|
|
|
|
3. Minted
|
|
|
|
|
4. Engraved
|
2021-11-21 07:04:12 -05:00
|
|
|
|
|
|
|
|
|
The first two options provide basic syntax
|
|
|
|
|
highlighting (listings), or none at all (verbatim).
|
|
|
|
|
|
ox-latex: Replace `org-latex-listings'
* lisp/ox-latex.el (org-latex-src-block, org-latex-keyword,
org-latex-inline-src-block, org-latex-template,
org-latex--caption/label-string, org-latex-engraved-preamble,
org-latex-listings): Replace `org-latex-listings' with
`org-latex-src-block-backend', which now can be set to listings/verbatim
and no longer advertises t/nil as valid values.
* lisp/ox-beamer.el (org-beamer-template): Update in the same manner as
`org-latex-template'.
* lisp/org-compat.el: Make `org-latex-listings' an obsolete alias for
`org-latex-src-block-backend'.
* testing/lisp/test-ox.el: Replace `org-latex-listings' reference with
`org-latex-src-block-backend'.
* doc/org-manual.org (Footnotes, LaTeX specific properties, Literal
Examples): Replace references to `org-latex-listings' with
`org-latex-src-block-backend'.
* etc/ORG-NEWS: Add a news entry noting this change.
The variable `org-latex-listings' originally indicated whether source
blocks should use the listings LaTeX package, or not. This usage has
evolved over the years, and now it sets one of four different
fontification backends. This renaming should make the variable name a
bit less misleading.
2022-05-07 02:46:28 -04:00
|
|
|
|
When using listings, you also need to make use of LaTeX package
|
2022-09-26 00:47:14 -04:00
|
|
|
|
\"listings\". The \"color\" LaTeX package is also needed if you
|
2021-11-21 07:04:12 -05:00
|
|
|
|
would like color too. These can simply be added to
|
2022-11-30 10:59:41 -05:00
|
|
|
|
`org-latex-packages-alist', using customize or 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 17:36:51 -05:00
|
|
|
|
|
2015-09-17 19:08:20 -04:00
|
|
|
|
(require \\='ox-latex)
|
|
|
|
|
(add-to-list \\='org-latex-packages-alist \\='(\"\" \"listings\"))
|
|
|
|
|
(add-to-list \\='org-latex-packages-alist \\='(\"\" \"color\"))
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
|
2021-11-21 07:04:12 -05:00
|
|
|
|
There are two further options for more comprehensive
|
2023-11-18 06:18:37 -05:00
|
|
|
|
fontification. The first can be set with,
|
2021-11-21 07:04:12 -05:00
|
|
|
|
|
ox-latex: Replace `org-latex-listings'
* lisp/ox-latex.el (org-latex-src-block, org-latex-keyword,
org-latex-inline-src-block, org-latex-template,
org-latex--caption/label-string, org-latex-engraved-preamble,
org-latex-listings): Replace `org-latex-listings' with
`org-latex-src-block-backend', which now can be set to listings/verbatim
and no longer advertises t/nil as valid values.
* lisp/ox-beamer.el (org-beamer-template): Update in the same manner as
`org-latex-template'.
* lisp/org-compat.el: Make `org-latex-listings' an obsolete alias for
`org-latex-src-block-backend'.
* testing/lisp/test-ox.el: Replace `org-latex-listings' reference with
`org-latex-src-block-backend'.
* doc/org-manual.org (Footnotes, LaTeX specific properties, Literal
Examples): Replace references to `org-latex-listings' with
`org-latex-src-block-backend'.
* etc/ORG-NEWS: Add a news entry noting this change.
The variable `org-latex-listings' originally indicated whether source
blocks should use the listings LaTeX package, or not. This usage has
evolved over the years, and now it sets one of four different
fontification backends. This renaming should make the variable name a
bit less misleading.
2022-05-07 02:46:28 -04:00
|
|
|
|
(setq org-latex-src-block-backend \\='minted)
|
2021-11-21 07:04:12 -05:00
|
|
|
|
|
ox-latex: Replace `org-latex-listings'
* lisp/ox-latex.el (org-latex-src-block, org-latex-keyword,
org-latex-inline-src-block, org-latex-template,
org-latex--caption/label-string, org-latex-engraved-preamble,
org-latex-listings): Replace `org-latex-listings' with
`org-latex-src-block-backend', which now can be set to listings/verbatim
and no longer advertises t/nil as valid values.
* lisp/ox-beamer.el (org-beamer-template): Update in the same manner as
`org-latex-template'.
* lisp/org-compat.el: Make `org-latex-listings' an obsolete alias for
`org-latex-src-block-backend'.
* testing/lisp/test-ox.el: Replace `org-latex-listings' reference with
`org-latex-src-block-backend'.
* doc/org-manual.org (Footnotes, LaTeX specific properties, Literal
Examples): Replace references to `org-latex-listings' with
`org-latex-src-block-backend'.
* etc/ORG-NEWS: Add a news entry noting this change.
The variable `org-latex-listings' originally indicated whether source
blocks should use the listings LaTeX package, or not. This usage has
evolved over the years, and now it sets one of four different
fontification backends. This renaming should make the variable name a
bit less misleading.
2022-05-07 02:46:28 -04:00
|
|
|
|
which causes source code to be exported using the LaTeX package
|
|
|
|
|
minted as opposed to listings. If you want to use minted, you
|
|
|
|
|
need to add the minted package to `org-latex-packages-alist', for
|
|
|
|
|
example using customize, or with
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
|
2015-09-17 19:08:20 -04:00
|
|
|
|
(require \\='ox-latex)
|
|
|
|
|
(add-to-list \\='org-latex-packages-alist \\='(\"newfloat\" \"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 17:36:51 -05:00
|
|
|
|
|
2012-03-19 16:38:12 -04:00
|
|
|
|
In addition, it is necessary to install pygments
|
2021-03-21 14:55:14 -04:00
|
|
|
|
\(URL `https://pygments.org>'), and to configure the variable
|
2013-01-27 17:11:34 -05:00
|
|
|
|
`org-latex-pdf-process' so that the -shell-escape option is
|
2013-07-05 07:57:46 -04:00
|
|
|
|
passed to pdflatex.
|
|
|
|
|
|
|
|
|
|
The minted choice has possible repercussions on the preview of
|
|
|
|
|
latex fragments (see `org-preview-latex-fragment'). If you run
|
|
|
|
|
into previewing problems, please consult
|
ox-latex: Replace `org-latex-listings'
* lisp/ox-latex.el (org-latex-src-block, org-latex-keyword,
org-latex-inline-src-block, org-latex-template,
org-latex--caption/label-string, org-latex-engraved-preamble,
org-latex-listings): Replace `org-latex-listings' with
`org-latex-src-block-backend', which now can be set to listings/verbatim
and no longer advertises t/nil as valid values.
* lisp/ox-beamer.el (org-beamer-template): Update in the same manner as
`org-latex-template'.
* lisp/org-compat.el: Make `org-latex-listings' an obsolete alias for
`org-latex-src-block-backend'.
* testing/lisp/test-ox.el: Replace `org-latex-listings' reference with
`org-latex-src-block-backend'.
* doc/org-manual.org (Footnotes, LaTeX specific properties, Literal
Examples): Replace references to `org-latex-listings' with
`org-latex-src-block-backend'.
* etc/ORG-NEWS: Add a news entry noting this change.
The variable `org-latex-listings' originally indicated whether source
blocks should use the listings LaTeX package, or not. This usage has
evolved over the years, and now it sets one of four different
fontification backends. This renaming should make the variable name a
bit less misleading.
2022-05-07 02:46:28 -04:00
|
|
|
|
URL `https://orgmode.org/worg/org-tutorials/org-latex-preview.html'.
|
|
|
|
|
|
|
|
|
|
The most comprehensive option can be set with,
|
|
|
|
|
|
|
|
|
|
(setq org-latex-src-block-backend \\='engraved)
|
|
|
|
|
|
|
|
|
|
which causes source code to be run through
|
|
|
|
|
`engrave-faces-latex-buffer', which generates colorings using
|
|
|
|
|
Emacs' font-lock information. This requires the Emacs package
|
2022-06-30 11:33:03 -04:00
|
|
|
|
engrave-faces (available from ELPA), and the LaTeX package
|
ox-latex: Replace `org-latex-listings'
* lisp/ox-latex.el (org-latex-src-block, org-latex-keyword,
org-latex-inline-src-block, org-latex-template,
org-latex--caption/label-string, org-latex-engraved-preamble,
org-latex-listings): Replace `org-latex-listings' with
`org-latex-src-block-backend', which now can be set to listings/verbatim
and no longer advertises t/nil as valid values.
* lisp/ox-beamer.el (org-beamer-template): Update in the same manner as
`org-latex-template'.
* lisp/org-compat.el: Make `org-latex-listings' an obsolete alias for
`org-latex-src-block-backend'.
* testing/lisp/test-ox.el: Replace `org-latex-listings' reference with
`org-latex-src-block-backend'.
* doc/org-manual.org (Footnotes, LaTeX specific properties, Literal
Examples): Replace references to `org-latex-listings' with
`org-latex-src-block-backend'.
* etc/ORG-NEWS: Add a news entry noting this change.
The variable `org-latex-listings' originally indicated whether source
blocks should use the listings LaTeX package, or not. This usage has
evolved over the years, and now it sets one of four different
fontification backends. This renaming should make the variable name a
bit less misleading.
2022-05-07 02:46:28 -04:00
|
|
|
|
fvextra be installed.
|
|
|
|
|
|
2022-11-30 10:59:41 -05:00
|
|
|
|
The styling of the engraved result can be customized with
|
ox-latex: Replace `org-latex-listings'
* lisp/ox-latex.el (org-latex-src-block, org-latex-keyword,
org-latex-inline-src-block, org-latex-template,
org-latex--caption/label-string, org-latex-engraved-preamble,
org-latex-listings): Replace `org-latex-listings' with
`org-latex-src-block-backend', which now can be set to listings/verbatim
and no longer advertises t/nil as valid values.
* lisp/ox-beamer.el (org-beamer-template): Update in the same manner as
`org-latex-template'.
* lisp/org-compat.el: Make `org-latex-listings' an obsolete alias for
`org-latex-src-block-backend'.
* testing/lisp/test-ox.el: Replace `org-latex-listings' reference with
`org-latex-src-block-backend'.
* doc/org-manual.org (Footnotes, LaTeX specific properties, Literal
Examples): Replace references to `org-latex-listings' with
`org-latex-src-block-backend'.
* etc/ORG-NEWS: Add a news entry noting this change.
The variable `org-latex-listings' originally indicated whether source
blocks should use the listings LaTeX package, or not. This usage has
evolved over the years, and now it sets one of four different
fontification backends. This renaming should make the variable name a
bit less misleading.
2022-05-07 02:46:28 -04:00
|
|
|
|
`org-latex-engraved-preamble' and `org-latex-engraved-options'.
|
|
|
|
|
The default preamble also uses the LaTeX package tcolorbox in
|
|
|
|
|
addition to fvextra."
|
2013-01-27 17:11:34 -05:00
|
|
|
|
:group 'org-export-latex
|
2022-11-13 02:29:15 -05:00
|
|
|
|
:package-version '(Org . "9.6")
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
:type '(choice
|
ox-latex: Replace `org-latex-listings'
* lisp/ox-latex.el (org-latex-src-block, org-latex-keyword,
org-latex-inline-src-block, org-latex-template,
org-latex--caption/label-string, org-latex-engraved-preamble,
org-latex-listings): Replace `org-latex-listings' with
`org-latex-src-block-backend', which now can be set to listings/verbatim
and no longer advertises t/nil as valid values.
* lisp/ox-beamer.el (org-beamer-template): Update in the same manner as
`org-latex-template'.
* lisp/org-compat.el: Make `org-latex-listings' an obsolete alias for
`org-latex-src-block-backend'.
* testing/lisp/test-ox.el: Replace `org-latex-listings' reference with
`org-latex-src-block-backend'.
* doc/org-manual.org (Footnotes, LaTeX specific properties, Literal
Examples): Replace references to `org-latex-listings' with
`org-latex-src-block-backend'.
* etc/ORG-NEWS: Add a news entry noting this change.
The variable `org-latex-listings' originally indicated whether source
blocks should use the listings LaTeX package, or not. This usage has
evolved over the years, and now it sets one of four different
fontification backends. This renaming should make the variable name a
bit less misleading.
2022-05-07 02:46:28 -04:00
|
|
|
|
(const :tag "Use listings" listings)
|
2013-10-29 12:20:20 -04:00
|
|
|
|
(const :tag "Use minted" minted)
|
2021-11-21 07:04:12 -05:00
|
|
|
|
(const :tag "Use engrave-faces-latex" engraved)
|
ox-latex: Replace `org-latex-listings'
* lisp/ox-latex.el (org-latex-src-block, org-latex-keyword,
org-latex-inline-src-block, org-latex-template,
org-latex--caption/label-string, org-latex-engraved-preamble,
org-latex-listings): Replace `org-latex-listings' with
`org-latex-src-block-backend', which now can be set to listings/verbatim
and no longer advertises t/nil as valid values.
* lisp/ox-beamer.el (org-beamer-template): Update in the same manner as
`org-latex-template'.
* lisp/org-compat.el: Make `org-latex-listings' an obsolete alias for
`org-latex-src-block-backend'.
* testing/lisp/test-ox.el: Replace `org-latex-listings' reference with
`org-latex-src-block-backend'.
* doc/org-manual.org (Footnotes, LaTeX specific properties, Literal
Examples): Replace references to `org-latex-listings' with
`org-latex-src-block-backend'.
* etc/ORG-NEWS: Add a news entry noting this change.
The variable `org-latex-listings' originally indicated whether source
blocks should use the listings LaTeX package, or not. This usage has
evolved over the years, and now it sets one of four different
fontification backends. This renaming should make the variable name a
bit less misleading.
2022-05-07 02:46:28 -04:00
|
|
|
|
(const :tag "Export verbatim" verbatim))
|
|
|
|
|
:safe (lambda (s) (memq s '(listings minted engraved 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 17:36:51 -05:00
|
|
|
|
|
2013-01-27 17:11:34 -05: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 17:36:51 -05: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 15:18:53 -04: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 17:36:51 -05:00
|
|
|
|
(shell-script "bash")
|
|
|
|
|
(gnuplot "Gnuplot")
|
2021-01-14 07:16:54 -05:00
|
|
|
|
(ocaml "[Objective]Caml") (caml "Caml")
|
2014-07-09 03:31:42 -04:00
|
|
|
|
(sql "SQL") (sqlite "sql")
|
2015-10-26 10:39:10 -04:00
|
|
|
|
(makefile "make")
|
|
|
|
|
(R "r"))
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
"Alist mapping languages to their listing language counterpart.
|
|
|
|
|
The key is a symbol, the major mode symbol without the \"-mode\".
|
2012-03-19 16:38:12 -04: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 17:11:34 -05:00
|
|
|
|
:group 'org-export-latex
|
2017-09-07 16:56:11 -04:00
|
|
|
|
:version "26.1"
|
2014-07-09 03:31:42 -04:00
|
|
|
|
:package-version '(Org . "8.3")
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
:type '(repeat
|
2011-12-09 08:38:36 -05: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 17:36:51 -05:00
|
|
|
|
|
2022-12-14 01:22:23 -05:00
|
|
|
|
(defcustom org-latex-listings-src-omit-language nil
|
|
|
|
|
"Discard src block language parameter in listings.
|
|
|
|
|
|
|
|
|
|
Set this option to t to omit the \"language=\" in the parameters to
|
|
|
|
|
\"lstlisting\" environments when exporting an src block.
|
|
|
|
|
|
|
|
|
|
This is necessary, for example, when the \"fancyvrb\" package is used
|
|
|
|
|
instead of \"listings\":
|
|
|
|
|
|
|
|
|
|
#+LATEX_HEADER: \\RequirePackage{fancyvrb}
|
|
|
|
|
#+LATEX_HEADER: \\DefineVerbatimEnvironment{verbatim}{Verbatim}{...}
|
|
|
|
|
#+LATEX_HEADER: \\DefineVerbatimEnvironment{lstlisting}{Verbatim}{...}"
|
|
|
|
|
:group 'org-export-latex
|
|
|
|
|
:package-version '(Org . "9.7")
|
|
|
|
|
:type 'boolean
|
|
|
|
|
:safe #'booleanp)
|
|
|
|
|
|
2013-01-27 17:11:34 -05: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 17:36:51 -05:00
|
|
|
|
"Association list of options for the latex listings package.
|
|
|
|
|
|
|
|
|
|
These options are supplied as a comma-separated list to the
|
2022-12-12 07:32:35 -05:00
|
|
|
|
\\lstlisting command. Each element of the association list should be
|
2022-05-04 11:31:59 -04:00
|
|
|
|
a list or cons cell 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 17:36:51 -05:00
|
|
|
|
|
2015-09-17 19:08:20 -04:00
|
|
|
|
(setq org-latex-listings-options
|
2015-09-21 00:24:12 -04:00
|
|
|
|
\\='((\"basicstyle\" \"\\\\small\")
|
2015-09-17 19:08:20 -04:00
|
|
|
|
(\"keywordstyle\" \"\\\\color{black}\\\\bfseries\\\\underbar\")))
|
2022-05-04 11:31:59 -04:00
|
|
|
|
; or
|
|
|
|
|
(setq org-latex-listings-options
|
|
|
|
|
\\='((\"basicstyle\" . \"\\\\small\")
|
|
|
|
|
(\"keywordstyle\" . \"\\\\color{black}\\\\bfseries\\\\underbar\")))
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
will typeset the code in a small size font with underlined, bold
|
|
|
|
|
black keywords.
|
|
|
|
|
|
|
|
|
|
Note that the same options will be applied to blocks of all
|
2014-03-25 10:58:41 -04:00
|
|
|
|
languages. If you need block-specific options, you may use the
|
|
|
|
|
following syntax:
|
|
|
|
|
|
|
|
|
|
#+ATTR_LATEX: :options key1=value1,key2=value2
|
|
|
|
|
#+BEGIN_SRC <LANG>
|
|
|
|
|
...
|
|
|
|
|
#+END_SRC"
|
2013-01-27 17:11:34 -05: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 17:36:51 -05:00
|
|
|
|
:type '(repeat
|
2011-12-09 08:38:36 -05: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 17:36:51 -05:00
|
|
|
|
|
2013-01-27 17:11:34 -05: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 17:36:51 -05: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 16:38:12 -04: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 17:36:51 -05: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 16:38:12 -04:00
|
|
|
|
|
|
|
|
|
pygmentize -L lexers"
|
2013-01-27 17:11:34 -05: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 17:36:51 -05:00
|
|
|
|
:type '(repeat
|
2011-12-09 08:38:36 -05: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 17:36:51 -05:00
|
|
|
|
|
2013-01-27 17:11:34 -05: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 17:36:51 -05:00
|
|
|
|
"Association list of options for the latex minted package.
|
|
|
|
|
|
|
|
|
|
These options are supplied within square brackets in
|
2012-03-19 16:38:12 -04:00
|
|
|
|
\\begin{minted} environments. Each element of the alist should
|
2022-05-04 11:31:59 -04:00
|
|
|
|
be a list or cons cell 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 17:36:51 -05:00
|
|
|
|
|
2015-09-17 19:08:20 -04:00
|
|
|
|
(setq org-latex-minted-options
|
2016-12-07 14:29:54 -05:00
|
|
|
|
\\='((\"bgcolor\" \"bg\") (\"frame\" \"lines\")))
|
2022-05-04 11:31:59 -04:00
|
|
|
|
; or
|
|
|
|
|
(setq org-latex-minted-options
|
|
|
|
|
\\='((\"bgcolor\" . \"bg\") (\"frame\" . \"lines\")))
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
|
2018-09-20 05:23:49 -04:00
|
|
|
|
will result in source blocks being exported 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 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
\\begin{minted}[bgcolor=bg,frame=lines]{<LANG>}
|
|
|
|
|
|
|
|
|
|
as the start of the minted environment. Note that the same
|
2014-03-25 10:58:41 -04:00
|
|
|
|
options will be applied to blocks of all languages. If you need
|
|
|
|
|
block-specific options, you may use the following syntax:
|
|
|
|
|
|
|
|
|
|
#+ATTR_LATEX: :options key1=value1,key2=value2
|
|
|
|
|
#+BEGIN_SRC <LANG>
|
|
|
|
|
...
|
|
|
|
|
#+END_SRC"
|
2013-01-27 17:11:34 -05: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 17:36:51 -05:00
|
|
|
|
:type '(repeat
|
2011-12-09 08:38:36 -05: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 17:36:51 -05:00
|
|
|
|
|
2015-11-30 07:07:56 -05:00
|
|
|
|
(defcustom org-latex-custom-lang-environments nil
|
2012-03-19 16:38:12 -04:00
|
|
|
|
"Alist mapping languages to language-specific LaTeX environments.
|
2012-01-17 14:54:08 -05:00
|
|
|
|
|
2018-09-20 05:23:49 -04:00
|
|
|
|
It is used during export of source blocks by the listings and
|
2018-09-20 05:28:05 -04:00
|
|
|
|
minted LaTeX packages. The environment may be a simple string,
|
2018-09-20 05:23:49 -04:00
|
|
|
|
composed of only letters and numbers. In this case, the string
|
2018-09-20 05:28:05 -04:00
|
|
|
|
is directly the name of the LaTeX environment to use. The
|
2018-09-20 05:23:49 -04:00
|
|
|
|
environment may also be a format string. In this case the format
|
|
|
|
|
string will be directly exported. This format string may contain
|
|
|
|
|
these elements:
|
2015-11-25 02:48:58 -05:00
|
|
|
|
|
|
|
|
|
%s for the formatted source
|
|
|
|
|
%c for the caption
|
|
|
|
|
%f for the float attribute
|
2016-02-26 14:47:16 -05:00
|
|
|
|
%l for an appropriate label
|
2016-01-14 08:40:46 -05:00
|
|
|
|
%o for the LaTeX attributes
|
2015-11-25 02:48:58 -05:00
|
|
|
|
|
|
|
|
|
For example,
|
2012-03-19 16:38:12 -04:00
|
|
|
|
|
2015-09-17 19:08:20 -04:00
|
|
|
|
(setq org-latex-custom-lang-environments
|
2016-12-07 14:29:54 -05:00
|
|
|
|
\\='((python \"pythoncode\")
|
2015-11-25 02:48:58 -05:00
|
|
|
|
(ocaml \"\\\\begin{listing}
|
2016-01-14 08:40:46 -05:00
|
|
|
|
\\\\begin{minted}[%o]{ocaml}
|
2015-11-25 02:48:58 -05:00
|
|
|
|
%s\\\\end{minted}
|
|
|
|
|
\\\\caption{%c}
|
|
|
|
|
\\\\label{%l}\")))
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
|
2015-11-25 02:48:58 -05:00
|
|
|
|
would have the effect that if Org encounters a Python source block
|
|
|
|
|
during LaTeX export it will produce
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
\\begin{pythoncode}
|
2018-09-20 05:23:49 -04:00
|
|
|
|
<source block body>
|
2015-11-25 02:48:58 -05:00
|
|
|
|
\\end{pythoncode}
|
|
|
|
|
|
|
|
|
|
and if Org encounters an Ocaml source block during LaTeX export it
|
|
|
|
|
will produce
|
|
|
|
|
|
|
|
|
|
\\begin{listing}
|
2016-01-14 08:40:46 -05:00
|
|
|
|
\\begin{minted}[<attr_latex options>]{ocaml}
|
2018-09-20 05:23:49 -04:00
|
|
|
|
<source block body>
|
2015-11-25 02:48:58 -05:00
|
|
|
|
\\end{minted}
|
|
|
|
|
\\caption{<caption>}
|
|
|
|
|
\\label{<label>}
|
2015-11-30 07:07:56 -05:00
|
|
|
|
\\end{listing}"
|
|
|
|
|
:group 'org-export-latex
|
|
|
|
|
:type '(repeat
|
|
|
|
|
(list
|
|
|
|
|
(symbol :tag "Language name ")
|
|
|
|
|
(string :tag "Environment name or format string")))
|
2017-01-25 23:39:18 -05:00
|
|
|
|
:version "26.1"
|
2015-11-30 07:07:56 -05:00
|
|
|
|
:package-version '(Org . "9.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 17:36:51 -05:00
|
|
|
|
|
2021-11-21 07:04:12 -05:00
|
|
|
|
(defcustom org-latex-engraved-preamble
|
|
|
|
|
"\\usepackage{fvextra}
|
|
|
|
|
|
|
|
|
|
[FVEXTRA-SETUP]
|
|
|
|
|
|
|
|
|
|
% Make line numbers smaller and grey.
|
|
|
|
|
\\renewcommand\\theFancyVerbLine{\\footnotesize\\color{black!40!white}\\arabic{FancyVerbLine}}
|
|
|
|
|
|
|
|
|
|
\\usepackage{xcolor}
|
|
|
|
|
|
|
|
|
|
% In case engrave-faces-latex-gen-preamble has not been run.
|
|
|
|
|
\\providecolor{EfD}{HTML}{f7f7f7}
|
|
|
|
|
\\providecolor{EFD}{HTML}{28292e}
|
|
|
|
|
|
|
|
|
|
% Define a Code environment to prettily wrap the fontified code.
|
|
|
|
|
\\usepackage[breakable,xparse]{tcolorbox}
|
|
|
|
|
\\DeclareTColorBox[]{Code}{o}%
|
|
|
|
|
{colback=EfD!98!EFD, colframe=EfD!95!EFD,
|
|
|
|
|
fontupper=\\footnotesize\\setlength{\\fboxsep}{0pt},
|
|
|
|
|
colupper=EFD,
|
|
|
|
|
IfNoValueTF={#1}%
|
|
|
|
|
{boxsep=2pt, arc=2.5pt, outer arc=2.5pt,
|
|
|
|
|
boxrule=0.5pt, left=2pt}%
|
|
|
|
|
{boxsep=2.5pt, arc=0pt, outer arc=0pt,
|
|
|
|
|
boxrule=0pt, leftrule=1.5pt, left=0.5pt},
|
|
|
|
|
right=2pt, top=1pt, bottom=0.5pt,
|
|
|
|
|
breakable}
|
|
|
|
|
|
|
|
|
|
[LISTINGS-SETUP]"
|
|
|
|
|
"Preamble content injected when using engrave-faces-latex for source blocks.
|
ox-latex: Replace `org-latex-listings'
* lisp/ox-latex.el (org-latex-src-block, org-latex-keyword,
org-latex-inline-src-block, org-latex-template,
org-latex--caption/label-string, org-latex-engraved-preamble,
org-latex-listings): Replace `org-latex-listings' with
`org-latex-src-block-backend', which now can be set to listings/verbatim
and no longer advertises t/nil as valid values.
* lisp/ox-beamer.el (org-beamer-template): Update in the same manner as
`org-latex-template'.
* lisp/org-compat.el: Make `org-latex-listings' an obsolete alias for
`org-latex-src-block-backend'.
* testing/lisp/test-ox.el: Replace `org-latex-listings' reference with
`org-latex-src-block-backend'.
* doc/org-manual.org (Footnotes, LaTeX specific properties, Literal
Examples): Replace references to `org-latex-listings' with
`org-latex-src-block-backend'.
* etc/ORG-NEWS: Add a news entry noting this change.
The variable `org-latex-listings' originally indicated whether source
blocks should use the listings LaTeX package, or not. This usage has
evolved over the years, and now it sets one of four different
fontification backends. This renaming should make the variable name a
bit less misleading.
2022-05-07 02:46:28 -04:00
|
|
|
|
This is relevant when `org-latex-src-block-backend' is set to `engraved'.
|
2021-11-21 07:04:12 -05:00
|
|
|
|
|
|
|
|
|
There is quite a lot of flexibility in what this preamble can be,
|
|
|
|
|
as long as it:
|
|
|
|
|
- Loads the fvextra package.
|
|
|
|
|
- Loads the package xcolor (if it is not already loaded elsewhere).
|
|
|
|
|
- Defines a \"Code\" environment (note the capital C), which all
|
|
|
|
|
\"Verbatim\" environments (provided by fvextra) will be wrapped with.
|
|
|
|
|
|
|
|
|
|
In the default value the colors \"EFD\" and \"EfD\" are provided
|
2022-11-30 10:59:41 -05:00
|
|
|
|
as they are respectively the foreground and background colors,
|
2021-11-21 07:04:12 -05:00
|
|
|
|
just in case they aren't provided by the generated preamble, so
|
2022-06-30 11:33:03 -04:00
|
|
|
|
we can assume they are always set.
|
2021-11-21 07:04:12 -05:00
|
|
|
|
|
2022-11-30 10:59:41 -05:00
|
|
|
|
Within this preamble there are two recognized macro-like placeholders:
|
2021-11-21 07:04:12 -05:00
|
|
|
|
|
|
|
|
|
[FVEXTRA-SETUP]
|
|
|
|
|
|
|
|
|
|
[LISTINGS-SETUP]
|
|
|
|
|
|
|
|
|
|
Unless you have a very good reason, both of these placeholders
|
|
|
|
|
should be included in the preamble.
|
|
|
|
|
|
|
|
|
|
FVEXTRA-SETUP sets fvextra's defaults according to
|
|
|
|
|
`org-latex-engraved-options', and LISTINGS-SETUP creates the
|
|
|
|
|
listings environment used for captioned or floating code blocks,
|
|
|
|
|
as well as defining \\listoflistings."
|
|
|
|
|
:group 'org-export-latex
|
|
|
|
|
:type 'string
|
|
|
|
|
:package-version '(Org . "9.6"))
|
|
|
|
|
|
|
|
|
|
(defcustom org-latex-engraved-options
|
|
|
|
|
'(("commandchars" . "\\\\\\{\\}")
|
|
|
|
|
("highlightcolor" . "white!95!black!80!blue")
|
|
|
|
|
("breaklines" . "true")
|
|
|
|
|
("breaksymbol" . "\\color{white!60!black}\\tiny\\ensuremath{\\hookrightarrow}"))
|
|
|
|
|
"Association list of options for the latex fvextra package when engraving code.
|
|
|
|
|
|
|
|
|
|
These options are set using \\fvset{...} in the preamble of the
|
|
|
|
|
LaTeX export. Each element of the alist should be a list or cons
|
|
|
|
|
cell containing two strings: the name of the option, and the
|
|
|
|
|
value. For example,
|
|
|
|
|
|
|
|
|
|
(setq org-latex-engraved-options
|
|
|
|
|
\\='((\"highlightcolor\" \"green\") (\"frame\" \"lines\")))
|
|
|
|
|
; or
|
|
|
|
|
(setq org-latex-engraved-options
|
|
|
|
|
\\='((\"highlightcolor\" . \"green\") (\"frame\" . \"lines\")))
|
|
|
|
|
|
|
|
|
|
will result in the following LaTeX in the preamble
|
|
|
|
|
|
|
|
|
|
\\fvset{%
|
|
|
|
|
bgcolor=bg,
|
|
|
|
|
frame=lines}
|
|
|
|
|
|
|
|
|
|
This will affect all fvextra environments. Note that the same
|
|
|
|
|
options will be applied to all blocks. If you need
|
|
|
|
|
block-specific options, you may use the following syntax:
|
|
|
|
|
|
|
|
|
|
#+ATTR_LATEX: :options key1=value1,key2=value2
|
|
|
|
|
#+BEGIN_SRC <LANG>
|
|
|
|
|
...
|
|
|
|
|
#+END_SRC"
|
|
|
|
|
:group 'org-export-latex
|
2022-11-13 02:29:15 -05:00
|
|
|
|
:package-version '(Org . "9.6")
|
2021-11-21 07:04:12 -05:00
|
|
|
|
:type '(alist :key-type (string :tag "option")
|
|
|
|
|
:value-type (string :tag "value")))
|
|
|
|
|
|
2022-05-07 14:01:34 -04:00
|
|
|
|
(defcustom org-latex-engraved-theme nil
|
|
|
|
|
"The theme that should be used for engraved code, when non-nil.
|
|
|
|
|
This can be set to any theme defined in `engrave-faces-themes' or
|
|
|
|
|
loadable by Emacs. When set to t, the current Emacs theme is
|
|
|
|
|
used. When nil, no theme is applied."
|
|
|
|
|
:group 'org-export-latex
|
2022-11-13 02:29:15 -05:00
|
|
|
|
:package-version '(Org . "9.6")
|
2022-05-07 14:01:34 -04:00
|
|
|
|
:type 'symbol)
|
|
|
|
|
|
2022-09-18 09:43:32 -04:00
|
|
|
|
(defun org-latex-generate-engraved-preamble (info)
|
2021-11-21 07:04:12 -05:00
|
|
|
|
"Generate the preamble to setup engraved code.
|
|
|
|
|
The result is constructed from the :latex-engraved-preamble and
|
2023-11-18 06:18:53 -05:00
|
|
|
|
:latex-engraved-options export options (passed via INFO plist), the
|
|
|
|
|
default values of which are given by `org-latex-engraved-preamble' and
|
2021-11-21 07:04:12 -05:00
|
|
|
|
`org-latex-engraved-options' respectively."
|
|
|
|
|
(let* ((engraved-options
|
|
|
|
|
(plist-get info :latex-engraved-options))
|
2022-05-07 14:01:34 -04:00
|
|
|
|
(engraved-preamble (plist-get info :latex-engraved-preamble))
|
2022-05-08 03:28:29 -04:00
|
|
|
|
(engraved-theme (plist-get info :latex-engraved-theme))
|
|
|
|
|
(engraved-themes
|
2022-09-04 00:16:49 -04:00
|
|
|
|
(mapcar
|
|
|
|
|
#'intern
|
|
|
|
|
(cl-delete-duplicates
|
|
|
|
|
(org-element-map
|
|
|
|
|
(plist-get info :parse-tree)
|
|
|
|
|
'(src-block inline-src-block)
|
|
|
|
|
(lambda (src)
|
|
|
|
|
(plist-get
|
|
|
|
|
(org-export-read-attribute :attr_latex src)
|
|
|
|
|
:engraved-theme))
|
|
|
|
|
info))))
|
2022-05-08 03:28:29 -04:00
|
|
|
|
(gen-theme-spec
|
|
|
|
|
(lambda (theme)
|
|
|
|
|
(if (eq engrave-faces-latex-output-style 'preset)
|
2022-09-04 00:16:49 -04:00
|
|
|
|
(engrave-faces-latex-gen-preamble theme)
|
2022-05-08 03:28:29 -04:00
|
|
|
|
(engrave-faces-latex-gen-preamble-line
|
|
|
|
|
'default
|
|
|
|
|
(alist-get 'default
|
|
|
|
|
(if theme
|
|
|
|
|
(engrave-faces-get-theme (intern theme))
|
|
|
|
|
engrave-faces-current-preset-style)))))))
|
2022-09-04 00:16:49 -04:00
|
|
|
|
(when (stringp engraved-theme)
|
|
|
|
|
(setq engraved-theme (intern engraved-theme)))
|
2021-11-21 07:04:12 -05:00
|
|
|
|
(when (string-match "^[ \t]*\\[FVEXTRA-SETUP\\][ \t]*\n?" engraved-preamble)
|
|
|
|
|
(setq engraved-preamble
|
|
|
|
|
(replace-match
|
|
|
|
|
(concat
|
|
|
|
|
"\\fvset{%\n "
|
|
|
|
|
(org-latex--make-option-string engraved-options ",\n ")
|
|
|
|
|
"}\n")
|
|
|
|
|
t t
|
|
|
|
|
engraved-preamble)))
|
|
|
|
|
(when (string-match "^[ \t]*\\[LISTINGS-SETUP\\][ \t]*\n?" engraved-preamble)
|
|
|
|
|
(setq engraved-preamble
|
|
|
|
|
(replace-match
|
|
|
|
|
(format
|
|
|
|
|
"%% Support listings with captions
|
|
|
|
|
\\usepackage{float}
|
|
|
|
|
\\floatstyle{%s}
|
|
|
|
|
\\newfloat{listing}{htbp}{lst}
|
|
|
|
|
\\newcommand{\\listingsname}{Listing}
|
|
|
|
|
\\floatname{listing}{\\listingsname}
|
|
|
|
|
\\newcommand{\\listoflistingsname}{List of Listings}
|
|
|
|
|
\\providecommand{\\listoflistings}{\\listof{listing}{\\listoflistingsname}}\n"
|
|
|
|
|
(if (memq 'src-block org-latex-caption-above)
|
|
|
|
|
"plaintop" "plain"))
|
|
|
|
|
t t
|
|
|
|
|
engraved-preamble)))
|
2022-07-20 11:33:37 -04:00
|
|
|
|
(concat
|
|
|
|
|
"\n% Setup for code blocks [1/2]\n\n"
|
|
|
|
|
engraved-preamble
|
|
|
|
|
"\n\n% Setup for code blocks [2/2]: syntax highlighting colors\n\n"
|
|
|
|
|
(if (require 'engrave-faces-latex nil t)
|
|
|
|
|
(if engraved-themes
|
|
|
|
|
(concat
|
|
|
|
|
(mapconcat
|
|
|
|
|
(lambda (theme)
|
|
|
|
|
(format
|
|
|
|
|
"\n\\newcommand{\\engravedtheme%s}{%%\n%s\n}"
|
2022-09-04 00:16:49 -04:00
|
|
|
|
(replace-regexp-in-string "[^A-Za-z]" "" (symbol-name theme))
|
2022-07-20 11:33:37 -04:00
|
|
|
|
(replace-regexp-in-string
|
|
|
|
|
"newcommand" "renewcommand"
|
|
|
|
|
(replace-regexp-in-string
|
|
|
|
|
"#" "##"
|
|
|
|
|
(funcall gen-theme-spec theme)))))
|
|
|
|
|
engraved-themes
|
|
|
|
|
"\n")
|
|
|
|
|
"\n\n"
|
|
|
|
|
(cond
|
|
|
|
|
((memq engraved-theme engraved-themes)
|
|
|
|
|
(concat "\\engravedtheme"
|
|
|
|
|
(replace-regexp-in-string
|
|
|
|
|
"[^A-Za-z]" "" engraved-theme)
|
|
|
|
|
"\n"))
|
|
|
|
|
(t (funcall gen-theme-spec engraved-theme))))
|
|
|
|
|
(funcall gen-theme-spec engraved-theme))
|
2023-03-29 10:30:41 -04:00
|
|
|
|
(warn "Cannot engrave source blocks. Consider installing `engrave-faces'.")
|
2022-07-20 11:33:37 -04:00
|
|
|
|
"% WARNING syntax highlighting unavailable as engrave-faces-latex was missing.\n")
|
|
|
|
|
"\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 17:36:51 -05:00
|
|
|
|
|
2012-03-19 16:38:12 -04:00
|
|
|
|
;;;; Compilation
|
|
|
|
|
|
2016-02-06 09:52:29 -05:00
|
|
|
|
(defcustom org-latex-compiler-file-string "%% Intended LaTeX compiler: %s\n"
|
2015-10-03 09:34:24 -04:00
|
|
|
|
"LaTeX compiler format-string.
|
|
|
|
|
See also `org-latex-compiler'."
|
2015-09-13 12:09:03 -04:00
|
|
|
|
:group 'org-export-latex
|
|
|
|
|
:type '(choice
|
2016-02-06 09:52:29 -05:00
|
|
|
|
(const :tag "Comment" "%% Intended LaTeX compiler: %s\n")
|
2015-09-13 12:09:03 -04:00
|
|
|
|
(const :tag "latex-mode file variable" "%% -*- latex-run-command: %s -*-\n")
|
|
|
|
|
(const :tag "AUCTeX file variable" "%% -*- LaTeX-command: %s -*-\n")
|
|
|
|
|
(string :tag "custom format" "%% %s"))
|
2017-01-25 23:39:18 -05:00
|
|
|
|
:version "26.1"
|
2015-09-13 12:09:03 -04:00
|
|
|
|
:package-version '(Org . "9.0"))
|
|
|
|
|
|
|
|
|
|
(defcustom org-latex-compiler "pdflatex"
|
2015-10-03 09:34:24 -04:00
|
|
|
|
"LaTeX compiler to use.
|
|
|
|
|
|
2015-10-26 16:38:04 -04:00
|
|
|
|
Must be an element in `org-latex-compilers' or the empty quote.
|
2015-10-03 09:34:24 -04:00
|
|
|
|
Can also be set in buffers via #+LATEX_COMPILER. See also
|
|
|
|
|
`org-latex-compiler-file-string'."
|
2015-09-13 12:09:03 -04:00
|
|
|
|
:group 'org-export-latex
|
|
|
|
|
:type '(choice
|
|
|
|
|
(const :tag "pdfLaTeX" "pdflatex")
|
|
|
|
|
(const :tag "XeLaTeX" "xelatex")
|
2015-10-03 09:34:24 -04:00
|
|
|
|
(const :tag "LuaLaTeX" "lualatex")
|
|
|
|
|
(const :tag "Unset" ""))
|
2017-01-25 23:39:18 -05:00
|
|
|
|
:version "26.1"
|
2015-09-13 12:09:03 -04:00
|
|
|
|
:package-version '(Org . "9.0"))
|
|
|
|
|
|
|
|
|
|
(defconst org-latex-compilers '("pdflatex" "xelatex" "lualatex")
|
2015-10-03 09:34:24 -04:00
|
|
|
|
"Known LaTeX compilers.
|
|
|
|
|
See also `org-latex-compiler'.")
|
2015-09-13 12:09:03 -04:00
|
|
|
|
|
2015-07-08 12:32:40 -04:00
|
|
|
|
(defcustom org-latex-bib-compiler "bibtex"
|
2015-10-03 09:34:24 -04:00
|
|
|
|
"Command to process a LaTeX file's bibliography.
|
2015-07-08 12:32:40 -04:00
|
|
|
|
|
|
|
|
|
The shorthand %bib in `org-latex-pdf-process' is replaced with
|
|
|
|
|
this value.
|
|
|
|
|
|
2015-10-03 09:34:24 -04:00
|
|
|
|
A better approach is to use a compiler suit such as `latexmk'."
|
2015-07-08 12:32:40 -04:00
|
|
|
|
:group 'org-export-latex
|
|
|
|
|
:type '(choice (const :tag "BibTeX" "bibtex")
|
|
|
|
|
(const :tag "Biber" "biber")
|
|
|
|
|
(string :tag "Other process"))
|
2017-01-25 23:39:18 -05:00
|
|
|
|
:version "26.1"
|
2015-07-08 12:32:40 -04:00
|
|
|
|
:package-version '(Org . "9.0"))
|
|
|
|
|
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(defcustom org-latex-pdf-process
|
2021-07-09 12:31:40 -04:00
|
|
|
|
(if (executable-find "latexmk")
|
|
|
|
|
'("latexmk -f -pdf -%latex -interaction=nonstopmode -output-directory=%o %f")
|
|
|
|
|
'("%latex -interaction nonstopmode -output-directory %o %f"
|
|
|
|
|
"%latex -interaction nonstopmode -output-directory %o %f"
|
|
|
|
|
"%latex -interaction nonstopmode -output-directory %o %f"))
|
2012-03-19 16:38:12 -04:00
|
|
|
|
"Commands to process a LaTeX file to a PDF file.
|
2016-11-27 06:07:11 -05:00
|
|
|
|
|
2022-05-21 23:44:56 -04:00
|
|
|
|
The command output will be parsed to extract compilation errors and
|
|
|
|
|
warnings according to `org-latex-known-warnings'.
|
|
|
|
|
|
2012-03-19 16:38:12 -04:00
|
|
|
|
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
|
2016-11-27 06:07:11 -05:00
|
|
|
|
relative file name, %F by the absolute file name, %b by the file
|
|
|
|
|
base name (i.e. without directory and extension parts), %o by the
|
|
|
|
|
base directory of the file, %O by the absolute file name of the
|
|
|
|
|
output file, %latex is the LaTeX compiler (see
|
|
|
|
|
`org-latex-compiler'), and %bib is the BibTeX-like compiler (see
|
|
|
|
|
`org-latex-bib-compiler').
|
2012-03-19 16:38:12 -04: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.
|
|
|
|
|
|
2015-09-13 12:09:03 -04:00
|
|
|
|
Consider a smart LaTeX compiler such as `texi2dvi' or `latexmk',
|
|
|
|
|
which calls the \"correct\" combinations of auxiliary programs.
|
2012-03-19 16:38:12 -04: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."
|
2022-11-15 17:49:56 -05:00
|
|
|
|
:group 'org-export-latex
|
2012-03-19 16:38:12 -04:00
|
|
|
|
:type '(choice
|
|
|
|
|
(repeat :tag "Shell command sequence"
|
|
|
|
|
(string :tag "Shell command"))
|
2015-09-13 12:09:03 -04:00
|
|
|
|
(const :tag "2 runs of latex"
|
|
|
|
|
("%latex -interaction nonstopmode -output-directory %o %f"
|
|
|
|
|
"%latex -interaction nonstopmode -output-directory %o %f"))
|
|
|
|
|
(const :tag "3 runs of latex"
|
|
|
|
|
("%latex -interaction nonstopmode -output-directory %o %f"
|
|
|
|
|
"%latex -interaction nonstopmode -output-directory %o %f"
|
|
|
|
|
"%latex -interaction nonstopmode -output-directory %o %f"))
|
|
|
|
|
(const :tag "latex,bibtex,latex,latex"
|
|
|
|
|
("%latex -interaction nonstopmode -output-directory %o %f"
|
2015-07-08 12:32:40 -04:00
|
|
|
|
"%bib %b"
|
2015-09-13 12:09:03 -04:00
|
|
|
|
"%latex -interaction nonstopmode -output-directory %o %f"
|
|
|
|
|
"%latex -interaction nonstopmode -output-directory %o %f"))
|
2012-03-19 16:38:12 -04:00
|
|
|
|
(const :tag "texi2dvi"
|
2016-11-08 12:24:13 -05:00
|
|
|
|
("cd %o; LATEX=\"%latex\" texi2dvi -p -b -V %b.tex"))
|
2013-06-21 11:57:32 -04:00
|
|
|
|
(const :tag "latexmk"
|
2021-07-09 12:31:40 -04:00
|
|
|
|
("latexmk -f -pdf -%latex -interaction=nonstopmode -output-directory=%o %f"))
|
2012-03-19 16:38:12 -04:00
|
|
|
|
(function)))
|
|
|
|
|
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(defcustom org-latex-logfiles-extensions
|
2014-06-22 18:40:12 -04:00
|
|
|
|
'("aux" "bcf" "blg" "fdb_latexmk" "fls" "figlist" "idx" "log" "nav" "out"
|
2014-10-25 11:14:34 -04:00
|
|
|
|
"ptc" "run.xml" "snm" "toc" "vrb" "xdv")
|
2013-02-28 02:41:57 -05:00
|
|
|
|
"The list of file extensions to consider as LaTeX logfiles.
|
2014-10-25 11:14:34 -04:00
|
|
|
|
The logfiles will be removed if `org-latex-remove-logfiles' is
|
2013-02-28 02:41:57 -05:00
|
|
|
|
non-nil."
|
2013-01-27 17:11:34 -05:00
|
|
|
|
:group 'org-export-latex
|
2017-01-25 23:39:18 -05:00
|
|
|
|
:version "26.1"
|
2014-10-25 11:14:34 -04:00
|
|
|
|
:package-version '(Org . "8.3")
|
2012-03-19 16:38:12 -04:00
|
|
|
|
:type '(repeat (string :tag "Extension")))
|
|
|
|
|
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(defcustom org-latex-remove-logfiles t
|
2012-03-19 16:38:12 -04:00
|
|
|
|
"Non-nil means remove the logfiles produced by PDF production.
|
2013-02-28 02:41:57 -05: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 17:11:34 -05:00
|
|
|
|
:group 'org-export-latex
|
2012-03-19 16:38:12 -04:00
|
|
|
|
:type 'boolean)
|
|
|
|
|
|
2014-03-29 16:56:43 -04:00
|
|
|
|
(defcustom org-latex-known-warnings
|
|
|
|
|
'(("Reference.*?undefined" . "[undefined reference]")
|
|
|
|
|
("Runaway argument" . "[runaway argument]")
|
|
|
|
|
("Underfull \\hbox" . "[underfull hbox]")
|
|
|
|
|
("Overfull \\hbox" . "[overfull hbox]")
|
|
|
|
|
("Citation.*?undefined" . "[undefined citation]")
|
|
|
|
|
("Undefined control sequence" . "[undefined control sequence]"))
|
2012-09-15 08:58:49 -04:00
|
|
|
|
"Alist of regular expressions and associated messages for the user.
|
2014-03-29 16:56:43 -04:00
|
|
|
|
The regular expressions are used to find possible warnings in the
|
2018-09-20 05:28:05 -04:00
|
|
|
|
log of a LaTeX-run. These warnings will be reported after
|
2014-03-29 16:56:43 -04:00
|
|
|
|
calling `org-latex-compile'."
|
2013-01-27 17:11:34 -05:00
|
|
|
|
:group 'org-export-latex
|
2017-01-25 23:39:18 -05:00
|
|
|
|
:version "26.1"
|
2014-03-29 16:56:43 -04:00
|
|
|
|
:package-version '(Org . "8.3")
|
2012-09-15 08:58:49 -04:00
|
|
|
|
:type '(repeat
|
|
|
|
|
(cons
|
2019-12-21 12:52:06 -05:00
|
|
|
|
(regexp :tag "Regexp")
|
2012-09-15 08:58:49 -04:00
|
|
|
|
(string :tag "Message"))))
|
|
|
|
|
|
2012-03-19 16:38:12 -04: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 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
;;; Internal Functions
|
|
|
|
|
|
2014-10-17 11:19:30 -04:00
|
|
|
|
(defun org-latex--caption-above-p (element info)
|
2019-09-18 22:32:25 -04:00
|
|
|
|
"Non-nil when caption is expected to be located above ELEMENT.
|
2014-10-17 11:19:30 -04:00
|
|
|
|
INFO is a plist holding contextual information."
|
|
|
|
|
(let ((above (plist-get info :latex-caption-above)))
|
|
|
|
|
(if (symbolp above) above
|
|
|
|
|
(let ((type (org-element-type element)))
|
|
|
|
|
(memq (if (eq type 'link) 'image type) above)))))
|
|
|
|
|
|
2015-04-19 09:12:27 -04:00
|
|
|
|
(defun org-latex--label (datum info &optional force full)
|
|
|
|
|
"Return an appropriate label for DATUM.
|
|
|
|
|
DATUM is an element or a `target' type object. INFO is the
|
|
|
|
|
current export state, as a plist.
|
2015-04-13 05:53:59 -04:00
|
|
|
|
|
2015-04-19 09:12:27 -04:00
|
|
|
|
Return nil if element DATUM has no NAME or VALUE affiliated
|
|
|
|
|
keyword or no CUSTOM_ID property, unless FORCE is non-nil. In
|
|
|
|
|
this case always return a unique label.
|
2015-04-13 05:53:59 -04:00
|
|
|
|
|
|
|
|
|
Eventually, if FULL is non-nil, wrap label within \"\\label{}\"."
|
2015-04-19 09:12:27 -04:00
|
|
|
|
(let* ((type (org-element-type datum))
|
|
|
|
|
(user-label
|
2015-04-13 05:53:59 -04:00
|
|
|
|
(org-element-property
|
2016-05-26 05:03:11 -04:00
|
|
|
|
(cl-case type
|
2015-04-15 15:46:57 -04:00
|
|
|
|
((headline inlinetask) :CUSTOM_ID)
|
|
|
|
|
(target :value)
|
|
|
|
|
(otherwise :name))
|
2015-04-19 09:12:27 -04:00
|
|
|
|
datum))
|
2015-04-13 05:53:59 -04:00
|
|
|
|
(label
|
|
|
|
|
(and (or user-label force)
|
|
|
|
|
(if (and user-label (plist-get info :latex-prefer-user-labels))
|
|
|
|
|
user-label
|
2019-05-12 18:51:39 -04:00
|
|
|
|
(concat (pcase type
|
|
|
|
|
(`headline "sec:")
|
|
|
|
|
(`table "tab:")
|
|
|
|
|
(`latex-environment
|
2016-07-25 09:21:12 -04:00
|
|
|
|
(and (string-match-p
|
2015-04-20 09:06:55 -04:00
|
|
|
|
org-latex-math-environments-re
|
|
|
|
|
(org-element-property :value datum))
|
|
|
|
|
"eq:"))
|
2019-05-12 18:51:39 -04:00
|
|
|
|
(`latex-matrices "eq:")
|
|
|
|
|
(`paragraph
|
2015-04-20 09:06:55 -04:00
|
|
|
|
(and (org-element-property :caption datum)
|
2019-05-12 18:51:39 -04:00
|
|
|
|
"fig:"))
|
2022-05-11 09:50:36 -04:00
|
|
|
|
(`src-block "lst:")
|
2019-05-12 18:51:39 -04:00
|
|
|
|
(_ nil))
|
2015-04-20 09:06:55 -04:00
|
|
|
|
(org-export-get-reference datum info))))))
|
2015-04-13 05:53:59 -04:00
|
|
|
|
(cond ((not full) label)
|
2015-04-19 09:42:39 -04:00
|
|
|
|
(label (format "\\label{%s}%s"
|
|
|
|
|
label
|
|
|
|
|
(if (eq type 'target) "" "\n")))
|
2015-04-13 05:53:59 -04:00
|
|
|
|
(t ""))))
|
|
|
|
|
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(defun org-latex--caption/label-string (element info)
|
2012-09-13 10:56:15 -04: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 17:36:51 -05:00
|
|
|
|
|
2012-09-13 10:56:15 -04: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 17:36:51 -05:00
|
|
|
|
|
2013-01-27 17:11:34 -05:00
|
|
|
|
For non-floats, see `org-latex--wrap-label'."
|
2015-04-13 05:53:59 -04:00
|
|
|
|
(let* ((label (org-latex--label element info nil t))
|
2012-09-13 10:56:15 -04:00
|
|
|
|
(main (org-export-get-caption element))
|
2015-06-30 19:12:42 -04:00
|
|
|
|
(attr (org-export-read-attribute :attr_latex element))
|
|
|
|
|
(type (org-element-type element))
|
|
|
|
|
(nonfloat (or (and (plist-member attr :float)
|
|
|
|
|
(not (plist-get attr :float))
|
|
|
|
|
main)
|
|
|
|
|
(and (eq type 'src-block)
|
|
|
|
|
(not (plist-get attr :float))
|
ox-latex: Replace `org-latex-listings'
* lisp/ox-latex.el (org-latex-src-block, org-latex-keyword,
org-latex-inline-src-block, org-latex-template,
org-latex--caption/label-string, org-latex-engraved-preamble,
org-latex-listings): Replace `org-latex-listings' with
`org-latex-src-block-backend', which now can be set to listings/verbatim
and no longer advertises t/nil as valid values.
* lisp/ox-beamer.el (org-beamer-template): Update in the same manner as
`org-latex-template'.
* lisp/org-compat.el: Make `org-latex-listings' an obsolete alias for
`org-latex-src-block-backend'.
* testing/lisp/test-ox.el: Replace `org-latex-listings' reference with
`org-latex-src-block-backend'.
* doc/org-manual.org (Footnotes, LaTeX specific properties, Literal
Examples): Replace references to `org-latex-listings' with
`org-latex-src-block-backend'.
* etc/ORG-NEWS: Add a news entry noting this change.
The variable `org-latex-listings' originally indicated whether source
blocks should use the listings LaTeX package, or not. This usage has
evolved over the years, and now it sets one of four different
fontification backends. This renaming should make the variable name a
bit less misleading.
2022-05-07 02:46:28 -04:00
|
|
|
|
(memq (plist-get info :latex-src-block-backend)
|
|
|
|
|
'(verbatim nil)))))
|
2013-06-29 11:04:03 -04:00
|
|
|
|
(short (org-export-get-caption element t))
|
2015-06-30 19:12:42 -04:00
|
|
|
|
(caption-from-attr-latex (plist-get attr :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 17:36:51 -05:00
|
|
|
|
(cond
|
2013-06-29 11:04:03 -04:00
|
|
|
|
((org-string-nw-p caption-from-attr-latex)
|
|
|
|
|
(concat caption-from-attr-latex "\n"))
|
2015-04-13 05:24:42 -04:00
|
|
|
|
((and (not main) (equal label "")) "")
|
2016-02-27 03:34:45 -05:00
|
|
|
|
((not main) 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 17:36:51 -05:00
|
|
|
|
;; Option caption format with short name.
|
2015-06-30 19:12:42 -04:00
|
|
|
|
(t
|
|
|
|
|
(format (if nonfloat "\\captionof{%s}%s{%s%s}\n"
|
|
|
|
|
"\\caption%s%s{%s%s}\n")
|
2017-03-16 07:45:10 -04:00
|
|
|
|
(let ((type* (if (eq type 'latex-environment)
|
|
|
|
|
(org-latex--environment-type element)
|
|
|
|
|
type)))
|
|
|
|
|
(if nonfloat
|
|
|
|
|
(cl-case type*
|
|
|
|
|
(paragraph "figure")
|
|
|
|
|
(image "figure")
|
|
|
|
|
(special-block "figure")
|
ox-latex: Replace `org-latex-listings'
* lisp/ox-latex.el (org-latex-src-block, org-latex-keyword,
org-latex-inline-src-block, org-latex-template,
org-latex--caption/label-string, org-latex-engraved-preamble,
org-latex-listings): Replace `org-latex-listings' with
`org-latex-src-block-backend', which now can be set to listings/verbatim
and no longer advertises t/nil as valid values.
* lisp/ox-beamer.el (org-beamer-template): Update in the same manner as
`org-latex-template'.
* lisp/org-compat.el: Make `org-latex-listings' an obsolete alias for
`org-latex-src-block-backend'.
* testing/lisp/test-ox.el: Replace `org-latex-listings' reference with
`org-latex-src-block-backend'.
* doc/org-manual.org (Footnotes, LaTeX specific properties, Literal
Examples): Replace references to `org-latex-listings' with
`org-latex-src-block-backend'.
* etc/ORG-NEWS: Add a news entry noting this change.
The variable `org-latex-listings' originally indicated whether source
blocks should use the listings LaTeX package, or not. This usage has
evolved over the years, and now it sets one of four different
fontification backends. This renaming should make the variable name a
bit less misleading.
2022-05-07 02:46:28 -04:00
|
|
|
|
(src-block (if (not (memq (plist-get info :latex-src-block-backend)
|
|
|
|
|
'(verbatim nil)))
|
2017-03-16 07:45:10 -04:00
|
|
|
|
"listing"
|
|
|
|
|
"figure"))
|
|
|
|
|
(t (symbol-name type*)))
|
|
|
|
|
""))
|
2015-06-30 19:12:42 -04:00
|
|
|
|
(if short (format "[%s]" (org-export-data short info)) "")
|
2019-10-13 03:23:50 -04:00
|
|
|
|
(org-trim label)
|
2015-06-30 19:12:42 -04:00
|
|
|
|
(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 17:36:51 -05:00
|
|
|
|
|
2013-02-02 14:58:39 -05: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 05:29:45 -05:00
|
|
|
|
(or org-export-coding-system buffer-file-coding-system)))
|
2013-02-02 14:58:39 -05:00
|
|
|
|
"utf8")))
|
|
|
|
|
(if (not cs) header
|
|
|
|
|
;; First translate if that is requested.
|
2014-07-28 09:14:53 -04:00
|
|
|
|
(setq cs (or (cdr (assoc cs org-latex-inputenc-alist)) cs))
|
2013-02-02 14:58:39 -05:00
|
|
|
|
;; 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 06:57:35 -04: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 17:36:51 -05:00
|
|
|
|
|
2012-06-14 06:57:35 -04: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 17:36:51 -05:00
|
|
|
|
|
2022-07-19 10:51:55 -04:00
|
|
|
|
The optional argument to Babel or the mandatory argument to
|
|
|
|
|
`\babelprovide' command 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.
|
2013-05-31 18:20:18 -04: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 17:36:51 -05:00
|
|
|
|
Return the new header."
|
2022-07-19 10:51:55 -04:00
|
|
|
|
(let* ((language-code (plist-get info :language))
|
2022-08-04 05:54:01 -04:00
|
|
|
|
(plist (cdr
|
|
|
|
|
(assoc language-code org-latex-language-alist)))
|
|
|
|
|
(language (plist-get plist :babel))
|
|
|
|
|
(language-ini-only (plist-get plist :babel-ini-only))
|
2023-09-08 13:33:25 -04:00
|
|
|
|
(language-ini-alt (plist-get plist :babel-ini-alt))
|
2022-08-04 05:54:01 -04:00
|
|
|
|
;; If no language is set, or Babel package is not loaded, or
|
|
|
|
|
;; LANGUAGE keyword value is a language served by Babel
|
|
|
|
|
;; exclusively through ini files, return HEADER as-is.
|
|
|
|
|
(header (if (or language-ini-only
|
|
|
|
|
(not (stringp language-code))
|
2022-07-19 10:51:55 -04:00
|
|
|
|
(not (string-match "\\\\usepackage\\[\\(.*\\)\\]{babel}" header)))
|
|
|
|
|
header
|
|
|
|
|
(let ((options (save-match-data
|
|
|
|
|
(org-split-string (match-string 1 header) ",[ \t]*"))))
|
|
|
|
|
;; If LANGUAGE is already loaded, return header
|
|
|
|
|
;; without AUTO. Otherwise, replace AUTO with language or
|
|
|
|
|
;; append language if AUTO is not present. Languages that are
|
|
|
|
|
;; served in Babel exclusively through ini files are not added
|
|
|
|
|
;; to the babel argument, and must be loaded using
|
|
|
|
|
;; `\babelprovide'.
|
2022-08-04 05:54:01 -04:00
|
|
|
|
(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)))))
|
2022-07-19 10:51:55 -04:00
|
|
|
|
;; If `\babelprovide[args]{AUTO}' is present, AUTO is
|
|
|
|
|
;; replaced by LANGUAGE.
|
|
|
|
|
(if (not (string-match "\\\\babelprovide\\[.*\\]{\\(.+\\)}" header))
|
2012-06-14 06:57:35 -04:00
|
|
|
|
header
|
2022-07-19 10:51:55 -04:00
|
|
|
|
(let ((prov (match-string 1 header)))
|
2022-11-14 17:33:16 -05:00
|
|
|
|
(if (equal "AUTO" prov)
|
|
|
|
|
(replace-regexp-in-string (format
|
|
|
|
|
"\\(\\\\babelprovide\\[.*\\]\\)\\({\\)%s}" prov)
|
|
|
|
|
(format "\\1\\2%s}"
|
2023-09-08 13:33:25 -04:00
|
|
|
|
(if language-ini-alt language-ini-alt
|
|
|
|
|
(or language language-ini-only)))
|
2022-11-14 17:33:16 -05:00
|
|
|
|
header t)
|
|
|
|
|
header)))))
|
2012-06-14 06:57:35 -04:00
|
|
|
|
|
2015-07-08 08:12:21 -04:00
|
|
|
|
(defun org-latex-guess-polyglossia-language (header info)
|
|
|
|
|
"Set the Polyglossia language according to the LANGUAGE keyword.
|
|
|
|
|
|
|
|
|
|
HEADER is the LaTeX header string. INFO is the plist used as
|
|
|
|
|
a communication channel.
|
|
|
|
|
|
|
|
|
|
Insertion of guessed language only happens when the Polyglossia
|
|
|
|
|
package has been explicitly loaded.
|
|
|
|
|
|
|
|
|
|
The argument to Polyglossia may be \"AUTO\" which is then
|
|
|
|
|
replaced with the language of the document or
|
|
|
|
|
`org-export-default-language'. Note, the language is really set
|
|
|
|
|
using \setdefaultlanguage and not as an option to the package.
|
|
|
|
|
|
|
|
|
|
Return the new header."
|
2022-08-04 05:54:01 -04:00
|
|
|
|
(let* ((language (plist-get info :language)))
|
2015-07-08 08:12:21 -04:00
|
|
|
|
;; If no language is set or Polyglossia is not loaded, return
|
|
|
|
|
;; HEADER as-is.
|
2015-08-02 03:50:45 -04:00
|
|
|
|
(if (or (not (stringp language))
|
2015-07-08 08:12:21 -04:00
|
|
|
|
(not (string-match
|
2022-08-04 05:54:01 -04:00
|
|
|
|
"\\\\usepackage\\(?:\\[\\([^]]+?\\)\\]\\){polyglossia}\n"
|
|
|
|
|
header)))
|
2015-07-08 08:12:21 -04:00
|
|
|
|
header
|
|
|
|
|
(let* ((options (org-string-nw-p (match-string 1 header)))
|
2015-08-02 03:50:45 -04:00
|
|
|
|
(languages (and options
|
|
|
|
|
;; Reverse as the last loaded language is
|
|
|
|
|
;; the main language.
|
|
|
|
|
(nreverse
|
|
|
|
|
(delete-dups
|
|
|
|
|
(save-match-data
|
|
|
|
|
(org-split-string
|
|
|
|
|
(replace-regexp-in-string
|
|
|
|
|
"AUTO" language options t)
|
|
|
|
|
",[ \t]*"))))))
|
|
|
|
|
(main-language-set
|
2015-07-08 08:12:21 -04:00
|
|
|
|
(string-match-p "\\\\setmainlanguage{.*?}" header)))
|
|
|
|
|
(replace-match
|
|
|
|
|
(concat "\\usepackage{polyglossia}\n"
|
2015-08-02 03:50:45 -04:00
|
|
|
|
(mapconcat
|
|
|
|
|
(lambda (l)
|
2022-08-04 05:54:01 -04:00
|
|
|
|
(let* ((plist (cdr
|
|
|
|
|
(assoc language org-latex-language-alist)))
|
|
|
|
|
(polyglossia-variant (plist-get plist :polyglossia-variant))
|
|
|
|
|
(polyglossia-lang (plist-get plist :polyglossia))
|
|
|
|
|
(l (if (equal l language)
|
|
|
|
|
polyglossia-lang
|
|
|
|
|
l)))
|
|
|
|
|
(format (if main-language-set (format "\\setotherlanguage{%s}\n" l)
|
2015-08-02 03:50:45 -04:00
|
|
|
|
(setq main-language-set t)
|
|
|
|
|
"\\setmainlanguage%s{%s}\n")
|
2022-08-04 05:54:01 -04:00
|
|
|
|
(if polyglossia-variant
|
|
|
|
|
(format "[variant=%s]" polyglossia-variant)
|
2015-08-02 03:50:45 -04:00
|
|
|
|
"")
|
2022-08-04 05:54:01 -04:00
|
|
|
|
l)))
|
2015-08-02 03:50:45 -04:00
|
|
|
|
languages
|
|
|
|
|
""))
|
2015-07-08 08:12:21 -04:00
|
|
|
|
t t header 0)))))
|
|
|
|
|
|
2015-09-13 12:09:03 -04:00
|
|
|
|
(defun org-latex--remove-packages (pkg-alist info)
|
2015-10-03 09:34:24 -04:00
|
|
|
|
"Remove packages based on the current LaTeX compiler.
|
2015-09-13 12:09:03 -04:00
|
|
|
|
|
2018-11-27 18:26:24 -05:00
|
|
|
|
PKG-ALIST is a list of packages, as in `org-latex-packages-alist'
|
|
|
|
|
and `org-latex-default-packages-alist'. If the fourth argument
|
|
|
|
|
of a package is neither nil nor a member of the LaTeX compiler
|
|
|
|
|
associated to the document, the package is removed.
|
2015-09-13 12:09:03 -04:00
|
|
|
|
|
2023-11-18 06:18:53 -05:00
|
|
|
|
LaTeX compiler is defined in :latex-compiler INFO plist entry.
|
|
|
|
|
|
2018-11-27 18:26:24 -05:00
|
|
|
|
Return new list of packages."
|
2015-09-13 12:09:03 -04:00
|
|
|
|
(let ((compiler (or (plist-get info :latex-compiler) "")))
|
2018-11-27 18:26:24 -05:00
|
|
|
|
(if (not (member-ignore-case compiler org-latex-compilers)) pkg-alist
|
|
|
|
|
(cl-remove-if-not
|
|
|
|
|
(lambda (package)
|
|
|
|
|
(pcase package
|
|
|
|
|
(`(,_ ,_ ,_ nil) t)
|
|
|
|
|
(`(,_ ,_ ,_ ,compilers) (member-ignore-case compiler compilers))
|
|
|
|
|
(_ t)))
|
|
|
|
|
pkg-alist))))
|
2015-09-13 12:09:03 -04:00
|
|
|
|
|
2013-01-27 17:11:34 -05: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 17:36:51 -05:00
|
|
|
|
"Return a character not used in string S.
|
|
|
|
|
This is used to choose a separator for constructs like \\verb."
|
|
|
|
|
(let ((ll "~,./?;':\"|!@#%^&-_=+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ<>()[]{}"))
|
2016-05-26 05:03:11 -04:00
|
|
|
|
(cl-loop for c across ll
|
|
|
|
|
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 17:36:51 -05:00
|
|
|
|
|
2022-06-30 11:33:03 -04:00
|
|
|
|
(defun org-latex--make-option-string (options &optional separator)
|
2023-12-06 09:18:46 -05:00
|
|
|
|
"Return a comma or SEPARATOR separated string of keywords and values.
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
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)
|
2022-05-04 11:31:59 -04:00
|
|
|
|
(let ((keyword (car pair))
|
|
|
|
|
(value (pcase (cdr pair)
|
|
|
|
|
((pred stringp) (cdr pair))
|
|
|
|
|
((pred consp) (cadr pair)))))
|
|
|
|
|
(concat keyword
|
|
|
|
|
(when value
|
|
|
|
|
(concat "="
|
|
|
|
|
(if (string-match-p (rx (any "[]")) value)
|
|
|
|
|
(format "{%s}" value)
|
|
|
|
|
value))))))
|
|
|
|
|
options
|
2022-06-30 11:33:03 -04:00
|
|
|
|
(or 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 17:36:51 -05:00
|
|
|
|
|
2015-04-13 05:24:42 -04:00
|
|
|
|
(defun org-latex--wrap-label (element output 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 17:36:51 -05:00
|
|
|
|
"Wrap label associated to ELEMENT around OUTPUT, if appropriate.
|
2015-04-13 05:24:42 -04:00
|
|
|
|
INFO is the current export state, as a plist. This function
|
|
|
|
|
should not be used for floats. See
|
2013-01-27 17:11:34 -05:00
|
|
|
|
`org-latex--caption/label-string'."
|
2015-04-13 05:24:42 -04:00
|
|
|
|
(if (not (and (org-string-nw-p output) (org-element-property :name element)))
|
|
|
|
|
output
|
|
|
|
|
(concat (format "\\phantomsection\n\\label{%s}\n"
|
2015-04-15 15:46:57 -04:00
|
|
|
|
(org-latex--label element info))
|
2015-04-13 05:24:42 -04: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 17:36:51 -05:00
|
|
|
|
|
2015-06-06 19:13:51 -04:00
|
|
|
|
(defun org-latex--protect-text (text)
|
|
|
|
|
"Protect special characters in string TEXT and return it."
|
2016-12-13 07:46:38 -05:00
|
|
|
|
(replace-regexp-in-string "[\\{}$%&_#~^]" "\\\\\\&" text))
|
2015-06-06 19:13:51 -04:00
|
|
|
|
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(defun org-latex--text-markup (text markup info)
|
2012-06-18 08:28:47 -04:00
|
|
|
|
"Format TEXT depending on MARKUP text markup.
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
INFO is a plist used as a communication channel. See
|
|
|
|
|
`org-latex-text-markup-alist' for details."
|
|
|
|
|
(let ((fmt (cdr (assq markup (plist-get info :latex-text-markup-alist)))))
|
2016-05-26 05:03:11 -04:00
|
|
|
|
(cl-case fmt
|
2015-06-06 19:13:51 -04:00
|
|
|
|
;; No format string: Return raw text.
|
|
|
|
|
((nil) text)
|
|
|
|
|
;; Handle the `verb' special case: Find an appropriate separator
|
|
|
|
|
;; and use "\\verb" command.
|
|
|
|
|
(verb
|
|
|
|
|
(let ((separator (org-latex--find-verb-separator text)))
|
2016-12-13 07:46:38 -05:00
|
|
|
|
(concat "\\verb"
|
|
|
|
|
separator
|
2015-06-06 19:13:51 -04:00
|
|
|
|
(replace-regexp-in-string "\n" " " text)
|
|
|
|
|
separator)))
|
2021-03-31 11:06:14 -04:00
|
|
|
|
(protectedtexttt (org-latex--protect-texttt text))
|
2015-06-06 19:13:51 -04:00
|
|
|
|
;; Else use format string.
|
|
|
|
|
(t (format fmt 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 12:00:50 -04:00
|
|
|
|
|
2021-03-31 11:06:14 -04:00
|
|
|
|
(defun org-latex--protect-texttt (text)
|
|
|
|
|
"Protect special chars, then wrap TEXT in \"\\texttt{}\"."
|
|
|
|
|
(format "\\texttt{%s}"
|
|
|
|
|
(replace-regexp-in-string
|
2023-04-20 05:01:50 -04:00
|
|
|
|
"--\\|<<\\|>>\\|[\\{}$%&_#~^]"
|
2021-03-31 11:06:14 -04:00
|
|
|
|
(lambda (m)
|
2023-04-12 04:57:34 -04:00
|
|
|
|
(cond ((equal m "--") "-{}-{}")
|
2023-04-20 05:01:50 -04:00
|
|
|
|
((equal m "<<") "<{}<{}")
|
|
|
|
|
((equal m ">>") ">{}>{}")
|
2021-03-31 11:06:14 -04:00
|
|
|
|
((equal m "\\") "\\textbackslash{}")
|
|
|
|
|
((equal m "~") "\\textasciitilde{}")
|
|
|
|
|
((equal m "^") "\\textasciicircum{}")
|
|
|
|
|
(t (org-latex--protect-text m))))
|
|
|
|
|
text nil t)))
|
|
|
|
|
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(defun org-latex--delayed-footnotes-definitions (element info)
|
2012-06-18 08:28:47 -04:00
|
|
|
|
"Return footnotes definitions in ELEMENT as a string.
|
|
|
|
|
|
|
|
|
|
INFO is a plist used as a communication channel.
|
|
|
|
|
|
2016-05-22 14:33:06 -04:00
|
|
|
|
Footnotes definitions are returned within \"\\footnotetext{}\"
|
2012-06-18 08:28:47 -04:00
|
|
|
|
commands.
|
|
|
|
|
|
2012-08-22 03:34:24 -04:00
|
|
|
|
This function is used within constructs that don't support
|
2016-08-28 06:14:39 -04:00
|
|
|
|
\"\\footnote{}\" command (e.g., an item tag). In that case,
|
2012-08-22 03:34:24 -04:00
|
|
|
|
\"\\footnotemark\" is used within the construct and the function
|
|
|
|
|
just outside of it."
|
2012-06-18 08:28:47 -04:00
|
|
|
|
(mapconcat
|
|
|
|
|
(lambda (ref)
|
2016-08-22 06:07:34 -04:00
|
|
|
|
(let ((def (org-export-get-footnote-definition ref info)))
|
|
|
|
|
(format "\\footnotetext[%d]{%s%s}"
|
|
|
|
|
(org-export-get-footnote-number ref info)
|
|
|
|
|
(org-trim (org-latex--label def info t t))
|
|
|
|
|
(org-trim (org-export-data def info)))))
|
2012-06-18 08:28:47 -04:00
|
|
|
|
;; Find every footnote reference in ELEMENT.
|
2015-12-12 22:46:24 -05:00
|
|
|
|
(letrec ((all-refs nil)
|
2015-11-02 14:58:50 -05:00
|
|
|
|
(search-refs
|
|
|
|
|
(lambda (data)
|
|
|
|
|
;; Return a list of all footnote references never seen
|
|
|
|
|
;; before in DATA.
|
|
|
|
|
(org-element-map data 'footnote-reference
|
|
|
|
|
(lambda (ref)
|
|
|
|
|
(when (org-export-footnote-first-reference-p ref info)
|
|
|
|
|
(push ref all-refs)
|
|
|
|
|
(when (eq (org-element-property :type ref) 'standard)
|
|
|
|
|
(funcall search-refs
|
|
|
|
|
(org-export-get-footnote-definition ref info)))))
|
|
|
|
|
info)
|
|
|
|
|
(reverse all-refs))))
|
2012-06-18 08:28:47 -04:00
|
|
|
|
(funcall search-refs element))
|
|
|
|
|
""))
|
|
|
|
|
|
2013-10-29 10:31:22 -04:00
|
|
|
|
(defun org-latex--translate (s info)
|
|
|
|
|
"Translate string S according to specified language.
|
|
|
|
|
INFO is a plist used as a communication channel."
|
|
|
|
|
(org-export-translate s :latex info))
|
|
|
|
|
|
2015-02-10 20:18:09 -05:00
|
|
|
|
(defun org-latex--format-spec (info)
|
2023-12-07 05:52:25 -05:00
|
|
|
|
"Create a format spec for document meta-data.
|
2015-02-10 20:18:09 -05:00
|
|
|
|
INFO is a plist used as a communication channel."
|
2022-08-04 05:54:01 -04:00
|
|
|
|
(let ((language (let* ((lang (plist-get info :language))
|
|
|
|
|
(plist (cdr
|
|
|
|
|
(assoc lang org-latex-language-alist))))
|
|
|
|
|
;; Here the actual name of the LANGUAGE or LANG is used.
|
|
|
|
|
(or (plist-get plist :lang-name)
|
|
|
|
|
lang))))
|
2015-03-27 08:04:13 -04:00
|
|
|
|
`((?a . ,(org-export-data (plist-get info :author) info))
|
2015-04-05 08:06:59 -04:00
|
|
|
|
(?t . ,(org-export-data (plist-get info :title) info))
|
2020-02-08 01:54:46 -05:00
|
|
|
|
(?s . ,(org-export-data (plist-get info :subtitle) info))
|
2015-02-10 20:18:09 -05:00
|
|
|
|
(?k . ,(org-export-data (org-latex--wrap-latex-math-block
|
2015-04-05 08:06:59 -04:00
|
|
|
|
(plist-get info :keywords) info)
|
2015-02-10 20:18:09 -05:00
|
|
|
|
info))
|
|
|
|
|
(?d . ,(org-export-data (org-latex--wrap-latex-math-block
|
2015-04-05 08:06:59 -04:00
|
|
|
|
(plist-get info :description) info)
|
2015-02-10 20:18:09 -05:00
|
|
|
|
info))
|
2015-03-27 07:51:01 -04:00
|
|
|
|
(?c . ,(plist-get info :creator))
|
2015-02-10 20:18:09 -05:00
|
|
|
|
(?l . ,language)
|
|
|
|
|
(?L . ,(capitalize language))
|
2022-02-22 12:46:45 -05:00
|
|
|
|
(?D . ,(org-export-data (org-export-get-date info) 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 17:36:51 -05:00
|
|
|
|
|
2015-10-03 14:12:45 -04:00
|
|
|
|
(defun org-latex--insert-compiler (info)
|
|
|
|
|
"Insert LaTeX_compiler info into the document.
|
|
|
|
|
INFO is a plist used as a communication channel."
|
|
|
|
|
(let ((compiler (plist-get info :latex-compiler)))
|
2021-09-29 03:22:47 -04:00
|
|
|
|
(and (org-string-nw-p org-latex-compiler-file-string)
|
|
|
|
|
(member (or compiler "") org-latex-compilers)
|
|
|
|
|
(format org-latex-compiler-file-string compiler))))
|
2015-10-03 14:12:45 -04:00
|
|
|
|
|
2017-01-18 17:30:01 -05:00
|
|
|
|
|
|
|
|
|
;;; Filters
|
|
|
|
|
|
|
|
|
|
(defun org-latex-matrices-tree-filter (tree _backend info)
|
|
|
|
|
(org-latex--wrap-latex-matrices tree info))
|
|
|
|
|
|
|
|
|
|
(defun org-latex-math-block-tree-filter (tree _backend info)
|
|
|
|
|
(org-latex--wrap-latex-math-block tree info))
|
|
|
|
|
|
|
|
|
|
(defun org-latex-math-block-options-filter (info _backend)
|
|
|
|
|
(dolist (prop '(:author :date :title) info)
|
|
|
|
|
(plist-put info prop
|
|
|
|
|
(org-latex--wrap-latex-math-block (plist-get info prop) info))))
|
|
|
|
|
|
|
|
|
|
(defun org-latex-clean-invalid-line-breaks (data _backend _info)
|
|
|
|
|
(replace-regexp-in-string
|
2019-03-04 21:00:00 -05:00
|
|
|
|
"\\(\\\\end{[A-Za-z0-9*]+}\\|^\\)[ \t]*\\\\\\\\[ \t]*$" "\\1"
|
2017-01-18 17:30:01 -05:00
|
|
|
|
data))
|
|
|
|
|
|
2015-07-31 07:52:22 -04:00
|
|
|
|
|
|
|
|
|
;;; Template
|
|
|
|
|
|
2017-01-21 05:31:25 -05:00
|
|
|
|
;;;###autoload
|
2017-02-10 20:35:00 -05:00
|
|
|
|
(defun org-latex-make-preamble (info &optional template snippet?)
|
2017-01-21 05:31:25 -05:00
|
|
|
|
"Return a formatted LaTeX preamble.
|
|
|
|
|
INFO is a plist used as a communication channel. Optional
|
|
|
|
|
argument TEMPLATE, when non-nil, is the header template string,
|
2017-02-10 20:35:00 -05:00
|
|
|
|
as expected by `org-splice-latex-header'. When SNIPPET? is
|
|
|
|
|
non-nil, only includes packages relevant to image generation, as
|
|
|
|
|
specified in `org-latex-default-packages-alist' or
|
|
|
|
|
`org-latex-packages-alist'."
|
2017-01-21 05:31:25 -05:00
|
|
|
|
(let* ((class (plist-get info :latex-class))
|
|
|
|
|
(class-template
|
|
|
|
|
(or template
|
2017-06-25 03:39:32 -04:00
|
|
|
|
(let* ((class-options (plist-get info :latex-class-options))
|
|
|
|
|
(header (nth 1 (assoc class (plist-get info :latex-classes)))))
|
|
|
|
|
(and (stringp header)
|
|
|
|
|
(if (not class-options) header
|
|
|
|
|
(replace-regexp-in-string
|
|
|
|
|
"^[ \t]*\\\\documentclass\\(\\(\\[[^]]*\\]\\)?\\)"
|
|
|
|
|
class-options header t nil 1))))
|
2017-01-21 05:31:25 -05:00
|
|
|
|
(user-error "Unknown LaTeX class `%s'" class))))
|
|
|
|
|
(org-latex-guess-polyglossia-language
|
|
|
|
|
(org-latex-guess-babel-language
|
|
|
|
|
(org-latex-guess-inputenc
|
|
|
|
|
(org-element-normalize-string
|
|
|
|
|
(org-splice-latex-header
|
|
|
|
|
class-template
|
|
|
|
|
(org-latex--remove-packages org-latex-default-packages-alist info)
|
|
|
|
|
(org-latex--remove-packages org-latex-packages-alist info)
|
2017-02-10 20:35:00 -05:00
|
|
|
|
snippet?
|
2017-01-21 05:31:25 -05:00
|
|
|
|
(mapconcat #'org-element-normalize-string
|
|
|
|
|
(list (plist-get info :latex-header)
|
2017-06-25 03:39:32 -04:00
|
|
|
|
(and (not snippet?)
|
|
|
|
|
(plist-get info :latex-header-extra)))
|
|
|
|
|
""))))
|
2017-01-21 05:31:25 -05:00
|
|
|
|
info)
|
|
|
|
|
info)))
|
|
|
|
|
|
2015-07-31 07:52:22 -04:00
|
|
|
|
(defun org-latex-template (contents info)
|
|
|
|
|
"Return complete document string after LaTeX conversion.
|
|
|
|
|
CONTENTS is the transcoded contents string. INFO is a plist
|
|
|
|
|
holding export options."
|
|
|
|
|
(let ((title (org-export-data (plist-get info :title) info))
|
|
|
|
|
(spec (org-latex--format-spec info)))
|
|
|
|
|
(concat
|
2023-04-30 07:37:51 -04:00
|
|
|
|
;; Timestamp.
|
2015-07-31 07:52:22 -04:00
|
|
|
|
(and (plist-get info :time-stamp-file)
|
|
|
|
|
(format-time-string "%% Created %Y-%m-%d %a %H:%M\n"))
|
2015-10-03 09:34:24 -04:00
|
|
|
|
;; LaTeX compiler.
|
2015-10-03 14:12:45 -04:00
|
|
|
|
(org-latex--insert-compiler info)
|
2015-07-31 07:52:22 -04:00
|
|
|
|
;; Document class and packages.
|
2017-01-21 05:31:25 -05:00
|
|
|
|
(org-latex-make-preamble info)
|
2012-06-30 10:21:31 -04:00
|
|
|
|
;; Possibly limit depth for headline numbering.
|
2012-03-19 16:38:12 -04:00
|
|
|
|
(let ((sec-num (plist-get info :section-numbers)))
|
|
|
|
|
(when (integerp sec-num)
|
|
|
|
|
(format "\\setcounter{secnumdepth}{%d}\n" sec-num)))
|
2012-06-30 10:21:31 -04: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 17:36:51 -05:00
|
|
|
|
(let ((author (and (plist-get info :with-author)
|
2011-12-09 08:38:36 -05: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-29 20:04:03 -04:00
|
|
|
|
(and auth (org-export-data auth info)))))
|
2011-12-09 08:38:36 -05: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-29 20:04:03 -04: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 17:36:51 -05:00
|
|
|
|
(cond ((and author email (not (string= "" email)))
|
2011-12-09 08:38:36 -05:00
|
|
|
|
(format "\\author{%s\\thanks{%s}}\n" author email))
|
2012-11-01 03:09:29 -04:00
|
|
|
|
((or author email) (format "\\author{%s}\n" (or author email)))))
|
2012-06-30 10:21:31 -04:00
|
|
|
|
;; Date.
|
2022-08-01 12:19:07 -04:00
|
|
|
|
;; LaTeX displays today's date by default. One can override this by
|
|
|
|
|
;; inserting \date{} for no date, or \date{string} with any other
|
2022-10-03 17:57:03 -04:00
|
|
|
|
;; string to be displayed as the date.
|
2013-04-02 17:59:00 -04:00
|
|
|
|
(let ((date (and (plist-get info :with-date) (org-export-get-date info))))
|
2022-07-31 18:47:37 -04:00
|
|
|
|
(format "\\date{%s}\n" (org-export-data date info)))
|
ox: Add #+SUBTITLE property in some backends
* ox-texinfo.el (texinfo, org-texinfo-template): Parse subtitle.
* ox-s5.el (org-s5-title-slide-template):
* ox-deck.el (org-deck-title-slide-template):
* ox-odt.el (odt, org-odt-template):
* ox-latex.el (latex, org-latex-template):
* ox-html.el (html, org-html-format-spec, org-html-template):
* ox-ascii.el (ascii, org-ascii-template--document-title):
* ox-beamer.el (beamer, org-beamer-template): Support #+SUBTITLE.
* ox-html.el (org-html-postamble-format)
(org-html-preamble-format):
* ox-latex.el (org-latex-title-command)
(org-latex-hyperref-template): Update docstring.
* ox-html.el (org-html-style-default): New .subtitle css property.
* ox-beamer.el (org-beamer-subtitle-format):
* ox-latex.el (org-latex-subtitle-format)
(org-latex-subtitle-separate): New variable.
* org.texi (ASCII/Latin-1/UTF-8 export)
(Beamer specific export settings)
(HTML Specific export settings)
(@LaTeX{} specific export settings, CSS support)
(ODT specific export settings)
(Texinfo specific export settings, Document preamble)
(Publishing options, Publishing options): Document #+SUBTITLE.
The patch adds a #+SUBTITLE keyword to ox-ascii, ox-latex, ox-html and
ox-odt.
2015-03-01 16:09:19 -05:00
|
|
|
|
;; Title and subtitle.
|
|
|
|
|
(let* ((subtitle (plist-get info :subtitle))
|
|
|
|
|
(formatted-subtitle
|
|
|
|
|
(when subtitle
|
|
|
|
|
(format (plist-get info :latex-subtitle-format)
|
|
|
|
|
(org-export-data subtitle info))))
|
|
|
|
|
(separate (plist-get info :latex-subtitle-separate)))
|
|
|
|
|
(concat
|
|
|
|
|
(format "\\title{%s%s}\n" title
|
2015-04-09 12:39:35 -04:00
|
|
|
|
(if separate "" (or formatted-subtitle "")))
|
ox: Add #+SUBTITLE property in some backends
* ox-texinfo.el (texinfo, org-texinfo-template): Parse subtitle.
* ox-s5.el (org-s5-title-slide-template):
* ox-deck.el (org-deck-title-slide-template):
* ox-odt.el (odt, org-odt-template):
* ox-latex.el (latex, org-latex-template):
* ox-html.el (html, org-html-format-spec, org-html-template):
* ox-ascii.el (ascii, org-ascii-template--document-title):
* ox-beamer.el (beamer, org-beamer-template): Support #+SUBTITLE.
* ox-html.el (org-html-postamble-format)
(org-html-preamble-format):
* ox-latex.el (org-latex-title-command)
(org-latex-hyperref-template): Update docstring.
* ox-html.el (org-html-style-default): New .subtitle css property.
* ox-beamer.el (org-beamer-subtitle-format):
* ox-latex.el (org-latex-subtitle-format)
(org-latex-subtitle-separate): New variable.
* org.texi (ASCII/Latin-1/UTF-8 export)
(Beamer specific export settings)
(HTML Specific export settings)
(@LaTeX{} specific export settings, CSS support)
(ODT specific export settings)
(Texinfo specific export settings, Document preamble)
(Publishing options, Publishing options): Document #+SUBTITLE.
The patch adds a #+SUBTITLE keyword to ox-ascii, ox-latex, ox-html and
ox-odt.
2015-03-01 16:09:19 -05:00
|
|
|
|
(when (and separate subtitle)
|
|
|
|
|
(concat formatted-subtitle "\n"))))
|
2012-06-30 10:21:31 -04:00
|
|
|
|
;; Hyperref options.
|
2015-08-19 10:45:01 -04:00
|
|
|
|
(let ((template (plist-get info :latex-hyperref-template)))
|
|
|
|
|
(and (stringp template)
|
|
|
|
|
(format-spec template spec)))
|
2021-11-21 07:04:12 -05:00
|
|
|
|
;; engrave-faces-latex preamble
|
2023-09-01 06:42:27 -04:00
|
|
|
|
(when (and (eq (plist-get info :latex-src-block-backend) 'engraved)
|
2021-11-21 07:04:12 -05:00
|
|
|
|
(org-element-map (plist-get info :parse-tree)
|
|
|
|
|
'(src-block inline-src-block) #'identity
|
|
|
|
|
info t))
|
2022-07-20 11:33:37 -04:00
|
|
|
|
(org-latex-generate-engraved-preamble info))
|
2012-06-30 10:21:31 -04: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 17:36:51 -05:00
|
|
|
|
"\\begin{document}\n\n"
|
2012-06-30 10:21:31 -04:00
|
|
|
|
;; Title command.
|
2015-02-10 20:18:09 -05:00
|
|
|
|
(let* ((title-command (plist-get info :latex-title-command))
|
|
|
|
|
(command (and (stringp title-command)
|
|
|
|
|
(format-spec title-command spec))))
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(org-element-normalize-string
|
ox: Optional export of title
* ox.el (org-export-with-title): New variable.
* ox (org-export-options-alist),
ox-ascii.el (org-ascii-template--document-title),
ox-beamer.el (org-beamer-template), ox-html.el (org-html-template),
ox-latex.el (org-latex-template), ox-man.el (org-man-template),
ox-odt.el (org-odt-template), ox-org.el (org-org-template),
ox-publish.el (org-publish-project-alist),
ox-texinfo.el (org-texinfo-template),
ox-groff.el (org-groff--mt-head): Use new variable.
* ox-koma-letter.el (org-koma-letter-use-title): Mark obsolete.
* test-ox.el (test-org-export/parse-option-keyword): Add :with-title.
* ORG-NEWS, org.texi: Mention org-export-with-title.
This is useful in e.g. ox-html where title can be set via
`org-html-preamble-template' or when using the {{{title}}}-macro.
2015-02-10 18:09:39 -05:00
|
|
|
|
(cond ((not (plist-get info :with-title)) nil)
|
|
|
|
|
((string= "" title) nil)
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
((not (stringp command)) nil)
|
|
|
|
|
((string-match "\\(?:[^%]\\|^\\)%s" command)
|
|
|
|
|
(format command title))
|
|
|
|
|
(t command))))
|
2012-06-30 10:21:31 -04: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 17:36:51 -05:00
|
|
|
|
(let ((depth (plist-get info :with-toc)))
|
|
|
|
|
(when depth
|
2018-02-03 08:52:20 -05:00
|
|
|
|
(concat (when (integerp depth)
|
2011-12-09 08:38:36 -05:00
|
|
|
|
(format "\\setcounter{tocdepth}{%d}\n" depth))
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(plist-get info :latex-toc-command))))
|
2012-06-30 10:21:31 -04: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 17:36:51 -05:00
|
|
|
|
contents
|
2012-06-30 10:21:31 -04:00
|
|
|
|
;; Creator.
|
2015-03-17 10:40:52 -04:00
|
|
|
|
(and (plist-get info :with-creator)
|
|
|
|
|
(concat (plist-get info :creator) "\n"))
|
2012-06-30 10:21:31 -04: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 17:36:51 -05: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 12:00:50 -04:00
|
|
|
|
;;;; Bold
|
|
|
|
|
|
2015-10-29 14:03:52 -04: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 12:00:50 -04:00
|
|
|
|
"Transcode BOLD from Org to LaTeX.
|
|
|
|
|
CONTENTS is the text with bold markup. INFO is a plist holding
|
|
|
|
|
contextual information."
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(org-latex--text-markup contents 'bold info))
|
org-element: Define new objects (bold, code, italic, ...)
* contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo.
(org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through,
org-e-ascii-underline): New functions.
(org-e-ascii-emphasis): Remove function.
* contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable
renamed from `org-e-html-emphasis-alist'. Change value type.
(org-e-html-bold, org-e-html-italic, org-e-html-strike-through,
org-e-html-underline): New functions.
(org-e-html-verbatim): Update function.
(org-e-html-emphasis): Remove function.
* contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist):
Variable renamed from `org-e-latex-emphasis-alist'. Change value
type.
(org-e-latex-center-block): Fix docstring.
(org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code,
org-e-latex-italic, org-e-latex-strike-through,
org-e-latex-underline): New functions.
(org-e-latex-verbatim): Update function.
(org-e-latex-emphasis): Remove function.
* contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code,
org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline):
New functions.
(org-e-odt-verbatim): Update function.
(org-e-odt-center-block): Fix docstring.
(org-e-odt-emphasis): Remove function.
* contrib/lisp/org-element.el (org-element-bold-parser):
(org-element-bold-interpreter, org-element-code-parser,
org-element-code-interpreter, org-element-italic-parser,
org-element-italic-interpreter, org-element-strike-through-parser,
org-element-strike-through-interpreter, org-element-underline-parser,
org-element-underline-interpreter): New functions.
(org-element-emphasis-parser, org-element-emphasis-interpreter):
Remove functions.
(org-element-verbatim-parser, org-element-verbatim-interpreter,
org-element-text-markup-successor): Update function.
(org-element-object-successor-alist): Add associations for new object
types.
(org-element-recursive-objects): Add `bold', `italic',
`strike-through' and `underline' as recursive types.
(org-element-object-restrictions): Add restrictions for new recursive
object types.
* contrib/lisp/org-export.el (org-export-filters-alist): Add filters
for new object types.
(org-export-with-todo-keywords): Add missing keywords.
(org-export-filter-center-block-functions,
org-export-filter-drawer-functions,
org-export-filter-dynamic-block-functions,
org-export-filter-headline-functions,
org-export-filter-inlinetask-functions,
org-export-filter-plain-list-functions,
org-export-filter-item-functions, org-export-filter-comment-functions,
org-export-filter-comment-block-functions,
org-export-filter-example-block-functions,
org-export-filter-export-block-functions,
org-export-filter-fixed-width-functions,
org-export-filter-footnote-definition-functions,
org-export-filter-horizontal-rule-functions,
org-export-filter-keyword-functions,
org-export-filter-latex-environment-functions,
org-export-filter-babel-call-functions,
org-export-filter-paragraph-functions,
org-export-filter-property-drawer-functions,
org-export-filter-quote-section-functions,
org-export-filter-quote-block-functions,
org-export-filter-section-functions,
org-export-filter-special-block-functions,
org-export-filter-src-block-functions,
org-export-filter-table-functions,
org-export-filter-table-cell-functions,
org-export-filter-table-row-functions,
org-export-filter-verse-block-functions,
org-export-filter-entity-functions,
org-export-filter-export-snippet-functions,
org-export-filter-footnote-reference-functions,
org-export-filter-inline-babel-call-functions,
org-export-filter-inline-src-block-functions,
org-export-filter-latex-fragment-functions,
org-export-filter-line-break-functions,
org-export-filter-link-functions, org-export-filter-macro-functions,
org-export-filter-radio-target-functions,
org-export-filter-statistics-cookie-functions,
org-export-filter-subscript-functions,
org-export-filter-superscript-functions,
org-export-filter-target-functions,
org-export-filter-time-stamp-functions,
org-export-filter-verbatim-functions): Fix docstring.
(org-export-filter-bold-functions, org-export-filter-code-functions,
org-export-filter-italic-functions,
org-export-filter-strike-through-functions,
org-export-filter-underline-functions): New variables.
(org-export-filter-emphasis-functions): Remove variable.
* testing/lisp/test-org-element.el: Add tests.
2012-04-28 12:00:50 -04: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 17:36:51 -05:00
|
|
|
|
|
2013-01-27 17:11:34 -05: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 17:36:51 -05: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 12:00:50 -04: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 17:36:51 -05:00
|
|
|
|
holding contextual information."
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(org-latex--wrap-label
|
2015-04-13 05:24:42 -04:00
|
|
|
|
center-block (format "\\begin{center}\n%s\\end{center}" 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 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
|
2012-04-28 20:11:22 -04:00
|
|
|
|
;;;; Clock
|
|
|
|
|
|
2015-10-29 14:03:52 -04:00
|
|
|
|
(defun org-latex-clock (clock _contents info)
|
2012-04-28 20:11:22 -04: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)
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(format (plist-get info :latex-inactive-timestamp-format)
|
2014-12-03 11:09:43 -05:00
|
|
|
|
(concat (org-timestamp-translate (org-element-property :value clock))
|
2012-10-30 16:59:50 -04:00
|
|
|
|
(let ((time (org-element-property :duration clock)))
|
2012-04-28 20:11:22 -04:00
|
|
|
|
(and time (format " (%s)" time)))))
|
2022-10-07 04:24:32 -04:00
|
|
|
|
org-latex-line-break-safe))
|
2012-04-28 20:11:22 -04: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 12:00:50 -04:00
|
|
|
|
;;;; Code
|
|
|
|
|
|
2015-10-29 14:03:52 -04: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 12:00:50 -04:00
|
|
|
|
"Transcode a CODE object from Org to LaTeX.
|
|
|
|
|
CONTENTS is nil. INFO is a plist used as a communication
|
|
|
|
|
channel."
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(org-latex--text-markup (org-element-property :value code) 'code info))
|
org-element: Define new objects (bold, code, italic, ...)
* contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo.
(org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through,
org-e-ascii-underline): New functions.
(org-e-ascii-emphasis): Remove function.
* contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable
renamed from `org-e-html-emphasis-alist'. Change value type.
(org-e-html-bold, org-e-html-italic, org-e-html-strike-through,
org-e-html-underline): New functions.
(org-e-html-verbatim): Update function.
(org-e-html-emphasis): Remove function.
* contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist):
Variable renamed from `org-e-latex-emphasis-alist'. Change value
type.
(org-e-latex-center-block): Fix docstring.
(org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code,
org-e-latex-italic, org-e-latex-strike-through,
org-e-latex-underline): New functions.
(org-e-latex-verbatim): Update function.
(org-e-latex-emphasis): Remove function.
* contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code,
org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline):
New functions.
(org-e-odt-verbatim): Update function.
(org-e-odt-center-block): Fix docstring.
(org-e-odt-emphasis): Remove function.
* contrib/lisp/org-element.el (org-element-bold-parser):
(org-element-bold-interpreter, org-element-code-parser,
org-element-code-interpreter, org-element-italic-parser,
org-element-italic-interpreter, org-element-strike-through-parser,
org-element-strike-through-interpreter, org-element-underline-parser,
org-element-underline-interpreter): New functions.
(org-element-emphasis-parser, org-element-emphasis-interpreter):
Remove functions.
(org-element-verbatim-parser, org-element-verbatim-interpreter,
org-element-text-markup-successor): Update function.
(org-element-object-successor-alist): Add associations for new object
types.
(org-element-recursive-objects): Add `bold', `italic',
`strike-through' and `underline' as recursive types.
(org-element-object-restrictions): Add restrictions for new recursive
object types.
* contrib/lisp/org-export.el (org-export-filters-alist): Add filters
for new object types.
(org-export-with-todo-keywords): Add missing keywords.
(org-export-filter-center-block-functions,
org-export-filter-drawer-functions,
org-export-filter-dynamic-block-functions,
org-export-filter-headline-functions,
org-export-filter-inlinetask-functions,
org-export-filter-plain-list-functions,
org-export-filter-item-functions, org-export-filter-comment-functions,
org-export-filter-comment-block-functions,
org-export-filter-example-block-functions,
org-export-filter-export-block-functions,
org-export-filter-fixed-width-functions,
org-export-filter-footnote-definition-functions,
org-export-filter-horizontal-rule-functions,
org-export-filter-keyword-functions,
org-export-filter-latex-environment-functions,
org-export-filter-babel-call-functions,
org-export-filter-paragraph-functions,
org-export-filter-property-drawer-functions,
org-export-filter-quote-section-functions,
org-export-filter-quote-block-functions,
org-export-filter-section-functions,
org-export-filter-special-block-functions,
org-export-filter-src-block-functions,
org-export-filter-table-functions,
org-export-filter-table-cell-functions,
org-export-filter-table-row-functions,
org-export-filter-verse-block-functions,
org-export-filter-entity-functions,
org-export-filter-export-snippet-functions,
org-export-filter-footnote-reference-functions,
org-export-filter-inline-babel-call-functions,
org-export-filter-inline-src-block-functions,
org-export-filter-latex-fragment-functions,
org-export-filter-line-break-functions,
org-export-filter-link-functions, org-export-filter-macro-functions,
org-export-filter-radio-target-functions,
org-export-filter-statistics-cookie-functions,
org-export-filter-subscript-functions,
org-export-filter-superscript-functions,
org-export-filter-target-functions,
org-export-filter-time-stamp-functions,
org-export-filter-verbatim-functions): Fix docstring.
(org-export-filter-bold-functions, org-export-filter-code-functions,
org-export-filter-italic-functions,
org-export-filter-strike-through-functions,
org-export-filter-underline-functions): New variables.
(org-export-filter-emphasis-functions): Remove variable.
* testing/lisp/test-org-element.el: Add tests.
2012-04-28 12:00:50 -04: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 17:36:51 -05:00
|
|
|
|
;;;; Drawer
|
|
|
|
|
|
2013-01-27 17:11:34 -05: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 17:36:51 -05: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 16:38:12 -04:00
|
|
|
|
(let* ((name (org-element-property :drawer-name drawer))
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(output (funcall (plist-get info :latex-format-drawer-function)
|
2013-11-14 08:05:18 -05:00
|
|
|
|
name contents)))
|
2015-04-13 05:24:42 -04:00
|
|
|
|
(org-latex--wrap-label drawer output 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 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Dynamic Block
|
|
|
|
|
|
2013-01-27 17:11:34 -05: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 17:36:51 -05: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 05:33:16 -04:00
|
|
|
|
holding contextual information. See `org-export-data'."
|
2015-04-13 05:24:42 -04:00
|
|
|
|
(org-latex--wrap-label 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 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Entity
|
|
|
|
|
|
2015-10-29 14:03:52 -04: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 17:36:51 -05:00
|
|
|
|
"Transcode an ENTITY object from Org to LaTeX.
|
|
|
|
|
CONTENTS are the definition itself. INFO is a plist holding
|
|
|
|
|
contextual information."
|
2013-11-09 12:26:47 -05:00
|
|
|
|
(org-element-property :latex entity))
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Example Block
|
|
|
|
|
|
2015-10-29 14:03:52 -04:00
|
|
|
|
(defun org-latex-example-block (example-block _contents info)
|
2012-03-19 16:38:12 -04:00
|
|
|
|
"Transcode an EXAMPLE-BLOCK element from Org to LaTeX.
|
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual
|
|
|
|
|
information."
|
2013-02-07 08:35:52 -05:00
|
|
|
|
(when (org-string-nw-p (org-element-property :value example-block))
|
2015-06-23 02:43:07 -04:00
|
|
|
|
(let ((environment (or (org-export-read-attribute
|
|
|
|
|
:attr_latex example-block :environment)
|
|
|
|
|
"verbatim")))
|
2022-12-08 07:44:58 -05:00
|
|
|
|
(org-latex--wrap-label
|
|
|
|
|
example-block
|
|
|
|
|
(format "\\begin{%s}\n%s\\end{%s}"
|
|
|
|
|
environment
|
|
|
|
|
(org-export-format-code-default example-block info)
|
|
|
|
|
environment)
|
|
|
|
|
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 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
|
2014-09-08 05:57:27 -04:00
|
|
|
|
;;;; Export Block
|
|
|
|
|
|
2015-10-29 14:03:52 -04:00
|
|
|
|
(defun org-latex-export-block (export-block _contents _info)
|
2014-09-08 05:57:27 -04:00
|
|
|
|
"Transcode a EXPORT-BLOCK element from Org to LaTeX.
|
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual information."
|
|
|
|
|
(when (member (org-element-property :type export-block) '("LATEX" "TEX"))
|
|
|
|
|
(org-remove-indentation (org-element-property :value export-block))))
|
|
|
|
|
|
|
|
|
|
|
2012-05-23 10:29:16 -04:00
|
|
|
|
;;;; Export Snippet
|
|
|
|
|
|
2015-10-29 14:03:52 -04:00
|
|
|
|
(defun org-latex-export-snippet (export-snippet _contents _info)
|
2012-05-23 10:29:16 -04:00
|
|
|
|
"Transcode a EXPORT-SNIPPET object from Org to LaTeX.
|
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual information."
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(when (eq (org-export-snippet-backend export-snippet) 'latex)
|
2012-05-23 10:29:16 -04: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 17:36:51 -05:00
|
|
|
|
;;;; Fixed Width
|
|
|
|
|
|
2015-10-29 14:03:52 -04: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 17:36:51 -05:00
|
|
|
|
"Transcode a FIXED-WIDTH element from Org to LaTeX.
|
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual information."
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(org-latex--wrap-label
|
2012-05-02 11:18:14 -04:00
|
|
|
|
fixed-width
|
2018-07-01 18:24:38 -04:00
|
|
|
|
(format "\\begin{verbatim}\n%s\n\\end{verbatim}"
|
2012-05-02 11:18:14 -04:00
|
|
|
|
(org-remove-indentation
|
2015-04-13 05:24:42 -04:00
|
|
|
|
(org-element-property :value fixed-width)))
|
|
|
|
|
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 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Footnote Reference
|
|
|
|
|
|
2015-10-29 14:03:52 -04: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 17:36:51 -05:00
|
|
|
|
"Transcode a FOOTNOTE-REFERENCE element from Org to LaTeX.
|
2012-03-19 16:38:12 -04:00
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual information."
|
2016-05-22 14:33:06 -04:00
|
|
|
|
(let ((label (org-element-property :label footnote-reference)))
|
|
|
|
|
(concat
|
|
|
|
|
;; Insert separator between two footnotes in a row.
|
|
|
|
|
(let ((prev (org-export-get-previous-element footnote-reference info)))
|
2023-05-16 06:41:53 -04:00
|
|
|
|
(when (org-element-type-p prev 'footnote-reference)
|
2016-05-22 14:33:06 -04:00
|
|
|
|
(plist-get info :latex-footnote-separator)))
|
|
|
|
|
(cond
|
|
|
|
|
;; Use `:latex-footnote-defined-format' if the footnote has
|
|
|
|
|
;; already been defined.
|
|
|
|
|
((not (org-export-footnote-first-reference-p footnote-reference info))
|
|
|
|
|
(format (plist-get info :latex-footnote-defined-format)
|
|
|
|
|
(org-latex--label
|
|
|
|
|
(org-export-get-footnote-definition footnote-reference info)
|
|
|
|
|
info t)))
|
|
|
|
|
;; Use \footnotemark if reference is within another footnote
|
2020-12-05 04:05:46 -05:00
|
|
|
|
;; reference, footnote definition, table cell, verse block, or
|
|
|
|
|
;; item's tag.
|
2018-09-21 19:35:44 -04:00
|
|
|
|
((or (org-element-lineage footnote-reference
|
|
|
|
|
'(footnote-reference footnote-definition
|
2020-12-05 04:05:46 -05:00
|
|
|
|
table-cell verse-block))
|
2023-05-16 06:41:53 -04:00
|
|
|
|
(org-element-type-p
|
2023-05-18 07:33:15 -04:00
|
|
|
|
(org-element-parent-element footnote-reference) 'item))
|
2016-05-22 14:33:06 -04:00
|
|
|
|
"\\footnotemark")
|
|
|
|
|
;; Otherwise, define it with \footnote command.
|
|
|
|
|
(t
|
|
|
|
|
(let ((def (org-export-get-footnote-definition footnote-reference info)))
|
|
|
|
|
(concat
|
|
|
|
|
(format "\\footnote{%s%s}" (org-trim (org-export-data def info))
|
|
|
|
|
;; Only insert a \label if there exist another
|
|
|
|
|
;; reference to def.
|
2016-05-25 13:48:51 -04:00
|
|
|
|
(cond ((not label) "")
|
2020-12-05 04:05:46 -05:00
|
|
|
|
((org-element-map (plist-get info :parse-tree)
|
|
|
|
|
'footnote-reference
|
2018-09-21 19:35:44 -04:00
|
|
|
|
(lambda (f)
|
|
|
|
|
(and (not (eq f footnote-reference))
|
|
|
|
|
(equal (org-element-property :label f) label)
|
|
|
|
|
(org-trim (org-latex--label def info t t))))
|
|
|
|
|
info t))
|
2016-05-25 13:48:51 -04:00
|
|
|
|
(t "")))
|
2016-05-22 14:33:06 -04:00
|
|
|
|
;; Retrieve all footnote references within the footnote and
|
|
|
|
|
;; add their definition after it, since LaTeX doesn't support
|
|
|
|
|
;; them inside.
|
|
|
|
|
(org-latex--delayed-footnotes-definitions def info))))))))
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Headline
|
|
|
|
|
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(defun org-latex-headline (headline contents info)
|
2013-02-23 07:40:47 -05: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 17:36:51 -05:00
|
|
|
|
CONTENTS holds the contents of the headline. INFO is a plist
|
|
|
|
|
holding contextual information."
|
2013-02-23 16:02:37 -05: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))
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(class-sectioning (assoc class (plist-get info :latex-classes)))
|
2013-02-23 16:02:37 -05:00
|
|
|
|
;; Section formatting will set two placeholders: one for
|
|
|
|
|
;; the title and the other for the contents.
|
|
|
|
|
(section-fmt
|
2013-11-17 03:12:41 -05:00
|
|
|
|
(let ((sec (if (functionp (nth 2 class-sectioning))
|
|
|
|
|
(funcall (nth 2 class-sectioning) level numberedp)
|
|
|
|
|
(nth (1+ level) class-sectioning))))
|
2013-02-23 16:02:37 -05:00
|
|
|
|
(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)))))))
|
2023-04-20 08:11:19 -04:00
|
|
|
|
;; Create a temporary export backend that hard-codes
|
2014-03-22 09:23:23 -04:00
|
|
|
|
;; "\underline" within "\section" and alike.
|
2023-04-20 08:11:19 -04:00
|
|
|
|
(section-backend
|
2021-03-31 11:06:14 -04:00
|
|
|
|
(org-export-create-backend
|
|
|
|
|
:parent 'latex
|
|
|
|
|
:transcoders
|
|
|
|
|
'((underline . (lambda (o c i) (format "\\underline{%s}" c)))
|
|
|
|
|
;; LaTeX isn't happy when you try to use \verb inside the argument of other
|
|
|
|
|
;; commands (like \section, etc.), and this causes compilation to fail.
|
|
|
|
|
;; So, within headings it's a good idea to replace any instances of \verb
|
|
|
|
|
;; with \texttt.
|
2021-04-06 07:47:04 -04:00
|
|
|
|
(code . (lambda (o _ _) (org-latex--protect-texttt (org-element-property :value o))))
|
|
|
|
|
(verbatim . (lambda (o _ _) (org-latex--protect-texttt (org-element-property :value o)))))))
|
2014-03-22 09:23:23 -04:00
|
|
|
|
(text
|
|
|
|
|
(org-export-data-with-backend
|
2023-04-20 08:11:19 -04:00
|
|
|
|
(org-element-property :title headline) section-backend info))
|
2013-02-23 16:02:37 -05:00
|
|
|
|
(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.
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(full-text (funcall (plist-get info :latex-format-headline-function)
|
2014-08-25 08:36:49 -04:00
|
|
|
|
todo todo-type priority text tags info))
|
2013-02-23 16:02:37 -05:00
|
|
|
|
;; Associate \label to the headline for internal links.
|
2015-04-13 05:53:59 -04:00
|
|
|
|
(headline-label (org-latex--label headline info t t))
|
2013-02-23 16:02:37 -05:00
|
|
|
|
(pre-blanks
|
2015-04-13 05:53:59 -04:00
|
|
|
|
(make-string (org-element-property :pre-blank headline) ?\n)))
|
2013-02-23 16:02:37 -05:00
|
|
|
|
(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
|
2014-01-13 11:48:19 -05:00
|
|
|
|
"\\item"
|
2016-07-25 09:21:12 -04:00
|
|
|
|
(and full-text
|
|
|
|
|
(string-match-p "\\`[ \t]*\\[" full-text)
|
2014-01-13 11:48:19 -05:00
|
|
|
|
"\\relax")
|
|
|
|
|
" " full-text "\n"
|
|
|
|
|
headline-label
|
|
|
|
|
pre-blanks
|
|
|
|
|
contents)))
|
2013-02-23 16:02:37 -05:00
|
|
|
|
;; 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 00:36:44 -04:00
|
|
|
|
;; an alternative heading when possible, and when this is not
|
|
|
|
|
;; identical to the usual heading.
|
2013-02-23 16:02:37 -05:00
|
|
|
|
(let ((opt-title
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(funcall (plist-get info :latex-format-headline-function)
|
2013-02-23 16:02:37 -05:00
|
|
|
|
todo todo-type priority
|
2014-03-22 09:23:23 -04:00
|
|
|
|
(org-export-data-with-backend
|
|
|
|
|
(org-export-get-alt-title headline info)
|
2023-04-20 08:11:19 -04:00
|
|
|
|
section-backend info)
|
2014-08-25 08:36:49 -04:00
|
|
|
|
(and (eq (plist-get info :with-tags) t) tags)
|
2014-10-25 11:14:34 -04:00
|
|
|
|
info))
|
|
|
|
|
;; Maybe end local TOC (see `org-latex-keyword').
|
|
|
|
|
(contents
|
|
|
|
|
(concat
|
|
|
|
|
contents
|
|
|
|
|
(let ((case-fold-search t)
|
|
|
|
|
(section
|
|
|
|
|
(let ((first (car (org-element-contents headline))))
|
2023-05-16 06:41:53 -04:00
|
|
|
|
(and (org-element-type-p first 'section) first))))
|
2014-10-25 11:14:34 -04:00
|
|
|
|
(org-element-map section 'keyword
|
|
|
|
|
(lambda (k)
|
|
|
|
|
(and (equal (org-element-property :key k) "TOC")
|
|
|
|
|
(let ((v (org-element-property :value k)))
|
2016-07-25 09:21:12 -04:00
|
|
|
|
(and (string-match-p "\\<headlines\\>" v)
|
|
|
|
|
(string-match-p "\\<local\\>" v)
|
2014-10-25 11:14:34 -04:00
|
|
|
|
(format "\\stopcontents[level-%d]" level)))))
|
|
|
|
|
info t)))))
|
2015-04-12 14:09:25 -04:00
|
|
|
|
(if (and opt-title
|
2013-05-02 00:36:44 -04:00
|
|
|
|
(not (equal opt-title full-text))
|
2015-04-27 11:43:18 -04:00
|
|
|
|
(string-match "\\`\\\\\\(.+?\\){" section-fmt))
|
2013-02-23 16:02:37 -05: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 17:36:51 -05:00
|
|
|
|
|
2013-02-23 16:40:12 -05:00
|
|
|
|
(defun org-latex-format-headline-default-function
|
2017-01-11 06:36:49 -05:00
|
|
|
|
(todo _todo-type priority text tags _info)
|
2013-02-23 16:40:12 -05:00
|
|
|
|
"Default format function for a headline.
|
|
|
|
|
See `org-latex-format-headline-function' for details."
|
|
|
|
|
(concat
|
2013-03-01 05:06:00 -05:00
|
|
|
|
(and todo (format "{\\bfseries\\sffamily %s} " todo))
|
2013-02-23 16:40:12 -05:00
|
|
|
|
(and priority (format "\\framebox{\\#%c} " priority))
|
|
|
|
|
text
|
|
|
|
|
(and tags
|
2014-08-25 08:36:49 -04:00
|
|
|
|
(format "\\hfill{}\\textsc{%s}"
|
2017-01-11 06:20:05 -05:00
|
|
|
|
(mapconcat #'org-latex--protect-text tags ":")))))
|
2013-02-23 16:40:12 -05: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 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
;;;; Horizontal Rule
|
|
|
|
|
|
2015-10-29 14:03:52 -04:00
|
|
|
|
(defun org-latex-horizontal-rule (horizontal-rule _contents info)
|
2013-02-12 16:21:46 -05: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 17:36:51 -05:00
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual information."
|
2012-08-21 12:53:14 -04: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 17:11:34 -05:00
|
|
|
|
(org-latex--wrap-label
|
2012-08-21 12:53:14 -04:00
|
|
|
|
horizontal-rule
|
2017-04-16 03:33:33 -04:00
|
|
|
|
(format "\\noindent\\rule{%s}{%s}"
|
|
|
|
|
(or (plist-get attr :width) "\\textwidth")
|
2015-04-13 05:24:42 -04:00
|
|
|
|
(or (plist-get attr :thickness) "0.5pt"))
|
|
|
|
|
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 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Inline Src Block
|
|
|
|
|
|
2015-10-29 14:03:52 -04: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 17:36:51 -05: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."
|
2022-05-04 06:53:10 -04:00
|
|
|
|
(let ((code (org-element-property :value inline-src-block))
|
|
|
|
|
(lang (org-element-property :language inline-src-block)))
|
ox-latex: Replace `org-latex-listings'
* lisp/ox-latex.el (org-latex-src-block, org-latex-keyword,
org-latex-inline-src-block, org-latex-template,
org-latex--caption/label-string, org-latex-engraved-preamble,
org-latex-listings): Replace `org-latex-listings' with
`org-latex-src-block-backend', which now can be set to listings/verbatim
and no longer advertises t/nil as valid values.
* lisp/ox-beamer.el (org-beamer-template): Update in the same manner as
`org-latex-template'.
* lisp/org-compat.el: Make `org-latex-listings' an obsolete alias for
`org-latex-src-block-backend'.
* testing/lisp/test-ox.el: Replace `org-latex-listings' reference with
`org-latex-src-block-backend'.
* doc/org-manual.org (Footnotes, LaTeX specific properties, Literal
Examples): Replace references to `org-latex-listings' with
`org-latex-src-block-backend'.
* etc/ORG-NEWS: Add a news entry noting this change.
The variable `org-latex-listings' originally indicated whether source
blocks should use the listings LaTeX package, or not. This usage has
evolved over the years, and now it sets one of four different
fontification backends. This renaming should make the variable name a
bit less misleading.
2022-05-07 02:46:28 -04:00
|
|
|
|
(pcase (plist-get info :latex-src-block-backend)
|
|
|
|
|
(`verbatim (org-latex--text-markup code 'code info))
|
|
|
|
|
(`minted (org-latex-inline-src-block--minted info code lang))
|
|
|
|
|
(`engraved (org-latex-inline-src-block--engraved info code lang))
|
|
|
|
|
(`listings (org-latex-inline-src-block--listings info code lang))
|
|
|
|
|
(oldval
|
2023-08-24 03:37:52 -04:00
|
|
|
|
(warn "Please update `org-latex-src-block-backend' to %s"
|
2023-03-29 10:30:41 -04:00
|
|
|
|
(if oldval "listings" "verbatim"))
|
ox-latex: Replace `org-latex-listings'
* lisp/ox-latex.el (org-latex-src-block, org-latex-keyword,
org-latex-inline-src-block, org-latex-template,
org-latex--caption/label-string, org-latex-engraved-preamble,
org-latex-listings): Replace `org-latex-listings' with
`org-latex-src-block-backend', which now can be set to listings/verbatim
and no longer advertises t/nil as valid values.
* lisp/ox-beamer.el (org-beamer-template): Update in the same manner as
`org-latex-template'.
* lisp/org-compat.el: Make `org-latex-listings' an obsolete alias for
`org-latex-src-block-backend'.
* testing/lisp/test-ox.el: Replace `org-latex-listings' reference with
`org-latex-src-block-backend'.
* doc/org-manual.org (Footnotes, LaTeX specific properties, Literal
Examples): Replace references to `org-latex-listings' with
`org-latex-src-block-backend'.
* etc/ORG-NEWS: Add a news entry noting this change.
The variable `org-latex-listings' originally indicated whether source
blocks should use the listings LaTeX package, or not. This usage has
evolved over the years, and now it sets one of four different
fontification backends. This renaming should make the variable name a
bit less misleading.
2022-05-07 02:46:28 -04:00
|
|
|
|
(if oldval
|
|
|
|
|
(org-latex-inline-src-block--listings info code lang)
|
|
|
|
|
(org-latex--text-markup code 'code info))))))
|
2022-05-04 06:53:10 -04:00
|
|
|
|
|
|
|
|
|
(defun org-latex-inline-src-block--minted (info code lang)
|
|
|
|
|
"Transcode an inline src block's content from Org to LaTeX, using minted.
|
|
|
|
|
INFO, CODE, and LANG are provided by `org-latex-inline-src-block'."
|
|
|
|
|
(let ((mint-lang (or (cadr (assq (intern lang)
|
|
|
|
|
(plist-get info :latex-minted-langs)))
|
|
|
|
|
(downcase lang)))
|
|
|
|
|
(options (org-latex--make-option-string
|
|
|
|
|
(plist-get info :latex-minted-options))))
|
|
|
|
|
(format "\\mintinline%s{%s}{%s}"
|
|
|
|
|
(if (string= options "") "" (format "[%s]" options))
|
|
|
|
|
mint-lang
|
|
|
|
|
code)))
|
|
|
|
|
|
2022-05-08 03:28:29 -04:00
|
|
|
|
(defun org-latex-inline-src-block--engraved (info code lang)
|
2021-11-21 07:04:12 -05:00
|
|
|
|
"Transcode an inline src block's content from Org to LaTeX, using engrave-faces.
|
|
|
|
|
INFO, CODE, and LANG are provided by `org-latex-inline-src-block'."
|
2022-05-08 03:28:29 -04:00
|
|
|
|
(org-latex-src--engrave-code
|
|
|
|
|
code lang nil (plist-get info :latex-engraved-options) t))
|
2021-11-21 07:04:12 -05:00
|
|
|
|
|
2022-05-04 06:53:10 -04:00
|
|
|
|
(defun org-latex-inline-src-block--listings (info code lang)
|
|
|
|
|
"Transcode an inline src block's content from Org to LaTeX, using lstlistings.
|
|
|
|
|
INFO, CODE, and LANG are provided by `org-latex-inline-src-block'."
|
|
|
|
|
(let* ((lst-lang (or (cadr (assq (intern lang)
|
|
|
|
|
(plist-get info :latex-listings-langs)))
|
|
|
|
|
lang))
|
|
|
|
|
(separator (org-latex--find-verb-separator code))
|
|
|
|
|
(options (org-latex--make-option-string
|
|
|
|
|
(append (plist-get info :latex-listings-options)
|
|
|
|
|
`(("language" ,lst-lang))))))
|
|
|
|
|
(concat (format "\\lstinline[%s]" options)
|
|
|
|
|
separator code separator)))
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
;;;; Inlinetask
|
|
|
|
|
|
2013-01-27 17:11:34 -05: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 17:36:51 -05: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-29 20:04:03 -04:00
|
|
|
|
(let ((title (org-export-data (org-element-property :title inlinetask) info))
|
2011-12-09 08:38:36 -05: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-29 20:04:03 -04:00
|
|
|
|
(let ((todo (org-element-property :todo-keyword inlinetask)))
|
|
|
|
|
(and todo (org-export-data todo info)))))
|
2012-03-19 16:38:12 -04:00
|
|
|
|
(todo-type (org-element-property :todo-type inlinetask))
|
2011-12-09 08:38:36 -05:00
|
|
|
|
(tags (and (plist-get info :with-tags)
|
2012-05-26 07:44:13 -04:00
|
|
|
|
(org-export-get-tags inlinetask info)))
|
2011-12-09 08:38:36 -05:00
|
|
|
|
(priority (and (plist-get info :with-priority)
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(org-element-property :priority inlinetask)))
|
2015-04-13 05:53:59 -04:00
|
|
|
|
(contents (concat (org-latex--label inlinetask info) contents)))
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(funcall (plist-get info :latex-format-inlinetask-function)
|
2014-08-25 08:36:49 -04:00
|
|
|
|
todo todo-type priority title tags contents info)))
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
|
|
|
|
|
(defun org-latex-format-inlinetask-default-function
|
2017-01-11 06:36:49 -05:00
|
|
|
|
(todo _todo-type priority title tags contents _info)
|
2018-02-16 15:16:15 -05:00
|
|
|
|
"Default format function for inlinetasks.
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
See `org-latex-format-inlinetask-function' for details."
|
|
|
|
|
(let ((full-title
|
|
|
|
|
(concat (when todo (format "\\textbf{\\textsf{\\textsc{%s}}} " todo))
|
|
|
|
|
(when priority (format "\\framebox{\\#%c} " priority))
|
|
|
|
|
title
|
2014-08-25 08:36:49 -04:00
|
|
|
|
(when tags
|
2018-04-18 17:57:51 -04:00
|
|
|
|
(format "\\hfill{}\\textsc{%s}"
|
|
|
|
|
(org-make-tag-string
|
|
|
|
|
(mapcar #'org-latex--protect-text tags)))))))
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(concat "\\begin{center}\n"
|
|
|
|
|
"\\fbox{\n"
|
2021-12-30 22:51:01 -05:00
|
|
|
|
"\\begin{minipage}[c]{.6\\linewidth}\n"
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
full-title "\n\n"
|
|
|
|
|
(and (org-string-nw-p contents)
|
2021-12-30 22:51:01 -05:00
|
|
|
|
(concat "\\rule[.8em]{\\linewidth}{2pt}\n\n" contents))
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
"\\end{minipage}\n"
|
|
|
|
|
"}\n"
|
|
|
|
|
"\\end{center}")))
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05: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 12:00:50 -04:00
|
|
|
|
;;;; Italic
|
|
|
|
|
|
2015-10-29 14:03:52 -04: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 12:00:50 -04:00
|
|
|
|
"Transcode ITALIC from Org to LaTeX.
|
|
|
|
|
CONTENTS is the text with italic markup. INFO is a plist holding
|
|
|
|
|
contextual information."
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(org-latex--text-markup contents 'italic info))
|
org-element: Define new objects (bold, code, italic, ...)
* contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo.
(org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through,
org-e-ascii-underline): New functions.
(org-e-ascii-emphasis): Remove function.
* contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable
renamed from `org-e-html-emphasis-alist'. Change value type.
(org-e-html-bold, org-e-html-italic, org-e-html-strike-through,
org-e-html-underline): New functions.
(org-e-html-verbatim): Update function.
(org-e-html-emphasis): Remove function.
* contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist):
Variable renamed from `org-e-latex-emphasis-alist'. Change value
type.
(org-e-latex-center-block): Fix docstring.
(org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code,
org-e-latex-italic, org-e-latex-strike-through,
org-e-latex-underline): New functions.
(org-e-latex-verbatim): Update function.
(org-e-latex-emphasis): Remove function.
* contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code,
org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline):
New functions.
(org-e-odt-verbatim): Update function.
(org-e-odt-center-block): Fix docstring.
(org-e-odt-emphasis): Remove function.
* contrib/lisp/org-element.el (org-element-bold-parser):
(org-element-bold-interpreter, org-element-code-parser,
org-element-code-interpreter, org-element-italic-parser,
org-element-italic-interpreter, org-element-strike-through-parser,
org-element-strike-through-interpreter, org-element-underline-parser,
org-element-underline-interpreter): New functions.
(org-element-emphasis-parser, org-element-emphasis-interpreter):
Remove functions.
(org-element-verbatim-parser, org-element-verbatim-interpreter,
org-element-text-markup-successor): Update function.
(org-element-object-successor-alist): Add associations for new object
types.
(org-element-recursive-objects): Add `bold', `italic',
`strike-through' and `underline' as recursive types.
(org-element-object-restrictions): Add restrictions for new recursive
object types.
* contrib/lisp/org-export.el (org-export-filters-alist): Add filters
for new object types.
(org-export-with-todo-keywords): Add missing keywords.
(org-export-filter-center-block-functions,
org-export-filter-drawer-functions,
org-export-filter-dynamic-block-functions,
org-export-filter-headline-functions,
org-export-filter-inlinetask-functions,
org-export-filter-plain-list-functions,
org-export-filter-item-functions, org-export-filter-comment-functions,
org-export-filter-comment-block-functions,
org-export-filter-example-block-functions,
org-export-filter-export-block-functions,
org-export-filter-fixed-width-functions,
org-export-filter-footnote-definition-functions,
org-export-filter-horizontal-rule-functions,
org-export-filter-keyword-functions,
org-export-filter-latex-environment-functions,
org-export-filter-babel-call-functions,
org-export-filter-paragraph-functions,
org-export-filter-property-drawer-functions,
org-export-filter-quote-section-functions,
org-export-filter-quote-block-functions,
org-export-filter-section-functions,
org-export-filter-special-block-functions,
org-export-filter-src-block-functions,
org-export-filter-table-functions,
org-export-filter-table-cell-functions,
org-export-filter-table-row-functions,
org-export-filter-verse-block-functions,
org-export-filter-entity-functions,
org-export-filter-export-snippet-functions,
org-export-filter-footnote-reference-functions,
org-export-filter-inline-babel-call-functions,
org-export-filter-inline-src-block-functions,
org-export-filter-latex-fragment-functions,
org-export-filter-line-break-functions,
org-export-filter-link-functions, org-export-filter-macro-functions,
org-export-filter-radio-target-functions,
org-export-filter-statistics-cookie-functions,
org-export-filter-subscript-functions,
org-export-filter-superscript-functions,
org-export-filter-target-functions,
org-export-filter-time-stamp-functions,
org-export-filter-verbatim-functions): Fix docstring.
(org-export-filter-bold-functions, org-export-filter-code-functions,
org-export-filter-italic-functions,
org-export-filter-strike-through-functions,
org-export-filter-underline-functions): New variables.
(org-export-filter-emphasis-functions): Remove variable.
* testing/lisp/test-org-element.el: Add tests.
2012-04-28 12:00:50 -04: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 17:36:51 -05:00
|
|
|
|
;;;; Item
|
|
|
|
|
|
2013-01-27 17:11:34 -05: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 17:36:51 -05:00
|
|
|
|
"Transcode an ITEM element from Org to LaTeX.
|
|
|
|
|
CONTENTS holds the contents of the item. INFO is a plist holding
|
|
|
|
|
contextual information."
|
2020-02-19 12:10:26 -05:00
|
|
|
|
(let* ((orderedp (eq (org-element-property
|
2023-05-03 08:56:35 -04:00
|
|
|
|
:type (org-element-parent item))
|
2020-02-19 12:10:26 -05:00
|
|
|
|
'ordered))
|
|
|
|
|
(level
|
|
|
|
|
;; Determine level of current item to determine the
|
|
|
|
|
;; correct LaTeX counter to use (enumi, enumii...).
|
|
|
|
|
(let ((parent item) (level 0))
|
2023-05-16 06:41:53 -04:00
|
|
|
|
(while (org-element-type-p
|
2023-05-03 08:56:35 -04:00
|
|
|
|
(setq parent (org-element-parent parent))
|
2023-05-16 06:41:53 -04:00
|
|
|
|
'(plain-list item))
|
|
|
|
|
(when (and (org-element-type-p parent 'plain-list)
|
2020-02-19 12:10:26 -05:00
|
|
|
|
(eq (org-element-property :type parent)
|
|
|
|
|
'ordered))
|
|
|
|
|
(cl-incf level)))
|
|
|
|
|
level))
|
|
|
|
|
(count (org-element-property :counter item))
|
|
|
|
|
(counter (and count
|
|
|
|
|
(< level 5)
|
|
|
|
|
(format "\\setcounter{enum%s}{%s}\n"
|
|
|
|
|
(nth (1- level) '("i" "ii" "iii" "iv"))
|
|
|
|
|
(1- count))))
|
2016-05-26 05:03:11 -04:00
|
|
|
|
(checkbox (cl-case (org-element-property :checkbox item)
|
2017-12-15 16:48:57 -05:00
|
|
|
|
(on "$\\boxtimes$")
|
|
|
|
|
(off "$\\square$")
|
|
|
|
|
(trans "$\\boxminus$")))
|
2012-03-19 16:38:12 -04:00
|
|
|
|
(tag (let ((tag (org-element-property :tag item)))
|
2018-09-21 19:35:44 -04:00
|
|
|
|
(and tag (org-export-data tag info))))
|
|
|
|
|
;; 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.
|
|
|
|
|
(tag-footnotes
|
|
|
|
|
(or (and tag (org-latex--delayed-footnotes-definitions
|
|
|
|
|
(org-element-property :tag item) info))
|
|
|
|
|
"")))
|
2014-01-13 11:48:19 -05:00
|
|
|
|
(concat counter
|
|
|
|
|
"\\item"
|
|
|
|
|
(cond
|
2018-09-21 19:35:44 -04:00
|
|
|
|
((and checkbox tag)
|
2020-02-19 12:10:26 -05:00
|
|
|
|
(format (if orderedp "{%s %s} %s" "[{%s %s}] %s")
|
|
|
|
|
checkbox tag tag-footnotes))
|
2018-09-21 19:35:44 -04:00
|
|
|
|
((or checkbox tag)
|
2020-02-19 12:10:26 -05:00
|
|
|
|
(format (if orderedp "{%s} %s" "[{%s}] %s")
|
|
|
|
|
(or checkbox tag) tag-footnotes))
|
2014-01-13 11:48:19 -05:00
|
|
|
|
;; Without a tag or a check-box, if CONTENTS starts with
|
|
|
|
|
;; an opening square bracket, add "\relax" to "\item",
|
|
|
|
|
;; unless the brackets comes from an initial export
|
|
|
|
|
;; snippet (i.e. it is inserted willingly by the user).
|
|
|
|
|
((and contents
|
2016-07-25 09:21:12 -04:00
|
|
|
|
(string-match-p "\\`[ \t]*\\[" contents)
|
2014-01-13 11:48:19 -05:00
|
|
|
|
(not (let ((e (car (org-element-contents item))))
|
2023-05-16 06:41:53 -04:00
|
|
|
|
(and (org-element-type-p e 'paragraph)
|
|
|
|
|
(let ((o (car (org-element-contents e))))
|
|
|
|
|
(and (org-element-type-p o 'export-snippet)
|
|
|
|
|
(eq (org-export-snippet-backend o)
|
|
|
|
|
'latex)))))))
|
2014-01-13 11:48:19 -05:00
|
|
|
|
"\\relax ")
|
|
|
|
|
(t " "))
|
2018-09-21 19:35:44 -04:00
|
|
|
|
(and contents (org-trim contents)))))
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Keyword
|
|
|
|
|
|
2015-10-29 14:03:52 -04: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 17:36:51 -05:00
|
|
|
|
"Transcode a KEYWORD element from Org to LaTeX.
|
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual information."
|
2012-03-28 08:04:26 -04:00
|
|
|
|
(let ((key (org-element-property :key keyword))
|
2012-03-19 16:38:12 -04: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 17:36:51 -05:00
|
|
|
|
(cond
|
2012-03-28 08:04:26 -04:00
|
|
|
|
((string= key "LATEX") value)
|
|
|
|
|
((string= key "INDEX") (format "\\index{%s}" value))
|
|
|
|
|
((string= key "TOC")
|
2014-10-25 11:14:34 -04:00
|
|
|
|
(let ((case-fold-search t))
|
2011-12-09 08:38:36 -05:00
|
|
|
|
(cond
|
2016-07-25 09:21:12 -04:00
|
|
|
|
((string-match-p "\\<headlines\\>" value)
|
|
|
|
|
(let* ((localp (string-match-p "\\<local\\>" value))
|
2023-05-18 07:35:35 -04:00
|
|
|
|
(parent (org-element-lineage keyword 'headline))
|
2014-10-25 11:14:34 -04:00
|
|
|
|
(level (if (not (and localp parent)) 0
|
|
|
|
|
(org-export-get-relative-level parent info)))
|
|
|
|
|
(depth
|
|
|
|
|
(and (string-match "\\<[0-9]+\\>" value)
|
|
|
|
|
(format
|
|
|
|
|
"\\setcounter{tocdepth}{%d}"
|
|
|
|
|
(+ (string-to-number (match-string 0 value)) level)))))
|
|
|
|
|
(if (and localp parent)
|
|
|
|
|
;; Start local TOC, assuming package "titletoc" is
|
|
|
|
|
;; required.
|
|
|
|
|
(format "\\startcontents[level-%d]
|
|
|
|
|
\\printcontents[level-%d]{}{0}{%s}"
|
|
|
|
|
level level (or depth ""))
|
|
|
|
|
(concat depth (and depth "\n") "\\tableofcontents"))))
|
2016-07-25 09:21:12 -04:00
|
|
|
|
((string-match-p "\\<tables\\>" value) "\\listoftables")
|
|
|
|
|
((string-match-p "\\<listings\\>" value)
|
ox-latex: Replace `org-latex-listings'
* lisp/ox-latex.el (org-latex-src-block, org-latex-keyword,
org-latex-inline-src-block, org-latex-template,
org-latex--caption/label-string, org-latex-engraved-preamble,
org-latex-listings): Replace `org-latex-listings' with
`org-latex-src-block-backend', which now can be set to listings/verbatim
and no longer advertises t/nil as valid values.
* lisp/ox-beamer.el (org-beamer-template): Update in the same manner as
`org-latex-template'.
* lisp/org-compat.el: Make `org-latex-listings' an obsolete alias for
`org-latex-src-block-backend'.
* testing/lisp/test-ox.el: Replace `org-latex-listings' reference with
`org-latex-src-block-backend'.
* doc/org-manual.org (Footnotes, LaTeX specific properties, Literal
Examples): Replace references to `org-latex-listings' with
`org-latex-src-block-backend'.
* etc/ORG-NEWS: Add a news entry noting this change.
The variable `org-latex-listings' originally indicated whether source
blocks should use the listings LaTeX package, or not. This usage has
evolved over the years, and now it sets one of four different
fontification backends. This renaming should make the variable name a
bit less misleading.
2022-05-07 02:46:28 -04:00
|
|
|
|
(cl-case (plist-get info :latex-src-block-backend)
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
((nil) "\\listoffigures")
|
|
|
|
|
(minted "\\listoflistings")
|
2021-11-21 07:04:12 -05:00
|
|
|
|
(engraved "\\listoflistings")
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(otherwise "\\lstlistoflistings")))))))))
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
|
2023-03-05 16:01:11 -05:00
|
|
|
|
;;;; LaTeX Environment
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
|
2017-03-16 07:45:10 -04:00
|
|
|
|
(defun org-latex--environment-type (latex-environment)
|
|
|
|
|
"Return the TYPE of LATEX-ENVIRONMENT.
|
|
|
|
|
|
|
|
|
|
The TYPE is determined from the actual latex environment, and
|
|
|
|
|
could be a member of `org-latex-caption-above' or `math'."
|
|
|
|
|
(let* ((latex-begin-re "\\\\begin{\\([A-Za-z0-9*]+\\)}")
|
|
|
|
|
(value (org-remove-indentation
|
|
|
|
|
(org-element-property :value latex-environment)))
|
|
|
|
|
(env (or (and (string-match latex-begin-re value)
|
|
|
|
|
(match-string 1 value))
|
|
|
|
|
"")))
|
|
|
|
|
(cond
|
|
|
|
|
((string-match-p org-latex-math-environments-re value) 'math)
|
|
|
|
|
((string-match-p
|
|
|
|
|
(eval-when-compile
|
|
|
|
|
(regexp-opt '("table" "longtable" "tabular" "tabu" "longtabu")))
|
|
|
|
|
env)
|
|
|
|
|
'table)
|
2023-08-18 04:00:13 -04:00
|
|
|
|
((string-match-p "figure" env) 'image)
|
2017-03-16 07:45:10 -04:00
|
|
|
|
((string-match-p
|
|
|
|
|
(eval-when-compile
|
|
|
|
|
(regexp-opt '("lstlisting" "listing" "verbatim" "minted")))
|
|
|
|
|
env)
|
|
|
|
|
'src-block)
|
|
|
|
|
(t 'special-block))))
|
|
|
|
|
|
2015-10-29 14:03:52 -04: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 17:36:51 -05:00
|
|
|
|
"Transcode a LATEX-ENVIRONMENT element from Org to LaTeX.
|
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual information."
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(when (plist-get info :with-latex)
|
2017-03-16 07:45:10 -04:00
|
|
|
|
(let* ((value (org-remove-indentation
|
|
|
|
|
(org-element-property :value latex-environment)))
|
|
|
|
|
(type (org-latex--environment-type latex-environment))
|
|
|
|
|
(caption (if (eq type 'math)
|
|
|
|
|
(org-latex--label latex-environment info nil t)
|
|
|
|
|
(org-latex--caption/label-string latex-environment info)))
|
|
|
|
|
(caption-above-p
|
|
|
|
|
(memq type (append (plist-get info :latex-caption-above) '(math)))))
|
|
|
|
|
(if (not (or (org-element-property :name latex-environment)
|
|
|
|
|
(org-element-property :caption latex-environment)))
|
|
|
|
|
value
|
2013-11-17 03:12:41 -05:00
|
|
|
|
;; Environment is labeled: label must be within the environment
|
2013-01-27 17:11:34 -05:00
|
|
|
|
;; (otherwise, a reference pointing to that element will count
|
2017-03-16 07:45:10 -04:00
|
|
|
|
;; the section instead). Also insert caption if `latex-environment'
|
|
|
|
|
;; is not a math environment.
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(with-temp-buffer
|
|
|
|
|
(insert value)
|
2017-03-16 07:45:10 -04:00
|
|
|
|
(if caption-above-p
|
|
|
|
|
(progn
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(forward-line))
|
|
|
|
|
(goto-char (point-max))
|
|
|
|
|
(forward-line -1))
|
|
|
|
|
(insert caption)
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(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 17:36:51 -05:00
|
|
|
|
|
2023-03-05 16:01:11 -05:00
|
|
|
|
;;;; 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 17:36:51 -05:00
|
|
|
|
|
2015-10-29 14:03:52 -04: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 17:36:51 -05:00
|
|
|
|
"Transcode a LATEX-FRAGMENT object from Org to LaTeX.
|
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual information."
|
2013-11-09 12:26:47 -05:00
|
|
|
|
(let ((value (org-element-property :value latex-fragment)))
|
|
|
|
|
;; Trim math markers since the fragment is enclosed within
|
|
|
|
|
;; a latex-math-block object anyway.
|
2015-11-06 17:01:03 -05:00
|
|
|
|
(cond ((string-match-p "\\`\\$[^$]" value) (substring value 1 -1))
|
|
|
|
|
((string-prefix-p "\\(" value) (substring value 2 -2))
|
2013-11-09 12:26:47 -05:00
|
|
|
|
(t value))))
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Line Break
|
|
|
|
|
|
2015-10-29 14:03:52 -04: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 17:36:51 -05:00
|
|
|
|
"Transcode a LINE-BREAK object from Org to LaTeX.
|
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual information."
|
2022-10-07 04:24:32 -04:00
|
|
|
|
(concat org-latex-line-break-safe "\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 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Link
|
|
|
|
|
|
2016-12-17 05:36:49 -05:00
|
|
|
|
(defun org-latex-image-link-filter (data _backend info)
|
|
|
|
|
(org-export-insert-image-links data info org-latex-inline-image-rules))
|
|
|
|
|
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(defun org-latex--inline-image (link info)
|
2012-03-19 16:38:12 -04: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."
|
2023-05-18 07:33:15 -04:00
|
|
|
|
(let* ((parent (org-element-parent-element link))
|
2020-02-20 03:29:21 -05:00
|
|
|
|
(path (let ((raw-path (org-element-property :path link)))
|
2012-03-19 16:38:12 -04:00
|
|
|
|
(if (not (file-name-absolute-p raw-path)) raw-path
|
|
|
|
|
(expand-file-name raw-path))))
|
2013-03-05 23:04:42 -05:00
|
|
|
|
(filetype (file-name-extension path))
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(caption (org-latex--caption/label-string parent info))
|
2014-10-17 11:19:30 -04:00
|
|
|
|
(caption-above-p (org-latex--caption-above-p link info))
|
2011-12-09 08:38:36 -05:00
|
|
|
|
;; Retrieve latex attributes from the element around.
|
2012-11-21 10:44:53 -05:00
|
|
|
|
(attr (org-export-read-attribute :attr_latex parent))
|
|
|
|
|
(float (let ((float (plist-get attr :float)))
|
2015-06-30 19:12:42 -04:00
|
|
|
|
(cond ((string= float "wrap") 'wrap)
|
2014-04-06 05:55:38 -04:00
|
|
|
|
((string= float "sideways") 'sideways)
|
2012-11-21 10:44:53 -05:00
|
|
|
|
((string= float "multicolumn") 'multicolumn)
|
2022-02-16 14:27:38 -05:00
|
|
|
|
((string= float "t") 'figure)
|
2016-07-25 17:22:01 -04:00
|
|
|
|
((and (plist-member attr :float) (not float)) 'nonfloat)
|
2021-05-15 09:20:35 -04:00
|
|
|
|
(float float)
|
|
|
|
|
((or (org-element-property :caption parent)
|
2013-06-29 11:04:03 -04:00
|
|
|
|
(org-string-nw-p (plist-get attr :caption)))
|
2016-07-25 17:22:01 -04:00
|
|
|
|
'figure)
|
|
|
|
|
(t 'nonfloat))))
|
2011-12-09 08:38:36 -05:00
|
|
|
|
(placement
|
2012-11-21 10:44:53 -05:00
|
|
|
|
(let ((place (plist-get attr :placement)))
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(cond
|
|
|
|
|
(place (format "%s" place))
|
|
|
|
|
((eq float 'wrap) "{l}{0.5\\textwidth}")
|
|
|
|
|
((eq float 'figure)
|
|
|
|
|
(format "[%s]" (plist-get info :latex-default-figure-position)))
|
|
|
|
|
(t ""))))
|
2016-07-25 17:22:01 -04:00
|
|
|
|
(center
|
2020-05-10 08:43:40 -04:00
|
|
|
|
(cond
|
|
|
|
|
;; If link is an image link, do not center.
|
2023-05-03 08:56:35 -04:00
|
|
|
|
((org-element-type-p (org-element-parent link) 'link) nil)
|
2020-05-10 08:43:40 -04:00
|
|
|
|
((plist-member attr :center) (plist-get attr :center))
|
|
|
|
|
(t (plist-get info :latex-images-centered))))
|
2013-01-08 19:04:14 -05:00
|
|
|
|
(comment-include (if (plist-get attr :comment-include) "%" ""))
|
2019-04-20 04:25:24 -04:00
|
|
|
|
;; It is possible to specify scale or width and height in
|
|
|
|
|
;; the ATTR_LATEX line, and also via default variables.
|
|
|
|
|
(scale (cond ((eq float 'wrap) "")
|
|
|
|
|
((plist-get attr :scale))
|
|
|
|
|
(t (plist-get info :latex-image-default-scale))))
|
|
|
|
|
(width (cond ((org-string-nw-p scale) "")
|
|
|
|
|
((plist-get attr :width))
|
2013-03-08 18:58:31 -05:00
|
|
|
|
((plist-get attr :height) "")
|
|
|
|
|
((eq float 'wrap) "0.48\\textwidth")
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(t (plist-get info :latex-image-default-width))))
|
2019-04-20 04:25:24 -04:00
|
|
|
|
(height (cond ((org-string-nw-p scale) "")
|
|
|
|
|
((plist-get attr :height))
|
2013-03-08 18:58:31 -05:00
|
|
|
|
((or (plist-get attr :width)
|
|
|
|
|
(memq float '(figure wrap))) "")
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(t (plist-get info :latex-image-default-height))))
|
2013-03-08 18:58:31 -05:00
|
|
|
|
(options (let ((opt (or (plist-get attr :options)
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(plist-get info :latex-image-default-option))))
|
2013-03-05 23:04:42 -05:00
|
|
|
|
(if (not (string-match "\\`\\[\\(.*\\)\\]\\'" opt)) opt
|
|
|
|
|
(match-string 1 opt))))
|
|
|
|
|
image-code)
|
2013-05-20 06:11:33 -04:00
|
|
|
|
(if (member filetype '("tikz" "pgf"))
|
2013-03-05 23:04:42 -05: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)))
|
2019-04-20 04:25:24 -04:00
|
|
|
|
(setq image-code
|
|
|
|
|
(cond ((org-string-nw-p scale)
|
|
|
|
|
(format "\\scalebox{%s}{%s}" scale image-code))
|
|
|
|
|
((or (org-string-nw-p width) (org-string-nw-p height))
|
|
|
|
|
(format "\\resizebox{%s}{%s}{%s}"
|
|
|
|
|
(if (org-string-nw-p width) width "!")
|
|
|
|
|
(if (org-string-nw-p height) height "!")
|
2019-12-07 06:30:19 -05:00
|
|
|
|
image-code))
|
|
|
|
|
(t image-code))))
|
2013-03-05 23:04:42 -05:00
|
|
|
|
;; For other images:
|
2019-04-20 04:25:24 -04:00
|
|
|
|
;; - add scale, or width and height to options.
|
2013-03-05 23:04:42 -05:00
|
|
|
|
;; - include the image with \includegraphics.
|
2019-04-20 04:25:24 -04:00
|
|
|
|
(if (org-string-nw-p scale)
|
|
|
|
|
(setq options (concat options ",scale=" scale))
|
|
|
|
|
(when (org-string-nw-p width) (setq options (concat options ",width=" width)))
|
|
|
|
|
(when (org-string-nw-p height) (setq options (concat options ",height=" height))))
|
2014-07-31 11:45:36 -04:00
|
|
|
|
(let ((search-option (org-element-property :search-option link)))
|
|
|
|
|
(when (and search-option
|
|
|
|
|
(equal filetype "pdf")
|
2016-07-25 09:21:12 -04:00
|
|
|
|
(string-match-p "\\`[0-9]+\\'" search-option)
|
2023-08-18 04:00:13 -04:00
|
|
|
|
(not (string-match-p "page=" options)))
|
2014-07-31 11:45:36 -04:00
|
|
|
|
(setq options (concat options ",page=" search-option))))
|
2013-03-17 17:01:36 -04:00
|
|
|
|
(setq image-code
|
|
|
|
|
(format "\\includegraphics%s{%s}"
|
|
|
|
|
(cond ((not (org-string-nw-p options)) "")
|
2016-07-25 17:22:01 -04:00
|
|
|
|
((string-prefix-p "," options)
|
|
|
|
|
(format "[%s]" (substring options 1)))
|
2013-03-17 17:17:31 -04:00
|
|
|
|
(t (format "[%s]" options)))
|
2022-07-25 09:58:04 -04:00
|
|
|
|
;; While \includegraphics is fine with unicode in the path,
|
|
|
|
|
;; \includesvg is prone to producing errors.
|
|
|
|
|
(if (and (string-match-p "[^[:ascii:]]" path)
|
|
|
|
|
(equal filetype "svg"))
|
|
|
|
|
(concat "\\detokenize{" path "}")
|
|
|
|
|
path)))
|
2013-07-27 02:24:38 -04:00
|
|
|
|
(when (equal filetype "svg")
|
|
|
|
|
(setq image-code (replace-regexp-in-string "^\\\\includegraphics"
|
|
|
|
|
"\\includesvg"
|
|
|
|
|
image-code
|
|
|
|
|
nil t))
|
|
|
|
|
(setq image-code (replace-regexp-in-string "\\.svg}"
|
|
|
|
|
"}"
|
|
|
|
|
image-code
|
|
|
|
|
nil t))))
|
2012-11-21 10:44:53 -05:00
|
|
|
|
;; Return proper string, depending on FLOAT.
|
2016-07-25 17:22:01 -04:00
|
|
|
|
(pcase float
|
2021-05-15 09:20:35 -04:00
|
|
|
|
((and (pred stringp) env-string)
|
|
|
|
|
(format "\\begin{%s}%s
|
|
|
|
|
%s%s
|
|
|
|
|
%s%s
|
|
|
|
|
%s\\end{%s}"
|
|
|
|
|
env-string
|
|
|
|
|
placement
|
|
|
|
|
(if caption-above-p caption "")
|
|
|
|
|
(if center "\\centering" "")
|
|
|
|
|
comment-include image-code
|
|
|
|
|
(if caption-above-p "" caption)
|
|
|
|
|
env-string))
|
2016-07-25 17:22:01 -04:00
|
|
|
|
(`wrap (format "\\begin{wrapfigure}%s
|
|
|
|
|
%s%s
|
2013-03-05 23:04:42 -05:00
|
|
|
|
%s%s
|
2014-10-17 11:19:30 -04:00
|
|
|
|
%s\\end{wrapfigure}"
|
2016-07-25 17:22:01 -04:00
|
|
|
|
placement
|
|
|
|
|
(if caption-above-p caption "")
|
|
|
|
|
(if center "\\centering" "")
|
|
|
|
|
comment-include image-code
|
|
|
|
|
(if caption-above-p "" caption)))
|
|
|
|
|
(`sideways (format "\\begin{sidewaysfigure}
|
|
|
|
|
%s%s
|
2014-04-06 05:55:38 -04:00
|
|
|
|
%s%s
|
2014-10-17 11:19:30 -04:00
|
|
|
|
%s\\end{sidewaysfigure}"
|
2016-07-25 17:22:01 -04:00
|
|
|
|
(if caption-above-p caption "")
|
|
|
|
|
(if center "\\centering" "")
|
|
|
|
|
comment-include image-code
|
|
|
|
|
(if caption-above-p "" caption)))
|
|
|
|
|
(`multicolumn (format "\\begin{figure*}%s
|
|
|
|
|
%s%s
|
2013-03-05 23:04:42 -05:00
|
|
|
|
%s%s
|
2014-10-17 11:19:30 -04:00
|
|
|
|
%s\\end{figure*}"
|
2016-07-25 17:22:01 -04:00
|
|
|
|
placement
|
|
|
|
|
(if caption-above-p caption "")
|
|
|
|
|
(if center "\\centering" "")
|
|
|
|
|
comment-include image-code
|
|
|
|
|
(if caption-above-p "" caption)))
|
|
|
|
|
(`figure (format "\\begin{figure}%s
|
|
|
|
|
%s%s
|
2013-03-05 23:04:42 -05:00
|
|
|
|
%s%s
|
2014-10-17 11:19:30 -04:00
|
|
|
|
%s\\end{figure}"
|
2016-07-25 17:22:01 -04:00
|
|
|
|
placement
|
|
|
|
|
(if caption-above-p caption "")
|
|
|
|
|
(if center "\\centering" "")
|
|
|
|
|
comment-include image-code
|
|
|
|
|
(if caption-above-p "" caption)))
|
|
|
|
|
((guard center)
|
2015-06-30 19:12:42 -04:00
|
|
|
|
(format "\\begin{center}
|
|
|
|
|
%s%s
|
|
|
|
|
%s\\end{center}"
|
|
|
|
|
(if caption-above-p caption "")
|
|
|
|
|
image-code
|
|
|
|
|
(if caption-above-p "" caption)))
|
2016-07-25 17:22:01 -04:00
|
|
|
|
(_
|
|
|
|
|
(concat (if caption-above-p caption "")
|
|
|
|
|
image-code
|
|
|
|
|
(if caption-above-p 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 17:36:51 -05:00
|
|
|
|
|
2013-01-27 17:11:34 -05: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 17:36:51 -05:00
|
|
|
|
"Transcode a LINK object from Org to LaTeX.
|
|
|
|
|
|
|
|
|
|
DESC is the description part of the link, or the empty string.
|
2012-03-19 16:38:12 -04: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 17:36:51 -05:00
|
|
|
|
`org-export-data'."
|
2020-01-17 18:44:41 -05:00
|
|
|
|
(let* ((type (org-element-property :type link))
|
2016-12-13 07:46:38 -05:00
|
|
|
|
(raw-path (org-element-property :path link))
|
2011-12-09 08:38:36 -05:00
|
|
|
|
;; Ensure DESC really exists, or set it to nil.
|
|
|
|
|
(desc (and (not (string= desc "")) desc))
|
|
|
|
|
(imagep (org-export-inline-image-p
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
link (plist-get info :latex-inline-image-rules)))
|
2016-12-13 07:46:38 -05:00
|
|
|
|
(path (org-latex--protect-text
|
2020-02-20 03:29:21 -05:00
|
|
|
|
(pcase type
|
|
|
|
|
((or "http" "https" "ftp" "mailto" "doi")
|
|
|
|
|
(concat type ":" raw-path))
|
|
|
|
|
("file"
|
|
|
|
|
(org-export-file-uri raw-path))
|
|
|
|
|
(_
|
|
|
|
|
raw-path)))))
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
(cond
|
2015-01-04 15:54:41 -05:00
|
|
|
|
;; Link type is handled by a special function.
|
2020-02-14 04:00:15 -05:00
|
|
|
|
((org-export-custom-protocol-maybe link desc 'latex 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 17:36:51 -05:00
|
|
|
|
;; Image file.
|
2022-01-29 10:49:52 -05:00
|
|
|
|
(imagep (org-latex--inline-image (org-export-link-localise link) info))
|
2012-05-18 15:06:12 -04:00
|
|
|
|
;; Radio link: Transcode target's contents and use them as link's
|
|
|
|
|
;; description.
|
2012-03-19 16:38:12 -04:00
|
|
|
|
((string= type "radio")
|
2012-05-18 05:20:00 -04:00
|
|
|
|
(let ((destination (org-export-resolve-radio-link link info)))
|
2014-08-27 18:48:17 -04:00
|
|
|
|
(if (not destination) desc
|
2012-05-18 05:20:00 -04:00
|
|
|
|
(format "\\hyperref[%s]{%s}"
|
2015-04-19 09:12:27 -04:00
|
|
|
|
(org-export-get-reference destination info)
|
2014-03-23 13:04:22 -04:00
|
|
|
|
desc))))
|
2013-02-23 07:40:47 -05:00
|
|
|
|
;; Links pointing to a headline: Find destination and build
|
2012-03-19 16:38:12 -04:00
|
|
|
|
;; appropriate referencing command.
|
|
|
|
|
((member type '("custom-id" "fuzzy" "id"))
|
2019-05-12 18:51:39 -04:00
|
|
|
|
(let ((destination
|
|
|
|
|
(if (string= type "fuzzy")
|
|
|
|
|
(org-export-resolve-fuzzy-link link info 'latex-matrices)
|
|
|
|
|
(org-export-resolve-id-link link info))))
|
2016-05-26 05:03:11 -04:00
|
|
|
|
(cl-case (org-element-type destination)
|
2012-06-06 17:39:04 -04:00
|
|
|
|
;; Id link points to an external file.
|
|
|
|
|
(plain-text
|
2013-03-27 18:24:50 -04:00
|
|
|
|
(if desc (format "\\href{%s}{%s}" destination desc)
|
|
|
|
|
(format "\\url{%s}" destination)))
|
2012-03-19 16:38:12 -04:00
|
|
|
|
;; Fuzzy link points nowhere.
|
2015-04-13 03:49:39 -04:00
|
|
|
|
((nil)
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(format (plist-get info :latex-link-with-unknown-path-format)
|
2012-03-19 16:38:12 -04: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-29 20:04:03 -04: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 05:33:16 -04:00
|
|
|
|
(org-element-property :raw-link link) info))))
|
2013-02-23 07:40:47 -05:00
|
|
|
|
;; LINK points to a headline. If headlines are numbered
|
2012-03-19 16:38:12 -04:00
|
|
|
|
;; and the link has no description, display headline's
|
|
|
|
|
;; number. Otherwise, display description or headline's
|
|
|
|
|
;; title.
|
|
|
|
|
(headline
|
2015-04-13 05:53:59 -04:00
|
|
|
|
(let ((label (org-latex--label destination info t)))
|
2014-09-22 11:40:55 -04:00
|
|
|
|
(if (and (not desc)
|
|
|
|
|
(org-export-numbered-headline-p destination info))
|
2021-06-06 14:13:18 -04:00
|
|
|
|
(format org-latex-reference-command label)
|
2012-03-19 16:38:12 -04:00
|
|
|
|
(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-29 20:04:03 -04: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 05:33:16 -04:00
|
|
|
|
(org-element-property :title destination) info))))))
|
2012-03-19 16:38:12 -04:00
|
|
|
|
;; Fuzzy link points to a target. Do as above.
|
|
|
|
|
(otherwise
|
2015-04-13 05:53:59 -04:00
|
|
|
|
(let ((ref (org-latex--label destination info t)))
|
2021-06-06 14:13:18 -04:00
|
|
|
|
(if (not desc) (format org-latex-reference-command ref)
|
2015-04-13 05:24:42 -04:00
|
|
|
|
(format "\\hyperref[%s]{%s}" ref 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 17:36:51 -05:00
|
|
|
|
;; Coderef: replace link with the reference name or the
|
|
|
|
|
;; equivalent line number.
|
|
|
|
|
((string= type "coderef")
|
2012-04-25 16:07:37 -04:00
|
|
|
|
(format (org-export-get-coderef-format path desc)
|
2020-06-01 09:15:15 -04:00
|
|
|
|
;; Resolve with RAW-PATH since PATH could be tainted
|
|
|
|
|
;; with `org-latex--protect-text' call above.
|
|
|
|
|
(org-export-resolve-coderef raw-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 17:36:51 -05:00
|
|
|
|
;; External link with a description part.
|
2019-02-27 14:22:51 -05:00
|
|
|
|
((and path desc) (format "\\href{%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 17:36:51 -05:00
|
|
|
|
;; External link without a description part.
|
|
|
|
|
(path (format "\\url{%s}" path))
|
|
|
|
|
;; No path, only description. Try to do something useful.
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(t (format (plist-get info :latex-link-with-unknown-path-format) desc)))))
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
|
2013-09-25 15:27:29 -04:00
|
|
|
|
;;;; Node Property
|
|
|
|
|
|
2015-10-29 14:03:52 -04:00
|
|
|
|
(defun org-latex-node-property (node-property _contents _info)
|
2013-09-25 15:27:29 -04:00
|
|
|
|
"Transcode a NODE-PROPERTY element from Org to LaTeX.
|
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual
|
|
|
|
|
information."
|
|
|
|
|
(format "%s:%s"
|
|
|
|
|
(org-element-property :key node-property)
|
|
|
|
|
(let ((value (org-element-property :value node-property)))
|
|
|
|
|
(if value (concat " " value) ""))))
|
|
|
|
|
|
|
|
|
|
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
;;;; Paragraph
|
|
|
|
|
|
2015-10-29 14:03:52 -04: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 17:36:51 -05: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."
|
2023-03-11 05:34:45 -05:00
|
|
|
|
;; Ensure that we do not create multiple paragraphs, when a single
|
|
|
|
|
;; paragraph is expected.
|
|
|
|
|
;; Multiple newlines may appear in CONTENTS, for example, when
|
|
|
|
|
;; certain objects are stripped from export, leaving single newlines
|
|
|
|
|
;; before and after.
|
|
|
|
|
(replace-regexp-in-string
|
|
|
|
|
(rx "\n" (1+ (0+ space) "\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 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Plain List
|
|
|
|
|
|
2013-01-27 17:11:34 -05: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 17:36:51 -05: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 16:38:12 -04:00
|
|
|
|
(let* ((type (org-element-property :type plain-list))
|
2012-11-21 08:54:39 -05: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")
|
2014-01-25 08:54:04 -05:00
|
|
|
|
((eq type 'descriptive) "description")
|
|
|
|
|
(t "itemize")))))
|
2013-01-27 17:11:34 -05: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 17:36:51 -05:00
|
|
|
|
plain-list
|
|
|
|
|
(format "\\begin{%s}%s\n%s\\end{%s}"
|
2011-12-09 08:38:36 -05:00
|
|
|
|
latex-type
|
2014-01-25 08:54:04 -05:00
|
|
|
|
(or (plist-get attr :options) "")
|
2011-12-09 08:38:36 -05:00
|
|
|
|
contents
|
2015-04-13 05:24:42 -04:00
|
|
|
|
latex-type)
|
|
|
|
|
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 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Plain Text
|
|
|
|
|
|
2013-01-27 17:11:34 -05: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 17:36:51 -05:00
|
|
|
|
"Transcode a TEXT string from Org to LaTeX.
|
|
|
|
|
TEXT is the string to transcode. INFO is a plist holding
|
|
|
|
|
contextual information."
|
2014-08-25 08:06:21 -04:00
|
|
|
|
(let* ((specialp (plist-get info :with-special-strings))
|
|
|
|
|
(output
|
|
|
|
|
;; Turn LaTeX into \LaTeX{} and TeX into \TeX{}.
|
|
|
|
|
(let ((case-fold-search nil))
|
2012-08-27 08:17:27 -04:00
|
|
|
|
(replace-regexp-in-string
|
2014-08-25 08:06:21 -04:00
|
|
|
|
"\\<\\(?:La\\)?TeX\\>" "\\\\\\&{}"
|
|
|
|
|
;; Protect ^, ~, %, #, &, $, _, { and }. Also protect \.
|
|
|
|
|
;; However, if special strings are used, be careful not
|
|
|
|
|
;; to protect "\" in "\-" constructs.
|
|
|
|
|
(replace-regexp-in-string
|
2015-06-26 03:50:22 -04:00
|
|
|
|
(concat "[%$#&{}_~^]\\|\\\\" (and specialp "\\([^-]\\|$\\)"))
|
2014-08-25 08:06:21 -04:00
|
|
|
|
(lambda (m)
|
2016-05-26 05:03:11 -04:00
|
|
|
|
(cl-case (string-to-char m)
|
2015-06-26 03:50:22 -04:00
|
|
|
|
(?\\ "$\\\\backslash$\\1")
|
2014-08-25 08:06:21 -04:00
|
|
|
|
(?~ "\\\\textasciitilde{}")
|
|
|
|
|
(?^ "\\\\^{}")
|
|
|
|
|
(t "\\\\\\&")))
|
|
|
|
|
text)))))
|
2012-10-26 18:36:00 -04: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 08:17:27 -04:00
|
|
|
|
;; Convert special strings.
|
|
|
|
|
(when specialp
|
2014-08-25 08:06:21 -04:00
|
|
|
|
(setq output (replace-regexp-in-string "\\.\\.\\." "\\\\ldots{}" output)))
|
2012-08-27 08:17:27 -04:00
|
|
|
|
;; Handle break preservation if required.
|
|
|
|
|
(when (plist-get info :preserve-breaks)
|
2012-10-26 18:36:00 -04:00
|
|
|
|
(setq output (replace-regexp-in-string
|
2022-10-07 04:24:32 -04:00
|
|
|
|
"\\(?:[ \t]*\\\\\\\\\\)?[ \t]*\n"
|
|
|
|
|
(concat org-latex-line-break-safe "\n")
|
|
|
|
|
output nil t)))
|
2012-08-27 08:17:27 -04:00
|
|
|
|
;; Return value.
|
2012-10-26 18:36:00 -04: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 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
|
2012-04-28 20:11:22 -04:00
|
|
|
|
;;;; Planning
|
|
|
|
|
|
2015-10-29 14:03:52 -04:00
|
|
|
|
(defun org-latex-planning (planning _contents info)
|
2012-04-28 20:11:22 -04: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)
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(format (plist-get info :latex-inactive-timestamp-format)
|
2014-12-03 11:09:43 -05:00
|
|
|
|
(org-timestamp-translate closed)))))
|
2012-04-28 20:11:22 -04:00
|
|
|
|
(let ((deadline (org-element-property :deadline planning)))
|
|
|
|
|
(when deadline
|
|
|
|
|
(concat
|
|
|
|
|
(format "\\textbf{%s} " org-deadline-string)
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(format (plist-get info :latex-active-timestamp-format)
|
2014-12-03 11:09:43 -05:00
|
|
|
|
(org-timestamp-translate deadline)))))
|
2012-04-28 20:11:22 -04:00
|
|
|
|
(let ((scheduled (org-element-property :scheduled planning)))
|
|
|
|
|
(when scheduled
|
|
|
|
|
(concat
|
|
|
|
|
(format "\\textbf{%s} " org-scheduled-string)
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(format (plist-get info :latex-active-timestamp-format)
|
2014-12-03 11:09:43 -05:00
|
|
|
|
(org-timestamp-translate scheduled)))))))
|
2012-04-28 20:11:22 -04:00
|
|
|
|
" ")
|
2022-10-07 04:24:32 -04:00
|
|
|
|
org-latex-line-break-safe))
|
2012-04-28 20:11:22 -04:00
|
|
|
|
|
|
|
|
|
|
2013-09-25 15:27:29 -04:00
|
|
|
|
;;;; Property Drawer
|
|
|
|
|
|
2015-10-29 14:03:52 -04:00
|
|
|
|
(defun org-latex-property-drawer (_property-drawer contents _info)
|
2013-09-25 15:27:29 -04:00
|
|
|
|
"Transcode a PROPERTY-DRAWER element from Org to LaTeX.
|
|
|
|
|
CONTENTS holds the contents of the drawer. INFO is a plist
|
|
|
|
|
holding contextual information."
|
|
|
|
|
(and (org-string-nw-p contents)
|
|
|
|
|
(format "\\begin{verbatim}\n%s\\end{verbatim}" contents)))
|
|
|
|
|
|
|
|
|
|
|
2014-10-18 04:15:29 -04:00
|
|
|
|
;;;; Pseudo Element: LaTeX Matrices
|
|
|
|
|
|
|
|
|
|
;; `latex-matrices' elements have the following properties:
|
|
|
|
|
;; `:caption', `:post-blank' and `:markup' (`inline', `equation' or
|
|
|
|
|
;; `math').
|
2014-10-17 11:16:28 -04:00
|
|
|
|
|
|
|
|
|
(defun org-latex--wrap-latex-matrices (data info)
|
|
|
|
|
"Merge contiguous tables with the same mode within a pseudo-element.
|
|
|
|
|
DATA is a parse tree or a secondary string. INFO is a plist
|
|
|
|
|
containing export options. Modify DATA by side-effect and return
|
|
|
|
|
it."
|
|
|
|
|
(org-element-map data 'table
|
|
|
|
|
(lambda (table)
|
|
|
|
|
(when (eq (org-element-property :type table) 'org)
|
|
|
|
|
(let ((mode (or (org-export-read-attribute :attr_latex table :mode)
|
|
|
|
|
(plist-get info :latex-default-table-mode))))
|
|
|
|
|
(when (and (member mode '("inline-math" "math"))
|
|
|
|
|
;; Do not wrap twice the same table.
|
2023-05-16 06:41:53 -04:00
|
|
|
|
(not (org-element-type-p
|
2023-05-03 08:56:35 -04:00
|
|
|
|
(org-element-parent table) 'latex-matrices)))
|
2014-10-17 11:16:28 -04:00
|
|
|
|
(let* ((caption (and (not (string= mode "inline-math"))
|
|
|
|
|
(org-element-property :caption table)))
|
2019-05-12 18:51:39 -04:00
|
|
|
|
(name (and (not (string= mode "inline-math"))
|
|
|
|
|
(org-element-property :name table)))
|
2014-10-17 11:16:28 -04:00
|
|
|
|
(matrices
|
|
|
|
|
(list 'latex-matrices
|
2019-05-12 18:51:39 -04:00
|
|
|
|
;; Inherit name from the first table.
|
|
|
|
|
(list :name name
|
|
|
|
|
;; FIXME: what syntax for captions?
|
|
|
|
|
;;
|
|
|
|
|
;; :caption caption
|
2014-10-17 11:16:28 -04:00
|
|
|
|
:markup
|
|
|
|
|
(cond ((string= mode "inline-math") 'inline)
|
2019-05-12 18:51:39 -04:00
|
|
|
|
((or caption name) 'equation)
|
2014-10-17 11:16:28 -04:00
|
|
|
|
(t 'math)))))
|
|
|
|
|
(previous table)
|
|
|
|
|
(next (org-export-get-next-element table info)))
|
|
|
|
|
(org-element-insert-before matrices table)
|
|
|
|
|
;; Swallow all contiguous tables sharing the same mode.
|
|
|
|
|
(while (and
|
|
|
|
|
(zerop (or (org-element-property :post-blank previous) 0))
|
|
|
|
|
(setq next (org-export-get-next-element previous info))
|
2023-05-16 06:41:53 -04:00
|
|
|
|
(org-element-type-p next 'table)
|
2014-10-18 04:15:29 -04:00
|
|
|
|
(eq (org-element-property :type next) 'org)
|
2014-10-17 11:16:28 -04:00
|
|
|
|
(string= (or (org-export-read-attribute
|
|
|
|
|
:attr_latex next :mode)
|
|
|
|
|
(plist-get info :latex-default-table-mode))
|
|
|
|
|
mode))
|
2019-05-12 18:51:39 -04:00
|
|
|
|
(org-element-put-property table :name nil)
|
|
|
|
|
(org-element-put-property table :caption nil)
|
2023-05-14 14:39:05 -04:00
|
|
|
|
(org-element-extract previous)
|
2023-05-16 06:41:53 -04:00
|
|
|
|
(org-element-adopt matrices previous)
|
2014-10-17 11:16:28 -04:00
|
|
|
|
(setq previous next))
|
2016-10-24 17:33:28 -04:00
|
|
|
|
;; Inherit `:post-blank' from the value of the last
|
|
|
|
|
;; swallowed table. Set the latter's `:post-blank'
|
|
|
|
|
;; value to 0 so as to not duplicate empty lines.
|
2014-10-17 11:16:28 -04:00
|
|
|
|
(org-element-put-property
|
|
|
|
|
matrices :post-blank (org-element-property :post-blank previous))
|
2016-10-24 17:33:28 -04:00
|
|
|
|
(org-element-put-property previous :post-blank 0)
|
2019-05-12 18:51:39 -04:00
|
|
|
|
(org-element-put-property table :name nil)
|
|
|
|
|
(org-element-put-property table :caption nil)
|
2023-05-14 14:39:05 -04:00
|
|
|
|
(org-element-extract previous)
|
2023-05-16 06:41:53 -04:00
|
|
|
|
(org-element-adopt matrices previous))))))
|
2014-10-17 11:16:28 -04:00
|
|
|
|
info)
|
|
|
|
|
data)
|
|
|
|
|
|
2019-05-12 18:51:39 -04:00
|
|
|
|
(defun org-latex-matrices (matrices contents info)
|
2014-10-17 11:16:28 -04:00
|
|
|
|
"Transcode a MATRICES element from Org to LaTeX.
|
|
|
|
|
CONTENTS is a string. INFO is a plist used as a communication
|
|
|
|
|
channel."
|
2019-05-12 18:51:39 -04:00
|
|
|
|
(pcase (org-element-property :markup matrices)
|
|
|
|
|
(`inline (format "\\(%s\\)" contents))
|
|
|
|
|
(`equation
|
|
|
|
|
(let ((caption (org-latex--caption/label-string matrices info))
|
|
|
|
|
(caption-above? (org-latex--caption-above-p matrices info)))
|
|
|
|
|
(concat "\\begin{equation}\n"
|
|
|
|
|
(and caption-above? caption)
|
|
|
|
|
contents
|
|
|
|
|
(and (not caption-above?) caption)
|
|
|
|
|
"\\end{equation}")))
|
|
|
|
|
(_
|
|
|
|
|
(format "\\[\n%s\\]" contents))))
|
2014-10-17 11:16:28 -04:00
|
|
|
|
|
|
|
|
|
|
2013-11-09 12:26:47 -05:00
|
|
|
|
;;;; Pseudo Object: LaTeX Math Block
|
|
|
|
|
|
2014-10-18 04:15:29 -04:00
|
|
|
|
;; `latex-math-block' objects have the following property:
|
|
|
|
|
;; `:post-blank'.
|
|
|
|
|
|
2013-12-25 04:43:19 -05:00
|
|
|
|
(defun org-latex--wrap-latex-math-block (data info)
|
2013-11-09 12:26:47 -05:00
|
|
|
|
"Merge contiguous math objects in a pseudo-object container.
|
2013-12-25 04:43:19 -05:00
|
|
|
|
DATA is a parse tree or a secondary string. INFO is a plist
|
|
|
|
|
containing export options. Modify DATA by side-effect and return it."
|
2013-11-09 12:26:47 -05:00
|
|
|
|
(let ((valid-object-p
|
2018-12-17 18:42:07 -05:00
|
|
|
|
;; Non-nil when OBJECT can be added to a latex math block.
|
|
|
|
|
(lambda (object)
|
|
|
|
|
(pcase (org-element-type object)
|
|
|
|
|
(`entity (org-element-property :latex-math-p object))
|
2015-11-06 17:01:03 -05:00
|
|
|
|
(`latex-fragment
|
2018-12-17 18:42:07 -05:00
|
|
|
|
(let ((value (org-element-property :value object)))
|
2015-11-06 17:01:03 -05:00
|
|
|
|
(or (string-prefix-p "\\(" value)
|
2018-12-17 18:42:07 -05:00
|
|
|
|
(string-match-p "\\`\\$[^$]" value))))))))
|
|
|
|
|
(org-element-map data '(entity latex-fragment)
|
2013-11-09 12:26:47 -05:00
|
|
|
|
(lambda (object)
|
|
|
|
|
;; Skip objects already wrapped.
|
2023-05-16 06:41:53 -04:00
|
|
|
|
(when (and (not (org-element-type-p
|
2023-05-03 08:56:35 -04:00
|
|
|
|
(org-element-parent object) 'latex-math-block))
|
2018-12-17 18:42:07 -05:00
|
|
|
|
(funcall valid-object-p object))
|
2013-11-09 12:26:47 -05:00
|
|
|
|
(let ((math-block (list 'latex-math-block nil))
|
2013-12-19 16:49:48 -05:00
|
|
|
|
(next-elements (org-export-get-next-element object info t))
|
|
|
|
|
(last object))
|
2013-12-25 04:43:19 -05:00
|
|
|
|
;; Wrap MATH-BLOCK around OBJECT in DATA.
|
2013-11-09 12:26:47 -05:00
|
|
|
|
(org-element-insert-before math-block object)
|
2023-05-14 14:39:05 -04:00
|
|
|
|
(org-element-extract object)
|
2023-05-16 06:41:53 -04:00
|
|
|
|
(org-element-adopt math-block object)
|
2013-12-19 16:49:48 -05:00
|
|
|
|
(when (zerop (or (org-element-property :post-blank object) 0))
|
|
|
|
|
;; MATH-BLOCK swallows consecutive math objects.
|
|
|
|
|
(catch 'exit
|
|
|
|
|
(dolist (next next-elements)
|
2018-12-17 18:42:07 -05:00
|
|
|
|
(unless (funcall valid-object-p next) (throw 'exit nil))
|
2023-05-14 14:39:05 -04:00
|
|
|
|
(org-element-extract next)
|
2023-05-16 06:41:53 -04:00
|
|
|
|
(org-element-adopt math-block next)
|
2016-12-06 18:45:52 -05:00
|
|
|
|
;; Eschew the case: \beta$x$ -> \(\betax\).
|
2018-12-17 18:42:07 -05:00
|
|
|
|
(org-element-put-property last :post-blank 1)
|
2016-12-06 18:45:52 -05:00
|
|
|
|
(setq last next)
|
|
|
|
|
(when (> (or (org-element-property :post-blank next) 0) 0)
|
|
|
|
|
(throw 'exit nil)))))
|
2013-11-09 12:26:47 -05:00
|
|
|
|
(org-element-put-property
|
2013-12-19 16:49:48 -05:00
|
|
|
|
math-block :post-blank (org-element-property :post-blank last)))))
|
2018-12-17 18:42:07 -05:00
|
|
|
|
info nil '(latex-math-block) t)
|
2013-12-25 04:43:19 -05:00
|
|
|
|
;; Return updated DATA.
|
|
|
|
|
data))
|
|
|
|
|
|
2015-10-29 14:03:52 -04:00
|
|
|
|
(defun org-latex-math-block (_math-block contents _info)
|
2013-11-09 12:26:47 -05:00
|
|
|
|
"Transcode a MATH-BLOCK object from Org to LaTeX.
|
|
|
|
|
CONTENTS is a string. INFO is a plist used as a communication
|
|
|
|
|
channel."
|
|
|
|
|
(when (org-string-nw-p contents)
|
|
|
|
|
(format "\\(%s\\)" (org-trim contents))))
|
|
|
|
|
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
;;;; Quote Block
|
|
|
|
|
|
2013-01-27 17:11:34 -05: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 17:36:51 -05:00
|
|
|
|
"Transcode a QUOTE-BLOCK element from Org to LaTeX.
|
|
|
|
|
CONTENTS holds the contents of the block. INFO is a plist
|
|
|
|
|
holding contextual information."
|
2021-05-26 17:58:05 -04:00
|
|
|
|
(let ((environment
|
2021-09-29 03:22:47 -04:00
|
|
|
|
(or (org-export-read-attribute :attr_latex quote-block :environment)
|
|
|
|
|
(plist-get info :latex-default-quote-environment)))
|
|
|
|
|
(options
|
|
|
|
|
(or (org-export-read-attribute :attr_latex quote-block :options)
|
|
|
|
|
"")))
|
|
|
|
|
(org-latex--wrap-label
|
|
|
|
|
quote-block (format "\\begin{%s}%s\n%s\\end{%s}"
|
|
|
|
|
environment
|
|
|
|
|
options
|
|
|
|
|
contents
|
|
|
|
|
environment)
|
|
|
|
|
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 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
;;;; Radio Target
|
|
|
|
|
|
2013-01-27 17:11:34 -05: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 17:36:51 -05:00
|
|
|
|
"Transcode a RADIO-TARGET object from Org to LaTeX.
|
|
|
|
|
TEXT is the text of the target. INFO is a plist holding
|
|
|
|
|
contextual information."
|
2015-04-19 09:12:27 -04:00
|
|
|
|
(format "\\label{%s}%s" (org-export-get-reference radio-target info) 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 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
|
2012-05-23 10:29:16 -04:00
|
|
|
|
;;;; Section
|
|
|
|
|
|
2015-10-29 14:03:52 -04:00
|
|
|
|
(defun org-latex-section (_section contents _info)
|
2012-05-23 10:29:16 -04: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 17:36:51 -05:00
|
|
|
|
;;;; Special Block
|
|
|
|
|
|
2013-01-27 17:11:34 -05: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 17:36:51 -05:00
|
|
|
|
"Transcode a SPECIAL-BLOCK element from Org to LaTeX.
|
|
|
|
|
CONTENTS holds the contents of the block. INFO is a plist
|
|
|
|
|
holding contextual information."
|
2014-09-17 13:38:06 -04:00
|
|
|
|
(let ((type (org-element-property :type special-block))
|
2014-10-17 11:19:30 -04:00
|
|
|
|
(opt (org-export-read-attribute :attr_latex special-block :options))
|
|
|
|
|
(caption (org-latex--caption/label-string special-block info))
|
|
|
|
|
(caption-above-p (org-latex--caption-above-p special-block info)))
|
2014-09-08 05:57:27 -04:00
|
|
|
|
(concat (format "\\begin{%s}%s\n" type (or opt ""))
|
2014-10-17 11:19:30 -04:00
|
|
|
|
(and caption-above-p caption)
|
2014-09-08 05:57:27 -04:00
|
|
|
|
contents
|
2014-10-17 11:19:30 -04:00
|
|
|
|
(and (not caption-above-p) caption)
|
2014-09-08 05:57:27 -04:00
|
|
|
|
(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 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Src Block
|
|
|
|
|
|
2015-10-29 14:03:52 -04: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 17:36:51 -05: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 08:35:52 -05:00
|
|
|
|
(when (org-string-nw-p (org-element-property :value src-block))
|
|
|
|
|
(let* ((lang (org-element-property :language src-block))
|
2022-05-07 02:02:44 -04:00
|
|
|
|
(caption (org-element-property :caption src-block))
|
|
|
|
|
(caption-above-p (org-latex--caption-above-p src-block info))
|
|
|
|
|
(label (org-element-property :name src-block))
|
|
|
|
|
(custom-env (and lang
|
|
|
|
|
(cadr (assq (intern lang)
|
|
|
|
|
org-latex-custom-lang-environments))))
|
|
|
|
|
(num-start (org-export-get-loc src-block info))
|
|
|
|
|
(retain-labels (org-element-property :retain-labels src-block))
|
|
|
|
|
(attributes (org-export-read-attribute :attr_latex src-block))
|
ox-latex: Replace `org-latex-listings'
* lisp/ox-latex.el (org-latex-src-block, org-latex-keyword,
org-latex-inline-src-block, org-latex-template,
org-latex--caption/label-string, org-latex-engraved-preamble,
org-latex-listings): Replace `org-latex-listings' with
`org-latex-src-block-backend', which now can be set to listings/verbatim
and no longer advertises t/nil as valid values.
* lisp/ox-beamer.el (org-beamer-template): Update in the same manner as
`org-latex-template'.
* lisp/org-compat.el: Make `org-latex-listings' an obsolete alias for
`org-latex-src-block-backend'.
* testing/lisp/test-ox.el: Replace `org-latex-listings' reference with
`org-latex-src-block-backend'.
* doc/org-manual.org (Footnotes, LaTeX specific properties, Literal
Examples): Replace references to `org-latex-listings' with
`org-latex-src-block-backend'.
* etc/ORG-NEWS: Add a news entry noting this change.
The variable `org-latex-listings' originally indicated whether source
blocks should use the listings LaTeX package, or not. This usage has
evolved over the years, and now it sets one of four different
fontification backends. This renaming should make the variable name a
bit less misleading.
2022-05-07 02:46:28 -04:00
|
|
|
|
(float (plist-get attributes :float)))
|
2022-05-07 02:02:44 -04:00
|
|
|
|
(funcall
|
ox-latex: Replace `org-latex-listings'
* lisp/ox-latex.el (org-latex-src-block, org-latex-keyword,
org-latex-inline-src-block, org-latex-template,
org-latex--caption/label-string, org-latex-engraved-preamble,
org-latex-listings): Replace `org-latex-listings' with
`org-latex-src-block-backend', which now can be set to listings/verbatim
and no longer advertises t/nil as valid values.
* lisp/ox-beamer.el (org-beamer-template): Update in the same manner as
`org-latex-template'.
* lisp/org-compat.el: Make `org-latex-listings' an obsolete alias for
`org-latex-src-block-backend'.
* testing/lisp/test-ox.el: Replace `org-latex-listings' reference with
`org-latex-src-block-backend'.
* doc/org-manual.org (Footnotes, LaTeX specific properties, Literal
Examples): Replace references to `org-latex-listings' with
`org-latex-src-block-backend'.
* etc/ORG-NEWS: Add a news entry noting this change.
The variable `org-latex-listings' originally indicated whether source
blocks should use the listings LaTeX package, or not. This usage has
evolved over the years, and now it sets one of four different
fontification backends. This renaming should make the variable name a
bit less misleading.
2022-05-07 02:46:28 -04:00
|
|
|
|
(pcase (plist-get info :latex-src-block-backend)
|
|
|
|
|
((or `verbatim (guard (not lang))) #'org-latex-src-block--verbatim)
|
|
|
|
|
(`minted #'org-latex-src-block--minted)
|
|
|
|
|
(`engraved #'org-latex-src-block--engraved)
|
|
|
|
|
(`listings #'org-latex-src-block--listings)
|
2022-05-07 02:02:44 -04:00
|
|
|
|
((guard custom-env) #'org-latex-src-block--custom)
|
ox-latex: Replace `org-latex-listings'
* lisp/ox-latex.el (org-latex-src-block, org-latex-keyword,
org-latex-inline-src-block, org-latex-template,
org-latex--caption/label-string, org-latex-engraved-preamble,
org-latex-listings): Replace `org-latex-listings' with
`org-latex-src-block-backend', which now can be set to listings/verbatim
and no longer advertises t/nil as valid values.
* lisp/ox-beamer.el (org-beamer-template): Update in the same manner as
`org-latex-template'.
* lisp/org-compat.el: Make `org-latex-listings' an obsolete alias for
`org-latex-src-block-backend'.
* testing/lisp/test-ox.el: Replace `org-latex-listings' reference with
`org-latex-src-block-backend'.
* doc/org-manual.org (Footnotes, LaTeX specific properties, Literal
Examples): Replace references to `org-latex-listings' with
`org-latex-src-block-backend'.
* etc/ORG-NEWS: Add a news entry noting this change.
The variable `org-latex-listings' originally indicated whether source
blocks should use the listings LaTeX package, or not. This usage has
evolved over the years, and now it sets one of four different
fontification backends. This renaming should make the variable name a
bit less misleading.
2022-05-07 02:46:28 -04:00
|
|
|
|
(oldval
|
2023-08-24 03:37:52 -04:00
|
|
|
|
(warn "Please update `org-latex-src-block-backend' to %s"
|
2023-03-29 10:30:41 -04:00
|
|
|
|
(if oldval "listings" "verbatim"))
|
ox-latex: Replace `org-latex-listings'
* lisp/ox-latex.el (org-latex-src-block, org-latex-keyword,
org-latex-inline-src-block, org-latex-template,
org-latex--caption/label-string, org-latex-engraved-preamble,
org-latex-listings): Replace `org-latex-listings' with
`org-latex-src-block-backend', which now can be set to listings/verbatim
and no longer advertises t/nil as valid values.
* lisp/ox-beamer.el (org-beamer-template): Update in the same manner as
`org-latex-template'.
* lisp/org-compat.el: Make `org-latex-listings' an obsolete alias for
`org-latex-src-block-backend'.
* testing/lisp/test-ox.el: Replace `org-latex-listings' reference with
`org-latex-src-block-backend'.
* doc/org-manual.org (Footnotes, LaTeX specific properties, Literal
Examples): Replace references to `org-latex-listings' with
`org-latex-src-block-backend'.
* etc/ORG-NEWS: Add a news entry noting this change.
The variable `org-latex-listings' originally indicated whether source
blocks should use the listings LaTeX package, or not. This usage has
evolved over the years, and now it sets one of four different
fontification backends. This renaming should make the variable name a
bit less misleading.
2022-05-07 02:46:28 -04:00
|
|
|
|
(if oldval
|
|
|
|
|
#'org-latex-src-block--listings
|
|
|
|
|
#'org-latex-src-block--verbatim)))
|
2022-05-07 02:02:44 -04:00
|
|
|
|
:src-block src-block
|
|
|
|
|
:info info
|
|
|
|
|
:lang lang
|
|
|
|
|
:caption caption
|
|
|
|
|
:caption-above-p caption-above-p
|
|
|
|
|
:label label
|
|
|
|
|
:num-start num-start
|
|
|
|
|
:retain-labels retain-labels
|
|
|
|
|
:attributes attributes
|
2022-06-29 11:17:11 -04:00
|
|
|
|
:float float
|
|
|
|
|
:custom-env custom-env))))
|
2022-05-07 02:02:44 -04:00
|
|
|
|
|
|
|
|
|
(cl-defun org-latex-src-block--verbatim
|
|
|
|
|
(&key src-block info caption caption-above-p float &allow-other-keys)
|
2021-11-21 01:35:34 -05:00
|
|
|
|
"Transcode a SRC-BLOCK element from Org to LaTeX, using verbatim.
|
|
|
|
|
LANG, CAPTION, CAPTION-ABOVE-P, LABEL, NUM-START, RETAIN-LABELS, ATTRIBUTES
|
|
|
|
|
and FLOAT are extracted from SRC-BLOCK and INFO in `org-latex-src-block'."
|
|
|
|
|
(let ((caption-str (org-latex--caption/label-string src-block info))
|
|
|
|
|
(verbatim (format "\\begin{verbatim}\n%s\\end{verbatim}"
|
|
|
|
|
(org-export-format-code-default src-block info))))
|
|
|
|
|
(cond ((string= "multicolumn" float)
|
|
|
|
|
(format "\\begin{figure*}[%s]\n%s%s\n%s\\end{figure*}"
|
|
|
|
|
(plist-get info :latex-default-figure-position)
|
|
|
|
|
(if caption-above-p caption-str "")
|
|
|
|
|
verbatim
|
|
|
|
|
(if caption-above-p "" caption-str)))
|
|
|
|
|
(caption (concat
|
|
|
|
|
(if caption-above-p caption-str "")
|
|
|
|
|
verbatim
|
|
|
|
|
(if caption-above-p "" (concat "\n" caption-str))))
|
|
|
|
|
(t verbatim))))
|
|
|
|
|
|
2022-05-07 02:02:44 -04:00
|
|
|
|
(cl-defun org-latex-src-block--custom
|
|
|
|
|
(&key src-block info caption caption-above-p attributes float custom-env &allow-other-keys)
|
2021-11-21 01:35:34 -05:00
|
|
|
|
"Transcode a SRC-BLOCK element from Org to LaTeX, using a custom environment.
|
|
|
|
|
LANG, CAPTION, CAPTION-ABOVE-P, LABEL, NUM-START, RETAIN-LABELS, ATTRIBUTES
|
|
|
|
|
and FLOAT are extracted from SRC-BLOCK and INFO in `org-latex-src-block'."
|
|
|
|
|
(let ((caption-str (org-latex--caption/label-string src-block info))
|
|
|
|
|
(formatted-src (org-export-format-code-default src-block info)))
|
|
|
|
|
(if (string-match-p "\\`[a-zA-Z0-9]+\\'" custom-env)
|
|
|
|
|
(format "\\begin{%s}\n%s\\end{%s}\n"
|
|
|
|
|
custom-env
|
|
|
|
|
(concat (and caption-above-p caption-str)
|
|
|
|
|
formatted-src
|
|
|
|
|
(and (not caption-above-p) caption-str))
|
|
|
|
|
custom-env)
|
|
|
|
|
(format-spec custom-env
|
|
|
|
|
`((?s . ,formatted-src)
|
|
|
|
|
(?c . ,caption)
|
|
|
|
|
(?f . ,float)
|
|
|
|
|
(?l . ,(org-latex--label src-block info))
|
|
|
|
|
(?o . ,(or (plist-get attributes :options) "")))))))
|
|
|
|
|
|
2022-05-07 02:02:44 -04:00
|
|
|
|
(cl-defun org-latex-src-block--minted
|
|
|
|
|
(&key src-block info lang caption caption-above-p num-start retain-labels attributes float &allow-other-keys)
|
2021-11-21 01:35:34 -05:00
|
|
|
|
"Transcode a SRC-BLOCK element from Org to LaTeX, using minted.
|
|
|
|
|
LANG, CAPTION, CAPTION-ABOVE-P, LABEL, NUM-START, RETAIN-LABELS, ATTRIBUTES
|
|
|
|
|
and FLOAT are extracted from SRC-BLOCK and INFO in `org-latex-src-block'."
|
|
|
|
|
(let* ((caption-str (org-latex--caption/label-string src-block info))
|
|
|
|
|
(placement (or (org-unbracket-string "[" "]" (plist-get attributes :placement))
|
|
|
|
|
(plist-get info :latex-default-figure-position)))
|
2022-05-08 12:04:10 -04:00
|
|
|
|
(multicolumn-p (string= "multicolumn" float))
|
2021-11-21 01:35:34 -05:00
|
|
|
|
(float-env
|
|
|
|
|
(cond
|
2022-05-08 12:04:10 -04:00
|
|
|
|
((or caption multicolumn-p)
|
|
|
|
|
(cons
|
|
|
|
|
(concat "\\begin{listing" (when multicolumn-p "*")
|
|
|
|
|
"}[" placement "]\n"
|
|
|
|
|
(if caption-above-p caption-str ""))
|
|
|
|
|
(concat "\n" (if caption-above-p "" caption-str)
|
|
|
|
|
"\\end{listing" (when multicolumn-p "*") "}")))
|
2021-11-21 01:35:34 -05:00
|
|
|
|
((string= "t" float)
|
2022-05-08 12:04:10 -04:00
|
|
|
|
(cons
|
|
|
|
|
(concat "\\begin{listing}[" placement "]\n")
|
|
|
|
|
"\n\\end{listing}"))))
|
2021-11-21 01:35:34 -05:00
|
|
|
|
(options (plist-get info :latex-minted-options))
|
|
|
|
|
(body
|
|
|
|
|
(format
|
|
|
|
|
"\\begin{minted}[%s]{%s}\n%s\\end{minted}"
|
|
|
|
|
;; Options.
|
|
|
|
|
(concat
|
|
|
|
|
(org-latex--make-option-string
|
|
|
|
|
(if (or (not num-start) (assoc "linenos" options))
|
|
|
|
|
options
|
|
|
|
|
(append
|
|
|
|
|
`(("linenos")
|
|
|
|
|
("firstnumber" ,(number-to-string (1+ num-start))))
|
|
|
|
|
options)))
|
|
|
|
|
(let ((local-options (plist-get attributes :options)))
|
|
|
|
|
(and local-options (concat "," local-options))))
|
|
|
|
|
;; Language.
|
|
|
|
|
(or (cadr (assq (intern lang)
|
|
|
|
|
(plist-get info :latex-minted-langs)))
|
|
|
|
|
(downcase lang))
|
|
|
|
|
;; Source code.
|
|
|
|
|
(let* ((code-info (org-export-unravel-code src-block))
|
|
|
|
|
(max-width
|
|
|
|
|
(apply 'max
|
2022-05-07 01:59:13 -04:00
|
|
|
|
(mapcar 'string-width
|
2021-11-21 01:35:34 -05:00
|
|
|
|
(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)))))))
|
2022-05-08 12:04:10 -04:00
|
|
|
|
(concat (car float-env) body (cdr float-env))))
|
2021-11-21 01:35:34 -05:00
|
|
|
|
|
2022-05-11 11:18:19 -04:00
|
|
|
|
(defun org-latex-src--engrave-mathescape-p (info options)
|
|
|
|
|
"From the export INFO plist, and the per-block OPTIONS, determine mathescape."
|
|
|
|
|
(let ((default-options (plist-get info :latex-engraved-options))
|
|
|
|
|
(mathescape-status
|
|
|
|
|
(lambda (opts)
|
|
|
|
|
(cl-some
|
|
|
|
|
(lambda (opt)
|
|
|
|
|
(or (and
|
|
|
|
|
(null (cdr opt))
|
|
|
|
|
(cond
|
|
|
|
|
((string-match-p
|
|
|
|
|
"\\(?:^\\|,\\)mathescape=false\\(?:,\\|$\\)"
|
|
|
|
|
(car opt))
|
|
|
|
|
'no)
|
|
|
|
|
((or (string-match-p
|
|
|
|
|
"\\(?:^\\|,\\)mathescape\\(?:=true\\)?\\(?:,\\|$\\)"
|
|
|
|
|
(car opt))
|
|
|
|
|
(string= "mathescape" (car opt)))
|
|
|
|
|
'yes)))
|
|
|
|
|
(and
|
|
|
|
|
(string= (car opt) "mathescape")
|
|
|
|
|
(cond
|
|
|
|
|
((or (and (stringp (cdr opt)) (string= (cdr opt) "true"))
|
|
|
|
|
(equal '("true") (cdr opt)))
|
|
|
|
|
'yes)
|
|
|
|
|
((or (and (stringp (cdr opt)) (string= "false" (cdr opt)))
|
|
|
|
|
(equal '("false") (cdr opt)))
|
|
|
|
|
'no)))))
|
|
|
|
|
opts))))
|
2022-07-24 08:57:07 -04:00
|
|
|
|
(let ((mathescape (or (funcall mathescape-status default-options)
|
|
|
|
|
(funcall mathescape-status options))))
|
|
|
|
|
(when (eq mathescape 'yes)
|
|
|
|
|
(or engrave-faces-latex-mathescape t)))))
|
2022-05-11 11:18:19 -04:00
|
|
|
|
|
2022-05-08 03:28:29 -04:00
|
|
|
|
(defun org-latex-src--engrave-code (content lang &optional theme options inline)
|
|
|
|
|
"Engrave CONTENT to LaTeX in a LANG-mode buffer, and give the result.
|
|
|
|
|
When the THEME symbol is non-nil, that theme will be used.
|
|
|
|
|
|
|
|
|
|
When INLINE is nil, a Verbatim environment wrapped in a Code
|
|
|
|
|
environment will be used. When t, a Verb command will be used.
|
|
|
|
|
|
|
|
|
|
When OPTIONS is provided, as either a string or list of key-value
|
|
|
|
|
pairs accepted by `org-latex--make-option-string', it is passed
|
|
|
|
|
to the Verbatim environment or Verb command."
|
2021-11-21 07:04:12 -05:00
|
|
|
|
(if (require 'engrave-faces-latex nil t)
|
|
|
|
|
(let* ((lang-mode (and lang (org-src-get-lang-mode lang)))
|
2022-05-08 03:28:29 -04:00
|
|
|
|
(engrave-faces-current-preset-style
|
|
|
|
|
(if theme
|
|
|
|
|
(engrave-faces-get-theme theme)
|
|
|
|
|
engrave-faces-current-preset-style))
|
2021-11-21 07:04:12 -05:00
|
|
|
|
(engraved-buffer
|
|
|
|
|
(with-temp-buffer
|
2022-07-24 08:57:07 -04:00
|
|
|
|
(insert (replace-regexp-in-string "\n\\'" "" content))
|
2021-11-21 07:04:12 -05:00
|
|
|
|
(when lang-mode
|
|
|
|
|
(if (functionp lang-mode)
|
|
|
|
|
(funcall lang-mode)
|
2023-03-29 10:30:41 -04:00
|
|
|
|
(warn "Cannot engrave code as %s. %s is undefined."
|
|
|
|
|
lang lang-mode)))
|
2021-11-21 07:04:12 -05:00
|
|
|
|
(engrave-faces-latex-buffer)))
|
|
|
|
|
(engraved-code
|
|
|
|
|
(with-current-buffer engraved-buffer
|
2022-05-08 03:28:29 -04:00
|
|
|
|
(buffer-string)))
|
|
|
|
|
(engraved-options
|
|
|
|
|
(when options
|
|
|
|
|
(concat "["
|
|
|
|
|
(if (listp options)
|
|
|
|
|
(org-latex--make-option-string options)
|
|
|
|
|
options)
|
|
|
|
|
"]")))
|
|
|
|
|
(engraved-wrapped
|
|
|
|
|
(if inline
|
|
|
|
|
(concat "\\Verb" engraved-options "{" engraved-code "}")
|
|
|
|
|
(concat "\\begin{Code}\n\\begin{Verbatim}" engraved-options "\n"
|
|
|
|
|
engraved-code "\n\\end{Verbatim}\n\\end{Code}"))))
|
2021-11-21 07:04:12 -05:00
|
|
|
|
(kill-buffer engraved-buffer)
|
2022-05-08 03:28:29 -04:00
|
|
|
|
(if theme
|
|
|
|
|
(concat "{\\engravedtheme"
|
|
|
|
|
(replace-regexp-in-string "[^A-Za-z]" ""
|
|
|
|
|
(symbol-name theme))
|
|
|
|
|
engraved-wrapped
|
|
|
|
|
"}")
|
|
|
|
|
engraved-wrapped))
|
2022-06-30 11:33:03 -04:00
|
|
|
|
(user-error "Cannot engrave code as `engrave-faces-latex' is unavailable.")))
|
2021-11-21 07:04:12 -05:00
|
|
|
|
|
2022-05-07 02:02:44 -04:00
|
|
|
|
(cl-defun org-latex-src-block--engraved
|
|
|
|
|
(&key src-block info lang caption caption-above-p num-start retain-labels attributes float &allow-other-keys)
|
2021-11-21 07:04:12 -05:00
|
|
|
|
"Transcode a SRC-BLOCK element from Org to LaTeX, using engrave-faces-latex.
|
|
|
|
|
LANG, CAPTION, CAPTION-ABOVE-P, LABEL, NUM-START, RETAIN-LABELS, ATTRIBUTES
|
|
|
|
|
and FLOAT are extracted from SRC-BLOCK and INFO in `org-latex-src-block'."
|
|
|
|
|
(let* ((caption-str (org-latex--caption/label-string src-block info))
|
|
|
|
|
(placement (or (org-unbracket-string "[" "]" (plist-get attributes :placement))
|
|
|
|
|
(plist-get info :latex-default-figure-position)))
|
2022-05-08 12:04:10 -04:00
|
|
|
|
(multicolumn-p (string= "multicolumn" float))
|
2021-11-21 07:04:12 -05:00
|
|
|
|
(float-env
|
|
|
|
|
(cond
|
2022-05-08 12:04:10 -04:00
|
|
|
|
((or caption multicolumn-p)
|
|
|
|
|
(cons
|
|
|
|
|
(concat "\\begin{listing" (when multicolumn-p "*")
|
|
|
|
|
"}[" placement "]\n"
|
|
|
|
|
(if caption-above-p caption-str ""))
|
|
|
|
|
(concat "\n" (if caption-above-p "" caption-str)
|
|
|
|
|
"\\end{listing" (when multicolumn-p "*") "}")))
|
2021-11-21 07:04:12 -05:00
|
|
|
|
((string= "t" float)
|
2022-05-08 12:04:10 -04:00
|
|
|
|
(cons
|
|
|
|
|
(concat "\\begin{listing}[" placement "]\n")
|
|
|
|
|
"\n\\end{listing}"))))
|
2022-05-08 03:28:29 -04:00
|
|
|
|
(options
|
|
|
|
|
(let ((engraved-options (plist-get info :latex-engraved-options))
|
|
|
|
|
(local-options (plist-get attributes :options)))
|
|
|
|
|
(append
|
|
|
|
|
(when (and num-start (not (assoc "linenos" engraved-options)))
|
|
|
|
|
`(("linenos")
|
|
|
|
|
("firstnumber" ,(number-to-string (1+ num-start)))))
|
2022-05-11 11:18:19 -04:00
|
|
|
|
(and local-options `((,local-options))))))
|
2022-05-08 03:28:29 -04:00
|
|
|
|
(engraved-theme (plist-get attributes :engraved-theme))
|
2021-11-21 07:04:12 -05:00
|
|
|
|
(content
|
|
|
|
|
(let* ((code-info (org-export-unravel-code src-block))
|
|
|
|
|
(max-width
|
|
|
|
|
(apply 'max
|
|
|
|
|
(mapcar 'string-width
|
|
|
|
|
(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)))))
|
|
|
|
|
(body
|
2022-05-11 11:18:19 -04:00
|
|
|
|
(let ((engrave-faces-latex-mathescape
|
|
|
|
|
(org-latex-src--engrave-mathescape-p info options)))
|
|
|
|
|
(org-latex-src--engrave-code
|
|
|
|
|
content lang
|
|
|
|
|
(when engraved-theme (intern engraved-theme))
|
|
|
|
|
options))))
|
2022-05-08 12:04:10 -04:00
|
|
|
|
(concat (car float-env) body (cdr float-env))))
|
2021-11-21 07:04:12 -05:00
|
|
|
|
|
2022-05-07 02:02:44 -04:00
|
|
|
|
(cl-defun org-latex-src-block--listings
|
|
|
|
|
(&key src-block info lang caption caption-above-p label num-start retain-labels attributes float &allow-other-keys)
|
2021-11-21 01:35:34 -05:00
|
|
|
|
"Transcode a SRC-BLOCK element from Org to LaTeX, using listings.
|
|
|
|
|
LANG, CAPTION, CAPTION-ABOVE-P, LABEL, NUM-START, RETAIN-LABELS, ATTRIBUTES
|
|
|
|
|
and FLOAT are extracted from SRC-BLOCK and INFO in `org-latex-src-block'."
|
|
|
|
|
(let ((lst-lang
|
|
|
|
|
(or (cadr (assq (intern lang)
|
|
|
|
|
(plist-get info :latex-listings-langs)))
|
|
|
|
|
lang))
|
|
|
|
|
(caption-str
|
|
|
|
|
(when caption
|
|
|
|
|
(let ((main (org-export-get-caption src-block))
|
|
|
|
|
(secondary (org-export-get-caption src-block t)))
|
|
|
|
|
(if (not secondary)
|
|
|
|
|
(format "{%s}" (org-export-data main info))
|
|
|
|
|
(format "{[%s]%s}"
|
|
|
|
|
(org-export-data secondary info)
|
|
|
|
|
(org-export-data main info))))))
|
|
|
|
|
(lst-opt (plist-get info :latex-listings-options)))
|
|
|
|
|
(concat
|
|
|
|
|
(format
|
2022-10-18 04:09:19 -04:00
|
|
|
|
"\\begin{lstlisting}[%s]\n%s\\end{lstlisting}"
|
|
|
|
|
;; Options.
|
2021-11-21 01:35:34 -05:00
|
|
|
|
(concat
|
|
|
|
|
(org-latex--make-option-string
|
|
|
|
|
(append
|
|
|
|
|
lst-opt
|
|
|
|
|
(cond
|
|
|
|
|
((and (not float) (plist-member attributes :float)) nil)
|
|
|
|
|
((string= "multicolumn" float) '(("float" "*")))
|
|
|
|
|
((and float (not (assoc "float" lst-opt)))
|
|
|
|
|
`(("float" ,(plist-get info :latex-default-figure-position)))))
|
2022-12-18 08:14:14 -05:00
|
|
|
|
(unless (plist-get info :latex-listings-src-omit-language)
|
2022-12-14 01:22:23 -05:00
|
|
|
|
`(("language" ,lst-lang)))
|
2022-12-14 01:12:55 -05:00
|
|
|
|
(when label
|
2022-12-18 08:14:14 -05:00
|
|
|
|
`(("label" ,(org-latex--label src-block info))))
|
2022-12-14 01:12:55 -05:00
|
|
|
|
(when caption-str
|
|
|
|
|
`(("caption" ,caption-str)))
|
|
|
|
|
(when caption-str
|
|
|
|
|
;; caption-above-p means captionpos is t(op)
|
|
|
|
|
;; else b(ottom)
|
|
|
|
|
`(("captionpos" ,(if caption-above-p "t" "b"))))
|
2021-11-21 01:35:34 -05:00
|
|
|
|
(cond ((assoc "numbers" lst-opt) nil)
|
|
|
|
|
((not num-start) '(("numbers" "none")))
|
|
|
|
|
(t `(("firstnumber" ,(number-to-string (1+ num-start)))
|
|
|
|
|
("numbers" "left"))))))
|
|
|
|
|
(let ((local-options (plist-get attributes :options)))
|
2022-10-18 04:09:19 -04:00
|
|
|
|
(and local-options (concat "," local-options))))
|
|
|
|
|
;; Source code.
|
2021-11-21 01:35:34 -05:00
|
|
|
|
(let* ((code-info (org-export-unravel-code src-block))
|
|
|
|
|
(max-width
|
|
|
|
|
(apply 'max
|
2022-05-07 01:59:13 -04:00
|
|
|
|
(mapcar 'string-width
|
2021-11-21 01:35:34 -05:00
|
|
|
|
(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))))))))
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
;;;; Statistics Cookie
|
|
|
|
|
|
2015-10-29 14:03:52 -04: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 17:36:51 -05:00
|
|
|
|
"Transcode a STATISTICS-COOKIE object from Org to LaTeX.
|
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual information."
|
2012-08-07 03:24:44 -04: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 17:36:51 -05: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 12:00:50 -04:00
|
|
|
|
;;;; Strike-Through
|
|
|
|
|
|
2015-10-29 14:03:52 -04: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 12:00:50 -04:00
|
|
|
|
"Transcode STRIKE-THROUGH from Org to LaTeX.
|
|
|
|
|
CONTENTS is the text with strike-through markup. INFO is a plist
|
|
|
|
|
holding contextual information."
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(org-latex--text-markup contents 'strike-through info))
|
org-element: Define new objects (bold, code, italic, ...)
* contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo.
(org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through,
org-e-ascii-underline): New functions.
(org-e-ascii-emphasis): Remove function.
* contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable
renamed from `org-e-html-emphasis-alist'. Change value type.
(org-e-html-bold, org-e-html-italic, org-e-html-strike-through,
org-e-html-underline): New functions.
(org-e-html-verbatim): Update function.
(org-e-html-emphasis): Remove function.
* contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist):
Variable renamed from `org-e-latex-emphasis-alist'. Change value
type.
(org-e-latex-center-block): Fix docstring.
(org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code,
org-e-latex-italic, org-e-latex-strike-through,
org-e-latex-underline): New functions.
(org-e-latex-verbatim): Update function.
(org-e-latex-emphasis): Remove function.
* contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code,
org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline):
New functions.
(org-e-odt-verbatim): Update function.
(org-e-odt-center-block): Fix docstring.
(org-e-odt-emphasis): Remove function.
* contrib/lisp/org-element.el (org-element-bold-parser):
(org-element-bold-interpreter, org-element-code-parser,
org-element-code-interpreter, org-element-italic-parser,
org-element-italic-interpreter, org-element-strike-through-parser,
org-element-strike-through-interpreter, org-element-underline-parser,
org-element-underline-interpreter): New functions.
(org-element-emphasis-parser, org-element-emphasis-interpreter):
Remove functions.
(org-element-verbatim-parser, org-element-verbatim-interpreter,
org-element-text-markup-successor): Update function.
(org-element-object-successor-alist): Add associations for new object
types.
(org-element-recursive-objects): Add `bold', `italic',
`strike-through' and `underline' as recursive types.
(org-element-object-restrictions): Add restrictions for new recursive
object types.
* contrib/lisp/org-export.el (org-export-filters-alist): Add filters
for new object types.
(org-export-with-todo-keywords): Add missing keywords.
(org-export-filter-center-block-functions,
org-export-filter-drawer-functions,
org-export-filter-dynamic-block-functions,
org-export-filter-headline-functions,
org-export-filter-inlinetask-functions,
org-export-filter-plain-list-functions,
org-export-filter-item-functions, org-export-filter-comment-functions,
org-export-filter-comment-block-functions,
org-export-filter-example-block-functions,
org-export-filter-export-block-functions,
org-export-filter-fixed-width-functions,
org-export-filter-footnote-definition-functions,
org-export-filter-horizontal-rule-functions,
org-export-filter-keyword-functions,
org-export-filter-latex-environment-functions,
org-export-filter-babel-call-functions,
org-export-filter-paragraph-functions,
org-export-filter-property-drawer-functions,
org-export-filter-quote-section-functions,
org-export-filter-quote-block-functions,
org-export-filter-section-functions,
org-export-filter-special-block-functions,
org-export-filter-src-block-functions,
org-export-filter-table-functions,
org-export-filter-table-cell-functions,
org-export-filter-table-row-functions,
org-export-filter-verse-block-functions,
org-export-filter-entity-functions,
org-export-filter-export-snippet-functions,
org-export-filter-footnote-reference-functions,
org-export-filter-inline-babel-call-functions,
org-export-filter-inline-src-block-functions,
org-export-filter-latex-fragment-functions,
org-export-filter-line-break-functions,
org-export-filter-link-functions, org-export-filter-macro-functions,
org-export-filter-radio-target-functions,
org-export-filter-statistics-cookie-functions,
org-export-filter-subscript-functions,
org-export-filter-superscript-functions,
org-export-filter-target-functions,
org-export-filter-time-stamp-functions,
org-export-filter-verbatim-functions): Fix docstring.
(org-export-filter-bold-functions, org-export-filter-code-functions,
org-export-filter-italic-functions,
org-export-filter-strike-through-functions,
org-export-filter-underline-functions): New variables.
(org-export-filter-emphasis-functions): Remove variable.
* testing/lisp/test-org-element.el: Add tests.
2012-04-28 12:00:50 -04: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 17:36:51 -05:00
|
|
|
|
;;;; Subscript
|
|
|
|
|
|
2018-12-17 18:42:07 -05: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 17:36:51 -05:00
|
|
|
|
"Transcode a SUBSCRIPT object from Org to LaTeX.
|
2018-12-17 18:42:07 -05:00
|
|
|
|
CONTENTS is the contents of the object."
|
|
|
|
|
(format "\\textsubscript{%s}" 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 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Superscript
|
|
|
|
|
|
2018-12-17 18:42:07 -05: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 17:36:51 -05:00
|
|
|
|
"Transcode a SUPERSCRIPT object from Org to LaTeX.
|
2018-12-17 18:42:07 -05:00
|
|
|
|
CONTENTS is the contents of the object."
|
|
|
|
|
(format "\\textsuperscript{%s}" 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 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Table
|
2012-05-07 09:21:25 -04:00
|
|
|
|
;;
|
2013-01-27 17:11:34 -05:00
|
|
|
|
;; `org-latex-table' is the entry point for table transcoding. It
|
2012-11-20 18:18:07 -05:00
|
|
|
|
;; takes care of tables with a "verbatim" mode. Otherwise, it
|
2013-01-27 17:11:34 -05:00
|
|
|
|
;; delegates the job to either `org-latex--table.el-table',
|
2022-06-20 09:56:14 -04:00
|
|
|
|
;; `org-latex--org-table', `org-latex--math-table' or
|
|
|
|
|
;; `org-latex--org-tabbing' functions,
|
2012-11-20 18:18:07 -05:00
|
|
|
|
;; depending of the type of the table and the mode requested.
|
2012-05-07 09:21:25 -04:00
|
|
|
|
;;
|
2013-01-27 17:11:34 -05:00
|
|
|
|
;; `org-latex--align-string' is a subroutine used to build alignment
|
2012-11-20 18:18:07 -05:00
|
|
|
|
;; string for Org tables.
|
2012-05-07 09:21:25 -04:00
|
|
|
|
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(defun org-latex-table (table contents info)
|
2012-05-07 09:21:25 -04:00
|
|
|
|
"Transcode a TABLE element from Org to LaTeX.
|
2012-05-23 17:21:25 -04:00
|
|
|
|
CONTENTS is the contents of the table. INFO is a plist holding
|
|
|
|
|
contextual information."
|
2012-11-20 18:18:07 -05:00
|
|
|
|
(if (eq (org-element-property :type table) 'table.el)
|
|
|
|
|
;; "table.el" table. Convert it using appropriate tools.
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(org-latex--table.el-table table info)
|
2012-11-20 18:18:07 -05:00
|
|
|
|
(let ((type (or (org-export-read-attribute :attr_latex table :mode)
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(plist-get info :latex-default-table-mode))))
|
2012-11-20 18:18:07 -05: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
|
2015-02-09 06:02:16 -05:00
|
|
|
|
`(table nil ,@(org-element-contents table))))))
|
2012-11-20 18:18:07 -05:00
|
|
|
|
;; Case 2: Matrix.
|
|
|
|
|
((or (string= type "math") (string= type "inline-math"))
|
2022-06-20 09:56:14 -04:00
|
|
|
|
(org-latex--math-table table info))
|
|
|
|
|
;; Case 3: Tabbing
|
2022-06-26 10:25:00 -04:00
|
|
|
|
((string= type "tabbing")
|
|
|
|
|
(org-table--org-tabbing table contents info))
|
2022-06-20 09:56:14 -04:00
|
|
|
|
;; Case 4: Standard table.
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(t (concat (org-latex--org-table table contents info)
|
2012-11-20 18:18:07 -05:00
|
|
|
|
;; When there are footnote references within the
|
|
|
|
|
;; table, insert their definition just after it.
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(org-latex--delayed-footnotes-definitions table info)))))))
|
2012-11-20 18:18:07 -05:00
|
|
|
|
|
2017-03-27 07:43:49 -04:00
|
|
|
|
(defun org-latex--align-string (table info &optional math?)
|
2012-05-07 09:21:25 -04:00
|
|
|
|
"Return an appropriate LaTeX alignment string.
|
|
|
|
|
TABLE is the considered table. INFO is a plist used as
|
2017-03-27 07:43:49 -04:00
|
|
|
|
a communication channel. When optional argument MATH? is
|
|
|
|
|
non-nil, TABLE is meant to be a matrix, where all cells are
|
|
|
|
|
centered."
|
2012-11-20 18:18:07 -05:00
|
|
|
|
(or (org-export-read-attribute :attr_latex table :align)
|
|
|
|
|
(let (align)
|
2012-05-07 09:21:25 -04:00
|
|
|
|
;; Extract column groups and alignment from first (non-rule)
|
|
|
|
|
;; row.
|
|
|
|
|
(org-element-map
|
2013-01-27 17:11:34 -05: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))
|
2017-03-27 07:43:49 -04:00
|
|
|
|
(push (if math? "c" ;center cells in matrices
|
|
|
|
|
(cl-case (org-export-table-cell-alignment cell info)
|
|
|
|
|
(left "l")
|
|
|
|
|
(right "r")
|
2017-03-27 08:01:32 -04:00
|
|
|
|
(center "c")))
|
|
|
|
|
align)
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(when (memq 'right borders) (push "|" align))))
|
|
|
|
|
info)
|
2012-11-20 18:18:07 -05: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 17:36:51 -05:00
|
|
|
|
|
2022-06-20 09:56:14 -04:00
|
|
|
|
(defun org-latex--align-string-tabbing (table info)
|
2022-06-26 10:25:00 -04:00
|
|
|
|
"Return LaTeX alignment string using tabbing environment.
|
2022-06-20 09:56:14 -04:00
|
|
|
|
TABLE is the considered table. INFO is a plist used as
|
|
|
|
|
a communication channel."
|
2022-06-26 10:25:00 -04:00
|
|
|
|
(or (org-export-read-attribute :attr_latex table :align)
|
|
|
|
|
(let* ((count
|
|
|
|
|
;; Count the number of cells in the first row.
|
|
|
|
|
(length
|
|
|
|
|
(org-element-map
|
|
|
|
|
(org-element-map table 'table-row
|
|
|
|
|
(lambda (row)
|
|
|
|
|
(and (eq (org-element-property :type row)
|
|
|
|
|
'standard)
|
|
|
|
|
row))
|
|
|
|
|
info 'first-match)
|
|
|
|
|
'table-cell #'identity)))
|
|
|
|
|
;; Calculate the column width, using a proportion of
|
|
|
|
|
;; the document's textwidth.
|
|
|
|
|
(separator
|
|
|
|
|
(format "\\hspace{%s\\textwidth} \\= "
|
|
|
|
|
(- (/ 1.0 count) 0.01))))
|
|
|
|
|
(concat (apply 'concat (make-list count separator))
|
|
|
|
|
"\\kill"))))
|
2022-06-20 09:56:14 -04:00
|
|
|
|
|
2018-11-30 12:43:30 -05:00
|
|
|
|
(defun org-latex--decorate-table (table attributes caption above? info)
|
|
|
|
|
"Decorate TABLE string with caption and float environment.
|
|
|
|
|
|
2021-05-15 09:20:35 -04:00
|
|
|
|
ATTRIBUTES is the plist containing LaTeX attributes. CAPTION is
|
|
|
|
|
its caption, as a string or nil. It is located above the table
|
|
|
|
|
if ABOVE? is non-nil. INFO is the plist containing current
|
2019-01-24 08:47:04 -05:00
|
|
|
|
export parameters.
|
2018-11-30 12:43:30 -05:00
|
|
|
|
|
|
|
|
|
Return new environment, as a string."
|
|
|
|
|
(let* ((float-environment
|
|
|
|
|
(let ((float (plist-get attributes :float)))
|
|
|
|
|
(cond ((and (not float) (plist-member attributes :float)) nil)
|
|
|
|
|
((member float '("sidewaystable" "sideways")) "sidewaystable")
|
|
|
|
|
((equal float "multicolumn") "table*")
|
2022-02-16 14:27:38 -05:00
|
|
|
|
((string= float "t") "table")
|
2021-05-15 09:20:35 -04:00
|
|
|
|
(float float)
|
|
|
|
|
((org-string-nw-p caption) "table")
|
2018-11-30 12:43:30 -05:00
|
|
|
|
(t nil))))
|
|
|
|
|
(placement
|
|
|
|
|
(or (plist-get attributes :placement)
|
|
|
|
|
(format "[%s]" (plist-get info :latex-default-figure-position))))
|
|
|
|
|
(center? (if (plist-member attributes :center)
|
|
|
|
|
(plist-get attributes :center)
|
|
|
|
|
(plist-get info :latex-tables-centered)))
|
|
|
|
|
(fontsize (let ((font (plist-get attributes :font)))
|
|
|
|
|
(and font (concat font "\n")))))
|
|
|
|
|
(concat (cond
|
|
|
|
|
(float-environment
|
|
|
|
|
(concat (format "\\begin{%s}%s\n" float-environment placement)
|
|
|
|
|
(if above? caption "")
|
|
|
|
|
(when center? "\\centering\n")
|
|
|
|
|
fontsize))
|
|
|
|
|
(caption
|
|
|
|
|
(concat (and center? "\\begin{center}\n" )
|
|
|
|
|
(if above? caption "")
|
|
|
|
|
(cond ((and fontsize center?) fontsize)
|
|
|
|
|
(fontsize (concat "{" fontsize))
|
|
|
|
|
(t nil))))
|
|
|
|
|
(center? (concat "\\begin{center}\n" fontsize))
|
|
|
|
|
(fontsize (concat "{" fontsize)))
|
|
|
|
|
table
|
|
|
|
|
(cond
|
|
|
|
|
(float-environment
|
|
|
|
|
(concat (if above? "" (concat "\n" caption))
|
|
|
|
|
(format "\n\\end{%s}" float-environment)))
|
|
|
|
|
(caption
|
|
|
|
|
(concat (if above? "" (concat "\n" caption))
|
|
|
|
|
(and center? "\n\\end{center}")
|
|
|
|
|
(and fontsize (not center?) "}")))
|
|
|
|
|
(center? "\n\\end{center}")
|
|
|
|
|
(fontsize "}")))))
|
|
|
|
|
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(defun org-latex--org-table (table contents info)
|
2012-05-07 09:21:25 -04: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 17:36:51 -05:00
|
|
|
|
|
2012-05-07 09:21:25 -04: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 18:18:07 -05:00
|
|
|
|
This function assumes TABLE has `org' as its `:type' property and
|
|
|
|
|
`table' as its `:mode' attribute."
|
2018-11-30 12:43:30 -05:00
|
|
|
|
(let* ((attr (org-export-read-attribute :attr_latex table))
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(alignment (org-latex--align-string table info))
|
2021-11-06 09:50:27 -04:00
|
|
|
|
(opt (org-export-read-attribute :attr_latex table :options))
|
2013-03-08 18:58:31 -05:00
|
|
|
|
(table-env (or (plist-get attr :environment)
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(plist-get info :latex-default-table-environment)))
|
2018-11-30 12:43:30 -05:00
|
|
|
|
(width
|
|
|
|
|
(let ((w (plist-get attr :width)))
|
|
|
|
|
(cond ((not w) "")
|
|
|
|
|
((member table-env '("tabular" "longtable")) "")
|
|
|
|
|
((member table-env '("tabu" "longtabu"))
|
|
|
|
|
(format (if (plist-get attr :spread) " spread %s "
|
|
|
|
|
" to %s ")
|
|
|
|
|
w))
|
|
|
|
|
(t (format "{%s}" w)))))
|
|
|
|
|
(caption (org-latex--caption/label-string table info))
|
|
|
|
|
(above? (org-latex--caption-above-p table info)))
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
(cond
|
2018-11-30 12:43:30 -05:00
|
|
|
|
((member table-env '("longtable" "longtabu"))
|
|
|
|
|
(let ((fontsize (let ((font (plist-get attr :font)))
|
|
|
|
|
(and font (concat font "\n")))))
|
|
|
|
|
(concat (and fontsize (concat "{" fontsize))
|
|
|
|
|
(format "\\begin{%s}%s{%s}\n" table-env width alignment)
|
|
|
|
|
(and above?
|
|
|
|
|
(org-string-nw-p caption)
|
2022-10-07 04:24:32 -04:00
|
|
|
|
(concat caption org-latex-line-break-safe "\n"))
|
2018-11-30 12:43:30 -05:00
|
|
|
|
contents
|
|
|
|
|
(and (not above?)
|
|
|
|
|
(org-string-nw-p caption)
|
2022-10-07 04:24:32 -04:00
|
|
|
|
(concat caption org-latex-line-break-safe "\n"))
|
2018-11-30 12:43:30 -05:00
|
|
|
|
(format "\\end{%s}" table-env)
|
|
|
|
|
(and fontsize "}"))))
|
|
|
|
|
(t
|
2021-11-06 09:50:27 -04:00
|
|
|
|
(let ((output (format "\\begin{%s}%s%s{%s}\n%s\\end{%s}"
|
2018-11-30 12:43:30 -05:00
|
|
|
|
table-env
|
2021-11-06 09:50:27 -04:00
|
|
|
|
(if opt (format "[%s]" opt) "")
|
2018-11-30 12:43:30 -05:00
|
|
|
|
width
|
|
|
|
|
alignment
|
|
|
|
|
contents
|
|
|
|
|
table-env)))
|
|
|
|
|
(org-latex--decorate-table output attr caption above? 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 17:36:51 -05:00
|
|
|
|
|
2022-06-20 09:56:14 -04:00
|
|
|
|
|
2022-06-26 10:25:00 -04:00
|
|
|
|
(defun org-table--org-tabbing (table contents info)
|
|
|
|
|
"Return tabbing environment LaTeX code for Org table.
|
2022-06-20 09:56:14 -04: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.
|
2022-06-26 10:25:00 -04:00
|
|
|
|
|
2022-06-20 09:56:14 -04:00
|
|
|
|
This function assumes TABLE has `org' as its `:type' property and
|
|
|
|
|
`tabbing' as its `:mode' attribute."
|
2022-06-26 10:25:00 -04:00
|
|
|
|
(format "\\begin{%s}\n%s\n%s\\end{%s}"
|
|
|
|
|
"tabbing"
|
|
|
|
|
(org-latex--align-string-tabbing table info)
|
|
|
|
|
contents
|
|
|
|
|
"tabbing"))
|
2022-06-20 09:56:14 -04:00
|
|
|
|
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(defun org-latex--table.el-table (table info)
|
2012-05-07 09:21:25 -04:00
|
|
|
|
"Return appropriate LaTeX code for a table.el table.
|
|
|
|
|
|
2012-11-20 18:18:07 -05:00
|
|
|
|
TABLE is the table type element to transcode. INFO is a plist
|
|
|
|
|
used as a communication channel.
|
2012-05-07 09:21:25 -04:00
|
|
|
|
|
|
|
|
|
This function assumes TABLE has `table.el' as its `:type'
|
2012-11-20 18:18:07 -05:00
|
|
|
|
property."
|
2012-05-07 09:21:25 -04:00
|
|
|
|
(require 'table)
|
|
|
|
|
;; Ensure "*org-export-table*" buffer is empty.
|
|
|
|
|
(with-current-buffer (get-buffer-create "*org-export-table*")
|
|
|
|
|
(erase-buffer))
|
2018-11-30 12:43:30 -05:00
|
|
|
|
(let ((output
|
|
|
|
|
(replace-regexp-in-string
|
|
|
|
|
"^%.*\n" "" ;remove comments
|
|
|
|
|
(with-temp-buffer
|
|
|
|
|
(save-excursion (insert (org-element-property :value table)))
|
|
|
|
|
(re-search-forward "^[ \t]*|[^|]" nil t)
|
|
|
|
|
(table-generate-source 'latex "*org-export-table*")
|
|
|
|
|
(with-current-buffer "*org-export-table*"
|
|
|
|
|
(org-trim (buffer-string))))
|
|
|
|
|
t t)))
|
2012-05-07 09:21:25 -04:00
|
|
|
|
(kill-buffer (get-buffer "*org-export-table*"))
|
2018-11-30 12:43:30 -05:00
|
|
|
|
(let ((attr (org-export-read-attribute :attr_latex table))
|
|
|
|
|
(caption (org-latex--caption/label-string table info))
|
|
|
|
|
(above? (org-latex--caption-above-p table info)))
|
2012-11-21 11:31:32 -05:00
|
|
|
|
(when (plist-get attr :rmlines)
|
|
|
|
|
;; When the "rmlines" attribute is provided, remove all hlines
|
2019-09-20 18:27:53 -04:00
|
|
|
|
;; but the one separating heading from the table body.
|
2012-11-21 11:31:32 -05:00
|
|
|
|
(let ((n 0) (pos 0))
|
|
|
|
|
(while (and (< (length output) pos)
|
|
|
|
|
(setq pos (string-match "^\\\\hline\n?" output pos)))
|
2016-05-26 05:03:11 -04:00
|
|
|
|
(cl-incf n)
|
2012-11-21 11:31:32 -05:00
|
|
|
|
(unless (= n 2) (setq output (replace-match "" nil nil output))))))
|
2018-11-30 12:43:30 -05:00
|
|
|
|
(org-latex--decorate-table output attr caption above? info))))
|
2012-11-20 18:18:07 -05:00
|
|
|
|
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(defun org-latex--math-table (table info)
|
2012-11-20 18:18:07 -05: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
|
2014-10-17 11:16:28 -04:00
|
|
|
|
`inline-math' or `math' as its `:mode' attribute."
|
|
|
|
|
(let* ((attr (org-export-read-attribute :attr_latex table))
|
2013-03-08 18:58:31 -05:00
|
|
|
|
(env (or (plist-get attr :environment)
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(plist-get info :latex-default-table-environment)))
|
2012-11-20 18:18:07 -05:00
|
|
|
|
(contents
|
|
|
|
|
(mapconcat
|
|
|
|
|
(lambda (row)
|
2016-11-06 17:29:12 -05:00
|
|
|
|
(if (eq (org-element-property :type row) 'rule) "\\hline"
|
2012-11-20 18:18:07 -05:00
|
|
|
|
;; Return each cell unmodified.
|
|
|
|
|
(concat
|
|
|
|
|
(mapconcat
|
|
|
|
|
(lambda (cell)
|
2015-02-09 06:02:16 -05:00
|
|
|
|
(substring (org-element-interpret-data cell) 0 -1))
|
2014-10-17 11:16:28 -04:00
|
|
|
|
(org-element-map row 'table-cell #'identity info) "&")
|
2022-10-07 04:24:32 -04:00
|
|
|
|
(or (cdr (assoc env org-latex-table-matrix-macros)) org-latex-line-break-safe)
|
2012-11-20 18:18:07 -05:00
|
|
|
|
"\n")))
|
2014-10-17 11:16:28 -04:00
|
|
|
|
(org-element-map table 'table-row #'identity info) "")))
|
2012-11-20 18:18:07 -05:00
|
|
|
|
(concat
|
2013-03-08 18:58:31 -05:00
|
|
|
|
;; Prefix.
|
2014-10-17 11:16:28 -04:00
|
|
|
|
(plist-get attr :math-prefix)
|
2012-11-20 18:18:07 -05:00
|
|
|
|
;; Environment. Also treat special cases.
|
2014-10-18 04:16:04 -04:00
|
|
|
|
(cond ((member env '("array" "tabular"))
|
2017-03-27 07:43:49 -04:00
|
|
|
|
(format "\\begin{%s}{%s}\n%s\\end{%s}"
|
|
|
|
|
env (org-latex--align-string table info t) contents env))
|
2013-01-27 17:11:34 -05:00
|
|
|
|
((assoc env org-latex-table-matrix-macros)
|
2013-03-08 18:58:31 -05:00
|
|
|
|
(format "\\%s%s{\n%s}"
|
|
|
|
|
env
|
|
|
|
|
(or (plist-get attr :math-arguments) "")
|
2012-11-20 18:18:07 -05:00
|
|
|
|
contents))
|
|
|
|
|
(t (format "\\begin{%s}\n%s\\end{%s}" env contents env)))
|
2013-03-08 18:58:31 -05:00
|
|
|
|
;; Suffix.
|
2014-10-17 11:16:28 -04:00
|
|
|
|
(plist-get attr :math-suffix))))
|
2012-04-12 17:48:23 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Table Cell
|
|
|
|
|
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(defun org-latex-table-cell (table-cell contents info)
|
2012-04-12 17:48:23 -04:00
|
|
|
|
"Transcode a TABLE-CELL element from Org to LaTeX.
|
|
|
|
|
CONTENTS is the cell contents. INFO is a plist used as
|
|
|
|
|
a communication channel."
|
2022-06-27 01:30:14 -04:00
|
|
|
|
(let ((type (org-export-read-attribute
|
2023-05-18 07:35:35 -04:00
|
|
|
|
:attr_latex (org-element-lineage table-cell 'table) :mode))
|
2022-06-27 01:30:14 -04:00
|
|
|
|
(scientific-format (plist-get info :latex-table-scientific-notation)))
|
|
|
|
|
(concat
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(if (and contents
|
|
|
|
|
scientific-format
|
|
|
|
|
(string-match orgtbl-exp-regexp contents))
|
|
|
|
|
;; Use appropriate format string for scientific
|
|
|
|
|
;; notation.
|
|
|
|
|
(format scientific-format
|
|
|
|
|
(match-string 1 contents)
|
|
|
|
|
(match-string 2 contents))
|
2022-06-27 01:30:14 -04:00
|
|
|
|
contents)
|
|
|
|
|
(when (org-export-get-next-element table-cell info)
|
|
|
|
|
(if (string= type "tabbing") " \\> " " & ")))))
|
2012-04-12 17:48:23 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Table Row
|
|
|
|
|
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(defun org-latex-table-row (table-row contents info)
|
2012-04-12 17:48:23 -04: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."
|
2014-09-09 16:48:10 -04:00
|
|
|
|
(let* ((attr (org-export-read-attribute :attr_latex
|
2023-05-03 08:56:35 -04:00
|
|
|
|
(org-element-parent table-row)))
|
2014-09-09 16:48:10 -04:00
|
|
|
|
(booktabsp (if (plist-member attr :booktabs) (plist-get attr :booktabs)
|
|
|
|
|
(plist-get info :latex-tables-booktabs)))
|
|
|
|
|
(longtablep
|
|
|
|
|
(member (or (plist-get attr :environment)
|
|
|
|
|
(plist-get info :latex-default-table-environment))
|
|
|
|
|
'("longtable" "longtabu"))))
|
|
|
|
|
(if (eq (org-element-property :type table-row) 'rule)
|
|
|
|
|
(cond
|
|
|
|
|
((not booktabsp) "\\hline")
|
|
|
|
|
((not (org-export-get-previous-element table-row info)) "\\toprule")
|
|
|
|
|
((not (org-export-get-next-element table-row info)) "\\bottomrule")
|
|
|
|
|
((and longtablep
|
|
|
|
|
(org-export-table-row-ends-header-p
|
|
|
|
|
(org-export-get-previous-element table-row info) info))
|
|
|
|
|
"")
|
|
|
|
|
(t "\\midrule"))
|
2012-04-12 17:48:23 -04:00
|
|
|
|
(concat
|
|
|
|
|
;; When BOOKTABS are activated enforce top-rule even when no
|
|
|
|
|
;; hline was specifically marked.
|
2014-09-09 16:48:10 -04:00
|
|
|
|
(and booktabsp (not (org-export-get-previous-element table-row info))
|
|
|
|
|
"\\toprule\n")
|
2022-10-07 04:24:32 -04:00
|
|
|
|
contents org-latex-line-break-safe "\n"
|
2012-04-12 17:48:23 -04:00
|
|
|
|
(cond
|
2013-10-26 19:52:05 -04:00
|
|
|
|
;; Special case for long tables. Define header and footers.
|
2012-04-12 17:48:23 -04:00
|
|
|
|
((and longtablep (org-export-table-row-ends-header-p table-row info))
|
2014-09-09 16:48:10 -04:00
|
|
|
|
(let ((columns (cdr (org-export-table-dimensions
|
2023-05-18 07:35:35 -04:00
|
|
|
|
(org-element-lineage table-row 'table) info))))
|
2014-09-09 16:48:10 -04:00
|
|
|
|
(format "%s
|
2013-10-26 19:52:05 -04:00
|
|
|
|
\\endfirsthead
|
2022-10-18 23:48:26 -04:00
|
|
|
|
\\multicolumn{%d}{l}{%s} \\\\[0pt]
|
2013-10-26 19:52:05 -04:00
|
|
|
|
%s
|
2022-10-18 23:48:26 -04:00
|
|
|
|
%s \\\\[0pt]\n
|
2013-10-26 19:52:05 -04:00
|
|
|
|
%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 17:36:51 -05:00
|
|
|
|
\\endhead
|
2013-10-26 20:37:30 -04:00
|
|
|
|
%s\\multicolumn{%d}{r}{%s} \\\\
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
\\endfoot
|
|
|
|
|
\\endlastfoot"
|
2014-09-09 16:48:10 -04:00
|
|
|
|
(if booktabsp "\\midrule" "\\hline")
|
|
|
|
|
columns
|
|
|
|
|
(org-latex--translate "Continued from previous page" info)
|
|
|
|
|
(cond
|
|
|
|
|
((not (org-export-table-row-starts-header-p table-row info))
|
|
|
|
|
"")
|
|
|
|
|
(booktabsp "\\toprule\n")
|
|
|
|
|
(t "\\hline\n"))
|
|
|
|
|
contents
|
|
|
|
|
(if booktabsp "\\midrule" "\\hline")
|
|
|
|
|
(if booktabsp "\\midrule" "\\hline")
|
|
|
|
|
columns
|
|
|
|
|
(org-latex--translate "Continued on next page" info))))
|
2012-04-12 17:48:23 -04:00
|
|
|
|
;; When BOOKTABS are activated enforce bottom rule even when
|
|
|
|
|
;; no hline was specifically marked.
|
2014-09-09 16:48:10 -04:00
|
|
|
|
((and booktabsp (not (org-export-get-next-element table-row info)))
|
|
|
|
|
"\\bottomrule"))))))
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Target
|
|
|
|
|
|
2015-10-29 14:03:52 -04: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 17:36:51 -05:00
|
|
|
|
"Transcode a TARGET object from Org to LaTeX.
|
2012-03-19 16:38:12 -04:00
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual
|
|
|
|
|
information."
|
2015-04-15 15:46:57 -04:00
|
|
|
|
(format "\\label{%s}" (org-latex--label target 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 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
|
2012-04-28 20:23:09 -04: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 17:36:51 -05:00
|
|
|
|
|
2015-10-29 14:03:52 -04:00
|
|
|
|
(defun org-latex-timestamp (timestamp _contents info)
|
2012-04-28 20:23:09 -04:00
|
|
|
|
"Transcode a TIMESTAMP object from Org to LaTeX.
|
2012-03-19 16:38:12 -04:00
|
|
|
|
CONTENTS is nil. INFO is a plist holding contextual
|
|
|
|
|
information."
|
2014-08-25 08:06:21 -04:00
|
|
|
|
(let ((value (org-latex-plain-text (org-timestamp-translate timestamp) info)))
|
|
|
|
|
(format
|
|
|
|
|
(plist-get info
|
2016-05-26 05:03:11 -04:00
|
|
|
|
(cl-case (org-element-property :type timestamp)
|
2014-08-25 08:06:21 -04:00
|
|
|
|
((active active-range) :latex-active-timestamp-format)
|
|
|
|
|
((inactive inactive-range) :latex-inactive-timestamp-format)
|
|
|
|
|
(otherwise :latex-diary-timestamp-format)))
|
|
|
|
|
value)))
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05: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 12:00:50 -04:00
|
|
|
|
;;;; Underline
|
|
|
|
|
|
2015-10-29 14:03:52 -04: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 12:00:50 -04:00
|
|
|
|
"Transcode UNDERLINE from Org to LaTeX.
|
|
|
|
|
CONTENTS is the text with underline markup. INFO is a plist
|
|
|
|
|
holding contextual information."
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(org-latex--text-markup contents 'underline info))
|
org-element: Define new objects (bold, code, italic, ...)
* contrib/lisp/org-e-ascii.el (org-e-ascii-option-alist): Fix typo.
(org-e-ascii-bold, org-e-ascii-code, org-e-ascii-strike-through,
org-e-ascii-underline): New functions.
(org-e-ascii-emphasis): Remove function.
* contrib/lisp/org-e-html.el (org-e-html-text-markup-alist): Variable
renamed from `org-e-html-emphasis-alist'. Change value type.
(org-e-html-bold, org-e-html-italic, org-e-html-strike-through,
org-e-html-underline): New functions.
(org-e-html-verbatim): Update function.
(org-e-html-emphasis): Remove function.
* contrib/lisp/org-e-latex.el (org-e-latex-text-markup-alist):
Variable renamed from `org-e-latex-emphasis-alist'. Change value
type.
(org-e-latex-center-block): Fix docstring.
(org-e-latex--text-markup, org-e-latex-bold, org-e-latex-code,
org-e-latex-italic, org-e-latex-strike-through,
org-e-latex-underline): New functions.
(org-e-latex-verbatim): Update function.
(org-e-latex-emphasis): Remove function.
* contrib/lisp/org-e-odt.el (org-e-odt-bold, org-e-odt-code,
org-e-odt-italic, org-e-odt-strike-through, org-e-odt-underline):
New functions.
(org-e-odt-verbatim): Update function.
(org-e-odt-center-block): Fix docstring.
(org-e-odt-emphasis): Remove function.
* contrib/lisp/org-element.el (org-element-bold-parser):
(org-element-bold-interpreter, org-element-code-parser,
org-element-code-interpreter, org-element-italic-parser,
org-element-italic-interpreter, org-element-strike-through-parser,
org-element-strike-through-interpreter, org-element-underline-parser,
org-element-underline-interpreter): New functions.
(org-element-emphasis-parser, org-element-emphasis-interpreter):
Remove functions.
(org-element-verbatim-parser, org-element-verbatim-interpreter,
org-element-text-markup-successor): Update function.
(org-element-object-successor-alist): Add associations for new object
types.
(org-element-recursive-objects): Add `bold', `italic',
`strike-through' and `underline' as recursive types.
(org-element-object-restrictions): Add restrictions for new recursive
object types.
* contrib/lisp/org-export.el (org-export-filters-alist): Add filters
for new object types.
(org-export-with-todo-keywords): Add missing keywords.
(org-export-filter-center-block-functions,
org-export-filter-drawer-functions,
org-export-filter-dynamic-block-functions,
org-export-filter-headline-functions,
org-export-filter-inlinetask-functions,
org-export-filter-plain-list-functions,
org-export-filter-item-functions, org-export-filter-comment-functions,
org-export-filter-comment-block-functions,
org-export-filter-example-block-functions,
org-export-filter-export-block-functions,
org-export-filter-fixed-width-functions,
org-export-filter-footnote-definition-functions,
org-export-filter-horizontal-rule-functions,
org-export-filter-keyword-functions,
org-export-filter-latex-environment-functions,
org-export-filter-babel-call-functions,
org-export-filter-paragraph-functions,
org-export-filter-property-drawer-functions,
org-export-filter-quote-section-functions,
org-export-filter-quote-block-functions,
org-export-filter-section-functions,
org-export-filter-special-block-functions,
org-export-filter-src-block-functions,
org-export-filter-table-functions,
org-export-filter-table-cell-functions,
org-export-filter-table-row-functions,
org-export-filter-verse-block-functions,
org-export-filter-entity-functions,
org-export-filter-export-snippet-functions,
org-export-filter-footnote-reference-functions,
org-export-filter-inline-babel-call-functions,
org-export-filter-inline-src-block-functions,
org-export-filter-latex-fragment-functions,
org-export-filter-line-break-functions,
org-export-filter-link-functions, org-export-filter-macro-functions,
org-export-filter-radio-target-functions,
org-export-filter-statistics-cookie-functions,
org-export-filter-subscript-functions,
org-export-filter-superscript-functions,
org-export-filter-target-functions,
org-export-filter-time-stamp-functions,
org-export-filter-verbatim-functions): Fix docstring.
(org-export-filter-bold-functions, org-export-filter-code-functions,
org-export-filter-italic-functions,
org-export-filter-strike-through-functions,
org-export-filter-underline-functions): New variables.
(org-export-filter-emphasis-functions): Remove variable.
* testing/lisp/test-org-element.el: Add tests.
2012-04-28 12:00:50 -04: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 17:36:51 -05:00
|
|
|
|
;;;; Verbatim
|
|
|
|
|
|
2015-10-29 14:03:52 -04:00
|
|
|
|
(defun org-latex-verbatim (verbatim _contents info)
|
2012-03-19 16:38:12 -04:00
|
|
|
|
"Transcode a VERBATIM object from Org to LaTeX.
|
|
|
|
|
CONTENTS is nil. INFO is a plist used as a communication
|
|
|
|
|
channel."
|
ox-latex: Use options instead of hard-coded variables
* lisp/ox-latex.el (org-latex-format-inlinetask-function): Change
default value.
(org-latex-guess-inputenc, org-latex--text-markup, org-latex-template,
org-latex-clock, org-latex-drawer, org-latex-footnote-reference,
org-latex-headline, org-latex-inline-src-block, org-latex-keyword,
org-latex--inline-image, org-latex-link, org-latex-planning,
org-latex-src-block, org-latex-table, org-latex--org-table,
org-latex--table, org-latex--math-table, org-latex-table-cell,
org-latex-table-row, org-latex-timestamp, org-latex-compile,
org-latex--collect-warnings): Use options instead of hard-coded
variables.
(org-latex-format-inlinetask-default-function): New function.
(org-latex-inlinetask): Use new function.
(org-latex--text-markup): Change signature.
(org-latex-bold, org-latex-code, org-latex-italic,
org-latex-strike-through, org-latex-underline, org-latex-verbatim):
Apply signature change.
2014-07-28 08:51:08 -04:00
|
|
|
|
(org-latex--text-markup
|
|
|
|
|
(org-element-property :value verbatim) 'verbatim info))
|
EXPERIMENTAL/org-latex: LaTeX back-end for generic exporter
* EXPERIMENTAL/org-latex.el (org-latex-option-alist,
org-latex-default-class, org-latex-classes
org-latex-inputenc-alist, org-latex-date-format,
org-latex-title-command, org-latex-format-headline-function, org-latex-emphasis-alist,
org-latex-footnote-separator, org-latex-active-timestamp-format,
org-latex-inactive-timestamp-format,
org-latex-diary-timestamp-format, org-latex-image-default-option,
org-latex-default-figure-position, org-latex-inline-image-extensions,
org-latex-default-table-environment, org-latex-tables-centered,
org-latex-tables-verbatim, org-latex-table-caption-above,
org-latex-format-drawer-function,
org-latex-format-inlinetask-function, org-latex-listings, org-latex-listings-langs,
org-latex-listings-options, org-latex-minted-langs,
org-latex-minted-options, org-latex-quotes,
org-latex-custom-lang-environments): New variables.
(org-latex--caption/label-string, org-latex--guess-inputenc,
org-latex--find-verb-separator, org-latex--make-option-string,
org-latex--quotation-marks, org-latex--wrap-label,
org-latex-template, org-latex-center-block, org-latex-drawer,
org-latex-dynamic-block, org-latex-emphasis, org-latex-entity,
org-latex-example-block, org-latex-export-snippet,
org-latex-export-block, org-latex-fixed-width,
org-latex-footnote-reference, org-latex-headline,
org-latex-horizontal-rule, org-latex-inline-src-block,
org-latex-inlinetask, org-latex-item, org-latex-keyword,
org-latex-latex-environment, org-latex-latex-fragment,
org-latex-line-break, org-latex-link--inline-image, org-latex-link,
org-latex-macro, org-latex-paragraph, org-latex-plain-list,
org-latex-plain-text, org-latex-property-drawer,
org-latex-quote-block, org-latex-quote-section,
org-latex-radio-target, org-latex-special-block,
org-latex-src-block, org-latex-statistics-cookie,
org-latex-subscript, org-latex-superscript,
org-latex-table--format-string, org-latex-table--align-string,
org-latex-table, org-latex-target, org-latex-time-stamp,
org-latex-verbatim, org-latex-verse-block): New functions.
2011-11-28 17:36:51 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;; Verse Block
|
|
|
|
|
|
2013-01-27 17:11:34 -05: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 17:36:51 -05:00
|
|
|
|
"Transcode a VERSE-BLOCK element from Org to LaTeX.
|
2013-03-05 08:37:47 -05:00
|
|
|
|
CONTENTS is verse block contents. INFO is a plist holding
|
2012-04-25 16:15:29 -04:00
|
|
|
|
contextual information."
|
2021-05-15 09:44:36 -04:00
|
|
|
|
(let* ((lin (org-export-read-attribute :attr_latex verse-block :lines))
|
|
|
|
|
(latcode (org-export-read-attribute :attr_latex verse-block :latexcode))
|
|
|
|
|
(cent (org-export-read-attribute :attr_latex verse-block :center))
|
2023-08-14 15:48:58 -04:00
|
|
|
|
(lit (org-export-read-attribute :attr_latex verse-block :literal))
|
2021-05-15 09:44:36 -04:00
|
|
|
|
(attr (concat
|
2023-08-14 15:48:58 -04:00
|
|
|
|
(if cent "[\\versewidth]" "")
|
|
|
|
|
(if lin (format "\n\\poemlines{%s}" lin) "")
|
|
|
|
|
(if latcode (format "\n%s" latcode) "")))
|
2021-05-15 09:44:36 -04:00
|
|
|
|
(versewidth (org-export-read-attribute :attr_latex verse-block :versewidth))
|
|
|
|
|
(vwidth (if versewidth (format "\\settowidth{\\versewidth}{%s}\n" versewidth) ""))
|
|
|
|
|
(linreset (if lin "\n\\poemlines{0}" "")))
|
|
|
|
|
(concat
|
|
|
|
|
(org-latex--wrap-label
|
|
|
|
|
verse-block
|
|
|
|
|
;; In a verse environment, add a line break to each newline
|
|
|
|
|
;; character and change each white space at beginning of a line
|
2023-08-14 15:48:58 -04:00
|
|
|
|
;; into a normal space, calculated with `\fontdimen2\font'. One
|
|
|
|
|
;; or more blank lines between lines are exported as a single
|
|
|
|
|
;; blank line. If the `:lines' attribute is used, the last
|
|
|
|
|
;; verse of each stanza ends with the string `\\!', according to
|
|
|
|
|
;; the syntax of the `verse' package. The separation between
|
|
|
|
|
;; stanzas can be controlled with the length `\stanzaskip', of
|
|
|
|
|
;; the aforementioned package. If the `:literal' attribute is
|
|
|
|
|
;; used, all blank lines are preserved and exported as
|
|
|
|
|
;; `\vspace*{\baselineskip}', including the blank lines before
|
|
|
|
|
;; or after CONTENTS.
|
2021-05-15 09:44:36 -04:00
|
|
|
|
(format "%s\\begin{verse}%s\n%s\\end{verse}%s"
|
|
|
|
|
vwidth
|
|
|
|
|
attr
|
2020-12-05 04:05:46 -05:00
|
|
|
|
(replace-regexp-in-string
|
2023-08-14 15:48:58 -04:00
|
|
|
|
"^[ \t]+" (lambda (m) (format "\\hspace*{%d\\fontdimen2\\font}" (length m)))
|
2021-05-15 09:44:36 -04:00
|
|
|
|
(replace-regexp-in-string
|
2023-08-14 15:48:58 -04:00
|
|
|
|
(if (not lit)
|
|
|
|
|
(rx-to-string
|
|
|
|
|
`(seq (group ,org-latex-line-break-safe "\n")
|
|
|
|
|
(1+ (group line-start (0+ space) ,org-latex-line-break-safe "\n"))))
|
|
|
|
|
(concat "^[ \t]*" (regexp-quote org-latex-line-break-safe) "$"))
|
|
|
|
|
(if (not lit)
|
|
|
|
|
(if lin "\\\\!\n\n" "\n\n")
|
|
|
|
|
"\\vspace*{\\baselineskip}")
|
2021-05-15 09:44:36 -04:00
|
|
|
|
(replace-regexp-in-string
|
2022-10-07 04:24:32 -04:00
|
|
|
|
"\\([ \t]*\\\\\\\\\\)?[ \t]*\n"
|
|
|
|
|
(concat org-latex-line-break-safe "\n")
|
2023-08-14 15:48:58 -04:00
|
|
|
|
(if (not lit)
|
|
|
|
|
(concat (org-trim contents t) "\n")
|
|
|
|
|
contents)
|
|
|
|
|
nil t)
|
2022-10-07 04:24:32 -04:00
|
|
|
|
nil t)
|
|
|
|
|
nil t)
|
|
|
|
|
linreset)
|
2021-05-15 09:44:36 -04:00
|
|
|
|
info)
|
|
|
|
|
;; Insert footnote definitions, if any, after the environment, so
|
|
|
|
|
;; the special formatting above is not applied to them.
|
|
|
|
|
(org-latex--delayed-footnotes-definitions verse-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 17:36:51 -05:00
|
|
|
|
|
2012-03-19 16:38:12 -04:00
|
|
|
|
|
2012-10-08 08:20:56 -04:00
|
|
|
|
;;; End-user functions
|
2012-03-19 16:38:12 -04:00
|
|
|
|
|
2012-07-20 07:11:44 -04:00
|
|
|
|
;;;###autoload
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(defun org-latex-export-as-latex
|
2021-09-29 03:22:47 -04:00
|
|
|
|
(&optional async subtreep visible-only body-only ext-plist)
|
2012-07-20 07:11:44 -04: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 11:24:19 -05: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 07:11:44 -04: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 17:11:34 -05:00
|
|
|
|
Export is done in a buffer named \"*Org LATEX Export*\", which
|
2012-07-20 07:11:44 -04:00
|
|
|
|
will be displayed when `org-export-show-temporary-export-buffer'
|
|
|
|
|
is non-nil."
|
|
|
|
|
(interactive)
|
Export back-ends: Apply changes to export functions
* contrib/lisp/ox-confluence.el (org-confluence-export-as-confluence):
* contrib/lisp/ox-deck.el (org-deck-export-as-html,
org-deck-export-to-html):
* contrib/lisp/ox-freemind.el (org-freemind-export-to-freemind):
* contrib/lisp/ox-groff.el (org-groff-export-to-groff,
org-groff-export-to-pdf):
* contrib/lisp/ox-koma-letter.el (org-koma-letter-export-as-latex,
org-koma-letter-export-to-latex, org-koma-letter-export-to-pdf):
* contrib/lisp/ox-rss.el (org-rss-export-as-rss,
org-rss-export-to-rss):
* contrib/lisp/ox-s5.el (org-s5-export-as-html,
org-s5-export-to-html):
* contrib/lisp/ox-taskjuggler.el (org-taskjuggler-export):
* lisp/ob-haskell.el:
* lisp/ox-ascii.el (org-ascii-export-as-ascii,
org-ascii-export-to-ascii):
* lisp/ox-beamer.el (org-beamer-export-as-latex,
org-beamer-export-to-latex, org-beamer-export-to-pdf):
* lisp/ox-html.el (org-html-export-as-html, org-html-export-to-html):
* lisp/ox-icalendar.el (org-icalendar-export-to-ics):
* lisp/ox-latex.el (org-latex-export-as-latex,
org-latex-export-to-pdf):
* lisp/ox-man.el (org-man-export-to-man, org-man-export-to-pdf):
* lisp/ox-md.el (org-md-export-as-markdown,
org-md-export-to-markdown):
* lisp/ox-odt.el (org-odt-export-to-odt):
* lisp/ox-org.el (org-org-export-as-org, org-org-export-to-org):
* lisp/ox-publish.el (org-publish-org-to):
* lisp/ox-texinfo.el (org-texinfo-export-to-texinfo,
org-texinfo-export-to-info):
* testing/lisp/test-ob-exp.el (test-ob-exp/org-babel-exp-src-blocks/w-no-file):
2013-08-07 04:35:42 -04:00
|
|
|
|
(org-export-to-buffer 'latex "*Org LATEX Export*"
|
|
|
|
|
async subtreep visible-only body-only ext-plist (lambda () (LaTeX-mode))))
|
2012-07-20 07:11:44 -04:00
|
|
|
|
|
2013-04-06 13:09:38 -04:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun org-latex-convert-region-to-latex ()
|
2016-08-23 16:13:56 -04:00
|
|
|
|
"Assume the current region has Org syntax, and convert it to LaTeX.
|
2013-04-06 13:09:38 -04:00
|
|
|
|
This can be used in any buffer. For example, you can write an
|
2016-08-23 16:13:56 -04:00
|
|
|
|
itemized list in Org syntax in an LaTeX buffer and use this
|
2013-04-06 13:09:38 -04:00
|
|
|
|
command to convert it."
|
|
|
|
|
(interactive)
|
|
|
|
|
(org-export-replace-region-by 'latex))
|
|
|
|
|
|
2023-06-29 15:18:01 -04:00
|
|
|
|
(defalias 'org-export-region-to-latex #'org-latex-convert-region-to-latex)
|
|
|
|
|
|
2012-07-20 07:11:44 -04:00
|
|
|
|
;;;###autoload
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(defun org-latex-export-to-latex
|
2021-09-29 03:22:47 -04:00
|
|
|
|
(&optional async subtreep visible-only body-only ext-plist)
|
2012-03-19 16:38:12 -04: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 11:24:19 -05: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 16:38:12 -04: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
|
Export back-ends: Apply changes to export functions
* contrib/lisp/ox-confluence.el (org-confluence-export-as-confluence):
* contrib/lisp/ox-deck.el (org-deck-export-as-html,
org-deck-export-to-html):
* contrib/lisp/ox-freemind.el (org-freemind-export-to-freemind):
* contrib/lisp/ox-groff.el (org-groff-export-to-groff,
org-groff-export-to-pdf):
* contrib/lisp/ox-koma-letter.el (org-koma-letter-export-as-latex,
org-koma-letter-export-to-latex, org-koma-letter-export-to-pdf):
* contrib/lisp/ox-rss.el (org-rss-export-as-rss,
org-rss-export-to-rss):
* contrib/lisp/ox-s5.el (org-s5-export-as-html,
org-s5-export-to-html):
* contrib/lisp/ox-taskjuggler.el (org-taskjuggler-export):
* lisp/ob-haskell.el:
* lisp/ox-ascii.el (org-ascii-export-as-ascii,
org-ascii-export-to-ascii):
* lisp/ox-beamer.el (org-beamer-export-as-latex,
org-beamer-export-to-latex, org-beamer-export-to-pdf):
* lisp/ox-html.el (org-html-export-as-html, org-html-export-to-html):
* lisp/ox-icalendar.el (org-icalendar-export-to-ics):
* lisp/ox-latex.el (org-latex-export-as-latex,
org-latex-export-to-pdf):
* lisp/ox-man.el (org-man-export-to-man, org-man-export-to-pdf):
* lisp/ox-md.el (org-md-export-as-markdown,
org-md-export-to-markdown):
* lisp/ox-odt.el (org-odt-export-to-odt):
* lisp/ox-org.el (org-org-export-as-org, org-org-export-to-org):
* lisp/ox-publish.el (org-publish-org-to):
* lisp/ox-texinfo.el (org-texinfo-export-to-texinfo,
org-texinfo-export-to-info):
* testing/lisp/test-ob-exp.el (test-ob-exp/org-babel-exp-src-blocks/w-no-file):
2013-08-07 04:35:42 -04:00
|
|
|
|
file-local settings."
|
2012-03-19 16:38:12 -04:00
|
|
|
|
(interactive)
|
2012-11-29 15:52:43 -05:00
|
|
|
|
(let ((outfile (org-export-output-file-name ".tex" subtreep)))
|
Export back-ends: Apply changes to export functions
* contrib/lisp/ox-confluence.el (org-confluence-export-as-confluence):
* contrib/lisp/ox-deck.el (org-deck-export-as-html,
org-deck-export-to-html):
* contrib/lisp/ox-freemind.el (org-freemind-export-to-freemind):
* contrib/lisp/ox-groff.el (org-groff-export-to-groff,
org-groff-export-to-pdf):
* contrib/lisp/ox-koma-letter.el (org-koma-letter-export-as-latex,
org-koma-letter-export-to-latex, org-koma-letter-export-to-pdf):
* contrib/lisp/ox-rss.el (org-rss-export-as-rss,
org-rss-export-to-rss):
* contrib/lisp/ox-s5.el (org-s5-export-as-html,
org-s5-export-to-html):
* contrib/lisp/ox-taskjuggler.el (org-taskjuggler-export):
* lisp/ob-haskell.el:
* lisp/ox-ascii.el (org-ascii-export-as-ascii,
org-ascii-export-to-ascii):
* lisp/ox-beamer.el (org-beamer-export-as-latex,
org-beamer-export-to-latex, org-beamer-export-to-pdf):
* lisp/ox-html.el (org-html-export-as-html, org-html-export-to-html):
* lisp/ox-icalendar.el (org-icalendar-export-to-ics):
* lisp/ox-latex.el (org-latex-export-as-latex,
org-latex-export-to-pdf):
* lisp/ox-man.el (org-man-export-to-man, org-man-export-to-pdf):
* lisp/ox-md.el (org-md-export-as-markdown,
org-md-export-to-markdown):
* lisp/ox-odt.el (org-odt-export-to-odt):
* lisp/ox-org.el (org-org-export-as-org, org-org-export-to-org):
* lisp/ox-publish.el (org-publish-org-to):
* lisp/ox-texinfo.el (org-texinfo-export-to-texinfo,
org-texinfo-export-to-info):
* testing/lisp/test-ob-exp.el (test-ob-exp/org-babel-exp-src-blocks/w-no-file):
2013-08-07 04:35:42 -04:00
|
|
|
|
(org-export-to-file 'latex outfile
|
|
|
|
|
async subtreep visible-only body-only ext-plist)))
|
2012-03-19 16:38:12 -04:00
|
|
|
|
|
2012-07-20 07:11:44 -04:00
|
|
|
|
;;;###autoload
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(defun org-latex-export-to-pdf
|
2021-09-29 03:22:47 -04:00
|
|
|
|
(&optional async subtreep visible-only body-only ext-plist)
|
2012-03-19 16:38:12 -04: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 11:24:19 -05: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 16:38:12 -04: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)
|
Export back-ends: Apply changes to export functions
* contrib/lisp/ox-confluence.el (org-confluence-export-as-confluence):
* contrib/lisp/ox-deck.el (org-deck-export-as-html,
org-deck-export-to-html):
* contrib/lisp/ox-freemind.el (org-freemind-export-to-freemind):
* contrib/lisp/ox-groff.el (org-groff-export-to-groff,
org-groff-export-to-pdf):
* contrib/lisp/ox-koma-letter.el (org-koma-letter-export-as-latex,
org-koma-letter-export-to-latex, org-koma-letter-export-to-pdf):
* contrib/lisp/ox-rss.el (org-rss-export-as-rss,
org-rss-export-to-rss):
* contrib/lisp/ox-s5.el (org-s5-export-as-html,
org-s5-export-to-html):
* contrib/lisp/ox-taskjuggler.el (org-taskjuggler-export):
* lisp/ob-haskell.el:
* lisp/ox-ascii.el (org-ascii-export-as-ascii,
org-ascii-export-to-ascii):
* lisp/ox-beamer.el (org-beamer-export-as-latex,
org-beamer-export-to-latex, org-beamer-export-to-pdf):
* lisp/ox-html.el (org-html-export-as-html, org-html-export-to-html):
* lisp/ox-icalendar.el (org-icalendar-export-to-ics):
* lisp/ox-latex.el (org-latex-export-as-latex,
org-latex-export-to-pdf):
* lisp/ox-man.el (org-man-export-to-man, org-man-export-to-pdf):
* lisp/ox-md.el (org-md-export-as-markdown,
org-md-export-to-markdown):
* lisp/ox-odt.el (org-odt-export-to-odt):
* lisp/ox-org.el (org-org-export-as-org, org-org-export-to-org):
* lisp/ox-publish.el (org-publish-org-to):
* lisp/ox-texinfo.el (org-texinfo-export-to-texinfo,
org-texinfo-export-to-info):
* testing/lisp/test-ob-exp.el (test-ob-exp/org-babel-exp-src-blocks/w-no-file):
2013-08-07 04:35:42 -04:00
|
|
|
|
(let ((outfile (org-export-output-file-name ".tex" subtreep)))
|
|
|
|
|
(org-export-to-file 'latex outfile
|
|
|
|
|
async subtreep visible-only body-only ext-plist
|
2021-11-28 14:44:22 -05:00
|
|
|
|
#'org-latex-compile)))
|
2012-03-19 16:38:12 -04:00
|
|
|
|
|
2013-02-26 03:28:59 -05:00
|
|
|
|
(defun org-latex-compile (texfile &optional snippet)
|
2012-03-19 16:38:12 -04:00
|
|
|
|
"Compile a TeX file.
|
|
|
|
|
|
|
|
|
|
TEXFILE is the name of the file being compiled. Processing is
|
2016-05-17 17:37:18 -04:00
|
|
|
|
done through the command specified in `org-latex-pdf-process',
|
|
|
|
|
which see. Output is redirected to \"*Org PDF LaTeX Output*\"
|
|
|
|
|
buffer.
|
2012-03-19 16:38:12 -04:00
|
|
|
|
|
2013-02-26 03:28:59 -05:00
|
|
|
|
When optional argument SNIPPET is non-nil, TEXFILE is a temporary
|
|
|
|
|
file used to preview a LaTeX snippet. In this case, do not
|
2016-05-17 17:37:18 -04:00
|
|
|
|
create a log buffer and do not remove log files.
|
|
|
|
|
|
|
|
|
|
Return PDF file name or raise an error if it couldn't be
|
|
|
|
|
produced."
|
|
|
|
|
(unless snippet (message "Processing LaTeX file %s..." texfile))
|
|
|
|
|
(let* ((compiler
|
|
|
|
|
(or (with-temp-buffer
|
|
|
|
|
(save-excursion (insert-file-contents texfile))
|
|
|
|
|
(and (search-forward-regexp (regexp-opt org-latex-compilers)
|
|
|
|
|
(line-end-position 2)
|
|
|
|
|
t)
|
2023-05-10 09:27:13 -04:00
|
|
|
|
(progn (forward-line 0) (eq (char-after) ?%))
|
2016-05-17 17:37:18 -04:00
|
|
|
|
(match-string 0)))
|
2022-05-21 23:43:38 -04:00
|
|
|
|
;; Cannot find the compiler inserted by
|
|
|
|
|
;; `org-latex-template' -> `org-latex--insert-compiler'.
|
|
|
|
|
;; Use a fallback.
|
2022-12-24 06:36:20 -05:00
|
|
|
|
org-latex-compiler))
|
2016-05-17 17:37:18 -04:00
|
|
|
|
(process (if (functionp org-latex-pdf-process) org-latex-pdf-process
|
2021-01-15 10:47:39 -05:00
|
|
|
|
;; Replace "%latex" with "%L" and "%bib" and
|
|
|
|
|
;; "%bibtex" with "%B" to adhere to `format-spec'
|
|
|
|
|
;; specifications.
|
2016-05-17 17:37:18 -04:00
|
|
|
|
(mapcar (lambda (command)
|
|
|
|
|
(replace-regexp-in-string
|
2021-01-15 10:47:39 -05:00
|
|
|
|
"%\\(?:\\(?:bib\\|la\\)tex\\|bib\\)\\>"
|
2016-05-17 17:37:18 -04:00
|
|
|
|
(lambda (m) (upcase (substring m 0 2)))
|
|
|
|
|
command))
|
|
|
|
|
org-latex-pdf-process)))
|
|
|
|
|
(spec `((?B . ,(shell-quote-argument org-latex-bib-compiler))
|
|
|
|
|
(?L . ,(shell-quote-argument compiler))))
|
|
|
|
|
(log-buf-name "*Org PDF LaTeX Output*")
|
|
|
|
|
(log-buf (and (not snippet) (get-buffer-create log-buf-name)))
|
2023-04-30 04:14:13 -04:00
|
|
|
|
outfile)
|
|
|
|
|
;; Erase compile buffer at the start.
|
2022-12-24 11:59:21 -05:00
|
|
|
|
(with-current-buffer log-buf
|
|
|
|
|
(erase-buffer))
|
2023-04-30 04:14:13 -04:00
|
|
|
|
(setq outfile
|
|
|
|
|
(org-compile-file
|
|
|
|
|
texfile process "pdf"
|
|
|
|
|
(format "See %S for details" log-buf-name)
|
|
|
|
|
log-buf spec))
|
2022-12-24 11:57:59 -05:00
|
|
|
|
(org-latex-compile--postprocess outfile log-buf snippet)
|
2016-05-17 17:37:18 -04:00
|
|
|
|
;; Return output file name.
|
|
|
|
|
outfile))
|
2012-03-19 16:38:12 -04:00
|
|
|
|
|
2022-12-24 11:57:59 -05:00
|
|
|
|
(defun org-latex-compile--postprocess (outfile log-buf &optional snippet)
|
|
|
|
|
"Process the results of creating OUTFILE via LaTeX compilation.
|
|
|
|
|
Warnings and errors are collected from LOG-BUF.
|
|
|
|
|
When SNIPPET is nil and `org-latex-remove-logfiles' non-nil,
|
|
|
|
|
log files (as specified by `org-latex-logfiles-extensions') are deleted."
|
|
|
|
|
(unless snippet
|
|
|
|
|
(when org-latex-remove-logfiles
|
|
|
|
|
(mapc #'delete-file
|
|
|
|
|
(directory-files
|
2023-08-15 06:13:44 -04:00
|
|
|
|
(or (file-name-directory outfile) default-directory)
|
2022-12-24 11:57:59 -05:00
|
|
|
|
t
|
|
|
|
|
(concat (regexp-quote (file-name-base outfile))
|
|
|
|
|
"\\(?:\\.[0-9]+\\)?\\."
|
|
|
|
|
(regexp-opt org-latex-logfiles-extensions))
|
|
|
|
|
t)))
|
|
|
|
|
(let ((warnings (org-latex--collect-warnings log-buf)))
|
|
|
|
|
(message (concat "PDF file produced"
|
|
|
|
|
(cond
|
|
|
|
|
((eq warnings 'error) " with errors.")
|
|
|
|
|
(warnings (concat " with warnings: " warnings))
|
|
|
|
|
(t ".")))))))
|
|
|
|
|
|
2014-03-29 16:56:43 -04:00
|
|
|
|
(defun org-latex--collect-warnings (buffer)
|
|
|
|
|
"Collect some warnings from \"pdflatex\" command output.
|
|
|
|
|
BUFFER is the buffer containing output. Return collected
|
|
|
|
|
warnings types as a string, `error' if a LaTeX error was
|
|
|
|
|
encountered or nil if there was none."
|
2012-03-19 16:38:12 -04:00
|
|
|
|
(with-current-buffer buffer
|
|
|
|
|
(save-excursion
|
|
|
|
|
(goto-char (point-max))
|
2012-09-15 08:58:49 -04:00
|
|
|
|
(when (re-search-backward "^[ \t]*This is .*?TeX.*?Version" nil t)
|
2014-03-29 16:56:43 -04:00
|
|
|
|
(if (re-search-forward "^!" nil t) 'error
|
|
|
|
|
(let ((case-fold-search t)
|
|
|
|
|
(warnings ""))
|
2014-07-28 09:14:53 -04:00
|
|
|
|
(dolist (warning org-latex-known-warnings)
|
2014-08-25 08:06:21 -04:00
|
|
|
|
(when (save-excursion (re-search-forward (car warning) nil t))
|
|
|
|
|
(setq warnings (concat warnings " " (cdr warning)))))
|
|
|
|
|
(org-string-nw-p (org-trim warnings))))))))
|
2012-03-19 16:38:12 -04:00
|
|
|
|
|
2012-10-08 08:20:56 -04:00
|
|
|
|
;;;###autoload
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(defun org-latex-publish-to-latex (plist filename pub-dir)
|
2012-10-08 08:20:56 -04: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 17:11:34 -05:00
|
|
|
|
(org-publish-org-to 'latex filename ".tex" plist pub-dir))
|
2012-10-08 08:20:56 -04:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(defun org-latex-publish-to-pdf (plist filename pub-dir)
|
2012-10-08 08:20:56 -04: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 17:11:34 -05:00
|
|
|
|
;; Unlike to `org-latex-publish-to-latex', PDF file is generated
|
2012-10-08 08:20:56 -04:00
|
|
|
|
;; in working directory and then moved to publishing directory.
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(org-publish-attachment
|
2012-10-08 08:20:56 -04:00
|
|
|
|
plist
|
2017-03-08 03:33:09 -05:00
|
|
|
|
;; Default directory could be anywhere when this function is
|
|
|
|
|
;; called. We ensure it is set to source file directory during
|
|
|
|
|
;; compilation so as to not break links to external documents.
|
|
|
|
|
(let ((default-directory (file-name-directory filename)))
|
|
|
|
|
(org-latex-compile
|
|
|
|
|
(org-publish-org-to
|
|
|
|
|
'latex filename ".tex" plist (file-name-directory filename))))
|
2012-10-08 08:20:56 -04:00
|
|
|
|
pub-dir))
|
|
|
|
|
|
2012-03-19 16:38:12 -04:00
|
|
|
|
|
2013-01-27 17:11:34 -05:00
|
|
|
|
(provide 'ox-latex)
|
|
|
|
|
|
|
|
|
|
;; Local variables:
|
|
|
|
|
;; generated-autoload-file: "org-loaddefs.el"
|
|
|
|
|
;; End:
|
|
|
|
|
|
|
|
|
|
;;; ox-latex.el ends here
|