Commit Graph

370 Commits

Author SHA1 Message Date
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 528b909fe1 ox-html: Properly escape ampersands in links
* lisp/ox-html.el (org-html-link): Properly escape ampersands in
  links.
(org-html-encode-plain-text): Small refactoring.

Reported-by: Karl Voit <devnull@Karl-Voit.at>
<http://permalink.gmane.org/gmane.emacs.orgmode/94640>
2015-02-05 12:56:23 +01:00
Nicolas Goaziou 5ae0749e63 ox-html: Do not output "nil" for empty sections
* lisp/ox-html.el (org-html-section): Do not output "nil" when section
  has no contents.

Reported-by: T.F. Torrey <tftorrey@tftorrey.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/94464>
2015-01-30 00:31:33 +01:00
Rasmus a297692b1c ox-html: Remove extra HTML_HEAD, HTML_HEAD_EXTRA
* ox-html.el (html): Fix typo.
2015-01-27 03:30:43 +01:00
Rasmus 86588d6501 ox-html.el: Fix bug introduced in 077a24b
* ox-html.el (org-html-format-list-item): Check that contents in
  non-nil.
2015-01-12 12:00:49 +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
Zane D. Purvis 7e6436e2c8 ox-html.el: Add exporting of priority
* list/ox-html.el (org-html--priority): New function.
(org-html-format-headline-default-function): Call `org-html--priority'.
(org-html-style-default): Add `.priority'.

HTML export previously did not support exporting of priority simply by setting
`org-export-with-priority' to `t'.

TINYCHANGE
2015-01-10 10:27:32 +01:00
Zane D. Purvis f9ba99bbc9 ox-html.el: DONE is monospace for consistency
* lisp/ox-html.el (org-html-style-default): `.done' gets `font-family:
monospace;'

Other items on the headline that aren't the text itself are monospaced,
including non-DONE todo's.

TINYCHANGE
2015-01-09 09:22:03 +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
Rasmus 077a24b8d0 ox-html.el: Trim list items
* ox-html.el (org-html-format-list-item): Trim contents to avoid
  spurious space.
2014-12-20 23:32:44 +01:00
Nicolas Goaziou fb906e15d7 ox-html: Fix docstring
* lisp/ox-html.el (org-html-protect-char-alist): Fix docstring.

Reported-by: Marcin Borkowski <mbork@wmi.amu.edu.pl>
2014-12-06 22:28:19 +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 8daf4a89f1 Fix preview latex
* lisp/org.el (org-toggle-latex-fragment): Fix previewing nested
  environments.
(org-format-latex): Change signature.  Rewrite using Elements.

* lisp/ox-html (org-html-format-latex):
* lisp/ox-odt (org-odt--translate-latex-fragments): Apply signature
  change.

Reported-by: Andreas Leha <andreas.leha@med.uni-goettingen.de>

<http://permalink.gmane.org/gmane.emacs.orgmode/92142>
2014-10-28 23:55:01 +01:00
Rasmus 58bb3a21f8 ox-html: Fix bug in c9ca0b6d.
* ox-html.el (org-html-inlinetask): Fix bug.
2014-10-26 02:50:14 +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 a526ee3b82 Fix 464cd96
* lisp/ox-html.el (org-html-link):
* lisp/ox-md.el (org-md-link): Fix errors introduced in
  464cd965cb.
2014-10-03 22:23:25 +02:00
Rasmus 464cd965cb ox: Support unnumbered headlines via property
* ox.el (org-export--collect-headline-numbering): Ignore unnumbered headline.
(org-export-get-headline-id,
org-export--collect-unnumbered-headline-id): New functions.
(org-export-numbered-headline-p): Further tests for unnumbered headline.
* ox-odt.el (org-odt-headline, org-odt-link,
org-odt-link--infer-description)
ox-md.el (org-md-headline, org-md-link),
ox-latex.el (org-latex-headline, org.latex-link),
ox-html.el (org-html-headline, org-html-link),
ox-ascii.el (org-ascii-link): Support unnumbered headlines.
* test-ox.el (test-org-export/org-export-get-headline-id): New test.
* OrgOdtStyles.xml: Add styles for unnumbered headings.
2014-10-03 22:06:34 +02:00
Nicolas Goaziou 80e493a1f7 Merge branch 'maint'
Conflicts:
	lisp/ox-html.el
2014-09-18 22:08:30 +02:00
Nicolas Goaziou 873fe49811 ox-html: Fix linking to deep level headlines
* lisp/ox-html.el (org-html-headline): Make sure even listified
  headlines have proper anchors so internal links can refer to them.
  Small refactoring.

Thanks to Bruce Gilstrap for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/90835
2014-09-18 21:37:07 +02:00
Nicolas Goaziou 3432681fbe Parsing and exporting special blocks preserve case
* lisp/org-element.el (org-element-special-block-parser):
* lisp/ox-latex.el (org-latex-special-block):
* lisp/ox-html.el (org-html-special-block):
* lisp/ox-man.el (org-man-special-block):
* lisp/ox-odt.el (org-odt-special-block):
* lisp/ox-texinfo.el (org-texinfo-special-block):
* contrib/lisp/ox-groff.el (org-groff-special-block): Preserve case.

* testing/lisp/test-org-element.el (test-org-element/special-block-parser):
  Add test.
2014-09-17 20:52:54 +02:00
Nicolas Goaziou e3369c07f0 Revert "Merge export and special blocks within back-ends"
This reverts commit fbc7097ffa.

Conflicts:
	lisp/ox-texinfo.el
2014-09-08 11:57:27 +02:00
Nicolas Goaziou 1a7c9d7d79 ox-html: Fix 9a34a1
* lisp/ox-html.el (org-html-paragraph): Only apply special rule in
  list items.

Thanks to Richard Lawrence for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/90532
2014-09-06 19:03:18 +02:00
Nicolas Goaziou 5da35ee0ca Merge branch 'maint' 2014-08-28 01:04:01 +02:00
Nicolas Goaziou ae457e7dce Fix exporting radio link with missing radio target
* contrib/lisp/ox-groff.el (org-groff-link):
* lisp/ox-beamer.el (org-beamer-link):
* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-odt.el (org-odt-link): When radio link has no valid
  target (e.g., this is a subtree export and the radio target is not
  in the exported subtree), simply return contents.

Thanks to Daniel Clement for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/90218
2014-08-28 00:48:17 +02:00
Nicolas Goaziou 9a34a13c07 ox-html: Better criterion for first paragraphs in lists
* lisp/ox-html.el (org-html-paragraph): Do not wrap first paragraph in
  an item within <p> tags in the most simple cases.

