0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-22 09:48:28 +00:00
Commit graph

96 commits

Author SHA1 Message Date
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
Bastien Guerry a597a8b622 ox-html.el and ox-org.el: Use the custom HTML extension.
* ox-org.el (org-org-publish-to-org):
* ox-html.el (org-html-publish-to-html): Use the custom
extension.

Thanks to Ian Barton for reporting this.
2013-04-03 13:25:11 +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
Bastien Guerry 51233b8ae2 ox-html.el (org-html-indent): Default to nil
* ox-html.el (org-html-indent): Default to nil, as non-nil can
break indentation of source code blocks.

Thanks to Vladimir Lomov for reporting this.
2013-03-21 14:25:18 +01:00
Bastien Guerry 73fe0ab77a ox-html.el (org-html-link): Don't insert nil if there is no attributes
* ox-html.el (org-html-link--inline-image): Small refactoring.
(org-html-link): Don't insert nil if there is no attributes.

Thanks to Samuel Wales for reporting this.
2013-03-20 07:54:16 +01:00
Bastien Guerry eff59a15d7 ox-html.el: Use the correct syntax for image and link attributes
* ox-html.el (org-html-link--inline-image): Use the correct
syntax for image attributes.  Allow :width :height and :alt as
predefined attributes for inline images.
(org-html-link, org-html-table): Use the standard syntax---
e.g. "#+attr_html: :options ..."--- to get attributes.
2013-03-19 19:39:35 +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
Bastien Guerry 3725c417ea ox-html.el (org-html--build-meta-info): Fix setting of http-equiv="Content-Type"
* ox-html.el (org-html--build-meta-info): Fix setting of
http-equiv="Content-Type".
2013-03-19 09:55:39 +01:00
Rick Frankel 67a17cfe85 Update s5 and deck,js slideshow exporters to work with refactored html
backend.

