0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-07-16 11:16:27 +00:00
Commit graph

45 commits

Author SHA1 Message Date
Nicolas Goaziou 07368bbc09 org-e-latex: Fix compile bugs
* EXPERIMENTAL/org-e-latex.el (org-e-latex-compile): Fix compile bugs.
2012-02-23 18:26:12 +01:00
Nicolas Goaziou 0fa24209cf org-export: Export snippets are not skipped automatically: back-ends decide
* contrib/lisp/org-export.el (org-export-snippet-backend): New
  function.
(org-export--skip-p): Remove automatic skip of export snippets.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii-export-snippet): Use new
  function.
* EXPERIMENTAL/org-e-html.el (org-e-html-export-snippet): Use new
  function.
* EXPERIMENTAL/org-e-latex.el (org-e-latex-export-snippet): Use new
  function.
* EXPERIMENTAL/org-e-odt.el (org-e-odt-export-snippet): Use new
  function.
* testing/contrib/lisp/test-org-export.el: Add test.

The idea behind this change is that a given back-end may decide to
keep an export snippet not directly targetted at it (i.e. a beamer
back-end that would want to keep latex snippets).  Hence, filtering
snippets is on back-ends side, and a new function is added to help
them in that task.
2012-02-23 18:21:29 +01:00
Nicolas Goaziou 40e42b9dca org-export: New function `org-export-get-parent'
* contrib/lisp/org-export.el (org-export-get-parent): New function.
(org-export-data, org-export-get-previous-element,
org-export-get-next-element): Use new function.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii-item): Use new function.
  Refactor code.
(org-e-ascii-paragraph): Use new function.
* EXPERIMENTAL/org-e-latex.el (org-e-latex-item): Use new function.
* EXPERIMENTAL/org-e-html.el (org-e-html-item): Use new function.
* EXPERIMENTAL/org-e-odt.el (org-e-odt-item): Use new function.
2012-02-22 18:23:44 +01:00
Nicolas Goaziou 620f1d5181 org-export: Remove :genealogy', introduce :ignore-list'
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
  org-e-ascii-item, org-e-ascii-paragraph): Apply `:genealogy' removal.
* EXPERIMENTAL/org-e-latex.el (org-e-latex-item): Apply `:genealogy'
  removal.
* contrib/lisp/org-element.el (org-element-map): Do not compile
  genealogy.  Also use `:ignore-list' when possible.
* contrib/lisp/org-export.el (org-export-collect-tree-properties):
  Populate `:ignore-list' before starting to transcode each element in
  subtree.
(org-export-get-min-level): Use `:ignore-list'.
(org-export--skip-p): Renamed from `org-export-skip-p'.  This is now
an internal function.
(org-export-data): Use and update `:ignore-list'.  Do not update
genealogy.
(org-export-ignore-element): New function
(org-export-last-sibling-p): Small refactoring.
(org-export-resolve-fuzzy-link): Apply `:genealogy' removal.
(org-export-get-genealogy): Use a more efficient algorithm.

The equivalent of (plist-get info :genealogy) is
now (org-export-get-genealogy blob info), blob being any element or
object.
2012-02-22 18:19:09 +01:00
Nicolas Goaziou 60caccc7e9 org-element: Rename accessors
* contrib/lisp/org-element.el (org-element-property,
  org-element-contents): New functions, renamed from, respecively
  `org-element-get-property' and `org-element-get-contents'.
