1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-12-02 08:22:16 +00:00
Commit Graph

62 Commits

Author SHA1 Message Date
Nicolas Goaziou
77c5710de2 ox-latex: Handle consecutive alterning sub and superscript
* lisp/ox-latex.el (org-latex--script-size): Handle consecutive
  alterning sub and superscript.

This patch fixes export of "a^b_c" constructs.
2013-04-18 00:06:06 +02:00
Nicolas Goaziou
99f8821995 ox-latex: Use \text command for subscript and superscript
* lisp/ox-latex.el (org-latex--script-size): Use \text command for
  subscript and superscript.  This is far superior to \mathrm, but it
  requires "amstext" package.  In particular, accented characters are
  now allowed within sub/superscript.
* lisp/org.el (org-latex-default-packages-alist): Add "amstext"
  package.
2013-04-17 20:59:41 +02:00
Nicolas Goaziou
d57b9e84e1 ox-latex: Better handling of sub/superscript within sub/superscript
* lisp/ox-latex.el (org-latex--script-size): Fix error when using
  sub/superscript within sub/superscript.
2013-04-17 20:59:41 +02:00
Nicolas Goaziou
b335a4fa34 ox-latex: Improve subscript/superscript export
* lisp/ox-latex.el (org-latex--script-size): New function.
(org-latex-subscript, org-latex-superscript): Use new function.
2013-04-17 18:43:01 +02:00
Nicolas Goaziou
407a6acf4d ox/ox-latex: Fix docstrings
* lisp/ox-latex.el: Remove instructions since everything is documented
  in Org manual.
* lisp/ox.el (org-export-with-smart-quotes): Use LATEX instead of
  LaTeX for keywords, the latter being hard to type, somewhat
  difficult to read, and overall just pedantic.
2013-04-16 12:54:05 +02:00
Bastien Guerry
320b633b6e ox-latex.el (latex): Don't force exporting with smart quotes
* ox-latex.el (latex): Don't force exporting with smart
quotes.

* ox.el (org-export-with-smart-quotes): Mention the need to
use the relevant Babel package when setting this option to
non-nil.

Before the fix, if the user used #+LANGUAGE: fr with no other
customization, the quotes would disappear from the PDF output.
That's because smart quotes were enforced, while the .tex file
needs \usepackage[french]{babel} to display the quotes.

We now don't force the smart quotes and give more explanations
in `org-export-with-smart-quotes'.
2013-04-16 11:39:41 +02:00
Nicolas Goaziou
5e0c969381 Better document LATEX_HEADER_EXTRA keywords
* doc/org.texi (Header and sectioning): Add a footnote about the
  different between LATEX_HEADER_EXTRA and LATEX_HEADER.
* lisp/ox-latex.el (org-latex-classes): Be more explicit about
  LATEX_HEADER_EXTRA.
2013-04-15 23:24:53 +02:00
Nicolas Goaziou
94518a95ba ox-latex: Update a docstring
* lisp/ox-latex.el (org-latex-classes): Update docstring.
2013-04-12 00:02:15 +02:00
Nicolas Goaziou
a9da959ae6 ox-latex: Remove specific default image width for floats
* lisp/ox-latex.el (org-latex--inline-image): Remove specific default
  image width for floats.  If no width nor height is provided, it
  should default to `org-latex-image-default-width' value.
2013-04-10 22:03:32 +02:00
Nicolas Goaziou
33f800ccd2 ox-latex: Fix inline-math table mode
* lisp/ox-latex.el (org-latex--math-table): Fix inline-math table
  environment.