Thanks to Daniel Clemente for suggesting it.
http://permalink.gmane.org/gmane.emacs.orgmode/89413
2014-08-26 09:55:54 +02:00
Nicolas Berthier 2ea7bf4042 ox-html: Support for exporting inline source code to HTML
* lisp/ox-html.el (org-html-inline-src-block): support for exporting
inline source code to HTML.
2014-08-22 14:39:39 +02:00
Rick Frankel 6fa58b3cc2 Fix html checkbox output.
* lisp/ox-html.el (html): Add missing `:html-checkbox-type' option.
2014-08-06 10:24:27 -04:00
Nicolas Goaziou 6ba05e3200 ox-html: Fix missing <span> block around section number
* lisp/ox-html.el (org-html-headline): Add <span> element around
  section number.

http://permalink.gmane.org/gmane.emacs.orgmode/89369
2014-08-02 15:36:42 +02:00
Nicolas Goaziou cc7d757571 ox-html: Fix missing section number in ids
* lisp/ox-html.el (org-html-headline): Fix missing section number in
  div ids.

Thanks to Matt Lundin for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/89291
2014-07-31 10:59:58 +02:00
Matt Lundin 282d8c86e7 Fix broken links in html publishing
* lisp/ox-html.el: Fix incorrect property name in :options-alist of
  html backend definition.
2014-07-30 09:57:18 +02:00
Nicolas Goaziou c9ca0b6df8 ox-html: Use options instead of hard-coded variables
* contrib/lisp/ox-s5.el (org-s5--format-toc-headline): Apply signature
  change.

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

* lisp/ox-html.el (org-html-format-drawer-function,
  org-html-publish-to-html): Small reformatting.

(org-html-infojs-install-script, org-html--build-meta-info,
org-html--build-mathjax-config, org-html-format-spec,
org-html--build-pre/postamble, org-html-template, org-html-toc,
org-html--format-toc-headline, org-html-list-of-listings,
org-html-list-of-tables, org-html-bold, org-html-drawer,
org-html-headline, org-html-inlinetask, org-html-italic,
org-html-checkbox, org-html-inline-image-p, org-html-link,
org-html-section, org-html-strike-through, org-html-table-cell,
org-html-table-row, org-html-underline, org-html-verbatim,
org-html-final-function, org-html-export-to-html): Do not use
hard-coded variable names.

(org-html-format-headline-function,
org-html-format-inlinetask-function): Change default value.  Require
an additional argument.

(org-html-format-footnote-reference,
org-html-format-footnotes-section,
org-html-format-footnote-definition, org-html-format-headline,
org-html-format-headline--wrap, org-html-format-section): Remove
functions.

(org-html-footnote-section, org-html-footnote-reference): Apply
function removal.  Do not use hard-coded variable names.

(org-html--anchor, org-html--todo, org-html--tags): Change signature.
Do not use hard-coded variable names.

(org-html-radio-target, org-html-target): Apply signature change.

(org-html-format-headline-default-function,
org-html-format-inlinetask-default-function): New functions.
2014-07-29 15:45:18 +02:00
Nicolas Goaziou fd448cb1e2 Remove some options associated to variables
* lisp/ox-html.el: Remove options.

* lisp/ox-icalendar.el: Remove options.

* lisp/ox-latex.el (org-latex-guess-inputenc, org-latex-compile,
  org-latex--collect-warnings): Use full variable name instead of an
  option.

* lisp/ox-man.el: Remove options.

* lisp/ox-odt.el: Remove options.

* lisp/ox-texinfo.el: Remove options.

* doc/org.texi (Publishing options): Update documentation accordingly.

These variables are meant to be used outside (or on the fringe) of the
export process, where information channel is not available.

remove
2014-07-29 15:45:18 +02:00
Bastien Guerry 44aaaad8c0 ox-html.el (org-html-fontify-code): Possibly deactivate fci-mode
* ox-html.el (org-html-fontify-code): Possibly deactivate fci-mode.

Thanks to Kaushal for suggesting this.
2014-07-28 11:07:03 +02:00
Bastien Guerry ac4b11e565 ox-html.el (org-html-protect-char-alist): Make a defvar
* ox-html.el (org-html-protect-char-alist): Make a defvar.
2014-07-27 19:55:49 +02:00
Nicolas Goaziou fbc7097ffa Merge export and special blocks within back-ends
* lisp/ox-ascii.el (org-ascii-export-block): Remove function.
(org-ascii-special-block): Handle raw special blocks.

* lisp/ox-beamer.el (org-beamer-export-block): Remove function.

* lisp/ox-html.el (org-html-export-block): Remove function.
(org-html-special-block): Handle raw special blocks.

* lisp/ox-latex.el (org-latex-export-block): Remove function.
(org-latex-special-block): Handle raw special blocks.

* lisp/ox-man.el (org-man-export-block): Remove function.
(org-man-special-block): Handle raw special blocks.

* lisp/ox-md.el (org-md-export-block): Remove function.

* lisp/ox-odt.el (org-odt-export-block): Remove function.
(org-odt-special-block): Handle raw special blocks.

* lisp/ox-texinfo.el (org-texinfo-export-block): Remove function.
(org-texinfo-special-block): Handle raw special blocks.

* contrib/lisp/ox-groff.el (org-groff-export-block): Remove function.
(org-groff-special-block): Handle raw special blocks.

* contrib/lisp/ox-koma-letter.el (org-koma-letter-export-block):
  Remove function.
2014-07-27 14:29:24 +02:00
Eric Schulte 1c3bdbb80a inhibit <p> wraps on a whole-list basis
* lisp/ox-html.el (org-html-paragraph): Extend the special case of
  inhibiting <p> wrappers to only perform such inhibition when *every*
  element of the list is a single paragraph long.  Otherwise unsightly
  spacing results.
2014-06-23 20:08:09 -04:00
Bastien Guerry f36b19eef6 org.el: Send a warning when org-loaddefs.el could not be found
* org.el: Send a warning when org-loaddefs.el could not be
found in the directory where this org.el file is loaded from.

* ox-org.el (org-org-publish-to-org):
* ox-odt.el (org-odt-do-format-code):
* ox-html.el (org-html-fontify-code):
* org.el (org-fontify-like-in-org-mode):
* org-src.el (org-src-font-lock-fontify-block):
* org-clock.el (org-clock-get-clocktable): Use
`font-lock-ensure' instead of `font-lock-fontify-buffer'.

* org.el (org-outline-level, org-copy-subtree)
(org-sort-entries, orgstruct-setup, org-show-context)
(org-create-formula-image-with-dvipng)
(org-create-formula-image-with-imagemagick)
(org-goto-sibling, org-goto-first-child, org-show-entry): Use
`ignore-errors' instead of (condition-case nil ... (error nil)).

People trying to load org.el when org-loaddefs.el is not available
has been a major cause of trouble when installing Org.  The warning
tells them what they need to do.
2014-05-29 22:08:43 +02:00
Nicolas Goaziou 7a956c3880 Associate all defcustoms to options in back-end definitions
* lisp/ox-ascii.el:
* lisp/ox-beamer.el:
* lisp/ox-html.el:
* lisp/ox-latex.el:
* lisp/ox-man.el:
* lisp/ox-md.el:
* lisp/ox-odt.el:
* lisp/ox-org.el:
* lisp/ox-texinfo.el: All defcustoms are defined as options in the
  back-end.
* lisp/ox-icalendar.el (icalendar): Ditto.  Also rename :with-vtodo
  property to :icalendar-include-todo.

* doc/org.texi (Publishing options): Update back-end specific
  properties.  Remove @vindex entries so as not to clobber variables
  index.

This change allows to change default value for any defcustom on the
fly when publishing.  It also normalizes how to choose and name what
variables to define as back-end options.
2014-05-28 14:53:29 +02:00
Nicolas Goaziou 6cdf1b6d3f Merge branch 'maint' 2014-05-15 13:45:38 +02:00
Nicolas Goaziou ab1ce2a757 ox-html: Fix spurious "figure" divs on empty paragraphs
* lisp/ox-html.el (org-html-standalone-image-p): Ensure paragraph
  contains at least a link before return a non-nil value.  Clarify
  docstring.

Thanks to Fabrice Popineau for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/86314
2014-05-15 13:44:18 +02:00
Nicolas Goaziou 5bece6f014 ox-html: Fix link handling
* lisp/ox-html.el (org-html-link): Use `org-link-escape-browser'.

