Commit Graph

442 Commits

Author SHA1 Message Date
Nicolas Goaziou 211d7aa9b2 Merge branch 'maint' 2017-03-27 13:53:05 +02:00
Nicolas Goaziou 7648354952 ox-latex: Fix user-defined align string in matrices
* lisp/ox-latex.el (org-latex--align-string): Change signature.
  Center all cells in matrices, yet preserve user-defined align
  string.
(org-latex--math-table): Apply signature change.

Reported-by: Phil Regier <phil.regier@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/112873>
2017-03-27 13:51:55 +02:00
Rasmus 9faf000e6a ox-latex: Support caption for latex-environment
* lisp/ox-latex.el (org-latex--environment-type): New function
  determining type of a latex-environment.
  (org-latex-latex-environment): Add support for caption.
  (org-latex--caption/label-string): Use correct type for non-floating
  latex-environments.
* etc/ORG-NEWS: Add entry.
2017-03-24 17:22:11 +01:00
Nicolas Goaziou 6747bf3de6 Merge branch 'maint' 2017-03-08 11:48:56 +01:00
Nicolas Goaziou 2eda74285e Fix LaTeX and Beamer publishing processes
* lisp/ox-beamer.el (org-beamer-publish-to-pdf):
* lisp/ox-latex.el (org-latex-publish-to-pdf): Set default directory
  prior to compiling the generated tex file.

Reported-by: Robert Klein <roklein@roklein.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/112388>
2017-03-08 09:33:09 +01:00
Nicolas Goaziou 0fe987e060 Merge branch 'maint' 2017-02-11 02:36:15 +01:00
Nicolas Goaziou 9070b97f0e Fix header in LaTeX snippets
* lisp/ox-latex.el (org-latex-make-preamble): Add optional argument.
* lisp/org.el (org-create-formula-image): Use it.

Reported-by: plus <ctre@users.sourceforge.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/112015>
2017-02-11 02:35:00 +01:00
Nicolas Goaziou 6b30deaae9 Merge branch 'maint' 2017-01-31 09:02:55 +01:00
Lixin Chin caa54d2e98 ox-latex.el: Wrap 'minted' src blocks in a 'listing' environment
* lisp/ox-latex.el (org-latex-src-block): Make source highlighting
  using the 'minted' syntax highlighting package behave the same as
  using the 'listings' syntax highlighting package.

The source block should be floating if a caption is provided, or if
':float t' is provided in an '#+ATTR_LATEX:' block.  Previously, the
source block would only be floating if ':float multicolumn' was
provided.  This now matches the Org mode documentation for source
blocks.

TINYCHANGE
2017-01-31 09:01:42 +01:00
Kyle Meyer 7278899697 Merge branch 'maint' 2017-01-26 00:05:29 -05:00
Kyle Meyer 7c710f6f57 Change :version in defcustoms from "25.2" to "26.1"
* lisp/ob-J.el (org-babel-J-command):
* lisp/ob-core.el (org-babel-hash-show-time):
* lisp/ob-exp.el (org-babel-exp-inline-code-template):
* lisp/ob-lisp.el (org-babel-lisp-eval-fn):
* lisp/org-agenda.el (org-agenda-view-columns-initially):
* lisp/org-attach.el (org-attach-commit):
(org-attach-archive-delete):
(org-attach-annex-auto-get):
* lisp/org-bibtex.el (org-bibtex-inherit-tags):
* lisp/org-clock.el (org-clock-into-drawer):
* lisp/org-colview.el (org-columns-summary-types):
* lisp/org-faces.el (org-block):
* lisp/org-src.el (org-src-block-faces):
* lisp/org-table.el (org-table-copy-increment):
(org-table-formula-create-columns):
(org-table-convert-region-max-lines):
* lisp/org-timer.el (org-timer-default-timer):
* lisp/org.el (org-export-backends):
(org-show-context-detail):
(org-cycle-hook):
(org-occur-case-fold-search):
(org-preview-latex-default-process):
(org-preview-latex-process-alist):
(org-preview-latex-image-directory):
(org-latex-default-packages-alist):
(org-sparse-tree-default-date-type):
(org-structure-template-alist):
(org-effort-durations):
(org-agenda-ignore-properties): Change :version from "25.2" to "26.1".
(customize-package-emacs-version-alist): Fix associations between Org
and Emacs releases.
* lisp/ox-ascii.el (org-ascii-list-margin):
* lisp/ox-beamer.el (org-beamer-subtitle-format):
* lisp/ox-html.el (org-html-format-headline-function):
(org-html-format-inlinetask-function):
(org-html-viewport):
* lisp/ox-latex.el (org-latex-caption-above):
(org-latex-prefer-user-labels):
(org-latex-subtitle-format):
(org-latex-hyperref-template):
(org-latex-footnote-defined-format):
(org-latex-images-centered):
(org-latex-default-figure-position):
(org-latex-text-markup-alist):
(org-latex-format-inlinetask-function):
(org-latex-custom-lang-environments):
(org-latex-compiler-file-string):
(org-latex-compiler):
(org-latex-bib-compiler):
(org-latex-logfiles-extensions):
(org-latex-known-warnings):
* lisp/ox-md.el (org-md-footnotes-section):
(org-md-footnote-format):
* lisp/ox-odt.el (org-odt-format-headline-function):
(org-odt-format-inlinetask-function):
(org-odt-inline-image-rules):
* lisp/ox-texinfo.el (org-texinfo-format-headline-function):
* lisp/ox.el (org-export-with-creator):
(org-export-with-title):
(org-export-with-broken-links):
(org-export-copy-to-kill-ring): Change :version from "25.2" to "26.1".

It looks like the goal is to sync Org 9.0.* (maint) with the Emacs
master branch (what will be version 26.1):
https://lists.gnu.org/archive/html/emacs-orgmode/2017-01/msg00558.html
2017-01-26 00:02:03 -05:00
Nicolas Goaziou 37bffbb347 Merge branch 'maint' 2017-01-21 11:59:12 +01:00
Nicolas Goaziou 53bc58c433 Rename `org-latex--make-preamble' into `org-latex-make-preamble'
* contrib/lisp/ox-koma-letter.el (org-koma-letter-template):
* lisp/org.el (org-create-formula-image):
* lisp/ox-beamer.el (org-beamer-template):
* lisp/ox-latex.el (org-latex-make-preamble): Renamed from
  `org-latex--make-preamble'.  Add an optional argument.  Autoload
  function.
(org-latex-template): Use new function name.
2017-01-21 11:31:25 +01:00
Nicolas Goaziou 4353deb0de Merge branch 'maint' 2017-01-18 23:36:54 +01:00
Nicolas Goaziou 35e90ced24 ox-latex: Fix insertion of line breaks at invalid locations
* lisp/ox-latex.el (org-latex-clean-invalid-line-breaks): New function.

Reported-by: Takeshi Teshima <takeshi.diadochos@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/111313>
2017-01-18 23:30:01 +01:00
Nicolas Goaziou 1faf5757e9 Merge branch 'maint' 2017-01-11 12:37:14 +01:00
Nicolas Goaziou 34f86ce6a4 ox-latex: Silence byte-compiler
* lisp/ox-latex.el (org-latex-format-headline-default-function):
(org-latex-format-inlinetask-default-function): Silence byte-compiler.
2017-01-11 12:36:49 +01:00
Nicolas Goaziou 9f96208eec Merge branch 'maint' 2017-01-11 12:20:52 +01:00
Nicolas Goaziou 3fa7903d76 ox-latex: Properly escape special characters in tags
* lisp/ox-latex.el (org-latex-format-headline-default-function):
(org-latex-format-inlinetask-default-function): Use
`org-latex--protect-text' instead of `org-latex-plain-text' to format
tags.
2017-01-11 12:20:05 +01:00
Kyle Meyer 0d3683f2cd Merge branch 'maint' 2017-01-05 20:23:58 -05:00
Kyle Meyer 713f785017 Update copyright years 2017-01-05 20:19:37 -05:00
Nicolas Goaziou 5ffb373a2c Implement `org-export-insert-image-links'
* lisp/ox.el (org-export-insert-image-links):
* lisp/ox-odt.el (org-odt--translate-image-links):
* lisp/ox-latex.el (org-latex-image-link-filter):
* lisp/ox-html.el (org-html-image-link-filter): New functions.
2016-12-17 11:36:49 +01:00
Nicolas Goaziou 3322f5edfc Merge branch 'maint' 2016-12-13 14:15:33 +01:00
Nicolas Goaziou 64a2f6e22d ox-latex: Fix typo
* lisp/ox-latex.el (org-latex--text-markup): Fix typo.
2016-12-13 14:15:07 +01:00
Nicolas Goaziou a76b000da7 Merge branch 'maint' 2016-12-13 13:48:51 +01:00
Nicolas Goaziou 8fec3d5f03 ox-latex: Fix links with special characters
* lisp/ox-latex.el (org-latex--protect-text): Properly escape special
  characters.
(org-latex--text-markup): Adapt to change above.
(org-latex-inline-src-block): Follow `org-latex-text-markup-alist'
specifications.
(org-latex-link): Escape forbidden characters in URL.
2016-12-13 13:46:38 +01:00
Nicolas Goaziou 7274786f6e Merge branch 'maint' 2016-12-13 09:13:37 +01:00
Nicolas Goaziou e491ab31c6 ox-latex: Fix nested sub/super-scripts
* lisp/ox-latex.el (org-latex--wrap-latex-math-block): Prevent merging
  multiple sub/super-scripts at the same level.  Nested scripts are
  allowed.