2013-04-09 15:46:41 +02:00
Bastien Guerry
1e496cc8f9 ox.el (org-export-replace-region-by): New function
* ox.el (org-export-replace-region-by): New function.
* ox-texinfo.el (org-texinfo-convert-region-to-texinfo):
* ox-md.el (org-md-convert-region-to-md):
* ox-latex.el (org-latex-convert-region-to-latex):
* ox-html.el (org-html-convert-region-to-html): New functions
to replace the active region by its export into various
backends.
2013-04-06 19:09:38 +02:00
Bastien Guerry
133afe8915 Cosmetic change in messages. 2013-04-06 16:49:10 +02:00
Nicolas Goaziou
735bb251b1 Remove TARGET handling from export back-ends
* contrib/lisp/ox-groff.el (org-groff-link): Remove TARGET handling.
* lisp/ox-ascii.el (org-ascii-link): Remove TARGET handling.
* lisp/ox-html.el (org-html-keyword): Remove TARGET handling.
* lisp/ox-latex.el (org-latex-keyword, org-latex-link): Remove TARGET
  handling.
* lisp/ox-man.el (org-man-keyword): Remove TARGET handling.
* lisp/ox-md.el (org-md-link): Remove TARGET handling.
* lisp/ox-odt.el (org-odt-keyword): Remove TARGET handling.
2013-04-04 20:38:36 +02:00
Nicolas Goaziou
e7bf989b28 export back-ends: Handle DATE keyword in a uniform way
* lisp/ox-ascii.el (org-ascii-template--document-title): Use new function.
* lisp/ox-beamer.el (org-beamer-template): Use new function.
* lisp/ox-html.el (org-html-format-spec): Use new function.
* lisp/ox-latex.el (org-latex-template): Use new function.
(org-latex-date-timestamp-format): Remove variable.

The uniform way is to format DATE according to
`org-export-date-timestamp-format' when keyword value consists in
a single timestamp.
2013-04-02 23:59:00 +02:00
Aaron Ecay
fa3b4830b8 ox-latex: Properly escape ~ for export
* lisp/ox-latex.el:
(org-latex-plain-text): Properly escape ~ for LaTeX export

In LaTeX, \~ gives a tilde diacritic (as in ã).  \textasciitilde{} is
the correct escape for a tilde.
2013-04-01 09:55:07 +02:00
Nicolas Goaziou
2746c764c6 ox-latex: Do not prefix relative paths with "file://"
* lisp/ox-latex.el (org-latex-link): Do not prefix relative paths with
  "file://".
2013-03-27 23:24:50 +01:00
Eric Abrahamsen
62bb13e8e7 ox-latex: Allow use of the "tabu" and "longtabu" table environments
* lisp/ox-latex.el (org-latex--org-table, org-latex-table-row): Allow
  use of the "tabu" and "longtabu" table environments.  New table
  attribute :spread handles the width specification syntax of "tabu"
  and "longtabu" table environments.
2013-03-27 15:26:41 +01:00
Nicolas Goaziou
03b59ed1f9 ox-latex: :long-listing avoids wrapping src-blocks within floats
* lisp/ox-latex.el (org-latex-long-listings): New variable.
(org-latex-src-block): Use new variable.
2013-03-27 15:04:18 +01:00
Bastien Guerry
a13b19e384 ox.el (org-export-define-backend, org-export-define-derived-backend): Use defuns
* ox.el (org-export-define-backend)
(org-export-define-derived-backend): Make defuns and update
docstrings.

* ox-texinfo.el (texinfo):
* ox-org.el (org):
* ox-odt.el (odt):
* ox-md.el (md):
* ox-man.el (man):
* ox-latex.el (latex):
* ox-icalendar.el (icalendar):
* ox-html.el (html):
* ox-beamer.el (beamer):
* ox-ascii.el (ascii): Use the defuns.
2013-03-19 19:39:34 +01:00
Nicolas Goaziou
90faed3672 ox-latex: Fix 7b36019069
* lisp/ox-latex.el (org-latex--inline-image): Fix commit
  7b36019069.
2013-03-17 22:17:31 +01:00
Nicolas Goaziou
7b36019069 ox-latex: Fix error with inline image with no option provided
* lisp/ox-latex.el (org-latex--inline-image): Fix error when no
  default width, height and option are provided and no attribute is
  set for the inline image.
2013-03-17 22:01:36 +01:00
Nicolas Goaziou
59cb22d638 ox: Simplify syntax for attributes
* lisp/ox.el (org-export-read-attribute): Do not use `read' to read
  attributes.  Instead, extract keywords and values from it, which
  means each value will be a string when non-nil.