(org-element-link-successor): Small refactoring.
(org-element-drawer-interpreter,
  org-element-dynamic-block-interpreter,
  org-element-footnote-definition-interpreter,
  org-element-headline-interpreter,
  org-element-inlinetask-interpreter, org-element-item-interpreter,
  org-element-special-block-interpreter,
  org-element-babel-call-interpreter,
  org-element-comment-interpreter,
  org-element-comment-block-interpreter,
  org-element-example-block-interpreter,
  org-element-export-block-interpreter,
  org-element-fixed-width-interpreter,
  org-element-keyword-interpreter,
  org-element-latex-environment-interpreter,
  org-element-property-drawer-interpreter,
  org-element-quote-section-interpreter,
  org-element-src-block-interpreter, org-element-table-interpreter,
  org-element-verse-block-interpreter,
  org-element-emphasis-interpreter, org-element-entity-interpreter,
  org-element-export-snippet-interpreter,
  org-element-footnote-reference-interpreter,
  org-element-inline-babel-call-interpreter,
  org-element-inline-src-block-interpreter,
  org-element-latex-fragment-interpreter,
  org-element-link-interpreter, org-element-macro-interpreter,
  org-element-statistics-cookie-interpreter,
  org-element-subscript-interpreter,
  org-element-superscript-interpreter,
  org-element-time-stamp-interpreter,
  org-element-verbatim-interpreter, org-element-map,
  org-element-parse-elements, org-element-parse-objects,
  org-element-interpret-data,
  org-element-interpret--affiliated-keywords,
  org-element-normalize-contents, org-element-swap-A-B,
  org-element-backward, org-element-drag-backward,
  org-element-drag-forward, org-element-forward,
  org-element-mark-element, org-narrow-to-element,
  org-transpose-elements, org-element-unindent-buffer,
  org-element-up): Use new names.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
  org-export-use-select-tags-p, org-export-get-min-level,
  org-export-data, org-export-skip-p, org-export-interpret-p,
  org-export-collect-footnote-definitions,
  org-export-footnote-first-reference-p,
  org-export-get-footnote-number, org-export-get-relative-level,
  org-export-last-sibling-p, org-export-inline-image-p,
  org-export-resolve-fuzzy-link, org-export-resolve-id-link,
  org-export-resolve-ref-link, org-export-resolve-coderef,
  org-export-expand-macro, org-export-get-loc,
  org-export-handle-code, org-export-collect-elements,
  org-export-get-genealogy, org-export-get-previous-element): Use new names.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
  org-e-ascii--build-title, org-e-ascii--build-caption,
  org-e-ascii--list-listings, org-e-ascii--list-tables,
  org-e-ascii--unique-links, org-e-ascii--describe-links,
  org-e-ascii-template, org-e-ascii-drawer, org-e-ascii-emphasis,
  org-e-ascii-entity, org-e-ascii-export-snippet,
  org-e-ascii-export-block, org-e-ascii-fixed-width,
  org-e-ascii-headline, org-e-ascii-horizontal-rule,
  org-e-ascii-inline-src-block, org-e-ascii-inlinetask,
  org-e-ascii-item, org-e-ascii-keyword,
  org-e-ascii-latex-environment, org-e-ascii-latex-fragment,
  org-e-ascii-link, org-e-ascii-paragraph, org-e-ascii-quote-section,
  org-e-ascii-statistics-cookie, org-e-ascii-subscript,
  org-e-ascii-superscript, org-e-ascii-table, org-e-ascii-verbatim,
  org-e-ascii-verse-block): Use new names
* EXPERIMENTAL/org-e-latex.el (org-e-latex--wrap-label,
  org-e-latex-drawer, org-e-latex-emphasis, org-e-latex-entity,
  org-e-latex-example-block, org-e-latex-export-snippet,
  org-e-latex-export-block, org-e-latex-fixed-width,
  org-e-latex-footnote-reference, org-e-latex-headline,
  org-e-latex-link--inline-image, org-e-latex-latex-fragment,
  org-e-latex-latex-environment, org-e-latex-keyword,
  org-e-latex-item, org-e-latex-inlinetask,
  org-e-latex-inline-src-block, org-e-latex-special-block,
  org-e-latex-radio-target, org-e-latex-quote-section,
  org-e-latex-plain-list, org-e-latex-src-block,
  org-e-latex-statistics-cookie, org-e-latex-table--format-string,
  org-e-latex-target, org-e-latex-time-stamp, org-e-latex-verbatim):
  Use new names
