* org-odt.el (org-odt-cleanup-xml-buffers): Use the new alias.
* org-compat.el: Alias `org-condition-case-unless-debug' to
`condition-case-unless-debug' or `condition-case-no-debug'.
* org-odt.el (org-odt-cleanup-xml-buffers): Use the new alias.
* org-compat.el: Alias `org-condition-case-unless-debug' to
`condition-case-unless-debug' or `condition-case-no-debug'.
* lisp/org-odt.el (org-odt-cleanup-xml-buffers): Use
`condition-case-no-debug' instead of
`condition-case-unless-debug'. This ensures backward
compatibility with Emacs versions < 24.1.
* lisp/org-odt.el (org-odt-init-outfile): Fix previous commit.
Make sure that nxml-mode is loaded before let-binding
`nxml-auto-insert-xml-declaration-flag'.
* lisp/org-odt.el (org-odt-init-outfile)
(org-odt-write-manifest-file): Disable
`nxml-auto-insert-xml-declaration-flag'.
* lisp/org-lparse.el (org-do-lparse): Don't trigger auto-mode
processing.
Guard against insertion of multiple XML declarations within
component XML files when
`nxml-auto-insert-xml-declaration-flag' is on.
Fixes bug
http://lists.gnu.org/archive/html/emacs-orgmode/2012-05/msg00510.html.
* org.el (org-version): When called non-interactively, insert
the short version string, otherwise send a message with the
complete version string.
* org-odt.el (org-odt-update-meta-file): Use (org-version) and
delegate checking whether `org-version' is known as a variable
there.
* org-html.el (org-export-as-html): Use (org-version).
* org-docbook.el (org-export-as-docbook): Ditto.
* org-latex.el (org-export-latex-make-header): Ditto.
* lisp/org-odt.el (org-odt-format-org-link): Pay no heed to
whether the internal links destined for headlines provide a
description or not. In fact, the `org-store-link' and
`org-insert-link' create internal links which do have a
description.
This fixes an issue where internal links terminating at an
invisible target (that is bound to a headline) was badly
rendered. Refer following thread:
http://lists.gnu.org/archive/html/emacs-orgmode/2012-04/msg00757.html
* lisp/org-odt.el (org-odt-format-org-link): Pay no heed to
whether the internal links destined for headlines provide a
description or not. In fact, the `org-store-link' and
`org-insert-link' create internal links which do have a
description.
This fixes an issue where internal links terminating at an
invisible target (that is bound to a headline) was badly
rendered. Refer following thread:
http://lists.gnu.org/archive/html/emacs-orgmode/2012-04/msg00757.html
* lisp/org-lparse.el (org-lparse-insert-org-table): Consider
short caption as plain text and not as org text.
* lisp/org-odt.el (org-export-odt-format-formula)
(org-export-odt-format-image): ditto.
Fixes earlier checkin. See
http://lists.gnu.org/archive/html/emacs-orgmode/2012-03/msg01212.html
Handling of short captions is only a convenience feature.
From within LibreOffice one can always create an "unprotected"
editable index and later manually delete unwanted index entries (for
example, delete uncaptioned entries which are given automatic names)
or modify existing entries (for example, fix long captions to their
short versions).
* lisp/org-odt.el (org-odt-begin-table)
(org-export-odt-format-formula, org-export-odt-format-image)
(org-odt-format-entity): Handle short caption.
* lisp/org-lparse.el (org-lparse-insert-org-table)
(org-lparse-insert-list-table, org-lparse-insert-table-table):
Ditto.
Handle short caption for tables, figures and formulae.
#+CAPTION: [Caption for index entry]{Regular caption.}
Fix for bug
http://lists.gnu.org/archive/html/emacs-orgmode/2012-03/msg01169.html
* lisp/org-odt.el (org-odt-format-entity-caption): Enumerate
entities that have either a caption or a label.
(org-odt-label-styles, org-odt-category-map-alist): Add a
separator between sequence number and caption. Introduced two
new label styles for handling of math formula and math label.
(org-odt-format-label-definition)
(org-export-odt-format-formula): Propagate above changes.
* lisp/org-odt.el (org-export-odt-category-strings): New
custom variable.
(org-odt-category-map-alist): Modify interpretation. Don't
use the same field to double up as both a OpenDocument
variable and a category string. Entries in this list now
specify only the OpenDocument variable. Category strings are
obtained through an indirect lookup of
`org-export-odt-category-strings'. Use same OpenDocument
variables as what LibreOffice uses for various entities. Fix
docstring.
(org-odt-add-label-definition)
(org-odt-format-label-definition)
(org-odt-format-label-reference): Propagate above changes.
Fix for the following bug:
http://lists.gnu.org/archive/html/emacs-orgmode/2012-03/msg00628.html
* lisp/org-lparse.el (org-do-lparse): Make effective setting
of `org-export-headline-levels' available to the ODT exporter.
Also remove some stale comments.
* lisp/org-odt.el (org-odt-format-link): Add support for
generating cross-references to chapter numbers.
(org-odt-format-org-link): Resolve links to outline headings
as section numbers. This special case resolution kicks in
only if the Org link has no description and the target outline
is not listified i.e., it is at a level within
`org-export-headline-levels'.
Fix for the following request:
http://lists.gnu.org/archive/html/emacs-orgmode/2012-02/msg01035.html
The above change is in conformity with the way links to
headlines will be treated in new ODT exporter that will be
built on top of Nicolas' org-element/org-export
infrastructure.
* lisp/org-odt.el (org-odt-insert-toc): Remove this stray,
dysfunctional routine. This possibly has crept in because of the
broken merges between "maint" and "origin" branches.
(org-odt-begin-table): Don't emit an empty paragraph when a table is
neither labelled or captioned.
(org-odt-init-outfile): Remove reference to an unused variable.
2012-01-17 Jambunathan K <kjambunathan@gmail.com>
* etc/styles/OrgOdtContentTemplate.xml
(OrgIndentedSection-Level-*): New section styles. These
sections are indented to the same level as the corresponding
list entries. These sections hold tables that occur within a
list.
(OrgTable): Increased relative width from 90% to 96% for
aesthetic reasons.
* lisp/org-odt.el (org-odt-table-indentedp): New variable
(org-odt-begin-table): Modified. If the table is within a
list, temporarily leave the list and begin an indented section
before emitting the table.
(org-odt-end-table): Modified. If the table was within a
list, close the indented section and re-open the list
immediately after ending the table.
(org-odt-continue-list, org-odt-discontinue-list): Helper
routines to temporarily discontinue and continue a list.
(org-odt-list-stack-stashed): New variable to hold the state
of a pending list.
(org-odt-begin-list, org-odt-begin-list-item)
(org-odt-end-list-item): Modified. Handle nitty-gritties for
continuing a list and list item.
(org-odt-section-count): New variable that keeps track of
section count. Used in conjunction with naming of sections.
(org-odt-begin-section, org-odt-end-section): New defuns.
(org-odt-init-outfile): Initialize
`org-odt-list-stack-stashed' and `org-odt-section-count'.
* lisp/org-lparse.el (org-lparse-list-item-count): Removed. Was a
superfluous variable.
(org-lparse-list-level): Removed. Now derived from
`org-lparse-list-stack'.
(org-lparse-list-stack): New. List that records the list
types - ordered, unordered or descriptive - in the following
order: self, parent, grand-parent etc.
(org-do-lparse): Added, removed above let-bound vars.
Disallowed regular tables within list-table block.
(org-lparse-begin-list, org-lparse-end-list)
(org-lparse-begin-list-item, org-lparse-end-list-item):
Propagate above changes.
OpenDocument doesn't permit tables to occur in the middle of a
list. Use list continuations and indented sections to typeset
indented tables.
Fixes the following bug:
http://lists.gnu.org/archive/html/emacs-orgmode/2012-01/msg00515.html
Add support for indented tables in ODT export
2012-01-20 Jambunathan K <kjambunathan@gmail.com>
* lisp/org-odt.el (org-odt-format-textbox): Honor user-specified
width in captioned images.
Fix for bug reported here:
http://lists.gnu.org/archive/html/emacs-orgmode/2012-01/msg00641.html
Honor user-specified width in captioned images
2012-01-23 Jambunathan K <kjambunathan@gmail.com>
* lisp/org-odt.el (org-odt-table-style-format): New. Template for
auto-generated table styles.
(org-odt-automatic-styles, org-odt-object-counters): New
variables.
(org-odt-add-automatic-style): New function.
(org-odt-write-automatic-styles): New function. Create
automatic styles for tables that have custom :rel-width.
(org-odt-begin-table): Parse attributes specified with
"#+ATTR_ODT: " option and use it to create an automatic table
style.
(org-odt-save-as-outfile): Call
`org-odt-add-write-automatic-styles'.
(org-odt-init-outfile): Init newly add variables.
(org-odt-section-count): Remove it.
(org-odt-begin-section): Use `org-odt-add-automatic-style' to
generate an automatic section name.
Customize table width using :rel-width option. For example,
to create a table of width 60% use:
#+attr_odt: :rel-width 60
| A | B |
|---+---|
| | |
org-odt.el: Put table width under user-control
2012-01-23 Jambunathan K <kjambunathan@gmail.com>
* lisp/org-odt.el (org-odt-label-styles): Add a new style.
(org-odt-category-map-alist): Use it.
Andreas Leha writes:
The following snippet exports correctly to LaTeX and to html, but
produces the text "Figure Figure" in odt.
Could the behaviour be synchronized?
=== example.org ==========================
* Test ref
plot(1:10, 1:10)
Here is a reference to Figure \ref{fig:bar}
=== example.org ==========================
org-odt.el: Make label references consistent with LaTeX export
2012-01-24 Jambunathan K <kjambunathan@gmail.com>
* lisp/org-odt.el (org-odt-entity-frame-styles): Add frame params
for images that are anchored as character.
(org-export-odt-format-image): Handle new anchor type
"as-char".
(org-export-odt-default-image-sizes-alist): Misc. change.
(org-export-odt-format-formula): Misc. change.
With this change, one can use the below snippet to produce
images that are laid out side-by-side.
#+ATTR_ODT: :width 7 :height 7 :anchor as-char
#+header: :file foo.png
[[./foo.png]]
#+caption: bar
#+ATTR_ODT: :width 7 :height 7 :anchor as-char
#+header: :file bar.png
[[./bar.png]]
See http://lists.gnu.org/archive/html/emacs-orgmode/2012-01/msg00677.html.
org-odt.el: Allow images to be anchored as characters
2012-01-24 Jambunathan K <kjambunathan@gmail.com>
* lisp/org-odt.el (org-export-odt-format-formula): Use :style
property to specify custom table styles.
Continuation of the earlier commit titled: "Put table width
under user-control".
org-odt.el: Fix regression in typesetting of MathML formulae
2012-01-27 Jambunathan K <kjambunathan@gmail.com>
* lisp/org-odt.el (org-odt-format-preamble): Don't insert TOC here.
Delay it till the end of export.
(org-odt-begin-document-body): Make a note of the default
position of TOC in `org-lparse-dyn-first-heading-pos'.
(org-odt-insert-toc): Insert TOC as directed by
[TABLE-OF-CONTENTS] line or at the default position.
(org-odt-end-export): Call `org-odt-insert-toc'.
Fix for the following bug:
http://lists.gnu.org/archive/html/emacs-orgmode/2012-01/msg00974.html
org-odt.el: Honor "[TABLE-OF-CONTENTS]" directive
2012-01-27 Jambunathan K <kjambunathan@gmail.com>
org-odt.el: Fix earlier commit
2012-01-30 Jambunathan K <kjambunathan@gmail.com>
* OrgOdtStyles.xml (OrgTitlePage): New page style. Include no
footer. Use "OrgFrontMatterPage" for the following page.
(OrgFrontMatterPage): New page style. Include a footer that
displays page numbers in Roman style. Use mirrored pages.
Use "OrgFrontMatterPage" for the following page.
(OrgPage): New page style. Include a footer that displays
page numbers. Use mirrored pages. Use "OrgPage" for the
following page.
(OrgFirstPage): New page style. Include a footer that
displays page numbers. Right page only. Use "OrgPage" for
the following page.
(Standard): Modify to include a footer that displays page
numbers. Use mirrored pages. Use "Standard" for the
following page.
None of the above page styles have a header.
The newly added page styles are not used as yet.
org-odt.el: By default, include page numbers in the page footer
2012-01-31 Jambunathan K <kjambunathan@gmail.com>
org-odt.el: Do `clear-image-cache' before `create-image'
2012-02-03 Jambunathan K <kjambunathan@gmail.com>
* lisp/org-lparse.el (org-lparse-do-convert): Replace
`call-process' with `shell-command-to-string'.
* lisp/org-odt.el (org-export-odt-convert-processes): Add a new
converter which depends solely on LibreOffice and nothing
else.
(org-export-odt-convert-process): Make the above native
converter the default.
Thanks to Giles for introducing the "--convert-to" option of
soffice.exe. The option seems to be a fairly recent
development.
http://imperfectsoftware.blogspot.in/2012/01/one-of-my-less-enjoyable-tasks-is-to.html
With this change, one can export to pdf via odt by a simple
(setq org-export-odt-preferred-output-format "pdf")
There is no need to install additional converters.
org-odt.el: Make LibreOffice the default converter
2012-02-09 Jambunathan K <kjambunathan@gmail.com>
* org-odt.el (org-export-odt-convert-capabilities): Change the
default value.
See http://lists.gnu.org/archive/html/emacs-orgmode/2012-02/msg00293.html.
Offer "docx" as an option in `org-export-odt-preferred-output-format'
2012-02-12 Jambunathan K <kjambunathan@gmail.com>
org-odt.el: Fix indentation
2012-02-12 Jambunathan K <kjambunathan@gmail.com>
org-odt.el: Tag all custom variables with Emacs version
2012-02-12 Jambunathan K <kjambunathan@gmail.com>
* lisp/org-odt.el (org-export-odt-convert-processes): Re-define
(org-export-odt-convert-capabilities): Fix an accidental
regression.
* lisp/org-lparse.el (org-lparse-do-convert): Related change.
Simplify definition of `org-export-odt-convert-processes'
2012-02-12 Jambunathan K <kjambunathan@gmail.com>
Retire support for BasicODConverter
2012-02-14 Jambunathan K <kjambunathan@gmail.com>
* org-odt.el (org-export-as-odt-to-buffer)
(org-replace-region-by-odt, org-export-region-as-odt): Remove
these interactive functions. They are of questionable value.
org-odt.el: Remove interactive functions of questionable value
2012-02-15 Jambunathan K <kjambunathan@gmail.com>
Improve converting from ODT to other formats
2012-02-15 Jambunathan K <kjambunathan@gmail.com>
* org-odt.el (org-export-odt-image-size-probe-method)
(org-odt-do-image-size): Use imagemagick preferentially to
determine image sizes.
See http://lists.gnu.org/archive/html/emacs-orgmode/2012-02/msg00288.html
org-odt.el: Use imagemagick to determine image sizes
2012-02-16 Jambunathan K <kjambunathan@gmail.com>
* org.texi (Top, OpenDocument Text export)
(ODT export commands, Extending ODT export)
(Images in ODT export, Tables in ODT export)
(Configuring a document converter): Add or Update.
org.texi: Update ODT section
Thanks to Glenn Morris for this fix in Emacs trunk.
Conflicts:
lisp/ob-emacs-lisp.el
lisp/ob-perl.el
lisp/ob-python.el
lisp/ob-ruby.el
lisp/ob-screen.el
lisp/org-eshell.el
lisp/org-mouse.el
* lisp/org-odt.el (org-odt-format-preamble): Don't insert TOC here.
Delay it till the end of export.
(org-odt-begin-document-body): Make a note of the default
position of TOC in `org-lparse-dyn-first-heading-pos'.
(org-odt-insert-toc): Insert TOC as directed by
[TABLE-OF-CONTENTS] line or at the default position.
(org-odt-end-export): Call `org-odt-insert-toc'.
Fix for the following bug:
http://lists.gnu.org/archive/html/emacs-orgmode/2012-01/msg00974.html
* etc/styles/OrgOdtContentTemplate.xml
(OrgIndentedSection-Level-*): New section styles. These
sections are indented to the same level as the corresponding
list entries. These sections hold tables that occur within a
list.
(OrgTable): Increased relative width from 90% to 96% for
aesthetic reasons.
* lisp/org-odt.el (org-odt-table-indentedp): New variable
(org-odt-begin-table): Modified. If the table is within a
list, temporarily leave the list and begin an indented section
before emitting the table.
(org-odt-end-table): Modified. If the table was within a
list, close the indented section and re-open the list
immediately after ending the table.
(org-odt-continue-list, org-odt-discontinue-list): Helper
routines to temporarily discontinue and continue a list.
(org-odt-list-stack-stashed): New variable to hold the state
of a pending list.
(org-odt-begin-list, org-odt-begin-list-item)
(org-odt-end-list-item): Modified. Handle nitty-gritties for
continuing a list and list item.
(org-odt-section-count): New variable that keeps track of
section count. Used in conjunction with naming of sections.
(org-odt-begin-section, org-odt-end-section): New defuns.
(org-odt-init-outfile): Initialize
`org-odt-list-stack-stashed' and `org-odt-section-count'.
* lisp/org-lparse.el (org-lparse-list-item-count): Removed. Was a
superfluous variable.
(org-lparse-list-level): Removed. Now derived from
`org-lparse-list-stack'.
(org-lparse-list-stack): New. List that records the list
types - ordered, unordered or descriptive - in the following
order: self, parent, grand-parent etc.
(org-do-lparse): Added, removed above let-bound vars.
Disallowed regular tables within list-table block.
(org-lparse-begin-list, org-lparse-end-list)
(org-lparse-begin-list-item, org-lparse-end-list-item):
Propagate above changes.
OpenDocument doesn't permit tables to occur in the middle of a
list. Use list continuations and indented sections to typeset
indented tables.
Fixes the following bug:
http://lists.gnu.org/archive/html/emacs-orgmode/2012-01/msg00515.html
Initialize`org-export-odt-schema-dir' *before* initializing
`org-odt-styles-dir'. This re-arrangement prevents the warning message that
notifies the user of missing OpenDocument schema files not lurk around in
the echo area like a sore-thumb.
* org-odt.el (org-odt-lib-dir): Add docstring.
(org-odt-data-dir): New variable. Use this variable to
control the locations from which the ODT exporter picks the
OpenDocument styles and schema files from. Set this variable
explicitly only if the in-built heuristics for locating the
above files fails.
(org-odt-styles-dir-list, org-odt-schema-dir-list): New
variables. Pay specific attention to (eval-when-compile ...)
form through which Makefile's $(datadir) - contained in
`org-odt-data-dir' - gets compiled in as a "hard coded"
constant.
(org-odt-styles-dir, org-export-odt-schema-dir): Add messages
to aid debugging.
* Makefile (etcdir): Remove this.
(stylesdir): Rename to datadir.
(datadir): Was stylesdir.
(STYLESFILES): Rename to DATAFILES.
(DATAFILES): Was STYLESFILES. Offer a menu of files that is
available. Package maintainers can use this list and their
own discretion to cherry-pick what they are willing to install
in their distribution.
(CP): Add recursive flag so that directories listed in
DATAFILES can be copied enbloc.
(install-lisp): Use conditional flag BATCH_EXTRA
(BATCH_EXTRA): "Target-specific variable value" that plumbs
the value of $(datadir) in to org-odt.el via
`org-odt-data-dir'. See ChangeLog entries for
`org-odt-styles-dir-list' and `org-odt-schema-dir-list'.
(BATCH): Add BATCH_EXTRA.
(lisp/org-odt.elc): Force re-generation of this target every
time so that $(datadir) gets plumbed in to org-odt.el through
`org-odt-data-dir'.
(org-odt-data-dir): "FORCE" target. Also a variable defined
in org-odt.el.
(install-etc): Rename this target to install-data.
(install-data): Was install-etc.
Fix for the following report:
http://lists.gnu.org/archive/html/emacs-orgmode/2011-12/msg00799.html
Ulrich Mueller <ulm@gentoo.org> writes:
In Gentoo we have an issue with the location of the
OpenDocument style files, reported to us in bug 396269 [1].
When org-mode is installed as a separate Gentoo package, its
lisp files are installed in
/usr/share/emacs/site-lisp/org-mode/. According to our
policy, non-lisp files would go to
/usr/share/emacs/etc/org-mode/. We would pass this as the
"etcdir" parameter to "make install", so the odt style files
would be installed in stylesdir =
/usr/share/emacs/etc/org-mode/styles/.
Now org-odt.el currently defines org-odt-styles-dir in a
defconst, and it searches only in ../etc/styles/,
./etc/styles/, and ./etc/org/ relative to lispdir. Obviously
it cannot find the files in the Gentoo location.
[1] <https://bugs.gentoo.org/show_bug.cgi?id=396269>
* org-odt.el (org-odt-styles-dir): Assume that the styles
files are located under `data-directory' of Emacs distribution
as etc/org/OrgOdtStyles.xml and
etc/org/OrgOdtContentTemplate.xml. Also update docstring.
(org-export-odt-schema-dir): Update docstring.
* lisp/org-odt.el (org-export-odt-default-org-styles-alist):
Add styles for title and subtitle.
(org-odt-format-toc): New.
(org-odt-format-preamble): New. Users can redefine this to
customize what goes before the document body. Currently it
outputs title, author and email, date and toc.
(org-odt-begin-document-body): Use `org-odt-format-preamble'.
(org-odt-format-date): Renamed from
`org-odt-iso-date-from-org-timestamp'. Also added an
additional param for format string.
(org-odt-begin-annotation, org-odt-update-meta-file): Use
`org-odt-format-date'.
* etc/styles/OrgOdtStyles.xml (Title, OrgTitle, Subtitle)
(OrgSubtitle): New styles for formatting title.