* contrib/lisp/ox-groff.el (org-groff-link--inline-image): Use new
  attribute syntax.  Small refactoring.
* lisp/ox-ascii.el (org-ascii-horizontal-rule): Use new attribute
  syntax.
* lisp/ox-beamer.el (org-beamer-plain-list): Use new attribute syntax.
* lisp/ox-html.el (org-html--textarea-block): Use new attribute
  syntax.
* lisp/ox-latex.el (org-latex--inline-image, org-latex--org-table,
  org-latex--math-table): Use new attribute syntax.
* lisp/ox-man.el (org-man-table--org-table): Use new attribute syntax.
  Small refactoring.
* lisp/ox-odt.el (org-odt-link--inline-image, org-odt-table-cell): Use
  new attribute syntax.
* testing/lisp/test-ox.el: Add tests.

This patch introduces two changes.  To begin with, it removes the need
for quoting and escaping characters.  Also, all non-nil values are
stored as strings.  As an exception "nil" is stored as nil.
2013-03-11 08:33:10 +01:00
Nicolas Goaziou
cd06578af4 ox-latex: Activate smart quotes by default
* lisp/ox-latex.el (latex): Activate smart quotes by default.
2013-03-08 23:42:24 +01:00
Nicolas Goaziou
1d6aba908b ox-latex: Don't insert a default width when height is provided in a figure environment
* lisp/ox-latex.el (org-latex--inline-image): Don't insert a default
  width when height is provided in a figure environment.

Thanks to Aaron Ecay for the patch.
2013-03-08 22:37:45 +01:00
Nicolas Goaziou
142ca75957 ox-latex: Fix overuse of default width/height
* lisp/ox-latex.el (org-latex--inline-image): Do not use default
  width (resp. height) when an user height (resp. width) is provided.
  Also, default height is only used when image is not wrapped within
  a figure or wrapfigure environment, in order to preserve ratio.
(org-latex-image-default-width, org-latex-image-default-height):
Update docstring.
2013-03-08 11:32:44 +01:00
Nicolas Goaziou
ee9372653f ox-latex: Introduce LATEX_HEADER_EXTRA keyword
* lisp/ox-latex.el (latex): Introduce new buffer keyword.
(org-latex-template): Use new keyword.
* lisp/ox-beamer.el (org-beamer-template): Use new keyword.
* lisp/org.el (org-create-formula--latex-header): Use new keyword.
* contrib/lisp/ox-koma-letter.el (org-koma-letter-template): Use new
  keyword.

Previewing of LaTeX snippets takes account of LATEX_HEADER keywords.
LATEX_HEADER_EXTRA keyword allows to specify some header lines that
will not be used for building snippets.
2013-03-07 09:02:29 +01:00
Nicolas Goaziou
e109a37ede 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 17:14:27 +01:00
Aaron Ecay
42576eaac1 ox-latex: Support tikz images, :width, and :height
* ox-latex.el:
(org-latex-image-default-option): Change default value to ""
(org-latex-image-default-width)
(org-latex-image-default-height): Add variables
(org-latex-inline-image-rules): Make .tikz files as exportable with
latex
(org-latex--inline-image): Support tikz images.  Also support separate
:width and :height parameters for images.

* ob-R.el (org-babel-R-construct-graphics-device-call): Change file
extension of tikz graphics files to .tikz

Tikz graphics should be exported to LaTeX by \include, not as a link.
This commit changes the file extension used for tikz graphics from .tex
to .tikz, and inserts code for including such images.  The :options for
tikz graphics are passed as an optional argument to a tikzpicture
environment.