* EXPERIMENTAL/org-e-publish.el (org-e-publish-collect-index,
  org-e-publish-index-generate-theindex): Use new names.
2012-02-22 13:47:20 +01:00
Nicolas Goaziou 0ff3d47d13 org-element: Introduce a new accessor: `org-element-type'
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--current-text-width,
  org-e-ascii--build-caption, org-e-ascii--build-title,
  org-e-ascii--describe-links, org-e-ascii-template,
  org-e-ascii-paragraph): Use new accessor
* EXPERIMENTAL/org-e-latex.el (org-e-latex--guess-inputenc): Small
  refactoring.
  (org-e-latex-footnote-reference, org-e-latex-link):  Use new
  accessor.
* contrib/lisp/org-element.el (org-element-type): New function.
  (org-element-map, org-element-parse-elements,
  org-element-interpret-data, org-element-normalize-contents,
  org-element-forward, org-element-unindent-buffer): Use new
  accessor.
* contrib/lisp/org-export.el (org-export-get-inbuffer-options,
  org-export-get-min-level, org-export-data, org-export-skip-p,
  org-export-interpret-p, org-export-expand,
  org-export-expand-include-keyword,
  org-export-prepare-file-contents, org-export-first-sibling-p,
  org-export-resolve-fuzzy-link, org-export-get-ordinal,
  org-export-get-loc, org-export-get-genealogy,
  org-export-get-parent-headline): Use new accessor.
2012-02-22 13:21:13 +01:00
Nicolas Goaziou 61f831b923 org-e-latex: Fix label position in LaTeX environments
* EXPERIMENTAL/org-e-latex.el (org-e-latex-latex-environment): label
  should be within the environment.
2012-02-20 01:05:46 +01:00
Nicolas Goaziou af2a46a76f org-export: Implement "ref" type links
* contrib/lisp/org-element.el (org-element-link-parser): Recognize
  "ref" type links as a new type of Org link.
* contrib/lisp/org-export.el (org-export-resolve-ref-link): New
  function.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--describe-links): Do not
  describe "ref" type links at the end of each section.
(org-e-ascii-link): Handle "ref" type links.
* EXPERIMENTAL/org-e-latex.el (org-e-latex-link): Handle "ref" type
  links.

"ref" type links are Org answer to LaTeXisms like "\ref{some-label}".
Hence, [[ref:some-label]] will be replaced with the sequence number of
the element with name "#+name: some-label" during export.
2012-02-19 18:24:22 +01:00
Nicolas Goaziou 6782d6f77b Fix infloop when parsing radio targets
* contrib/lisp/org-element.el (org-element-link-parser): Do not parse
  radio link as a recursive link.
* contrib/lisp/org-export.el (org-export-solidify-link-text): Make
  sure "\" isn't allowed in solidified strings.  This is required to
  allow entities in radio targets.
* EXPERIMENTAL/org-e-latex.el (org-e-latex-link): Apply changes to
  radio links.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii-link): Apply changes to
  radio links.
2012-02-17 18:46:05 +01:00
Nicolas Goaziou 3e18c9cad7 org-e-latex: Change list of listings command according to package used
* EXPERIMENTAL/org-e-latex.el (org-e-latex-keyword): Use
  \listoflistings for minted and \lstlistoflistings for listings package.
2012-02-16 20:14:31 +01:00
Nicolas Goaziou 664271cde7 org-export: New `org-export-get-parent-paragraph' function
* contrib/lisp/org-export.el (org-export-get-genealogy,
org-export-get-parent-paragraph): New functions.
(org-export-get-parent-headline, org-export-get-previous-element,
org-export-get-next-element): Internally use new function.
* EXPERIMENTAL/org-e-latex.el (org-e-latex-link--inline-image,
org-e-latex-link): Apply changes to topology functions.