Thanks to Michael Brand for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/85789
2014-05-04 21:41:43 +02:00
Bastien Guerry f588f6d884 Merge branch 'maint' 2014-04-22 10:42:10 +02:00
Bastien Guerry 6f1b5185c2 ox-html.el (org-html-infojs-install-script): Don't install infojs scripts when #+INFOJS_OPT: is empty
* ox-html.el (org-html-infojs-install-script): Don't install
infojs scripts when #+INFOJS_OPT: is empty.

Thanks to Diez B. Roggisch for reporting this.
2014-04-22 10:41:56 +02:00
Rick Frankel dd8b3cbf36 Fix list item class attribute.
* lisp/ox-html.el (org-html-format-list-item): Make sure checkbox type
  class attribute only added to list item if item is a checkbox.
2014-04-17 15:16:19 -04:00
Nicolas Goaziou fffd055ac5 Merge branch 'maint'
Conflicts:
	lisp/org-element.el
	lisp/ox-html.el
2014-04-17 11:34:54 +02:00
Nicolas Goaziou 9dac00129d Update export back-ends wrt "file" link changes
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-html.el (org-html-link):  Do not expand absolute file names
  and do not try to fix hierarchy part, as it is already taken care of
  at the parser level.

* lisp/ox-md.el (org-md-link): Ditto.  Also fix absolute file names.

* lisp/ox-odt.el (org-odt-link):
* lisp/ox-man.el (org-man-link):
* lisp/ox-texinfo.el (org-texinfo-link):
* contrib/lisp/ox-groff.el (org-groff-link): Ditto.  Do not prepend
  scheme part to relative file names either.

* contrib/lisp/ox-deck.el (org-deck-link): Small refactoring.
2014-04-17 11:30:15 +02:00
Nicolas Goaziou 73c141e43e Revert "Fix link export"
This reverts commit fc1f7d752f.
2014-04-17 11:30:14 +02:00
Nicolas Goaziou 7b3c11f797 Revert "Fix mailto links"
This reverts commit f61cd6b7a1.
2014-04-17 11:30:14 +02:00
Rick Frankel 8d20a8419f Add classes to checkbox list elements.
* lisp/ox-html.el (org-html-format-list-item): Add the appropriate
  class `on', `off' or `trans' (the tri-state checkbox types) to the
  list elements in checkbox lists.
2014-04-16 21:10:34 -04:00
Rick Frankel 93ff3e5cb7 Process html attributes on paragraphs.
* lisp/ox-html.el (org-html-paragraph): Add processed html attributes
  to paragraph tag.
2014-04-16 21:09:57 -04:00
Nicolas Goaziou ee3cf87d40 Merge branch 'maint'
Conflicts:
	lisp/ox-html.el
2014-04-14 13:56:05 +02:00
Nicolas Goaziou f61cd6b7a1 Fix mailto links
* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-man.el (org-man-link):
* lisp/ox-odt.el (org-odt-link):
* contrib/lisp/ox-groff.el (org-groff-link): "mailto" URI do not have
  an authority part, we do not append "//".
2014-04-14 13:47:57 +02:00
Nicolas Goaziou d34fa17716 Merge branch 'maint'
Conflicts:
	lisp/ox-html.el
2014-04-14 12:41:38 +02:00
Nicolas Goaziou fc1f7d752f Fix link export
* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-man.el (org-man-link):
* lisp/ox-odt.el (org-odt-link):
* lisp/ox-texinfo.el (org-texinfo-link): Append "//" after some link
  types.

* lisp/ox-md.el (org-md-link):
* contrib/lisp/ox-groff.el (org-groff-link): Ditto.  Also remove some
  unused code, as search options are already stripped out link's path.

Since 3589f64e42, Org ignores "//" in
a link type so it has to be re-introduced upon exporting.
2014-04-14 12:36:34 +02:00
Rick Frankel 37df5f94f4 Allow disabling of htmlization in ox-html export.
* lisp/ox-html.el (org-html-htmlize-output-type): Add `nil'
  option (no htmlization).
(org-html-fontify-code): Return plain text if
`org-html-htmlize-output-type' is `nil'.
2014-03-26 08:42:23 -04:00
Nicolas Goaziou 230d09aeb0 Merge branch 'maint' 2014-03-24 14:20:23 +01:00
Nicolas Goaziou 2e79bd8119 export back-ends: Update radio target export
* 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-md.el (org-md-link):
* lisp/ox-odt.el (org-odt-link): Update radio target export according
  to recent changes.

See bug report at http://permalink.gmane.org/gmane.emacs.orgmode/82923
2014-03-24 14:13:24 +01:00
Bastien Guerry 4223367f89 ox-html.el: Enhance docstrings
* ox-html.el (org-html-table-header-tags)
(org-html-table-data-tags): Enhance docstrings.
2014-03-19 11:27:18 +01:00
Nicolas Goaziou 17ecfd4130 Merge branch 'maint' 2014-03-17 10:33:21 +01:00
Nicolas Goaziou 44095d483b Revert "Fix links to radio targets."
This reverts commit d2e7b1b5b1.
2014-03-17 10:05:52 +01:00
Bastien Guerry ed3f1288cb Merge branch 'maint' 2014-03-17 03:00:04 +01:00
Bastien Guerry d2e7b1b5b1 Fix links to radio targets.
* ox-latex.el (org-latex-link):
* ox-html.el (org-html-link):
* ox-beamer.el (org-beamer-link): Fix links to radio targets.

* ox-ascii.el (org-ascii-link): For links to a radio target,
use the link, not the target.

Thanks to Noah Slater for reporting this.
2014-03-17 02:58:02 +01:00
Nicolas Goaziou 818e2a1de7 Merge branch 'maint' 2014-03-16 10:56:46 +01:00
Rasmus d9dd1e6bd5 Remove reference to hgroup in ox-html
* ox-html.el (org-html-html5-elements): Drop reference to hgroup.
2014-03-16 10:56:09 +01:00
Michael Brand 54e3009d73 Fix escaping of more links in HTML export
* lisp/org.el (org-link-escape-chars): Extend docstring.
(org-link-escape-chars-browser): Mention in docstring that it will
become a candidate for removal.
(org-link-escape-browser): Mention in docstring that it will become a
candidate for removal.
(org-open-at-point): Move `url-encode-url' and comments into
`org-link-escape-browser'.