2016-12-13 09:13:22 +01:00
Kyle Meyer 53d11dc51d Merge branch 'maint' 2016-12-07 22:36:28 -05:00
Paul Eggert b7cb9b54d5 Backport commit eeecac7 from Emacs
Fix minor quoting problems in doc strings
eeecac7ab9d1f8c3a29cffe4586e5fd2414dd671
Paul Eggert
Wed Dec 7 11:31:16 2016 -0800
2016-12-07 22:33:31 -05:00
Nicolas Goaziou 47ca6c129c Merge branch 'maint' 2016-12-07 00:47:45 +01:00
Nicolas Goaziou c797cc0f87 ox-latex: Do not generate nested sub/superscripts
* lisp/ox-latex.el (org-latex--wrap-latex-math-block): Do not wrap
  consecutive sub or super-scripts within the same block.

Reported-by: Scott Otterson <scotto@sharpleaf.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/110589>
2016-12-07 00:45:52 +01:00
Nicolas Goaziou 8165eb9156 Merge branch 'maint' 2016-11-27 12:09:23 +01:00
Nicolas Goaziou 289363d510 Fix LaTeX preview
* lisp/org.el (org-compile-file): Introduce new %O placeholder.
(org-preview-latex-process-alist): Use it.

* lisp/ox-latex.el (org-latex-pdf-process):
* lisp/ox-man.el (org-man-pdf-process):
* lisp/ox-texinfo.el (org-texinfo-info-process): Document it.

Reported-by: Scott Otterson <scotto@sharpleaf.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/110464>
2016-11-27 12:07:11 +01:00
Nicolas Goaziou 8bf0d32aed Merge branch 'maint' 2016-11-25 12:23:24 +01:00
Nicolas Goaziou 2e35a59763 ox-latex: Fix error when compiling in a different than source file
* lisp/ox-latex.el (org-latex-compile): List logfiles with their full
  name instead of relative ones.

Reported-by: Éric Würbel <eric.wurbel@univ-amu.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/110402>
2016-11-25 12:22:54 +01:00
Nicolas Goaziou 52387021dc Merge branch 'maint' 2016-11-09 18:43:36 +01:00
Nicolas Goaziou 1f87273fd2 ox-latex: Fix temporary files removal when compiling files
* lisp/ox-latex.el (org-latex-compile): Assume temporary files are
  located in the output directory.

This partly reverts 120f8c0.
2016-11-09 18:42:29 +01:00
Nicolas Goaziou c9e0a52a99 Merge branch 'maint' 2016-11-08 18:25:08 +01:00
Nicolas Goaziou ae68bc516d ox-latex: Fix texi2dvi command
* lisp/ox-latex.el (org-latex-pdf-process): Handle cases where tex file
  is not located in default-directory.
2016-11-08 18:24:13 +01:00
Nicolas Goaziou 09e25bd16d Merge branch 'maint' 2016-11-08 13:41:30 +01:00
Nicolas Goaziou a135f746a1 ox-latex: Fix latexmk command
* lisp/ox-latex.el (org-latex-pdf-process): Fix latexmk command.
2016-11-08 13:40:36 +01:00
Nicolas Goaziou 398ec42685 Merge branch 'maint' 2016-11-08 11:48:35 +01:00
Nicolas Goaziou 120f8c09f4 Fix file compilation in a different directory than current one
* lisp/org.el (org-compile-file): Do not set default directory.
(org-preview-latex-process-alist): Update since base-name may no be
located in current directory.
* lisp/ox-latex.el (org-latex-compile): Remove auxiliary files in
  default directory instead of ".tex" file directory.

Reported-by: Alex Fenton <alex.fenton@pressure.to>
<http://permalink.gmane.org/gmane.emacs.orgmode/110078>
2016-11-08 11:44:28 +01:00
Nicolas Goaziou 2c0d8774b4 ox-latex: Allow horizontal rules in table math mode
* lisp/ox-latex.el (org-latex--math-table): Handle horizontal rules.
* doc/org.texi (Tables in @LaTeX{} export): Update documentation.
2016-11-06 23:31:54 +01:00
Nicolas Goaziou 975260cb25 ox-latex: Add column groups back in table math mode
* lisp/ox-latex.el (org-latex--math-table): Preserve column groups.

Reported-by: Stefanos Carlström <stefanos.carlstrom@fysik.lth.se>
<http://permalink.gmane.org/gmane.emacs.orgmode/110086>
2016-11-06 23:25:06 +01:00
Nicolas Goaziou e5ca11cab8 ox-latex: Fix matrices export
* lisp/ox-latex.el (org-latex--wrap-latex-matrices): Do not add spurious
  blank lines within a matrices block.

Reported-by: thomas.stenhaug@gmail.com
<http://permalink.gmane.org/gmane.emacs.orgmode/109854>
2016-10-24 23:33:28 +02:00
Nicolas Goaziou adaf808605 ox-latex: Fix source block label with listings package
* lisp/ox-latex.el (org-latex-src-block): Properly translate label into
  Org internal reference when using "listings" package.
2016-10-18 23:10:56 +02:00
Nicolas Goaziou d907041911 Change :version in defcustoms from "25.1" to "25.2"
* lisp/ob-exp.el (org-babel-exp-inline-code-template):
* lisp/ob-lisp.el (org-babel-lisp-eval-fn):
* lisp/org-agenda.el (org-agenda-view-columns-initially):
* lisp/org-attach.el (org-attach-commit):
(org-attach-archive-delete):
(org-attach-annex-auto-get):
* lisp/org-bibtex.el (org-bibtex-inherit-tags):
* lisp/org-clock.el (org-clock-into-drawer):
* lisp/org-colview.el (org-columns-summary-types):
* lisp/org-table.el (org-table-copy-increment):
(org-table-formula-create-columns):
(org-table-convert-region-max-lines):
* lisp/org-timer.el (org-timer-default-timer):
* lisp/org.el (org-export-backends):
(org-cycle-hook):
(org-occur-case-fold-search):
(org-preview-latex-image-directory):
(org-latex-default-packages-alist):
(org-sparse-tree-default-date-type):
(org-structure-template-alist):
(org-effort-durations):
(org-agenda-ignore-properties): Change :version from "25.1" to "25.2".
(customize-package-emacs-version-alist): Fix associations between Org
and Emacs releases.
* lisp/ox-ascii.el (org-ascii-list-margin):
* lisp/ox-beamer.el (org-beamer-subtitle-format):
* lisp/ox-html.el (org-html-format-headline-function):
(org-html-format-inlinetask-function):
(org-html-viewport):
* lisp/ox-latex.el (org-latex-caption-above):
(org-latex-prefer-user-labels):
(org-latex-subtitle-format):
(org-latex-hyperref-template):
(org-latex-images-centered):
(org-latex-text-markup-alist):
(org-latex-format-inlinetask-function):
(org-latex-custom-lang-environments):
(org-latex-compiler-file-string):
(org-latex-compiler):
(org-latex-bib-compiler):
(org-latex-logfiles-extensions):
(org-latex-known-warnings):
* lisp/ox-md.el (org-md-footnotes-section):
(org-md-footnote-format):
* lisp/ox-odt.el (org-odt-format-headline-function):
(org-odt-format-inlinetask-function):
(org-odt-inline-image-rules):
* lisp/ox-texinfo.el (org-texinfo-format-headline-function):
* lisp/ox.el (org-export-with-creator):
(org-export-with-title):
(org-export-with-broken-links):
(org-export-copy-to-kill-ring): Change :version from "25.1" to "25.2".