This new function is especially useful since every object derives its
properties from those the containing paragraph.
2012-02-16 20:14:31 +01:00
Nicolas Goaziou 7d3f7f60e0 Make inline image definition more configurable
* contrib/lisp/org-element.el (org-element-object-restrictions): Allow
  plain links in link description.
* contrib/lisp/org-export.el (org-export-default-inline-image-rule):
  New variable.
(org-export-inline-image-p): Use rules instead of extensions. A rule
is a regexp applied to path for a given type of link.  It allows to
extend inline images to non-local files.
* EXPERIMENTAL/org-e-latex.el (org-e-latex-inline-image-rules): New
  variable.
(org-e-latex-inline-image-extensions): Removed variable

There are two motivations behind this change.  The first one is to
allow, for example, an HTML exporter to define a rule like the
following:

 ("http" . "\\.\\(png\\|jpg\\|jpeg\\|gif\\)\\(\\?\\(\\w+=\\w+&?\\)*\\)?")

The other one is to properly define thumbnails (clickable images),
like the following:

  [[http://orgmode.org][file:~/my-logo.png]]
2012-02-16 20:14:31 +01:00
Nicolas Goaziou c804bef74b org-e-latex: Small refactoring
* EXPERIMENTAL/org-e-latex.el (org-e-latex-table--format-string):
  Small refactoring.
2012-02-08 23:26:02 +01:00
Nicolas Goaziou f4a568f06a org-e-latex: Allow formal "booktabs" display of tables
* EXPERIMENTAL/org-e-latex.el (org-e-latex-tables-booktabs): New
  variable.
(org-e-latex-table): Use special "booktabs" rules when previous
variable is non-nil or "booktabs=yes" attribute is provided.
2012-02-08 23:26:02 +01:00
Nicolas Goaziou 678de3fdf0 org-e-latex: Add creator info in hypersetup when it should be commented
* EXPERIMENTAL/org-e-latex.el (org-e-latex-template): Add creator info
  in hypersetup when it should be commented.
2012-02-07 08:20:27 +01:00
Nicolas Goaziou aac1c8b60d org-e-latex: Fix a docstring
* EXPERIMENTAL/org-e-latex.el (org-e-latex-classes): Fix a docstring.
2012-02-06 15:08:05 +01:00
Nicolas Goaziou 6eeca7f9cb org-e-latex: Fix some docstrings 2012-02-05 15:06:49 +01:00
Nicolas Goaziou 176b959c4f Handling of file inclusion through keywords is done before export
* contrib/lisp/org-element.el (org-element-map): Remove included file
  expansion part.
* contrib/lisp/org-export.el (org-export-as): Expand include keywords
  before executing blocks.
(org-export-expand-include-keyword, org-export-prepare-file-contents):
  New functions.
(org-export-included-file, org-export-parse-included-file): Removed
  functions.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii-keyword): Remove include
  keyword handling.
* EXPERIMENTAL/org-e-latex.el (org-e-latex-keyword): Remove include
  keyword handling.

Back-ends do not need anymore to take care of #+include keywords.
This change is required since file inclusion can potentially break any
structure.  Hence, it should be done before parsing.
2012-02-05 12:57:50 +01:00
Nicolas Goaziou d9970d1bd9 Implement limited headine numbering for e-latex and e-ascii back-ends
* contrib/lisp/org-export.el (org-export-with-section-numbers): Modify
  doc-string to document the changes.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--build-title): Implement
  limited headline numbering.
* EXPERIMENTAL/org-e-latex.el (org-e-latex-template): Implement
  limited headline numbering.
2012-01-27 14:49:32 +01:00
Nicolas Goaziou 674bb56857 org-e-latex: Change output for links without description pointing to an headline
* EXPERIMENTAL/org-e-latex.el (org-e-latex-link): Use ref command for
  a link pointing to an headline when headlines are numbered and no
  description is provided.
(org-e-latex-headline): Change automatic label for headlines.
2012-01-25 18:23:59 +01:00
Nicolas Goaziou c4fad02b06 org-e-latex: Fix an infloop with inline images
* EXPERIMENTAL/org-e-latex.el (org-e-latex-link--inline-image): Fix an
  infloop.