* lisp/ox-html.el (org-html-link): Make use of
`org-link-escape-browser' like `org-open-at-point'.

* testing/lisp/test-org.el (test-org/org-link-escape-chars-browser):
Mention in docstring that it will become a candidate for removal.
2014-02-19 20:49:21 +01:00
Rick Frankel 9715523abe Fix escaping of links in html export.
* lisp/ox-html.el (org-html-link): Unescape org-escaped links an
  re-escape for html (browser).
2014-02-11 11:08:57 +01:00
Nicolas Goaziou 81f2f5a6e8 Export back-ends: Remove quote section translators
* lisp/ox-ascii.el (org-ascii--current-text-width): Remove
  `quote-section' reference.
  (org-ascii-quote-section): Remove function.
* lisp/ox-html.el (org-html-quote-section): Remove function.
* lisp/ox-man.el (org-man-quote-section): Remove function.
* lisp/ox-md.el (org-md-quote-section): Remove function.
* lisp/ox-odt.el (org-odt-quote-section): Remove function.
* lisp/ox-org.el (org-org-quote-section): Remove function.
* lisp/ox-texinfo.el (org-texinfo-quote-section): Remove function.
2014-01-27 21:14:44 +01:00
Nicolas Goaziou 9d5e11fc79 export back-ends: Reorder options in templates
* lisp/ox-beamer.el: Be more cautious about the order in which options
  are defined, at this order will be the same when creating an export
  template (see `org-export-insert-default-template').
* lisp/ox-html.el: Ditto.
* lisp/ox-latex.el: Ditto.
* lisp/ox.el: Ditto.
2014-01-22 15:45:23 +01:00
Rick Frankel e955be903a Add better svg support to html exporter.
* lisp/ox-html.el (org-html--format-image): If image is an svg file,
  format as "object" using new function `org-html--svg-image' instead
  of "img".
2014-01-16 17:35:55 -05:00
Rick Frankel 1376df2648 Use an overridable list of available doctypes for customization.
* lisp/ox-html.el (org-html-doctype): Use choice of available
  doctypes (from `org-html-doctype-alist) plus user-entered string.
2014-01-16 17:35:39 -05:00
Nicolas Goaziou 1d7bf33c5f ox-html: Fix a docstring
* lisp/ox-html.el (org-html-allow-name-attribute-in-anchors): Default
  value changed in 36a21d9372.  The
  docstring now reflects this change.
2014-01-10 10:07:22 +01:00
Nicolas Goaziou d0538affec ox-html: Fix a docstring
* lisp/ox-html.el (org-html-checkbox-types): Emphasize valid symbols
  to use for configuration.
2014-01-10 10:00:17 +01:00
Nicolas Goaziou 78e66c7212 ox-html: Fix checkbox customization
* lisp/ox-html.el (org-html-checkbox-types): Fix docstring.
(org-html-checkbox-type): Use symbols instead of strings.  It avoids
to rely on `intern' later on.  Modify docstring so its first line
contains only a complete sentence.
(org-html-checkbox): Use `assq' instead of `assoc'.

This fixes 2c782da801.
2014-01-10 09:52:08 +01:00
Rick Frankel 2c782da801 Add customization options for html checkboxes.
(org-html-checkbox-types): New constant. Contains unicode, ascii and html
checkbox alists.
(org_html_checkbox_type): New customzation variable can be set to one
of the above choices.  Defaults to "ascii"
(org-html-checkbox): Use the appropriate set of checkboxes as
specified in `org-html-checkbox-type'.
2014-01-09 18:04:09 -05:00
Rick Frankel 36a21d9372 Default `org-html-allow-name-attribute-in-anchors' to nil for HTML5
compatibily.
2014-01-09 18:00:52 -05:00
Bastien Guerry c41f5075ac Merge branch 'maint'
Conflicts:
	contrib/lisp/org-favtable.el
2014-01-05 06:36:11 +01:00
Bastien Guerry 3737676632 Update copyright year for files changed since 2013 2014-01-05 06:35:21 +01:00
Bastien Guerry 0beda99171 Revert "Update copyright years."
This reverts commit 21105594fc.
2014-01-05 06:28:07 +01:00
Bastien Guerry 096ff7e078 Merge branch 'maint'
Conflicts:
	contrib/lisp/org-favtable.el
2014-01-04 18:58:12 +01:00
Bastien Guerry 21105594fc Update copyright years. 2014-01-04 18:56:11 +01:00
Nicolas Goaziou eb5cb33218 Merge branch 'maint' 2014-01-01 19:07:31 +01:00
Nicolas Goaziou 1a3591c0e7 ox-html: Clean up some comments
* lisp/ox-html.el: Clean up "FIXME" comments.
2014-01-01 19:05:49 +01:00
Nicolas Goaziou 4d652d21ae ox-html: Change default behaviour for unresolved link options
* lisp/ox-html.el (org-html-link): When an option cannot be resolved,
  append a hash sign as it could point to a target, instead of
  ignoring it.
2014-01-01 18:58:26 +01:00
Bastien Guerry f58a8482b4 Merge branch 'maint' 2013-12-30 10:44:57 +01:00
Vladimir Lomov 71e2401bb5 ox-html.el: Use classes for caption instead of align
* ox-html.el (org-html-style-default): New classes
caption.t-above and caption.t-bottom.
(org-html-table): Use new classes.

TINYCHANGE

Signed-off-by: Vladimir Lomov <lomov.vl@gmail.com>
2013-12-30 10:44:43 +01:00
Bastien Guerry 855ba428f2 Merge branch 'maint' 2013-12-30 10:44:31 +01:00
Bastien Guerry 4898be673f Revert "ox-html.el: Use classes for caption instead of align"
This reverts commit 1813200fc8.
2013-12-30 10:43:43 +01:00
Bastien Guerry 52d34f6cbc Merge branch 'maint' 2013-12-30 10:37:33 +01:00
Vladimir Lomov 1813200fc8 ox-html.el: Use classes for caption instead of align
* ox-html.el (org-html-style-default): New classes
caption.t-above and caption.t-bottom.
(org-html-table): Use new classes.

Signed-off-by: Vladimir Lomov <lomov.vl@gmail.com>
2013-12-30 10:35:13 +01:00
Nicolas Goaziou 317efee93b Merge branch 'maint'
Conflicts:
	contrib/lisp/org-drill.el
2013-12-03 21:02:48 +01:00
Nicolas Goaziou 8953b417f2 ox-html: Fix LaTeX fragments export
* lisp/ox-html.el (org-html-format-latex): Add an argument.  Ensure
  latex header is the same as specified in the original buffer when
  exporting a LaTeX fragment or environment.
(org-html-latex-environment, org-html-latex-fragment): Apply signature
change.
2013-12-03 20:57:08 +01:00
Nicolas Goaziou 7a726dd137 Merge branch 'maint' 2013-11-22 09:49:17 +01:00
Nicolas Goaziou 23e6c72133 ox-html: Fix TOC entries
* lisp/ox-html.el (org-html--format-toc-headline): Add missing
  headline number in TOC entries.  This fixes commit
  4c94c4d062.