Also provide :width and :height ATTR_LATEX entries for images.  For tikz
graphics, these are implemented with \resizebox; for other image types
they are inserted in the optional arguments to \includegraphics.
2013-03-06 09:29:37 +01:00
Bastien Guerry
fe23891b2a ox-latex.el: Fix some typos in docstrings
* ox-latex.el:
(org-latex-table-scientific-notation, org-latex-verse-block):
Fix typos in docstrings.
2013-03-05 16:38:33 +01:00
Nicolas Goaziou
6ab71385f8 ox-latex: Do not overwrite provided numbering options in minted and listings
* lisp/ox-latex.el (org-latex-src-block): Do not overwrite provided
  numbering options in minted and listings.

If "numbers" option (resp. "linenos" option) is provided in
`org-latex-listings-options' (resp. `org-latex-minted-options'),
export will ignore "+n" and "-n" switches from source blocks.
2013-03-05 12:13:05 +01:00
Nicolas Goaziou
cd23825d62 ox-latex: Don't add optional title on unnumbered headlines
* lisp/ox-latex.el (org-latex-headline): Don't add optional title on
  unnumbered headlines.
2013-03-04 21:18:34 +01:00
Bastien Guerry
44ecd80f06 ox-latex.el (org-latex-toc-command): Cosmetic docstring change
* ox-latex.el (org-latex-toc-command): Cosmetic docstring change.
2013-03-04 20:08:39 +01:00
Nicolas Goaziou
f00fd7800f ox-latex: Fix bug with enforced item numbering in mixed lists
* lisp/ox-latex.el (org-latex-item): Fix wrong behaviour when
  a counter is set in an ordered list while its parent is not ordered.

This fixes numbering in the following case:

  - Unordered.
    3. [@3] Ordered.

Thanks to Hiroshi Saito for reporting the problem.
2013-03-04 08:54:58 +01:00
Bastien Guerry
ff97a0ee9d Revert "Add (provide ...) forms."
This reverts commit 8decdbcd23.
2013-03-02 16:20:59 +01:00
Bastien Guerry
8decdbcd23 Add (provide ...) forms.
E.g., if a user requires the 'org-icalendar feature,
he really wants to load 'ox-icalendar if it's in her
load-path.
2013-03-02 10:25:10 +01:00
Nicolas Goaziou
25b5ab8a23 ox-latex: Fix nested markup in TODO keyword defalt format
* lisp/ox-latex.el (org-latex-format-headline-default-function): Use
  declarative shape to nest makup for TODO keywords.  Previous syntax
  generated errors during export.
2013-03-01 11:06:00 +01:00
Bastien Guerry
4ba1e40cff ox-latex.el: Improve two docstrings
* ox-latex.el (org-latex-logfiles-extensions)
(org-latex-remove-logfiles): Improve docstrings.
2013-02-28 08:41:57 +01:00
Nicolas Goaziou
86563e0119 org-element: OPTIONAL_TITLE becomes ALT_TITLE property
* lisp/org-element.el (org-element-headline-parser):
  Rename :optional-title into :alt-title.
* lisp/ox.el (org-export-get-alt-title): Renamed from
  `org-export-get-optional-title'.
* lisp/ox-ascii.el (org-ascii--build-title): Apply name change.
* lisp/ox-html.el (org-html--format-toc-headline): Apply name change.
* lisp/ox-latex.el (org-latex-headline): Apply name change.
* lisp/ox-texinfo.el (org-texinfo--get-node,
  org-texinfo--generate-menu-items): Apply name change.
* testing/lisp/test-ox.el: Update tests.
* doc/org.texi (Table of contents): Update documentation.
2013-02-27 00:03:59 +01:00
Bastien Guerry
295b0ba5d1 Bump :version to "24.4" and add :package-version.
The options updated are those who won't be in Emacs 24.3.
2013-02-26 18:21:28 +01:00
Nicolas Goaziou
58fc1b4bf4 Use `org-latex-compile' when processing formulas with imagemagick
* lisp/ox-latex.el (org-latex-compile): Add an optional argument for
  latex snippet previewing.
