;;; ox.el --- Generic Export Engine for Org Mode
-;; Copyright (C) 2012-2013 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2014 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <n.goaziou at gmail dot com>
;; Keywords: outlines, hypermedia, calendar, wp
"Alist between export properties and ways to set them.
The CAR of the alist is the property name, and the CDR is a list
-like (KEYWORD OPTION DEFAULT BEHAVIOUR) where:
+like (KEYWORD OPTION DEFAULT BEHAVIOR) where:
KEYWORD is a string representing a buffer keyword, or nil. Each
property defined this way can also be set, during subtree
property).
OPTION is a string that could be found in an #+OPTIONS: line.
DEFAULT is the default value for the property.
-BEHAVIOUR determines how Org should handle multiple keywords for
+BEHAVIOR determines how Org should handle multiple keywords for
the same property. It is a symbol among:
nil Keep old value and discard the new one.
t Replace old value with the new one.
:group 'org-export-general
:type '(choice
(const :tag "No creator sentence" nil)
- (const :tag "Sentence as a comment" 'comment)
+ (const :tag "Sentence as a comment" comment)
(const :tag "Insert the sentence" t)))
(defcustom org-export-with-date t
(defcustom org-export-with-sub-superscripts t
"Non-nil means interpret \"_\" and \"^\" for export.
+If you want to control how Org displays those characters, see
+`org-use-sub-superscripts'. `org-export-with-sub-superscripts'
+used to be an alias for `org-use-sub-superscripts' in Org <8.0,
+it is not anymore.
+
When this option is turned on, you can use TeX-like syntax for
-sub- and superscripts. Several characters after \"_\" or \"^\"
-will be considered as a single item - so grouping with {} is
-normally not needed. For example, the following things will be
-parsed as single sub- or superscripts.
+sub- and superscripts and see them exported correctly.
+
+You can also set the option with #+OPTIONS: ^:t
+
+Several characters after \"_\" or \"^\" will be considered as a
+single item - so grouping with {} is normally not needed. For
+example, the following things will be parsed as single sub- or
+superscripts:
10^24 or 10^tau several digits will be considered 1 item.
10^-12 or 10^-tau a leading sign with digits or a word
terminated by almost any nonword/nondigit char.
x_{i^2} or x^(2-i) braces or parenthesis do grouping.
-Still, ambiguity is possible - so when in doubt use {} to enclose
-the sub/superscript. If you set this variable to the symbol
-`{}', the braces are *required* in order to trigger
-interpretations as sub/superscript. This can be helpful in
-documents that need \"_\" frequently in plain text.
-
-This option can also be set with the OPTIONS keyword,
-e.g. \"^:nil\"."
+Still, ambiguity is possible. So when in doubt, use {} to enclose
+the sub/superscript. If you set this variable to the symbol `{}',
+the braces are *required* in order to trigger interpretations as
+sub/superscript. This can be helpful in documents that need \"_\"
+frequently in plain text."
:group 'org-export-general
+ :version "24.4"
+ :package-version '(Org . "8.0")
:type '(choice
(const :tag "Interpret them" t)
(const :tag "Curly brackets only" {})
:type 'coding-system)
(defcustom org-export-copy-to-kill-ring 'if-interactive
- "Should we push exported content to the kill ring?"
+ "Non-nil means pushing export output to the kill ring.
+This variable is ignored during asynchronous export."
:group 'org-export-general
:version "24.3"
:type '(choice
;; Make sure point is at a heading.
(if (org-at-heading-p) (org-up-heading-safe) (org-back-to-heading t))
;; Take care of EXPORT_TITLE. If it isn't defined, use headline's
- ;; title as its fallback value.
+ ;; title (with no todo keyword, priority cookie or tag) as its
+ ;; fallback value.
(when (setq prop (or (org-entry-get (point) "EXPORT_TITLE")
- (progn (looking-at org-todo-line-regexp)
- (org-match-string-no-properties 3))))
+ (progn (looking-at org-complex-heading-regexp)
+ (org-match-string-no-properties 4))))
(setq plist
(plist-put
plist :title
((member keyword org-element-document-properties)
(org-element-parse-secondary-string
value (org-element-restriction 'keyword)))
- ;; If BEHAVIOUR is `split' expected value is
+ ;; If BEHAVIOR is `split' expected value is
;; a list of strings, not a string.
((eq (nth 4 option) 'split) (org-split-string value))
(t value)))))))))
(plist-put
plist property
;; Handle value depending on specified
- ;; BEHAVIOUR.
+ ;; BEHAVIOR.
(case behaviour
(space
(if (not (plist-get plist property))
;; Populate OPTIONS and KEYWORDS.
(dolist (entry (cond ((eq backend 'default) org-export-options-alist)
((org-export-backend-p backend)
- (org-export-get-all-options backend))
- (t (org-export-get-all-options
+ (org-export-backend-options backend))
+ (t (org-export-backend-options
(org-export-get-backend backend)))))
(let ((keyword (nth 1 entry))
(option (nth 2 entry)))
(defconst org-export-smart-quotes-regexps
(list
;; Possible opening quote at beginning of string.
- "\\`\\([\"']\\)\\(\\w\\|\\s.\\|\\s_\\)"
+ "\\`\\([\"']\\)\\(\\w\\|\\s.\\|\\s_\\|\\s(\\)"
;; Possible closing quote at beginning of string.
"\\`\\([\"']\\)\\(\\s-\\|\\s)\\|\\s.\\)"
;; Possible apostrophe at beginning of string.
;;;; Topology
;;
;; Here are various functions to retrieve information about the
-;; neighbourhood of a given element or object. Neighbours of interest
+;; neighborhood of a given element or object. Neighbors of interest
;; are direct parent (`org-export-get-parent'), parent headline
;; (`org-export-get-parent-headline'), first element containing an
;; object, (`org-export-get-parent-element'), parent table
a string.
A non-nil optional argument ASYNC means the process should happen
-asynchronously. The resulting buffer file then be accessible
+asynchronously. The resulting buffer will then be accessible
through the `org-export-stack' interface.
Optional arguments SUBTREEP, VISIBLE-ONLY, BODY-ONLY and