2013-11-22 09:48:25 +01:00
Bastien Guerry 9214000c21 Merge branch 'maint'
Conflicts:
	doc/org.texi
2013-11-17 09:17:39 +01:00
Bastien Guerry a6210cc9c2 Backport Paul's fixes from Emacs trunk (1/2)
See http://article.gmane.org/gmane.emacs.diffs/123123
2013-11-17 09:12:41 +01:00
Bastien Guerry f327d42734 Merge branch 'maint'
Conflicts:
	lisp/ox.el
2013-11-15 06:24:07 +01:00
Bastien Guerry 22a061f575 Partially revert commit adcebf
* ox.el (org-export-async-init-file):
* ox-odt.el (org-odt-with-latex):
* ox-html.el (org-html-with-latex):
* org.el (org-return-follows-link):
* ob-python.el (org-babel-python-command): Don't use :set.

Thanks to Glenn Morris for pointing at this.
2013-11-15 06:22:36 +01:00
Bastien Guerry 786ebde303 Merge branch 'maint'
Conflicts:
	lisp/ox.el
2013-11-14 14:09:25 +01:00
Bastien Guerry adcebf38f8 Fix errors reported by cus-test.el
* ox.el (org-export-async-init-file): Use :set to set the
default value.

* ox-texinfo.el (org-texinfo-filename): Fix default value.
(org-texinfo-format-headline-function): Use 'ignore as the
default value.
(org-texinfo-format-drawer-function): Use a function as the
default value.  Update docstring.
(org-texinfo-drawer): Always use
`org-texinfo-format-drawer-function' as it is now a function
by default.
(org-texinfo-headline): Compare
`org-texinfo-format-headline-function' against 'ignore.
(org-texinfo-inlinetask): Compare
`org-texinfo-format-inlinetask-function' against 'ignore.

* ox-odt.el (org-odt-format-drawer-function): Use a function
as the default value.  Update docstring.
(org-odt-format-headline-function)
(org-odt-format-inlinetask-function): Fix default value.
(org-odt-with-latex): Use :set to set the default value.
(org-odt-drawer): Always use `org-odt-format-drawer-function'
as it is now a function by default.
(org-odt-format-headline--wrap): Compare
`org-odt-format-headline-function' against 'ignore.

* ox-latex.el (org-latex-format-drawer-function): Use a
function as the default value.  Update docstring.
(org-latex-format-inlinetask-function): Fix default value.
(org-latex-drawer): Always use
`org-latex-format-drawer-function' as it is now a function by
default.
(org-latex-inlinetask): Compare
`org-latex-format-inlinetask-function' against 'ignore.

* ox-html.el (org-html-format-drawer-function): Use a
function as the default value.  Update docstring.
(org-html-format-headline-function)
(org-html-format-inlinetask-function): Fix default value.
(org-html-with-latex): Use :set to set the default value.
(org-html--format-toc-headline)
(org-html-format-headline--wrap): Compare
`org-html-format-headline-function' against 'ignore.
(org-html-inlinetask): Compare
`org-html-format-inlinetask-function' against 'ignore.

* ox-ascii.el (org-ascii-format-drawer-function): Use a
function as the default value.  Update docstring.
(org-ascii-drawer): Always use
`org-ascii-format-drawer-function' as it is now a function by
default.
(org-ascii-format-inlinetask-default): New function.
(org-ascii-format-inlinetask-function): Use
`org-ascii-format-inlinetask-default' as the default.

* org.el (org-mouse-1-follows-link): Use :set to set the
default value.  Update custom type.
(org-log-note-headings): Fix order or list items in the custom
type.
(orgstruct-heading-prefix-regexp): Use an empty string as the
default value.  Use 'regexp as the custom type.
(orgstruct-make-binding): Tiny docstring enhancement.  Assume
`orgstruct-heading-prefix-regexp' is a string.

* org-agenda.el (org-agenda-search-view-max-outline-level):
Set default value to 0.  Update docstring.
(org-agenda-deadline-leaders): Fix custom type.
(org-search-view): Assume
`org-agenda-search-view-max-outline-level' is a number.

* ob-ruby.el (org-babel-ruby-nil-to): Fix custom type.

* ob-python.el (org-babel-python-mode): Use :set to set the
default value.
(org-babel-python-None-to): Fix custom type.

* ob-plantuml.el (org-plantuml-jar-path): Fix default value.
(org-babel-execute:plantuml): Assume `org-plantuml-jar-path'
is a string.