Neither Org 8.3 nor Org 9.0 were released with Emacs 25.1.
2016-10-05 11:18:39 +02:00
Nicolas Goaziou 45c775a4d2 ox-latex: Set default figure position to htbp
* lisp/ox-latex.el (org-latex-default-figure-position): Change default
  value.  Add missing keywords.

Reported-by: Jean Louis <guix@rcdrun.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/109468>
2016-10-02 09:54:17 +02:00
Aaron Ecay 79dab621f9 ox-latex: tiny refactoring.
* lisp/ox-latex.el (org-latex--insert-compiler): Refactor.
2016-09-26 16:56:19 +01:00
Nicolas Goaziou cefe157d42 ox-latex: Fix typo
* lisp/ox-latex.el (org-latex--delayed-footnotes-definitions): Fix typo
  in docstring.
2016-08-28 12:14:39 +02:00
Nicolas Goaziou de24694f05 Turn org-mode into Org or Org mode
Use Org or Org mode instead of org-mode or Org-mode according to
"Documentation standards".
2016-08-23 22:13:56 +02:00
Nicolas Goaziou 908b3b05cd ox-latex: Fix repeated footnotes in tables
* lisp/ox-latex.el (org-latex--delayed-footnotes-definitions): Fix
  referencing multiple occurrences of the same footnote in a table.

Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/108789>
2016-08-22 12:07:34 +02:00
Nicolas Goaziou 096f4287a6 ox-latex: Allow toggling centering of images
* lisp/ox-latex.el (latex): Introduce new
  property :latex-images-centered.
(org-latex-images-centered): New variable.
(org-latex--inline-image): Handle new attribute :center, in addition to
variable above.
* doc/org.texi (Images in @LaTeX{} export): Document new behaviour
(Publishing options): Reference :latex-images-centered.
2016-07-25 23:31:25 +02:00
Nicolas Goaziou c4da20a2f3 Silence byte-compiler
* lisp/ob-core.el (org-babel-process-params): Silence byte-compiler.
* lisp/ob-groovy.el (org-babel-groovy-evaluate):
* lisp/ob-haskell.el (org-babel-execute:haskell):
* lisp/ob-io.el (org-babel-io-evaluate):
* lisp/ob-octave.el (org-babel-octave-evaluate-external-process):
(org-babel-octave-evaluate-session):
* lisp/ob-perl.el (org-babel-perl-evaluate):
* lisp/ob-python.el (org-babel-python-evaluate-external-process):
(org-babel-python-evaluate-session):
* lisp/ob-ruby.el (org-babel-ruby-pp-wrapper-method):
(org-babel-ruby-evaluate):
* lisp/ob-scala.el:
* lisp/ob-tangle.el:
(org-babel-tangle-collect-blocks):
* lisp/org-agenda.el (org-agenda-get-category-icon):
(org-agenda-todo-yesterday):
* lisp/org-bbdb.el (org-bbdb-anniv-extract-date):
(org-bbdb-make-anniv-hash):
(org-bbdb-anniversaries-future):
* lisp/org-bibtex.el (org-bibtex-fleshout):
(org-bibtex-read):
(org-bibtex-write):
* lisp/org-capture.el (org-capture-set-target-location):
(org-capture-get-indirect-buffer):
(org-mks):
* lisp/org-clock.el (org-clock--oldest-date):
(org-clock-resolve):
(org-clock-sum):
(org-clock-special-range):
(org-clocktable-steps):
* lisp/org-ctags.el (org-ctags-create-tags):
* lisp/org-element.el (org-element--interpret-affiliated-keywords):
(org-element--cache-shift-positions):
(org-element--cache-sync):
(org-element--cache-submit-request):
* lisp/org-habit.el (org-habit-parse-todo):
* lisp/org-inlinetask.el (org-inlinetask-hide-tasks):
* lisp/org-lint.el (org-lint--generate-reports):
* lisp/org-mouse.el (org-mouse-get-context):
* lisp/org-plot.el (org-plot/gnuplot-to-grid-data):
(org-plot/gnuplot):
* lisp/ox-ascii.el (org-ascii--current-text-width):
(org-ascii--current-justification):
(org-ascii--build-caption):
(org-ascii--checkbox):
(org-ascii-item):
* lisp/ox-html.el (org-html-footnote-section):
* lisp/ox-latex.el (org-latex--make-option-string):
* lisp/ox-odt.el (org-odt-toc):
(org-odt-add-automatic-style):
(org-odt-format-label):
(org-odt-link--inline-image):
(org-odt--render-image/formula):
(org-odt--enumerable-image-p):
(org-odt--enumerable-latex-image-p):
(org-odt--enumerable-formula-p):
(org-odt-do-format-code):
(org-odt-table-cell): Silence byte-compiler.
2016-07-25 17:10:53 +02:00
Nicolas Goaziou 72461eaeaf Use `string-match-p' instead of `org-string-match-p'
* contrib/lisp/org-contacts.el (org-contacts-filter):
(org-contacts-complete-group):
(org-contacts-complete-tags-props):
* contrib/lisp/org-wl.el (org-wl-open):
* contrib/lisp/ox-bibtex.el (org-bibtex-merge-contiguous-citations):
* lisp/ob-core.el (org-babel-demarcate-block):
* lisp/ob-processing.el (org-babel-processing-view-sketch):
* lisp/ob-stan.el (org-babel-execute:stan):
* lisp/org-agenda.el (org-agenda-get-category-icon):
* lisp/org-clock.el (org-clock-into-drawer):
* lisp/org-element.el (org-element-link-parser):
* lisp/org-lint.el (org-lint-orphaned-affiliated-keywords):
(org-lint-invalid-babel-call-block):
(org-lint-colon-in-name):
* lisp/org-list.el (org-list-item-body-column):
* lisp/org-macro.el (org-macro-replace-all):
* lisp/org-plot.el (org-plot/gnuplot-script):
* lisp/org-table.el (org-table-export):
(org-table-align):
(org-table-get-range):
(org-table-recalculate):
(org-table-expand-lhs-ranges):
(org-table-formula-substitute-names):
(org-table-show-reference):
(orgtbl-to-texinfo):
(org-table-remote-reference-indirection):
* lisp/org.el (org-make-link-string):
(org--open-elisp-link):
(org-open-at-point):
(org-store-log-note):
(org-cached-entry-get):
(org--valid-property-p):
(org-entry-properties):
(org-buffer-property-keys):
(org-insert-drawer):
(org-display-inline-images):
(org-in-commented-heading-p):
* lisp/ox-ascii.el (org-ascii-keyword):
* lisp/ox-beamer.el (org-beamer--format-frame):
* lisp/ox-html.el (org-html-keyword):
* lisp/ox-latex.el (org-latex--label):
(org-latex-headline):
(org-latex-item):
(org-latex-keyword):
(org-latex--inline-image):
(org-latex-src-block):
* lisp/ox-odt.el (org-odt-styles-dir):
(org-odt-keyword):
(org-odt--translate-latex-fragments):
* lisp/ox-texinfo.el (org-texinfo-template):
(org-texinfo-keyword):
(org-texinfo-src-block):
* lisp/ox.el (org-export-inline-image-p):
(org-export-file-uri):
* testing/lisp/test-org-table.el (test-org-table/to-generic):
(test-org-table/to-latex):
(test-org-table/to-html):
(test-org-table/named-field):
(test-org-table/named-column):
(test-org-table/tab-indent):
(test-org-table/first-rc):
(test-org-table/last-rc): Use `string-match-p' instead of
`org-string-match-p'.
2016-07-25 15:21:12 +02:00
Nicolas Goaziou b2091f6d75 Move obsolete declarations into "org-compat.el"
* lisp/org-agenda.el (org-agenda-list):
(org-agenda-goto-today):
(org-agenda-reset-view): Remove reference to obsolete
`org-agenda-ndays'.
2016-06-30 15:20:51 +02:00
Nicolas Goaziou 84f8c9a226 ox-latex: Use "cl-lib"
* lisp/ox-latex.el (org-latex--label):
(org-latex--caption/label-string):
(org-latex--find-verb-separator):
(org-latex--text-markup):
(org-latex-inline-src-block):
(org-latex-item):
(org-latex-keyword):
(org-latex--inline-image):
(org-latex-link):
(org-latex-plain-text):
(org-latex-matrices):
(org-latex--script-size):
(org-latex--align-string):
(org-latex--table.el-table):
(org-latex-timestamp): Use "cl-" prefix.
2016-05-26 11:03:11 +02:00
Rasmus 9dbeaa278d ox-latex: Fix bug introduced in 888ebfdeaf
* lisp/ox-latex.el (org-latex-footnote-reference): Handle anonymous
  footnotes.

Reported-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/107381>
2016-05-25 19:48:51 +02:00
Rasmus 888ebfdeaf ox-latex: More robust repeated footnote references
* lisp/ox-latex.el (org-latex--delayed-footnotes-definitions): Fix typo
  in docstring.
(org-latex-footnote-defined-format): New defcustom.
(org-latex-footnote-reference): Refer to repeated footnotes using
labels.  Format using new defcustom.
* etc/ORG-NEWS: Mention change.
* doc/org.texi (Publishing options): Add new defcustom.
2016-05-25 09:14:52 +02:00
Brian Carlson af8e3d84ee ox: Provide offset to [+-]n in SRC/EXAMPLE export
* lisp/org-element.el (org-element-example-block-parser): Use cons cell
  for :number-lines specifying offset in addition to type (new/continue).
  ('continue . offset) for :number-lines will add this offset count to
  the last line number. ('new . offset) for :number-lines will reset the
  line number counting starting at offset
(org-element-src-block-parser): same for SRC block as EXAMPLE block

* lisp/ox-html.el (org-html-format-code):
* lisp/ox-latex.el (org-latex-src-block):
* lisp/ox-odt.el (org-odt-format-code):
* lisp/ox.el (org-export-resolve-coderef):
(org-export-get-loc):
(org-export-format-code-default):
* contrib/lisp/ox-groff.el (org-groff-src-block): Use new cons cell
  for :number-lines.

* testing/lisp/test-ox.el  (ert-deftest test-org-export/get-loc): Tests for
changes
(test-org-gen-loc-list): Helper function for `test-org-export/get-loc'.
2016-05-24 21:40:35 +02:00
Rasmus 58f5def625 ox-latex.el: Format-spec checks Polyglossia
* ox-latex.el (org-latex--format-spec): Also check Polyglossia language.
2016-05-23 09:00:54 +02:00
Rasmus 42bc27b473 Merge branch 'maint' 2016-05-23 08:59:29 +02:00
Rasmus 8c968a9697 ox-latex: Detect languages irrespective of case
* ox-latex.el (org-latex-guess-babel-language):
* ox-latex.el (org-latex--format-spec): Detect languages correctly
  irrespective of case.