* lisp/ox-html.el (org-html--build-pre/postamble): Add css class to
  wrapper div (defaults to `org-pre/postamble-class').  Move spec
  building to separate function (`org-html-format-spec').
(org-html-format-spec): New function.
(org-pre/postamble-class): New variable.

* contrib/lisp/ox-deck.el: Replace :html-{pre,post}amble export
  options with :deck versions.
(org-deck-postamble): Replaces `org-deck-postamble-template', uses
format-spec (and `org-html-format-spec') instead of custom template
option.
(org-deck-preamble): Replaces `org-deck-postamble-template', uses
format-spec (and `org-html-format-spec') instead of custom template
option.
(org-deck-title-slide-template): Use standard format specs.
(org-deck-template): Use org-html--build-pre/postamble instead of
`org-deck-fill-template'. Use fill-template for title slide (with
standard format specs) instead of custom `org-fill-template'
(org-deck-template-alist):  Delete.
(org-deck-postamble-template): Delete.
(org-deck-preamble-template): Delete.

* contrib/lisp/ox-s5.el: Same overall set of changes as ox-deck.
(org-s5-divs): New option, similar usage to `org-html-divs'.
(org-s5-footer-template): Delete.
(org-s5-header-template): Delete.
2013-03-16 15:17:44 -04:00
Rick Frankel ffdd9e9d73 ox-html.el: Cleanup pre/postamble handling
* lisp/ox-html.el (org-html--timestamp-format): New variable used
in the metadata and the pre/postamble.
(org-html-style-default): Make the preamble and postamble use the
same style.  Make all anchors font-size %100.  Remove margin from
the content section.
(org-html-container-element): Fix docstring.
(org-html-postamble-format, org-html-preamble-format): Update
docstrings.
(org-html-template): Use `org-html--build-pre/postamble'.
(org-html--build-pre/postamble): New function, combining the
pre/postamble generator.  Merge lists of formatters from the
preamble and postamble.  Fix bug, using :time-stamp-file instead
of :with-date for auto display of date: this brings usage in-line
with the latex and beamer exporter.
(org-html--build-postamble, org-html--build-postamble): Delete.
2013-03-16 09:23:35 +01:00
Bastien Guerry 3293c8fc48 Fix compiler warning 2013-03-15 16:10:07 +01:00
Bastien Guerry e8742b78e0 ox-html.el: New option `org-html-indent' to indent the HTML output
* ox-html.el (org-html-indent): New option.
(org-html-use-unicode-chars): New option.
(org-html-pretty-output): Delete.
(org-html-final-function): Use the new options.
2013-03-15 15:02:18 +01:00
Bastien Guerry d660979a0e ox-html.el (org-html-link): Fix handling of abbreviated links which include a file: protocol
* ox-html.el (org-html-link): Fix handling of abbreviated
links which include a file: protocol.

Before the patch, exporting this buffer does not export the link correctly:

#+LINK: test file:my.file::%s

[[test::search]]
2013-03-15 14:31:13 +01:00
Bastien Guerry 4eba81e5f4 ox-html.el: Enhance date insertion
* ox-html.el (org-html--build-postamble): Default to today's
date.
(org-html--build-meta-info): When #+DATE contains a time
stamp, parse it as a RFC 822 time string, otherwise simply
insert the date as a string.
2013-03-15 14:15:32 +01:00
Bastien Guerry ab33f3cfac ox-html.el (org-html-link): Minor code clean-up
* ox-html.el (org-html-link): Minor code clean-up.
2013-03-13 12:05:15 +01:00
Bastien Guerry 8091854eaf ox-html.el (org-html-format-inline-image): Fix missing string in formatting string
* ox-html.el (org-html-format-inline-image): Fix missing string in
formatting string.

Thanks to Richard Stanton for reporting this.
2013-03-13 09:48:53 +01:00
Bastien Guerry 93489893dc ox-html.el: Better formatting for footnotes
* ox-html.el (org-html-style-default): New classes `footpara' and
`footdef' for the footnotes paragraphs and definitions.
(org-html-format-footnote-definition): Wrap the footnote
defintions into their own div.
(org-html-paragraph): Don't add extra <br/> after a paragraph in a
footnote.
2013-03-12 15:17:15 +01:00
Bastien Guerry 549d81878e ox-html.el (org-html-container-element, org-html-divs): Docstring enhancement
* ox-html.el (org-html-container-element, org-html-divs): Mention
that org-info.js will not work when changing the defaults.
2013-03-12 09:49:34 +01:00
Bastien Guerry 25222853f9 Merge branch 'master-reapply-rick-patch'
Conflicts:
	lisp/ox-html.el
2013-03-12 09:43:58 +01:00
Rick Frankel ec8823bea5 Parameterize some html content containers
* lisp/ox-html.el: (define-backend): Add :html-doctype and
:html-container parameters.
(org-html-doctype): New option for doctype declaration.
(org-html-container-elemnt): New option for specifying the wrapper
container element.
(org-html-divs): Change to alist of three entries each containing a
key ('preamble, 'content, 'postamble), an HTML element type and an
id to allow setting container elements.
(org-html--build-preamble): Modified to use `org-html-divs'.
(org-html--build-postamble): Modified to use `org-html-divs'.
(org-html-template): Modified to use doctype and container-element
settings.
2013-03-12 09:42:27 +01:00
Bastien Guerry baa299952f ox-html.el: New CSS .underline and #org-div-home-and-up.
* ox-html.el (org-html-style-default): New CSS .underline and
#org-div-home-and-up.
(org-html-text-markup-alist): Don't hardcode the style, use the
new class .underline.
(org-html-home/up-format): Don't hardcode the style, use
#org-div-home-and-up.
(org-html-center-block): Use the .center class.
2013-03-12 07:41:38 +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
Bastien Guerry ccee7e4885 Don't use HTML tables for footnote defintions.
* ox-html.el (org-html-format-footnote-definition)
(org-html-footnote-section): Don't wrap footnote definitions into
tables.
(org-html-paragraph): Add HTML style and class parameter when the
paragraph is in a footnote definition.  Also allow to add an extra
string after the paragraph.  Further parameters can be added for
paragraphs in other environments.

Thanks to Samuel Wales for asking this.
2013-03-10 12:09:43 +01:00
Bastien Guerry e100bf91c4 ox-html.el (org-html-template): Always include the title.
* ox-html.el (org-html-template): Always include the title as <h1
class="title"></h1>, even when there is no title, as org-info.js
needs it.

Thanks to Henry Atting for reporting this.
2013-03-08 16:53:06 +01:00
Bastien Guerry e1f42859b4 ox-html.el (org-html-format-inline-image): Don't add superfluous <p></p> when there is an empty caption
* ox-html.el (org-html-format-inline-image): Don't add superfluous
<p></p> when there is an empty caption.
2013-03-08 11:22:01 +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
Bastien Guerry 1259dd8ff7 ox-html.el: More CSS tweaks
* ox-html.el (org-html-style-default): More cosmetic tweaks.
(org-html-head-include-default-style): Minor docstring update.

Thanks to Ken Williams who provided the patch about adding
the name of the source code block.
2013-03-05 17:06:01 +01:00
Bastien Guerry 8a2e3e2a79 Add :version and :package-version
* ox.el (org-export-snippet-translation-alist)
(org-export-coding-system, org-export-in-background)
(org-export-async-init-file, org-export-invisible-backends)
(org-export-dispatch-use-expert-ui):
* ox-texinfo.el (org-texinfo-filename, org-texinfo-classes)
(org-texinfo-format-headline-function)
(org-texinfo-node-description-column)
(org-texinfo-active-timestamp-format)
(org-texinfo-link-with-unknown-path-format)
(org-texinfo-tables-verbatim)
(org-texinfo-table-scientific-notation)
(org-texinfo-text-markup-alist)
(org-texinfo-format-drawer-function)
(org-texinfo-format-inlinetask-function)
(org-texinfo-info-process):
* ox-man.el (org-man-tables-centered)
(org-man-table-scientific-notation)
(org-man-source-highlight, org-man-source-highlight-langs)
(org-man-pdf-process, org-man-logfiles-extensions):
* ox-html.el (org-html-allow-name-attribute-in-anchors)
(org-html-coding-system, org-html-divs):
* ox-ascii.el (org-ascii-text-width)
(org-ascii-headline-spacing, org-ascii-indented-line-width)
(org-ascii-paragraph-spacing, org-ascii-charset)
(org-ascii-underline, org-ascii-bullets)
(org-ascii-links-to-notes)
(org-ascii-table-keep-all-vertical-lines)
(org-ascii-table-widen-columns)
(org-ascii-table-use-ascii-art)
(org-ascii-format-drawer-function)
(org-ascii-format-inlinetask-function):
* org.el (org-modules, org-export-backends)
(org-highlight-latex-and-related, orgstruct-setup-hook):
* org-attach.el (org-attach-git-annex-cutoff):
* org-archive.el (org-archive-file-header-format):
* org-agenda.el (org-agenda-todo-ignore-time-comparison-use-seconds):
* ob-python.el (org-babel-python-hline-to)
(org-babel-python-None-to):
* ob-ditaa.el (org-ditaa-eps-jar-path):
* ob-core.el (org-babel-results-keyword): Add :version and
:package-version.

* ox-ascii.el: Use utf-8-emacs as the file coding system.
2013-03-05 16:38:33 +01:00
Bastien Guerry 085e86dd53 ox-html.el: Update the default CSS
* ox-html.el (org-html-style-default): Cosmetic changes.
(org-html-postamble, org-html-preamble)
(org-html-preamble-format): Update docstring.
2013-03-05 16:38:33 +01:00
Bastien Guerry 83cda91a92 ox-html.el: Fix or add docstring
* ox-html.el (org-html-text-markup-alist)
(org-html-pretty-output, org-html-link-org-files-as-html)
(org-html-postamble, org-html-preamble)
(org-html-format-inline-image, org-html-splice-attributes)
(org-export-splice-style, org-html-htmlize-region-for-paste)
(org-html-fix-class-name)
(org-html-format-footnote-reference)
(org-html-format-footnotes-section)
(org-html-footnote-section, org-html--anchor)
(org-html--todo, org-html--tags, org-html-format-headline)
(org-html-toc, org-html-format-section, org-html-checkbox)
(org-html-format-list-item, org-html-format-latex)
(org-html-encode-plain-text)
(org-html-table-first-row-data-cells)
(org-html-table--table.el-table, org-html-final-function): Fix
or add docstring.
2013-03-05 16:38:33 +01:00
Bastien Guerry 4956a23f8e ox-html.el: Remove two useless comments. 2013-03-04 20:08:18 +01:00
Bastien Guerry 584a782174 ox-html.el (org-html-encode-plain-text): Fix typo in docstring
* ox-html.el (org-html-encode-plain-text): Fix typo in docstring.
2013-03-04 19:41:34 +01:00
Bastien Guerry 516f0df844 Update HTML options names in the manual and ox-html.el.
* org.texi (CSS support): (In-buffer settings): Update HTML options
names.

* ox-html.el (html): Update HTML options names.
2013-03-04 17:56:37 +01:00
Nicolas Goaziou c7dbf2bd45 ox-html: Fix "HTML_HEAD" and "HTML_HEAD_EXTRA" keywords
* lisp/ox-html.el (html): Fix "HTML_HEAD" and "HTML_HEAD_EXTRA"
  keywords.
2013-03-04 17:27:18 +01:00
Nicolas Goaziou 0c14ad963c ox-html: Allow multiple #+LATEX_HEAD and #+LATEX_HEAD_EXTRA again
* lisp/ox-html.el (html): Allow multiple #+LATEX_HEAD and
  #+LATEX_HEAD_EXTRA again.
2013-03-04 16:23:13 +01:00
Nicolas Goaziou 51ab145e36 ox-html: Exclude contents div and title from body-only export
* lisp/ox-html.el (org-html-inner-template): Remove contents div and
  title.
(org-html-template): Add contents div and title.
2013-03-04 12:33:04 +01:00
Nicolas Goaziou f3ef3eb549 ox-html: Can't activate jsinfo script during a body-only export
* lisp/ox-html.el (org-html-infojs-install-script): Can't activate
  jsinfo script during a body-only export.
2013-03-04 12:33:03 +01:00
Bastien Guerry 8b637b54a9 Complete fix for 128e14b 2013-03-03 22:26:09 +01:00
Bastien Guerry f3fa14ef5d Fix commit 128e14b 2013-03-03 22:21:53 +01:00
Jambunathan K 510f5a9ba9 ox-html.el (org-html-code, org-html-verbatim): Transcode value
* lisp/ox-html.el (org-html-code, org-html-verbatim):
Transcode value.
2013-03-03 21:58:09 +01:00
Bastien Guerry 128e14b7f5 ox-html.el: Reintroduce #+HTML_HEAD_EXTRA, previously known as HTML_STYLE_EXTRA
* ox-html.el (html): Reintroduce #+HTML_HEAD_EXTRA, previously
known as HTML_STYLE_EXTRA.
(org-html-head): Enhance docstring.
(org-html-head-extra): Reintroduce.  Was `org-html-style-extra'.
(org-html--build-head): Rename from `org-html--build-head'.
Add information from `org-html-head-extra'.
(org-html-template): Use `org-html--build-head'.

Having an option for adding extra stuff is useful when publishing
projects.
2013-03-03 18:58:40 +01:00
Bastien Guerry 633cfc9dac ox-html.el (org-html-display-buffer-mode): Delete
* ox-html.el (org-html-display-buffer-mode): Delete.
(org-html-export-as-html): Use `set-auto-mode' instead of
`org-html-display-buffer-mode'.

Thanks to Jambunathan for suggesting this.
2013-03-03 18:29:00 +01:00
Bastien Guerry 0e42e7a7e3 ox-html.el: Rename a property (complete commit 2752ef1c4b)
Thanks to Sébastien Vauban for reporting this.
2013-03-03 06:34:35 +01:00
Bastien Guerry b9e1648860 ox-html.el (html): Remove :html-htmlized-css-url :options-alist
* ox-html.el (html): Remove :html-htmlized-css-url
:options-alist.
2013-03-03 06:30:43 +01:00
Jambunathan K f2b2c8318f Add Freemind Mindmap Back-End for Org Export Engine
* contrib/lisp/ox-freemind.el: New file.

* lisp/ox-html.el (org-html--tags, org-html-format-headline)
(org-html--format-toc-headline, org-html-checkbox)
(org-html-table-cell, org-html-timestamp)
(org-html-verse-block, org-html-special-string-regexps):
Replace named HTML entities with their numeric counterparts.
This keeps Freemind backend happy.
2013-03-02 22:33:03 +01:00
Bastien Guerry 71e9b321ec Merge branch 'master-wip3' 2013-03-02 18:59:55 +01:00
Bastien Guerry 4351dda5ab ox-org.el: Handle :htmlized-source in publishing projects
* ox-org.el (org-org-htmlized-css-url): Rename from
`org-html-htmlized-org-css-url' and moved here from
ox-html.el.
(org-org-publish-to-org): Handle :htmlized-source in
publishing projects.
2013-03-02 18:46:07 +01:00
Bastien Guerry 2752ef1c4b ox-html.el: Use HTML_HEAD instead of HTML_STYLE and fix some variable names
* ox-html.el (org-html-style-default): Update docstring.
(org-html-infojs-install-script, org-html--build-style):
Update property names.
(org-html-head-include-scripts)
(org-html-head-include-default-style, org-html-head):
Respectively rename from `org-html-style-include-scripts',
`org-html-style-include-default' and `org-html-style', now
obsolete.
(org-html-style-extra): Delete.

Thanks to those who pointed at this problem on the mailing list.
2013-03-02 18:05:16 +01:00
Nicolas Goaziou 82246f8196 ox-html: Fix infloop
* lisp/ox-html.el (org-html--format-toc-headline): Fix infloop
  introduced in c299c109bb.
2013-03-02 18:02:57 +01:00
Bastien Guerry ff97a0ee9d Revert "Add (provide ...) forms."
This reverts commit 8decdbcd23.
2013-03-02 16:20:59 +01:00