* ob-latex.el (org-babel-latex-htlatex): Fix default value.
(org-babel-latex-htlatex-packages): Fix custom type.
(org-babel-execute:latex): Assume `org-babel-latex-htlatex' is
a string.

Thanks to Glenn Morris for reporting this.
2013-11-14 14:05:18 +01:00
Bastien Guerry 02ab072061 Merge branch 'maint' 2013-11-13 08:46:26 +01:00
Bastien Guerry 757eb6e0fb Fix previous commits
Thanks to Jambunathan for pointing this.
2013-11-13 08:46:01 +01:00
Bastien Guerry cdaeac1aa0 Merge branch 'maint' 2013-11-13 07:40:56 +01:00
Bastien Guerry d2ba43c496 ox-html.el: Add version and package-version to some options
* ox-html.el (org-html-format-drawer-function)
(org-html-format-headline-function)
(org-html-format-inlinetask-function)
(org-html-creator-string): Add version and package-version.

Thanks to Jambunathan for reporting problems in this area.
2013-11-13 07:27:10 +01:00
Bastien Guerry b6522af499 Merge branch 'maint' 2013-11-12 21:24:57 +01:00
Bastien Guerry 4d7293e2d0 ox-html.el (org-html-text-markup-alist): Fix version
* ox-html.el (org-html-text-markup-alist): Fix version.

Thanks to Jambunathan for reporting this.
2013-11-12 21:24:32 +01:00
Bastien Guerry 71884cc039 Merge branch 'maint'
Conflicts:
	lisp/ob-C.el
	lisp/ob-clojure.el
	lisp/ob-core.el
	lisp/ob-lisp.el
	lisp/org-clock.el
2013-11-12 21:00:49 +01:00
Bastien Guerry f95641c443 Backport changes from Emacs revs 115081 and 115082
2013-11-12  Stefan Monnier  <monnier@iro.umontreal.ca>

	Address some byte-compiler warnings.
	* ob-abc.el (org-babel-expand-body:abc): Use dolist.
	(org-babel-execute:abc): Fix regexp quoting.
	* ob-calc.el (org--var-syms): Rename from `var-syms'.
	* ob-lilypond.el (ly-compile-lilyfile): Remove redundant let-binding.
	* ob-table.el (sbe): Move debug declaration.
	* org-clock.el (org--msg-extra): Rename from `msg-extra'.
	* org.el (org-version): Avoid var name starting with _.
	(org-inhibit-startup, org-called-with-limited-levels)
	(org-link-search-inhibit-query, org-time-was-given)
	(org-end-time-was-given, org-def, org-defdecode, org-with-time):
	* org-colview.el (org-agenda-overriding-columns-format):
	* org-agenda.el (org-agenda-multi, org-depend-tag-blocked)
	(org-agenda-show-log-scoped):
	* ob-python.el (py-which-bufname, python-shell-buffer-name):
	* ob-haskell.el (org-export-copy-to-kill-ring):
	* ob-exp.el (org-link-search-inhibit-query):
	* ob-R.el (ess-eval-visibly-p):
	* ob-core.el (org-src-window-setup): Declare before use.
	(org-babel-expand-noweb-references): Remove unused `blocks-in-buffer'.
	* ox-odt.el (org-odt-hfy-face-to-css):
	* org-src.el (org-src-associate-babel-session, org-src-get-lang-mode):
	* org-bibtex.el (org-bibtex-get, org-bibtex-ask, org-bibtex)
	(org-bibtex-check):
	* ob-tangle.el (org-babel-tangle, org-babel-spec-to-string)
	(org-babel-tangle-single-block, org-babel-tangle-comment-links):
	* ob-table.el (sbe):
	* ob-sqlite.el (org-babel-sqlite-expand-vars):
	* ob-sql.el (org-babel-sql-expand-vars):
	* ob-shen.el (org-babel-execute:shen):
	* ob-sh.el (org-babel-execute:sh, org-babel-sh-evaluate):
	* ob-scala.el (org-babel-scala-evaluate):
	* ob-ruby.el (org-babel-ruby-table-or-string)
	(org-babel-ruby-evaluate):
	* ob-python.el (org-babel-python-table-or-string)
	(org-babel-python-evaluate-external-process)
	(org-babel-python-evaluate-session):
	* ob-picolisp.el (org-babel-execute:picolisp):
	* ob-perl.el (org-babel-perl-evaluate):
	* ob-maxima.el (org-babel-execute:maxima):
	* ob-lisp.el (org-babel-execute:lisp):
	* ob-java.el (org-babel-execute:java):
	* ob-io.el (org-babel-io-evaluate):
	* ob-haskell.el (org-babel-execute:haskell):
	* ob-fortran.el (org-babel-execute:fortran):
	* ob-exp.el (org-babel-exp-code):
	* ob-emacs-lisp.el (org-babel-execute:emacs-lisp):
	* ob-ditaa.el (org-babel-execute:ditaa):
	* ob-core.el (org-babel-execute-src-block, org-babel-sha1-hash)
	(org-babel-parse-header-arguments, org-babel-reassemble-table)
	(org-babel-goto-src-block-head, org-babel-mark-block)
	(org-babel-expand-noweb-references, org-babel-script-escape)
	(org-babel-process-file-name):
	* ob-clojure.el (org-babel-execute:clojure):
	* ob-calc.el (org-babel-execute:calc):
	* ob-awk.el (org-babel-execute:awk):
	* ob-abc.el (org-babel-execute:abc):
	* ob-R.el (org-babel-expand-body:R):
	* ob-C.el (org-babel-C-execute): Avoid deprecated ((lambda) ...).

2013-11-12  Glenn Morris  <rgm@gnu.org>

	* ox-html.el (org-html-scripts): Add 2013 to copyright years.
	(org-html-infojs-template): Copyright holder to FSF.
2013-11-12 20:57:31 +01:00
Nicolas Goaziou ed38714b14 Merge branch 'maint' 2013-11-06 16:12:57 +01:00
Nicolas Goaziou 4c94c4d062 ox-html: Add TODO keyword to TOC entries
* lisp/ox-html.el (org-html--format-toc-headline): TOC entries are
  closer to regular headline formatting.
2013-11-06 16:12:24 +01:00
Nicolas Goaziou 35842c7362 Merge branch 'maint' 2013-10-20 11:00:57 +02:00
Nicolas Goaziou e5cecc5d34 export back-ends: Remove duplicate information
* lisp/ox-ascii.el: Remove comments at the beginning of the file since
  the library is documented in Org manual.
* lisp/ox-beamer.el: Remove comments at the beginning of the file since
  the library is documented in Org manual.
* lisp/ox-html.el: Remove comments at the beginning of the file since
  the library is documented in Org manual.
* lisp/ox-icalendar.el: Remove comments at the beginning of the file since
  the library is documented in Org manual.
* lisp/ox-md.el: Remove comments at the beginning of the file since
  the library is documented in Org manual.
2013-10-20 11:00:05 +02:00
Rick Frankel 6f5180bd9f Fix escaping of links in html export.
* lisp/ox-html.el (org-html-link): Unescape org-escaped links an
  re-escape for html (browser).
2013-10-02 18:26:27 -04:00
Nicolas Goaziou e09ffe2a67 ox: Add a defcustom to export properties drawers
* lisp/ox.el (org-export-with-drawers): Improve docstring.
(org-export-with-properties): New variable
(org-export--skip-p): Handle new variable.
(org-export-options-alist): Install new variable.
* lisp/ox-ascii.el (org-ascii-node-property,
  org-ascii-property-drawer): New functions.
* lisp/ox-html.el (org-html-node-property): New function.
(org-html-property-drawer): Export property drawers as "pre" blocks.
* lisp/ox-latex.el (org-latex-property-drawer,
  org-latex-node-property): New functions.
* lisp/ox-man.el (org-man-node-property, org-man-property-drawer): New
  functions.
* lisp/ox-md.el (org-md-node-property, org-md-property-drawer): New
  functions.
* lisp/ox-odt.el (org-odt-node-property): New function.
(org-odt-property-drawer): Export property drawers as fixed width
blocks.
* lisp/ox-texinfo.el (org-texinfo-node-property): New function.
(org-texinfo-property-drawer): Export property drawers as verbatim
blocks.
* doc/org.texi: Update manual.
* testing/lisp/test-ox.el: Add tests.
2013-09-26 13:46:31 +02:00
Nicolas Goaziou 1ad8f4a01e ox-html: Fix meta tag output for properties
* lisp/ox-html.el (org-html--build-meta-info): Fix output of meta tags
  when properties are present.

Reported-by: Kyle Machulis <kyle@nonpolynomial.com>
2013-09-03 14:11:37 +02:00
Nicolas Goaziou 9154c70a04 Export back-ends: Apply changes to export functions
* contrib/lisp/ox-confluence.el (org-confluence-export-as-confluence):
* contrib/lisp/ox-deck.el (org-deck-export-as-html,
  org-deck-export-to-html):
* contrib/lisp/ox-freemind.el (org-freemind-export-to-freemind):
* contrib/lisp/ox-groff.el (org-groff-export-to-groff,
  org-groff-export-to-pdf):
* contrib/lisp/ox-koma-letter.el (org-koma-letter-export-as-latex,
  org-koma-letter-export-to-latex, org-koma-letter-export-to-pdf):
* contrib/lisp/ox-rss.el (org-rss-export-as-rss,
  org-rss-export-to-rss):
* contrib/lisp/ox-s5.el (org-s5-export-as-html,
  org-s5-export-to-html):
* contrib/lisp/ox-taskjuggler.el (org-taskjuggler-export):
* lisp/ob-haskell.el:
* lisp/ox-ascii.el (org-ascii-export-as-ascii,
  org-ascii-export-to-ascii):