2016-05-23 08:45:54 +02:00
Nicolas Goaziou ea1147a479 Add `org-compile-file' and `org-file-newer-than-p'
* lisp/org.el (org-compile-file):
(org-file-newer-than-p): New functions.

* lisp/ox-latex.el (org-latex-compile): Use new functions.

* lisp/ox-man.el (org-man-compile): Use new functions.
(org-man-collect-errors): Remove it.

* lisp/ox-texinfo.el (org-texinfo-compile): Use new functions.
(org-texinfo-collect-errors): Remove function as it is not accurate
enough (e.g., it doesn't handle internationalization).
2016-05-19 09:44:05 +02:00
Nicolas Goaziou 2a0a37c1a7 Merge branch 'maint' 2016-02-27 09:35:30 +01:00
Nicolas Goaziou dc68d28d67 ox-latex: Remove spurious newline in labels
* lisp/ox-latex.el (org-latex--caption/label-string): Remove spurious
  newline in labels.

Reported-by: Thomas S. Dye <tsd@tsdye.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/105356>
2016-02-27 09:34:45 +01:00
Nicolas Goaziou 7bcd3e6a79 ox-latex: Remove trailing white space
* lisp/ox-latex.el (org-latex-custom-lang-environments): Remove trailing
  white space in docstring.
2016-02-26 20:47:16 +01:00
Rasmus 18dff8d3fa ox-latex: Fix typo
* lisp/ox-latex.el (org-latex-compiler-file-string): Fix typo.

Reported-by: Julien Cubizolles <j.cubizolles@free.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/104836>
2016-02-06 15:52:29 +01:00
Alan Schmitt 06a1fea109 ox-latex.el: Fix minted inline
* lisp/ox-latex.el (org-latex-inline-src-block): Output minted code that
  correctly formats code inline.
2016-02-06 09:48:44 +01:00
Nicolas Goaziou 094f46c203 Merge branch 'maint' 2016-01-31 23:32:07 +01:00
Nicolas Goaziou 3aa355c037 ox-latex: Fix numbering of source blocks
* lisp/ox-latex.el (org-latex-src-block): Fix numbering reset on source
  blocks when using the listings package.

Reported-by: P-O Gustafsson <kullager@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/104650>
2016-01-31 23:30:49 +01:00
Nicolas Goaziou 4ebb6cea39 ox-latex: Use `cl-subseq' instead of `org-sublist'
* lisp/ox-latex.el (org-latex-compile): Use `cl-subseq' instead of
  `org-sublist'.
2016-01-26 23:05:04 +01:00
Nicolas Goaziou 03cbcf41ed Merge branch 'maint' 2016-01-26 23:03:11 +01:00
Anthony Cowley a37996910e ox-latex: PDF generation timestamp check
* lisp/ox-latex.el (org-latex-compile): Improve timestamp check on HFS+
  filesystem by only considering 1-second clock resolution.

Previously, the call to (current-time) could return a timestamp with
a non-zero microsecond or picosecond fields, while the file attribute
always has zeros for these fields.  The check that the generated file is
newer than the reference timestamp only succeeded when the time to
generate the file crossed a 1-second clock interval.

TINYCHANGE
2016-01-26 23:02:21 +01:00
Alan Schmitt 4fe777fdae ox-latex: Add option support to custom environment
* lisp/ox-latex.el (org-latex-src-block): make the options from
  attr_latex available to the custom environment using %o.
2016-01-16 15:09:10 +01:00
Kyle Meyer 6345de2d05 Merge branch 'maint' 2016-01-09 17:43:27 -05:00
Kyle Meyer 6bc48c5f41 Update copyright years 2016-01-09 17:12:03 -05:00
Nicolas Goaziou 54318add34 Change export block syntax
* lisp/org-element.el (org-element-export-block-parser):
(org-element--current-element): Use new syntax for export blocks.
(org-element-block-name-alist): Remove.

* lisp/ox.el (org-export-register-backend):
(org-export-define-derived-backend): Remove :export-block keyword from
back-end's definition.
(org-export-expand-include-keyword): Use new syntax for include
keywords.

* lisp/ox-ascii.el (ascii):
* lisp/ox-beamer.el (beamer):
* lisp/ox-html.el (html):
* lisp/ox-latex.el (latex):
(org-latex-prefer-user-labels):
* lisp/ox-man.el (man):
* lisp/ox-md.el (md):
* lisp/ox-odt.el (odt):
* lisp/ox-texinfo.el (texinfo): Propagate changes to "ox.el".

* lisp/ob-core.el (org-babel-insert-result):
* lisp/ob-haskell.el (org-babel-haskell-export-to-lhs): Use new syntax.

* lisp/org.el (org-structure-template-alist): Use new syntax.
(org-protecting-blocks): Add "export" to protected blocks.  Remove
  back-ends blocks, which are now special blocks.
(org-fontify-meta-lines-and-blocks-1): Fontify correctly new blocks.

* lisp/org-footnote.el (org-footnote-forbidden-blocks):
* lisp/org-list.el (org-list-forbidden-blocks): Add "export" to
  forbidden blocks.  Remove back-ends blocks, which are now special
  blocks.

* contrib/lisp/ox-extra.el: Update comments.

* testing/lisp/test-org-element.el (test-org-element/export-block-parser):
(test-org-element/export-block-interpreter):
* testing/lisp/test-ob.el (test-ob/org-babel-remove-result--results-html):
(test-ob/org-babel-remove-result--results-latex):
* testing/lisp/test-ox.el (test-org-export/expand-include): Update tests.

Export blocks are explicitly marked as such at the syntax level to
disambiguate their parsing from special blocks.  The new syntax is

  #+BEGIN_EXPORT backend
  ...
  #+END_EXPORT

instead of

  #+BEGIN_backend
  ...
  #+END_backend

As a consequence, =INCLUDE= keywords syntax is modified, e.g.,

  #+INCLUDE: "file.org" HTML

becomes

  #+INCLUDE: "file.org" export html
2015-12-20 21:56:27 +01:00
Kyle Meyer f57778090e Update for change in letrec behavior
* lisp/ox-latex.el (org-latex--delayed-footnotes-definitions):
* lisp/ox.el (org-export--selected-trees):
(org-export--prune-tree):
(org-export--merge-external-footnote-definitions):
(org-export--footnote-reference-map): Provide nil value for binders.

Using

  (letrec ((SYMBOL)) ...)

to bind SYMBOL to nil relies on (setq SYMBOL) setting SYMBOL to nil.  As
of 5d93a89 (Byte compiler: on setq with an odd number of arguments,
generate a `signal', 2015-11-26) in the Emacs repo, setq signals an
error when given an odd number of arguments.

Reported-by: Zack Piper <zack@apertron.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/103539>
<http://permalink.gmane.org/gmane.emacs.devel/196182>
2015-12-12 22:46:24 -05:00
Alan Schmitt b2eb53f27d ox-latex: Make org-latex-custom-lang-environments a defcustom
* ox-latex.el (org-latex-custom-lang-environments): Change from defvar
  into a defcustom.
2015-12-01 09:16:06 +01:00
Alan Schmitt 2aa80849da ox-latex: Extend custom-lang-environments
* ox-latex.el (org-latex-custom-lang-environments): Extend the
  documentation string.
* ox-latex.el (org-latex-src-block): Allow a custom language environment
  to be a format string to be directly inserted.
2015-11-30 12:59:12 +01:00
Nicolas Goaziou cdfc96f47c ox-latex: Do not merge consecutive $$...$$
* lisp/ox-latex.el (org-latex-latex-fragment): Since $$..$$ snippets are
  not wrapped within a math-block, do not remove markers.
(org-latex--wrap-latex-math-block): Do not wrap $$...$$ LaTeX snippets.
2015-11-06 23:01:03 +01:00
Nicolas Goaziou a274c21419 ox-latex: Fix "void function nil" error
* lisp/ox-latex.el (org-latex--delayed-footnotes-definitions): Fix "void
  function nil" error.

Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/102477>
2015-11-02 20:58:50 +01:00
Nicolas Goaziou 8bccb21313 ox-latex: Use lexical binding
* lisp/ox-latex.el (org-latex-format-drawer-function):
(org-latex-bold):
(org-latex-clock):
(org-latex-code):
(org-latex-entity):
(org-latex-example-block):
(org-latex-export-block):
(org-latex-export-snippet):
(org-latex-fixed-width):
(org-latex-footnote-reference):
(org-latex-format-headline-default-function):
(org-latex-horizontal-rule):
(org-latex-inline-src-block):
(org-latex-format-inlinetask-default-function):
(org-latex-italic):
(org-latex-keyword):
(org-latex-latex-environment):
(org-latex-latex-fragment):
(org-latex-line-break):
(org-latex-node-property):
(org-latex-paragraph):
(org-latex-planning):
(org-latex-property-drawer):
(org-latex-matrices):
(org-latex-matrices-tree-filter):
(org-latex-math-block-tree-filter):
(org-latex-math-block-options-filter):
(org-latex-math-block):
(org-latex-section):
(org-latex-src-block):
(org-latex-statistics-cookie):
(org-latex-strike-through):
(org-latex--script-size):
(org-latex-subscript):
(org-latex-superscript):
(org-latex-target):
(org-latex-timestamp):
(org-latex-underline):
(org-latex-verbatim):
(org-latex-compile): Silence byte-compiler.  Refactor `mapc' + `lambda'
into `dolist'.
2015-10-29 19:08:26 +01:00
Marco Wahl ca8a0234fc ox-latex: Fix typo in docstring 2015-10-26 21:38:04 +01:00
Rasmus 385f2381f9 ox-latex: Add mapping for R src blocks with minted
* ox-latex.el (org-latex-listings-langs): Add mapping for R.
2015-10-26 15:39:52 +01:00
Rasmus 002499b26b ox-latex: Small refactor
* ox-latex.el (org-latex--make-preamble): Renamed
org-latex--make-header.
(org-latex--insert-compiler): New function.
(org-latex-template):
* ox-koma-letter.el: Use new function.
2015-10-04 15:54:28 +02:00
Rasmus 45b01819e0 Improve docstrings regarding latex_compiler
* org.el (org-latex-default-packages-alist):
* ox-latex.el (org-latex-compiler, org-latex-compilers)
  (org-latex-compiler-file-string, org-latex-bib-compiler)
  (org-latex--remove-packages): Improve docstring wrt. latex_compiler.
2015-10-04 15:54:21 +02:00
Rasmus 679adcaa64 ox-latex: Fix typo in 1e4b7e4bec
* ox-latex.el (org-latex--remove-packages): Fix typo.
2015-09-29 19:39:01 +02:00
Rasmus f6187deca5 ox-latex: Small refactor
* ox-latex.el (org-latex-compile): Use format-spec.
2015-09-27 23:49:32 +02:00
Rasmus 74da3bc10f ox-latex: Support arbitrary bibtex-like program
* ox-latex.el (org-latex-bib-compiler): New defcustom.
  (org-latex-pdf-process): Update docstring.
  (org-latex-compile): Use new defcustom.
* org.texi (@LaTeX{} and PDF export): Add documentation.
2015-09-27 23:49:32 +02:00
Rasmus 1e4b7e4bec ox-latex: Support changable TeX compilers
* org.el (org-latex-default-packages-alist): Only use inputenc
and fontenc in pdftex.
* ox-latex.el (latex): Add :latex-compiler.
(org-latex-compiler): New defcustom.
(org-latex-compilers): New defconst.
(org-latex--remove-packages): New function.
(org-latex-template): Use new function and variables.
(org-latex-pdf-process): Update to use %latex shorthand.
(org-latex-compile): Check and use intended compiler.
* org.texi (@LaTeX{} and PDF export): Document changes.
* ORG-NEWS: Add entry.

Adds #+latex_compiler: keyword.

Note, rubber is dropped from `org-latex-pdf-process' since it does not
allow arbitrary latex commands.

Suggested-by: Suvayu Ali <fatkasuvayu+linux@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/98921>
2015-09-27 23:49:32 +02:00
Paul Eggert c86a10b0bc Backport commit 284c470 from Emacs master branch
Backslash cleanup in Elisp source files
284c470ef752967fcd8bae6a450dc138462b1e49
Paul Eggert
Thu Sep 17 16:09:39 2015 -0700
2015-09-21 18:38:39 -04:00
Kyle Meyer 0839dc4322 Protect remaining apostrophes in docstrings
Protect apostrophes not covered by the last backport.  Convert
expressions like '(...)  to \\='(...)  and symbols written as 'name to
`name'.  (In addition to ensuring the correct display, the latter also
improves consistency with many Org docstrings.)

If these aren't protected, Emacs 25 may display them as curved quotes in
the help buffer, depending on the value of text-quoting-style.
2015-09-21 18:38:39 -04:00
Kyle Meyer d77a52a502 Backport quote-related commits from Emacs
These changes are the combination of the commits below (in order
applied).  Unlike other backports, these are applied in one commit
because they are closely related and because some of the later commits
reverse changes in earlier commits.  Changes to message and help quote
display for Emacs 25 seem to be here to stay.  The quote protections are
required to ensure grave accents and apostrophes are displayed as
intended in Emacs 25, and they should not affect earlier versions.

  Quoting fixes in lisp/org
  6cd2629bd1b3ce77d29ac28e29237c94a4197116
  Paul Eggert
  Mon Aug 31 00:29:40 2015 -0700

  More-conservative ‘format’ quote restyling
  fbb5531fa11d13854b274d28ccd329c9b6652cfc
  Paul Eggert
  Sun Aug 23 22:39:06 2015 -0700

  Prefer directed to neutral quotes
  875a5d0ead827d3da32ecbd30e739a29f07bbc87
  Paul Eggert
  Mon Aug 24 23:57:25 2015 -0700

  Escape ` and ' in doc
  19532d147b431a4fe34f088d6de07891c48e2c5c
  Paul Eggert
  Tue Sep 1 18:23:21 2015 -0700

  Fix some more docstring etc. quoting problems
  26bd978d87dfbf9baa115cd961a67d42b416c4bf
  Paul Eggert
  Thu Sep 3 15:32:54 2015 -0700

  Go back to grave quoting in source-code docstrings etc.
  6afef3f6ca2f3009c722b84e249903b7f807b044
  Paul Eggert
  Mon Sep 7 16:09:27 2015 -0700
2015-09-21 18:38:18 -04:00
Nicolas Goaziou f9f35bc79b ox-latex: Allow nil for `org-latex-hyperref-template'
* lisp/ox-latex.el (org-latex-hyperref-template): Allow nil value.  Make
  `org-latex-with-hyperref' an obsolete alias for the variable.

<http://permalink.gmane.org/gmane.emacs.orgmode/100222>
2015-08-19 16:51:07 +02:00
Nicolas Goaziou aa7dfd54de Revert "ox-latex.el: Resurrect `org-latex-with-hyperref'"
This reverts commit 6f41105bd9.
2015-08-19 16:45:01 +02:00
Bastien 6f41105bd9 ox-latex.el: Resurrect `org-latex-with-hyperref'
* ox-latex.el (latex): Resurrect :latex-hyperref-p.
(org-latex-with-hyperref): Resurrect.
(org-latex-template): Use :latex-hyperref-p.

* org.texi (Beamer specific export settings)
(@LaTeX{} specific export settings): Mention both
`org-latex-hyperref-template' and `org-latex-with-hyperref'.

Thanks to Scott Randby for raising this issue.
2015-08-18 19:23:34 +02:00
Paul Eggert 3a81c7ee6f Backport commit 0c856a2 from Emacs master branch
* lisp/ob-core.el (org-babel-check-evaluate)
(org-babel-confirm-evaluate):
* lisp/ob-fortran.el (org-babel-fortran-var-to-fortran):
* lisp/ox-latex.el (org-latex-compile):
* lisp/ox-man.el (org-man-compile):
* lisp/ox-odt.el (org-odt-template):
* lisp/ox-texinfo.el (org-texinfo-compile):
Change (message (format ...)) to (message ...), and likewise
for ‘error’.  This lessens the probability of confusion when the
output of ‘format’ contains ‘%’.

Fix some confusion with ‘format’
0c856a2c459016f1f9cce173f5b2b49be36e3452
Paul Eggert
Wed Aug 5 19:07:28 2015 -0700
2015-08-05 23:29:43 -04:00
Nicolas Goaziou 4117e398e6 ox-latex: Tiny refactoring
* lisp/ox-latex.el (org-latex-guess-polyglossia-language): Tiny
  reactoring.
2015-08-02 09:50:45 +02:00
Rasmus 8d3bc7875f ox-latex: New function to generate header
* ox-latex.el (org-latex--make-header): New function.
  (org-latex-template): Use new function.
* ox-koma-letter.el (org-koma-letter-template): Use new function.
2015-07-31 14:12:50 +02:00
Rasmus 309f15887a Add notes on Polyglossia support
* ox-latex.el (org-latex-classes): Update docstring.
* ORG-NEWS: Update.
2015-07-31 14:12:35 +02:00
Rasmus 3f03986bb2 ox-latex: Add polyglossia support
* ox-latex.el (org-latex-guess-polyglossia-language): New function.
  (org-latex-polyglossia-language-alist): New defconst.
  (org-latex-template): Apply new function.
* ox-koma-letter.el (org-koma-letter-template): Apply new function.

Suggested-by: Suvayu Ali <fatkasuvayu+linux@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/98921>
2015-07-29 18:17:36 +02:00
Rasmus c4a913770d Update minted documentation.
* ox-latex.el (org-latex-listings):
* org.texi (Literal examples): Update minted documentation.
2015-07-03 13:42:21 +01:00
Rasmus 46a71bb93f ox-latex: Support captions for none-floats
* ox-latex.el (org-latex--caption/label-string): Format
  nonfloating captions using the capt-of package.
  (org-latex--inline-image, org-latex-src-block)
  (org-latex--org-table): Allow none-float and caption.
2015-07-03 13:42:03 +01:00
Nicolas Goaziou 5a5e4a5eee ox-latex: Fix backslash escaping in plain text
* lisp/ox-latex.el (org-latex-plain-text): Fix backslash escaping.
2015-06-26 09:50:22 +02:00
Nicolas Goaziou 66686f69a5 ox-latex: Remove useless call to `org-latex--wrap-latex-math-block'
* lisp/ox-latex.el (org-latex-footnote-reference): Remove call to
  `org-latex--wrap-latex-math-block' since definitions are already
  taken care of at the filter parse tree level, since
  47265b31ca.
2015-06-23 15:31:09 +02:00
Nicolas Goaziou 8ff31bd0cf ox-latex: Introduce :environment attribute for example blocks
* lisp/ox-latex.el (org-latex-example-block): Implement :environment
  attribute, which allows to override "verbatim" environment.
* doc/org.texi (@LaTeX{} specific attributes): Document change.
2015-06-23 08:43:07 +02:00
Nicolas Goaziou c532ff36aa ox-latex: Fix b8ade2e79e
* lisp/ox-latex.el (org-latex-inline-src-block): Fix
  b8ade2e79e.
2015-06-07 15:18:38 +02:00
Nicolas Goaziou b8ade2e79e ox-latex: Do not use \verb command anymore
* lisp/ox-latex.el (org-latex-text-markup-alist): Remove \verb from
  default value.
(org-latex--protect-text): New function.
(org-latex--text-markup):
(org-latex-inline-src-block): Use new function.

Suggested-by: Titus von der Malsburg <malsburg@posteo.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/98000>
2015-06-07 01:13:51 +02:00
Rasmus 34a3cd5467 ox-latex: Use standard LaTeX label prefixes
* ox-latex.el (org-latex--label): Use standard LaTeX prefixes.
  (org-latex-math-environments-re): New defconst.
2015-04-28 00:05:37 +02:00
Nicolas Goaziou 88ea2ced0e ox-latex: Allow alt titles in starred sectionning commands
* lisp/ox-latex.el (org-latex-headline): Allow alt titles in starred
  sectionning commands.

Reported-by: Vikas Rawal <vikaslists@agrarianresearch.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/97242>
2015-04-27 17:43:18 +02:00
Rasmus d13a2bb1c7 ox-latex: Fix footnote bug when narrowed buffer
* ox-latex.el (org-latex-footnote-reference): Support math in outside
  footnotes when narrowed.
2015-04-26 15:42:12 +02:00
Nicolas Goaziou e0567c9cac Export back-ends: Use `org-export-file-uri'
* contrib/lisp/ox-groff.el (org-groff-link):
* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-man.el (org-man-link):
* lisp/ox-md.el (org-md-link):
* lisp/ox-odt.el (org-odt-link):
* lisp/ox-texinfo.el (org-texinfo-link): Use `org-export-file-uri'.
2015-04-20 12:37:13 +02:00
Nicolas Goaziou 3d4a153105 ox-latex: Tiny refactoring
* lisp/ox-latex.el (org-latex--label): Tiny refactoring.
2015-04-19 15:42:39 +02:00
Nicolas Goaziou 88108f652f ox-latex: Fix f1548e11fe
* lisp/ox-latex.el (org-latex-prefer-user-labels): Fix docstring.
(org-latex--label): Fix docstring.  Do not add a spurious newline
character when generating "\\label" macro for a target.
(org-latex-link):
(org-latex-radio-target): Radio targets always use internal labelling
scheme.

Radio targets are visible in the document so they can contain
forbidden characters, and user cannot adapt them to naming
restrictions from a given back-end.
2015-04-19 15:16:52 +02:00
Rasmus f1548e11fe ox-latex: Accept user-label for more types
* ox-latex.el (org-latex--label): Add user-labels for targets.
(org-latex--wrap-label, org-latex-link, org-latex-target)
(org-latex-radio-target): Use org-latex--label.
2015-04-16 12:07:49 +02:00
Nicolas Goaziou 4bbc054bd2 ox-latex: Introduce `org-latex-prefer-user-labels' variable
* lisp/ox-latex.el (org-latex-prefer-user-labels): New variable.
(org-latex-custom-id-as-label): Remove variable.
(org-latex--label): New function.

(org-latex--caption/label-string):
(org-latex-headline):
(org-latex-inlinetask):
(org-latex-latex-environment):
(org-latex-link): Use new function.

* etc/ORG-NEWS: Document new variable.

This variable replaces, and generalizes,
`org-latex-custom-id-as-label'.
2015-04-13 15:21:23 +02:00
Nicolas Goaziou 4590332652 Export back-ends: Use `org-export-get-reference'
* lisp/ox-beamer.el (org-beamer-link):
(org-beamer-plain-list):
(org-beamer-target):
(org-beamer-radio-target):

* lisp/ox-html.el (org-html--wrap-image):
(org-html--format-toc-headline):
(org-html-list-of-listings):
(org-html-list-of-tables):
(org-html-headline):
(org-html-inline-src-block):
(org-html-link):
(org-html-paragraph):
(org-html-section):
(org-html-radio-target):
(org-html-src-block):
(org-html-table):
(org-html-target):

* lisp/ox-latex.el (org-latex--caption/label-string):
(org-latex--wrap-label):
(org-latex-center-block):
(org-latex-drawer):
(org-latex-dynamic-block):
(org-latex-example-block):
(org-latex-fixed-width):
(org-latex-headline):
(org-latex-horizontal-rule):
(org-latex-latex-environment):
(org-latex-link):
(org-latex-plain-list):
(org-latex-quote-block):
(org-latex-radio-target):
(org-latex-target):
(org-latex-verse-block):

* lisp/ox-man.el (org-man-target):

* lisp/ox-md.el (org-md-headline):

* lisp/ox-odt.el (org-odt-format-headline--wrap):
(org-odt-headline):
(org-odt-format-label):
(org-odt-link--infer-description):
(org-odt-link):
(org-odt-radio-target):
(org-odt-target):

* lisp/ox-texinfo.el (org-texinfo--get-node):
(org-texinfo-radio-target):
(org-texinfo-target):

* contrib/lisp/ox-groff.el (org-groff-link):
(org-groff-radio-target):
(org-groff-target):

* contrib/lisp/ox-rss.el (org-rss-headline): Use
  `org-export-get-reference'.
2015-04-13 15:21:22 +02:00
Nicolas Goaziou 1efb7561da ox-latex: Tiny fix
* lisp/ox-latex.el (org-latex-link): Tiny fix.
2015-04-13 09:56:44 +02:00
Nicolas Goaziou 65bbb1f7c8 ox-latex: Use :ALT_TITLE: on unnumbered headlines
* lisp/ox-latex.el (org-latex-headline): Use :ALT_TITLE: also on
  unnumbered headlines.

Suggested-by: Marcin Borkowski <mbork@wmi.amu.edu.pl>
<http://permalink.gmane.org/gmane.emacs.orgmode/96860>
2015-04-12 20:09:25 +02:00
Rasmus a12d98e93e ox-latex: Fix a780080fc
* ox-latex.el (org-latex-template): Empty string for subtitle
  when it is not set.
2015-04-09 18:39:35 +02:00
Nicolas Goaziou d7e7b78c2e Fix a780080fcf
* lisp/ox-latex.el (latex): Parse SUBTITLE, DESCRIPTION and KEYWORDS.
* lisp/ox-beamer.el (org-beamer-template): Do not parse again
  SUBTITLE.
2015-04-09 10:04:29 +02:00
Rasmus a780080fcf 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-04-08 23:23:13 +02:00
Nicolas Goaziou 9bf5ecbad1 ox-latex: Parse DATE
* lisp/ox-latex.el (latex): Parse DATE.
2015-04-05 19:00:56 +02:00
Nicolas Goaziou c466a4deee ox-latex, ox-koma-letter: Use new `parse' syntax
* contrib/lisp/ox-koma-letter.el (koma-letter): Set "SUBJECT" as
  parsed.
(org-koma-letter-template): Apply.
* lisp/ox-latex.el (latex): Set "DESCRIPTION" and "KEYWORDS" as
  parsed.
(org-latex--format-spec): Apply.
2015-04-05 14:11:14 +02:00
Derek Feichtinger 4f7aba3b40 ox-latex: Fix for export of doi type links
* lisp/ox-latex.el (org-latex-link): Add "doi" to the list of link
types that retain the protocol prefix in the exported link.

<http://permalink.gmane.org/gmane.emacs.orgmode/96669>
TINYCHANGE
2015-04-04 00:04:31 +02:00
Rasmus 79c0aa21ca ox: Remove #+KEYWORD and #+DESCRIPTION
* ox.el: Remove #+KEYWORD: and #+DESCRIPTION:.
* ox-deck.el, ox-rss.el, ox-html, ox-latex, ox-odt, ox-org: Add
  #+KEYWORD and #+DESCRIPTION.
* org.texi (Export settings): Explicit state which backends
  support #+DESCRIPTION and #+KEYWORDS.
2015-03-29 14:08:13 +02:00
Nicolas Goaziou a0f2293405 Remove comment related translators in export back-ends
* lisp/ox-ascii.el (ascii):
* lisp/ox-latex.el (latex):
* lisp/ox-man.el (man):
* lisp/ox-md.el (md):
* lisp/ox-org.el (org):
* lisp/ox-texinfo.el (texinfo):

* contrib/lisp/ox-groff.el (groff): Remove `comment' and
`comment-block' translators.

`comment' and `comment-block' translators are not needed since both
commented lines and comment blocks do not appear anymore in the parse
tree.  See 69dd4301ab.
2015-03-28 10:56:11 +01:00
Rasmus 69cab81ffa ox-latex: Utilize change in bcf6970
* ox-koma-letter.el (org-koma-letter-template),
  ox-latex.el (org-latex--format-spec): Tiny refactor.
2015-03-27 13:04:13 +01:00
Rasmus e9fd19968b ox: Always insert creator in metadata
* ox-odt.el (org-odt-template): Always insert creator.
* ox-latex.el (org-latex--format-spec): Creator always available.
2015-03-27 12:51:01 +01:00
Nicolas Goaziou 16cea3d7b7 ox: Remove `comment' special value for `org-export-with-creator'
* lisp/ox.el (org-export-with-creator): Change default value.

* lisp/ox-ascii.el (org-ascii-template):
* lisp/ox-beamer.el (org-beamer-template):
* lisp/ox-latex.el (org-latex-template):
* lisp/ox-odt.el (org-odt-template):
* lisp/ox-org.el (org-org-template):
* lisp/ox-texinfo.el (org-texinfo-template): Treat
  `org-export-with-creator' as a boolean.

* testing/lisp/test-ox.el (test-org-export/parse-option-keyword):
  Update test.

* doc/org.texi (Export settings): Update allowed values in
  `org-export-with-creator'.

* etc/ORG-NEWS: Signal change.

Special `comment' value isn't meaningful for all back-ends and is not
implemented in every back-end where it makes sense anyway.

It is possible to add a comment including creator at the end of the
document using a body filter instead.
2015-03-17 15:51:22 +01:00
Nicolas Goaziou c76f254e8b ox: Fix custom link handling in anonymous back-end
* lisp/ox.el (org-export-custom-protocol-maybe): Change signature.
* contrib/lisp/ox-groff.el (org-groff-link):
* lisp/ox-ascii.el (org-ascii-link):
* lisp/ox-beamer.el (org-beamer-link):
* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-man.el (org-man-link):
* lisp/ox-md.el (org-md-link):
* lisp/ox-odt.el (org-odt-link):
* lisp/ox-org.el (org-org-link):
* lisp/ox-texinfo.el (org-texinfo-link): Apply signature change.

* testing/lisp/test-ox.el (test-org-export/custom-protocol-maybe):
  Update test.

Provide explicitly back-end used instead of guessing it from INFO
channel as an anonymous back-end could be used, masquerading the real
one.

Reported-by: Christian Moe <mail@christianmoe.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/95402>
2015-02-24 15:54:01 +01:00
Rasmus 507d2aae0f Fix bug introduced in 438d75c
* ox-latex.el (org-latex--format-spec): Fix bug.
2015-02-20 00:05:56 +01:00
Rasmus 438d75c59d ox-latex: Format-spec for hyperref and title
* ox-latex.el (org-latex--format-spec): New function with format-specs.
  (org-latex-template): Use org-latex--format-spec.
  (org-latex-hyperref-template): New defaults and use
  org-latex--format-spec.
  (org-latex-title-command): Use org-latex--format-spec.
* ORG-NEWS: Mention change.
2015-02-19 22:41:02 +01:00
Nicolas Goaziou 0d24086657 Update some copyright years 2015-02-16 01:40:07 +01:00
Rasmus e6fcc853c5 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-12 01:45:39 +01:00
Nicolas Goaziou 650278f775 org-element: Interpret pseudo objects without declaration
* lisp/org-element.el (org-element-object-containers): New variable
(org-element-interpret-data): Remove optional argument.
(org-element--interpret-data-1): Remove optional argument.  Guess when
a given element or object has a pseudo type.

* lisp/ox-latex.el (org-latex-pseudo-objects): Remove variable.
(org-latex-table, org-latex--math-table): Apply signature change above.

* testing/lisp/test-org-element.el (test-org-element/interpret-data):
  Update test.
2015-02-09 12:04:38 +01:00
Nicolas Goaziou b07e2f6ff1 ox: Implement local table of contents
* lisp/ox.el (org-export-collect-headlines): Allow to collect
  headlines locally.
* testing/lisp/test-ox.el (test-org-export/collect-headlines): Add
  tests.

* lisp/ox-ascii.el (org-ascii--build-toc):
(org-ascii-keyword):
* lisp/ox-html.el (org-html-toc):
(org-html-keyword):
* lisp/ox-odt.el (org-odt-toc): Allow local table of contents.
(org-odt--format-toc): New function.
(org-odt-begin-toc, org-odt-end-toc): Remove functions.

* lisp/ox-latex.el (org-latex-logfiles-extensions): Optionally remove
  "ptc" files.
(org-latex-headline, org-latex-keyword): Implement partial table of
contents assuming "titletoc" package is loaded.

* etc/ORG-NEWS:
* doc/org.texi (Table of contents): Document new parameter.
2015-01-11 22:47:02 +01:00
Nicolas Goaziou b7b913f656 ox-latex: Ignore width parameter in tabular environment
* lisp/ox-latex.el (org-latex--org-table): Ignore width parameter in
  tabular environment.

Reported-by: Giuseppe Lipari <giulipari@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/93815>
2015-01-06 23:30:54 +01:00
Nicolas Goaziou 3900155788 Implement `org-export-custom-protocol-maybe' and use it
* lisp/ox.el (org-export-custom-protocol-maybe): New function.
* contrib/lisp/ox-groff.el (org-groff-link):
* lisp/ox-ascii.el (org-ascii-link):
* lisp/ox-beamer.el (org-beamer-link):
* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-man.el (org-man-link):
* lisp/ox-md.el (org-md-link):
* lisp/ox-odt.el (org-odt-link):
* lisp/ox-texinfo.el (org-texinfo-link): Use new function.

* testing/lisp/test-ox.el (test-org-export/custom-protocol-maybe): New
  test.
2015-01-04 22:16:36 +01:00
Nicolas Goaziou e1adb17ba5 Fix custom timestamps during export
* lisp/org.el (org-translate-time): Remove function.
(org-timestamp-translate): Rewrite function so it doesn't use the one
above.

* lisp/ox-ascii.el (org-ascii-clock, org-ascii-planning):
* lisp/ox-html.el (org-html-clock, org-html-planning, org-html-timestamp):
* lisp/ox-latex.el (org-latex-clock, org-latex-planning):
* lisp/ox-texinfo.el (org-texinfo-clock, org-texinfo-planning): Use
  `org-timestamp-translate' instead of `org-translate-time'.

* etc/ORG-NEWS: Document function removal.

Reported-by: Ian Barton <lists@wilkesley.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/93127>
2014-12-03 17:18:16 +01:00
Nicolas Goaziou 919722a6a6 ox-latex: Do not message "PDF file produced" for fragments
* lisp/ox-latex.el (org-latex-compile): Do not message "PDF file
  produced" for fragments.
2014-11-16 17:58:11 +01:00
Nicolas Goaziou 61ba40c371 ox: Deprecate `org-export-get-genealogy' for `org-element-lineage'
* lisp/ox.el (org-export-collect-tree-properties,
  org-export-numbered-headline-p, org-export-get-tags,
  org-export-resolve-fuzzy-link, org-export-get-ordinal,
  org-export-get-parent-headline, org-export-get-parent-element,
  org-export-get-parent-table):

* lisp/ox-ascii.el (org-ascii--current-text-width):

* lisp/ox-beamer.el (org-beamer--frame-level):

* lisp/ox-icalendar.el (org-icalendar-blocked-headline-p):

* lisp/ox-latex.el (org-latex-footnote-reference):

* lisp/ox-odt.el (org-odt--enumerate, org-odt-link--infer-description,
  org-odt-table): Use `org-element-lineage' instead of
  `org-export-get-genealogy'.
2014-11-16 13:30:33 +01:00
Nicolas Goaziou 1b92b8b8fe ox-latex: Add missing defcustom keywords
* lisp/ox-latex.el (org-latex-caption-above): Add missing keywords.
2014-10-29 22:18:00 +01:00
Nicolas Goaziou 926553c608 ox-latex: Change default value for `org-latex-caption-above'
* lisp/ox-latex.el (org-latex-caption-above): Change default value.

`org-latex-table-caption-above' is removed completely since default
value do not match anymore.

See <http://permalink.gmane.org/gmane.emacs.orgmode/91363>.
2014-10-25 00:10:02 +02:00
Nicolas Goaziou 7f97406542 Bump Emacs version
* lisp/ob-core.el (org-babel-examplize-region):
* lisp/ob-exp.el (org-babel-exp-inline-code-template):
* lisp/org-table.el (org-table-copy-increment):
(org-table-formula-create-columns):
* lisp/org.el (org-agenda-ignore-drawer-properties):
(org-agenda-ignore-properties):
* lisp/ox-ascii.el (org-ascii-list-margin):
* lisp/ox-html.el (org-html-format-headline-function):
(org-html-format-inlinetask-function):
* lisp/ox-latex.el (org-latex-hyperref-template):
(org-latex-custom-id-as-label):
(org-latex-format-inlinetask-function):
(org-latex-known-warnings):
* lisp/ox-odt.el (org-odt-format-headline-function):
(org-odt-format-inlinetask-function):
* lisp/ox-texinfo.el (org-texinfo-format-headline-function): Bump
  Emacs version.
2014-10-24 11:56:09 +02:00
Nicolas Goaziou c27d86d6f1 ox-latex: Possibly make a matrix out of tabular environment
* lisp/ox-latex.el (org-latex--math-table): Properly create matrix if
  "tabular" environment is used.  Make sure cells are centered instead
  of applying usual alignment rules.
2014-10-18 10:16:04 +02:00