2012-01-25 13:18:28 +01:00
Nicolas Goaziou cb8847f6fe org-e-latex: Expand path when file name is absolute in an inline image
* EXPERIMENTAL/org-e-latex.el (org-e-latex-link): In links, expand
  path when file name is absolute.
2012-01-23 19:16:30 +01:00
Nicolas Goaziou 32afb61b87 org-e-latex: Fix variable shadowing
* EXPERIMENTAL/org-e-latex.el (org-e-latex-table--format-string): Now
  accept three arguments.
(org-e-latex-table--align-string, org-e-latex-table): Distinguish
between the communication channel (INFO) and informations about
table (TABLE-INFO).
2012-01-22 22:00:44 +01:00
Nicolas Goaziou 711d2ef0e0 org-element: Syntax change for caption
* contrib/lisp/org-element.el (org-element-dual-keywords): Move
  caption in the dual keywords category.
(org-element--affiliated-re): Change regexp matching a dual keyword.
(org-element-collect-affiliated-keywords): Dual parsed keywords also
  get their optional value parsed as a secondary string.
* EXPERIMENTAL/org-e-latex.el (org-e-latex--caption/label-string,
  org-e-latex-src-block): Apply caption status change.
* EXPERIMENTAL/org-e-ascii.el (org-e-ascii--build-caption): Apply
  caption status change.
(org-e-ascii--list-listings, org-e-ascii--list-tables): Apply caption
  status change.  Also use short caption name when available.

The status change implies a syntax change.  Captions can now share
#+results: syntax, which mean that they can have a secondary
value. Thus, the following Org snippets are valid, the first two being
equivalent.

#+caption: long name
#+caption[]: long name
#+caption[short name]: long name
2012-01-22 21:34:00 +01:00
Nicolas Goaziou 96dc2b01ce org-e-latex: Silence byte-compiler 2012-01-21 16:51:15 +01:00
Nicolas Goaziou 3c4a0795df Fix some docstrings 2012-01-17 21:06:30 +01:00
Nicolas Goaziou ecfb12de19 New interactive export functions for 'e-latex back-end
* EXPERIMENTAL/org-e-latex.el (org-e-latex-export-to-latex,
  org-e-latex-export-to-pdf): New functions.
* contrib/lisp/org-export.el (org-export-dispatch): Make use of new
  functions.
2012-01-17 20:27:38 +01:00
Nicolas Goaziou 812d0a5375 org-e-latex: Fix customize group name and docstrings
* EXPERIMENTAL/org-e-latex.el (org-export-e-latex): Customize group,
  renamed from org-export-latex.
(org-e-latex-listings, org-e-latex-listings-options,
  org-e-latex-minted-options, org-e-latex-custom-lang-environments):
  Fix variable name in docstring.
2012-01-16 08:06:11 +01:00
Nicolas Goaziou 5e970e407a org-export: Add a new predicate to test if an headline is low level
* contrib/lisp/org-export.el (org-export-low-level-p): New function.
* EXPERIMENTAL/org-e-latex.el (org-e-latex-headline): Make use of new function.
2012-01-15 18:40:40 +01:00
Nicolas Goaziou 85588714ac org-e-latex: Apply changes to org-export-resolve-fuzzy-link
* EXPERIMENTAL/org-e-latex.el (org-e-latex-link): Apply changes to
  org-export-resolve-fuzzy-link.
2012-01-14 01:02:48 +01:00
Nicolas Goaziou cbc5aafe19 org-e-latex: Apply signature modification of functions
* EXPERIMENTAL/org-e-latex.el (org-e-latex-example-block,
  org-e-latex-src-block): Apply changes to `org-export-handle-code'.
(org-e-latex-link): Use new function `org-export-resolve-coderef'.
2012-01-11 16:52:08 +01:00
Nicolas Goaziou c15209c923 org-e-latex: Apply removal of :previous-element and :previous-object properties
* EXPERIMENTAL/org-e-latex.el (org-e-latex-footnote-reference,
  org-e-latex-headline): Use new functions for retrieving previous
  element.