* lisp/ox-beamer.el (org-beamer-export-as-latex,
  org-beamer-export-to-latex, org-beamer-export-to-pdf):
* lisp/ox-html.el (org-html-export-as-html, org-html-export-to-html):
* lisp/ox-icalendar.el (org-icalendar-export-to-ics):
* lisp/ox-latex.el (org-latex-export-as-latex,
  org-latex-export-to-pdf):
* lisp/ox-man.el (org-man-export-to-man, org-man-export-to-pdf):
* lisp/ox-md.el (org-md-export-as-markdown,
  org-md-export-to-markdown):
* lisp/ox-odt.el (org-odt-export-to-odt):
* lisp/ox-org.el (org-org-export-as-org, org-org-export-to-org):
* lisp/ox-publish.el (org-publish-org-to):
* lisp/ox-texinfo.el (org-texinfo-export-to-texinfo,
  org-texinfo-export-to-info):
* testing/lisp/test-ob-exp.el (test-ob-exp/org-babel-exp-src-blocks/w-no-file):
2013-08-07 16:11:42 +02:00
Eric Schulte db9f11a860 check html-link-home exists before triming
Ensure that the :html-link-home property exists before passing it to
  `org-trim' which assumes it's argument is a string.
2013-07-30 00:04:10 +02:00
Feng Shu 2a94fca6ca Fix generating LaTeX formula images
* lisp/ox-odt.el (org-odt--translate-latex-fragments): Fix imagemagick support.
* lisp/ox-html.el (org-html-latex-environment)
(org-html-latex-fragment): Fix imagemagick support.
* org.el (org-create-formula-image-with-imagemagick): Generate correct
size formula image.
(org-format-latex-header): Change pagestyle command position.
* doc/org.texi (@LaTeX{} fragments)
(Previewing @LaTeX{} fragments)
(Math formatting in HTML export)
(Working with @LaTeX{} math snippets): Add document about creating
formula image with imagemagick.
2013-07-15 15:31:38 +02:00
Nicolas Goaziou 020eb8eaef ox-html: Fix inline image attributes
* lisp/ox-html.el (org-html-link): Add image attributes to "img" tag,
  not to the "a" container.  Also fix spacing for attributes.

Thanks to Robert Eckl for reporting it.
2013-07-10 10:12:43 +02:00
Kodi Arfer 535bf4a1f2 ox-html: Under html5-fancy, use <nav> for the ToC
* lisp/ox-html.el (org-html-toc): Use <nav> instead of <div>
  for the root element when appropriate.

TINYCHANGE
2013-07-09 22:51:18 +02:00
Kodi Arfer 03040dd44d ox-html: Allow "Figure %d:", etc. to be styled
* lisp/ox-html.el (org-html-paragraph): Wrap "Figure %d:" in
  <span class="figure-number">.
  (org-html-list-of-tables, org-html-table): Wrap "Table %d:" in
   <span class="table-number">.
  (org-html-list-of-listings): Wrap "Listing %d:" in
  <span class="listing-number">.
* doc/org.text (CSS support): Mention .figure-number,
  .listing-number, and .table-number.

I didn't change org-html-style-default, so these labels won't
appear special by default.

TINYCHANGE
2013-07-09 22:28:53 +02:00
Nicolas Goaziou fe8bfb8bd9 Merge branch 'maint' 2013-07-08 22:27:35 +02:00
Nicolas Goaziou eb37142b14 ox-html: Fix number of arguments when setting `org-html-format-headline-function'
* lisp/ox-html.el (org-html-format-headline--wrap): Fix number of
  arguments when setting `org-html-format-headline-function'.

Thanks to Jisang Yoo for reporting it.
2013-07-08 22:27:03 +02:00
Nicolas Goaziou 758a545fb6 Export back-ends: Apply changes to back-end structure
* lisp/ox-html.el (org-html--format-toc-headline): Make use of
  anonymous back-ends.
* lisp/ox-odt.el (org-odt-footnote-reference): Make use of anonymous
  back-ends.
(org-odt-format-label, org-odt-toc, org-odt-format-headline--wrap):
  Use `org-export-with-backend' instead of
  `org-export-with-translations'.
* contrib/lisp/ox-freemind.el (org-freemind--build-node-contents): Use
  `org-export-with-backend' instead of `org-export-with-translations'.
2013-07-04 14:17:49 +02:00
Nicolas Goaziou 1b42e9d8b2 ox-html: Fix standalone hyperlinked images
* lisp/ox-html.el (org-html-inline-images): Change default value and
  remove `maybe'.
(org-html-format-inline-image): Remove functions.
(org-html--wrap-image, org-html--format-image,
org-html-inline-image-p): New functions.
(org-html-latex-environment, org-html-latex-fragment): Use new
functions.
(org-html-standalone-image-p): Use new functions.  Also remove an
unused optional argument.
(org-html-link, org-html-paragraph): Correctly export hyperlinked
images.

This patch permits the back-end to recognize links like:

  [[http://orgmode.org][http://orgmode.org/img/org-mode-unicorn-logo.png]]

as standalone, so they can get wrapped within a proper environment and
get captions.

Thanks to Kodi Arfer for reporting it.
2013-07-02 21:06:43 +02:00
Bastien Guerry 99f7f5def3 ox-html.el (org-html-link-use-abs-url): New option
* ox-html.el (org-html-link-use-abs-url): New option.
(org-html-link): Use it to prepend relative links with the
value of HTML_LINK_HOME, when defined.
2013-07-01 16:06:37 +02:00
Bastien Guerry 0c4f81dee1 Merge branch 'maint' 2013-07-01 14:32:27 +02:00
Bastien Guerry 79ce6174fd Revert "ox-html.el (org-html-plain-list): Handle alphabetical ordered list"
This reverts commit 8012d88db7.

See http://mid.gmane.org/87wqpaqz3c.fsf%40gmail.com for the discussion
about whether this feature should go in or not.
2013-07-01 14:31:41 +02:00
Bastien Guerry 2ccd6d9887 Merge branch 'maint' 2013-07-01 00:36:17 +02:00
Bastien Guerry 8012d88db7 ox-html.el (org-html-plain-list): Handle alphabetical ordered list
* ox-html.el (org-html-begin-plain-list): New parameter
`ordered-num' to tell whether the list is ordered numerically.
(org-html-plain-list): Handle alphabetical ordered list.
2013-07-01 00:33:25 +02:00
Kodi Arfer abacffb3e0 ox-html: Restore wrongly omitted table attributes under HTML5
* lisp/ox-html.el (org-html-table): For HTML5,
  omit :html-table-attributes but not :id or :attr_html.