* lisp/org.el (org-create-formula-image-with-imagemagick): Use
  `org-latex-compile' instead of rewriting it.
2013-02-26 13:43:48 +01:00
Nicolas Goaziou
87c553d268 ox-latex: Fix 309ccd9649
* lisp/ox-latex.el (org-latex-headline): Fix regexp in commit
  309ccd9649.
2013-02-25 11:14:57 +01:00
Nicolas Goaziou
309ccd9649 ox-latex: Do not add optional section name when section is unnumbered
* lisp/ox-latex.el (org-latex-headline): Do not add optional section
  name when section is unnumbered.
2013-02-25 11:03:56 +01:00
Nicolas Goaziou
ebf13a39fc ox-latex: Remove non-existent TOC value
* lisp/ox-latex.el (org-latex-keyword): Remove "figures" value.
2013-02-24 16:26:45 +01:00
Nicolas Goaziou
a15a657bfb ox: Better return value for `org-export-get-optional-title'
* lisp/ox.el (org-export-get-optional-title): Return regular title
  when no optional title is found.
* lisp/ox-ascii.el (org-ascii--build-title): Apply change to
  `org-export-get-optional-title'.
* lisp/ox-html.el (org-html--format-toc-headline): Apply change to
  `org-export-get-optional-title'.
* lisp/ox-latex.el (org-latex-headline): Apply change to
  `org-export-get-optional-title'.
* testing/lisp/test-ox.el: Add tests.
2013-02-24 09:20:35 +01:00
Nicolas Goaziou
d790fbd489 ox-ascii/ox-latex/ox-html: Make use of optional title in toc
* lisp/ox-ascii.el (org-ascii--build-title): Add an argument.  Use
  optional title when building a toc line.
(org-ascii--build-toc): Call `org-ascii--build-title' with appropriate
arguments.
* lisp/ox-latex.el (org-latex-headline): Use optional title for table
  of contents.
* lisp/ox-html.el (org-html--toc-text): Renamed from
  `org-html-toc-text'.  Add docstring.
(org-html--format-toc-headline): Renamed from
`org-html-format-toc-headline'.  Add docstring.  Use optional title if
possible.
(org-html-toc): Add docstring.
2013-02-23 23:58:23 +01:00
Nicolas Goaziou
a1236b9606 ox-latex: Fix 99d4c8f915
* lisp/ox-latex.el (org-latex-format-headline-default-function): Make
  the variable a function.
2013-02-23 22:41:30 +01:00
Nicolas Goaziou
57fb6ffa4d ox-latex: Set inputenc option according to `org-export-coding-system'
* lisp/ox-latex.el (org-latex-guess-inputenc): Set inputenc option
  according to `org-export-coding-system'.
2013-02-23 14:04:26 +01:00
Bastien Guerry
99d4c8f915 ox-latex.el (org-latex-format-headline-default-function): New option
* ox-latex.el (org-latex-format-headline-default-function):
New option.
(org-latex-format-headline-function): Use the new option as
the default value.

The rationale here is that most users will expect Org 8.0
to format headlines like Org <8.0 did.  If they want a different
formatting, then they can use `org-latex-format-headline-function'.
2013-02-23 13:40:47 +01:00
Bastien Guerry
5d5e5631ca ox-latex.el (org-latex-toc-command): Don't add vertical space after the table of contents
* ox-latex.el (org-latex-toc-command): Don't add vertical
space after the table of contents.

Let the user decides about such aesthetic issues.
2013-02-23 13:33:36 +01:00
Bastien Guerry
e9e32173cc Update headers. 2013-02-23 09:56:24 +01:00