2012-01-11 16:52:08 +01:00
Nicolas Goaziou 3010402b47 org-e-latex: Support for sections
* EXPERIMENTAL/org-e-latex.el (org-e-latex-section): New function
2012-01-08 12:50:29 +01:00
Nicolas Goaziou fc895b9574 org-e-latex: Apply changes to `:genealogy'
* EXPERIMENTAL/org-e-latex.el (org-e-latex-item,
  org-e-latex-link--inline-image): Apply changes to `:genealogy'.
2012-01-07 14:33:48 +01:00
Nicolas Goaziou 08bad014c7 EXPERIMENTAL/org-e-latex.el (org-e-latex-collect-errors): Small fix 2012-01-05 22:29:16 +01:00
Nicolas Goaziou 938f126511 EXPERIMENTAL/org-e-latex: Fix transcoding of example-block elements
* EXPERIMENTAL/org-e-latex.el (org-e-latex-example-block): Fix
transcoding.  Verbatim environment was omitted.
(org-e-latex-fixed-width): Whitespace cleanup.
2012-01-05 20:15:05 +01:00
Nicolas Goaziou 6d2a98552d EXPERIMENTAL/org-e-latex.el: Fix defcustom groups 2012-01-05 20:15:05 +01:00
Nicolas Goaziou 116dfdd2d5 EXPERIMENTAL/org-e-latex: Provide a canonical way to compile a .tex file
* EXPERIMENTAL/org-e-latex.el (org-e-latex-pdf-process,
(org-e-latex-logfiles-extensions, org-e-latex-remove-logfiles): New
variables.
(org-e-latex-compile, org-e-latex-collect-errors): New functions
2012-01-05 20:15:05 +01:00
Bastien Guerry e44d2975ff Fix copyright (to 2012) year and Org version (to 7.8.03). 2012-01-03 18:47:01 +01:00
Nicolas Goaziou d1019fea0d * EXPERIMENTAL/org-e-latex.el: Small documentation change 2011-12-23 16:34:20 +01:00
Nicolas Goaziou ed96338b21 EXPERIMENTAL/org-e-latex: Apply change of back-end's name
* EXPERIMENTAL/org-e-latex.el (org-e-latex--caption/label-string,
org-e-latex-template, org-e-latex-headline,
org-e-latex-inlinetask, org-e-latex-item, org-e-latex-keyword,
org-e-latex-link, org-e-latex-src-block, org-e-latex-table,
org-e-latex-verse-block): Apply change of back-end's name.
2011-12-23 16:30:06 +01:00
Nicolas Goaziou d7ba7d2e69 EXPERIMENTAL/org-e-latex: Use new footnote API
* EXPERIMENTAL/org-e-latex.el (org-e-latex-footnote-reference):
  Rewrite function to use new footnote API.
2011-12-23 16:24:14 +01:00
Nicolas Goaziou c3972265bb Modification to the type signature of `org-export-inline-image-p'
EXPERIMENTAL/org-e-latex.el (org-e-latex-link): Apply changes.
contrib/lisp/org-export.el (org-export-inline-image-p): Remove
description of the link as a required argument, since this function is
called with link contents anyway.
2011-12-20 18:50:59 +01:00
Bastien Guerry 8af710c41c Add a commentary: how to test org-e-latex.el. 2011-12-11 16:33:34 +01:00
Bastien Guerry df6b7be939 Rename EXPERIMENTAL/org-latex.el to EXPERIMENTAL/org-e-latex.el.
This prevents a namespace conflict with lisp/org-latex.el.  By
convention, new exporters in EXPERIMENTAL/ will share the org-e-*
prefix.
2011-12-11 16:23:09 +01:00
Renamed from EXPERIMENTAL/org-latex.el (Browse further)