TINYCHANGE
2013-06-30 09:30:23 +02:00
Nicolas Goaziou cb9c1dd668 ox-html: Tiny refactoring
* lisp/ox-html.el (org-html-link): Remove left-over binding.
2013-06-29 14:48:08 +02:00
Nicolas Goaziou 29aec9448a ox-html: Small refactoring
* lisp/ox-html.el (org-html-link): Small refactoring.
2013-06-29 14:26:48 +02:00
Yoshinari Nomura d5f3f41c7a ox-html: add figure and table numbers to HTML captions
* lisp/ox-html.el: (org-html--has-caption-p): New function.
(org-html-link--inline-image),
(org-html-table): Prepend ordinal number to caption.
(org-html-link): Make numbered link by counting captioned figures and tables.
2013-06-29 13:58:12 +02:00
Nicolas Goaziou 70b9b93feb ox-html: Use OPTIONS items instead of keywords for booleans
* lisp/ox-html.el (html): Replace "HTML_HTML5_FANCY",
  "HTML_INCLUDE_STYLE" and "HTML_INCLUDE_SCRIPTS" with, respectively,
  ":html5-fancy", "html-style" and "html-scripts" options.
(org-html-html5-fancy): Reformat docstring.
* doc/org.texi (HTML doctypes): Reflect keyword removal.
(CSS support): Reflect keyword removal.

The reasoning behind this change is that keywords can only store
strings as value.  Therefore, they are not suited for toggles ("nil"
vs nil problem).
2013-06-21 19:17:47 +02:00
Nicolas Goaziou ab40235826 Merge branch 'maint' 2013-06-20 20:19:55 +02:00
Nicolas Goaziou f9ae004aca ox-html: Fix typo preventing insertion of link up/link home anchors
* lisp/ox-html.el (org-html-template): Fix typo preventing insertion
  of link up/link home anchors.

Thanks to Daniel G. Gerber for noticing it.
2013-06-20 20:18:55 +02:00
Nicolas Goaziou 8e9c10ada4 Merge branch 'maint' 2013-06-09 11:30:51 +02:00
Aurélien Aptel 56b864b265 lisp/ox-html.el: Minimal encoding for code and verbatim text
* lisp/ox-html.el: Remove fancy string replacements for code and
verbatim text when exporting to html.

Exporting =--option= or ~--option~ to html used to replace -- with a
ndash.

TINYCHANGE
2013-06-09 11:29:49 +02:00
Achim Gratz d36a933c65 Compatibility: fix XEmacs compilation failures
* lisp/ob-eval.el, lisp/ob.el, lisp/org-macro.el, lisp/org-mhe.el:
  Require org-macs and org-compat as necessary.
* lisp/ob-tangle.el: Declare function `org-store-link' and
  `org-open-link-from-string'.
* lisp/org-compat.el: Extend eval-and-compile clause and add advices
  for functions that have different parameter lists in XEmacs. Add
  variable definitions that XEmacs lacks .
* lisp/org-macs.el (declare-function): Define macro to use autoload
  instead for XEmacs.
* lisp/ox-html.el, lisp/ox-odt.el: XEmacs does not have table.el, so
  use 'noerror on the require form.
* lisp/ox-texinfo.el (org-texinfo-table-column-widths): Fix spliced
  argument list that XEmacs complains about by adding parenthesis.

This fixes all compilation failures on XEmacs and warnings related to
Org that indicate that XEmacs has compiled things wrongly (for
instance it might have interpreted a function as a variable symbol).
There are still many warnings that probably indicate serious problems.
2013-06-01 11:31:07 +02:00
Kodi Arfer f3ba879079 ox-html: Fix handling of time-stamp-file
* lisp/ox-html.el (org-html--build-meta-info): Insert no timestamp
  when :time-stamp-file is nil.

TINYCHANGE
2013-05-30 21:41:27 +02:00
Kodi Arfer d574bf522d ox-html: Fix handling of time-stamp-file
* lisp/ox-html.el (org-html--build-meta-info): Insert no timestamp
  when :time-stamp-file is nil.

TINYCHANGE
2013-05-30 21:38:34 +02:00
Rick Frankel 9d22167c68 Refactor fetching html doctype from alist into function so it can be reused in inherited exporters.
* lisp/ox-html.el (org-html-doctype): Add new function `org-html-doctype'.
(org-html-template): Use `org-html-doctype' function instead of inline
code.

* contrib/lisp/ox-deck.el (org-deck-template): Use `org-html-doctype'
  function instead of inline code.

* contrib/lisp/ox-s5.el (org-s5-template): Use `org-html-doctype'
  function instead of inline code.
2013-05-29 15:23:04 -04:00
Eric Schulte 06cdb2d228 respect org-html-table-caption-above 2013-05-21 14:30:12 -06:00
Nicolas Goaziou 1f7b310142 Merge branch 'maint' 2013-05-14 19:01:20 +02:00
Nicolas Goaziou f371e5da0d ox-html: Fix org-export-string-as when org-html-with-latex is dvipng
* lisp/ox-html.el (org-html-format-latex): Provide a prefix for
  temporary file when using dvipng, even if the current buffer isn't
  associated to a file.
2013-05-14 18:59:05 +02:00
Nicolas Goaziou 38de30ad8e Merge branch 'maint' 2013-05-12 14:39:09 +02:00
Nicolas Goaziou a8d0e76b7d ox-html: Remove code relative to bibliography
* lisp/ox-html.el (org-html-inner-template): Remove code relative to
  bibliography.
(org-html-bibliography): Remove function.

Bibliography is handled by the contrib/ package "ox-bibtex.el".
2013-05-12 14:38:10 +02:00
Carsten Dominik b3a88babf1 Merge branch 'fix-types' 2013-05-09 15:24:43 +02:00
Carsten Dominik a84c01642b Fix customization types of variables
* contrib/lisp/org-wl.el (org-wl-namazu-default-index): Fix custom type.
* lisp/ob-lob.el (org-babel-lob-files): Fix custom type.
* lisp/org-agenda.el (org-agenda-export-html-style):
(org-agenda-ndays):
(org-agenda-inactive-leader):
(org-agenda-day-face-function):
(org-agenda-auto-exclude-function): Fix custom type.
* lisp/org-bibtex.el (org-bibtex-prefix): Fix custom type.
* lisp/org-clock.el (org-clock-heading-function):
(org-show-notification-handler): Fix custom type.
* lisp/org-footnote.el (org-footnote-auto-adjust): Fix custom type.
* lisp/org-protocol.el (org-protocol-default-template-key): Fix custom type.
* lisp/org.el (org-make-link-description-function):
(org-link-translation-function):
(org-link-frame-setup):
(org-refile-target-verify-function):
(org-get-priority-function):
(org-use-fast-tag-selection):
(org-columns-modify-value-for-display-function):
(org-sparse-tree-default-date-type): Fix custom type.
* lisp/ox-html.el (org-html-postamble):
(org-html-postamble-format):
(org-html-preamble-format): Fix custom type.
* lisp/ox-odt.el (org-odt-content-template-file): Fix custom type.
* lisp/ox.el (org-export-with-archived-trees):
(org-export-initial-scope): Fix custom type.

Thanks to Glenn Moris for reporting these.  He used cus-test.el
to find them.
2013-05-09 15:19:02 +02:00
Nicolas Goaziou ce59889673 ox-html: Fix code typo
* lisp/ox-html.el (org-html--build-meta-info): Fix code typo.
2013-05-09 08:26:38 +02:00