Table of Contents
This is a fork of Org's ODT backend and adds many useful improvements to that backend. This fork is authoritative because it is maintained by the original author of that backend.
Add https://kjambunathan.github.io/elpa/
to package-archives
. Once that is done, you can install the exporter withM-x list-packages
.
(custom-set-variables
'(package-archives
(quote
(("gnu" . "https://elpa.gnu.org/packages/")
("ox-odt" . "https://kjambunathan.github.io/elpa/")))))
In the Emacs *Packages*
menu, the entry for the ODT backend looks like
ox-odt 9.2.1.205 available ox-odt OpenDocument Text Exporter for Org Mode
ox-odt
and not the ox-odt
that comes with upstream emacs
or org-mode
org
file: C-x C-f somefie.org
odt
: C-c C-e o o
Switch to *Messages*
buffer: C-x b *Messages*
. Inspect the path of styles
file.
Here is a sample run on my setup.
ODT Zip Dir is /tmp/odt-fLRSbZ/
Formatting LaTeX using mathml
Embedding /home/kjambunathan/src/org-mode-ox-odt/testing/examples/odt/publish/org-mode-unicorn.png as Images/0001.png...
----> ox-odt: Content template file is /home/kjambunathan/.emacs.d/elpa/ox-odt-9.5.3.437/etc/styles/OrgOdtContentTemplate.xml**
Wrote /tmp/odt-fLRSbZ/content.xml
----> ox-odt: Styles file is /home/kjambunathan/.emacs.d/elpa/ox-odt-9.5.3.437/etc/styles/OrgOdtStyles.xml**
Wrote /tmp/odt-fLRSbZ/styles.xml [2 times]
Wrote /tmp/odt-fLRSbZ/meta.xml
Wrote /tmp/odt-fLRSbZ/mimetype
Wrote /tmp/odt-fLRSbZ/META-INF/manifest.xml
Create OpenDocument file ‘3jacmbl0nfj0.odt’...
Using schema ~/.emacs.d/elpa/ox-odt-9.5.3.437/etc/schema/od-schema.rnc
Running zip -mX0 3jacmbl0nfj0.odt mimetype
Running zip -rmTq 3jacmbl0nfj0.odt .
Created /home/kjambunathan/src/org-mode-ox-odt/testing/examples/odt/publish/3jacmbl0nfj0.odt
The path of the styles
files suggests that ox-odt
is coming from /home/kjambunathan/.emacs.d/elpa/ox-odt-9.5.3.437/
which is exactly what you want.
ox-odt
from previous step is not the enhanced ox-odt
seq
, peg
, citeproc
, rnc-mode
etcThis repository depends on following packages
seq: Sequence manipulation functions
(This package is available in GNU ELPA)
This is a Mandatory package.
peg: Parsing Expression Grammars in Emacs Lisp
(This package is available in GNU ELPA)
This package is Not Needed, if you want to use just the ODT
(= OpenDocument Text
) exporter.
This package is Mandatory, if you want to make use of ODS
(= OpenDocument Spreadsheet
) exporter.
citeproc: A CSL 1.0.2 Citation Processor
(This package is available in MELPA)
This package is Desirable.
When this package is available in load-path
, the ODT exporter will provide richer formatting of Citations and Bibliographies.
rnc-mode: Emacs mode to edit Relax-NG Compact
files
(This package is available in GNU ELPA)
This package is Optional.
Install this package only if you have a need to look at *.rnc
files.
Ensure you install one or more of the above packages depending on your needs.
package.el
...Add the following to the very end of your init file
(progn
(require 'package)
(setq load-path
(cons
(package-desc-dir (package--get-activatable-pkg 'ox-odt))
load-path))
(load-library "ox-odt"))
ox-odt
and not the ox-odt
that comes with upstream emacs
or org-mode
straight.el
... (use-package ox-odt
:straight (org-mode-ox-odt
:host github
:repo "kjambunathan/org-mode-ox-odt"
:files ("lisp/ox-odt.el"
"lisp/ox-ods.el"
"lisp/odt.el"
"etc"
"docs"
"contrib/odt/LibreOffice")))
straight.el
...~/.doom.d/packages.el
, (package! ox-odt
:recipe
(
:host github
:repo "kjambunathan/org-mode-ox-odt"
:files ("lisp/ox-odt.el"
"lisp/ox-ods.el"
"lisp/odt.el"
"etc"
"docs"
"contrib/odt/LibreOffice")))
~/.emacs.d/bin/doom sync
.Doom-emacs uses straight.el, so it may be like this in the straight.el way.
git
checkout of this repo ...Assuming that you have checked out the source under ~/src/
directory, add the following at THE VERY BOTTOM of your user-init-file
(setq load-path (cons "~/src/org-mode-ox-odt/lisp/" load-path))
(load-library "ox-odt")
(load-library "ox-ods")
Identify the most recent version of ox-odt
from the org-mode-ox-odt
ELPA. At the time of writing this note, it is ox-odt-9.5.3.456.tar
.
Download ox-odt-9.5.3.456.tar
and untar
it
~$ cd ~/Downloads/
~/Downloads$ wget https://raw.githubusercontent.com/kjambunathan/kjambunathan.github.io/master/elpa/ox-odt-9.5.3.456.tar
~/Downloads$ tar xvf ox-odt-9.5.3.456.tar
user-init-file
(progn
(setq load-path
(cons
;; Replace this path with where `ox-odt.el' can be found
"~/Downloads/ox-odt-9.5.3.456/"
load-path))
(load-library "ox-odt")
(load-library "ox-ods"))
See Top (OpenDocument Text Exporter for Emacs’ Org Mode).
If you are an existing user of OpenDocument exporter, start with What is New (OpenDocument Text Exporter for Emacs’ Org Mode).
If you want a /near complete/, but a /crude/ list of features start with List of features that are exclusive to The Enhanced OpenDocument Exporter for Org mode.
If you want a blog-style, informal introduction to some of the features of this exporter, you may want to look at the following articles:
Issues
page. Whenever a new feature is added, I add a very user-friendly note to how that feature may be put to use.Issues
pageDiscussions
pageWill you merge this repo to upstream Orgmode
or GNU Emacs
?
Never
Will you put this repo on MELPA
or GNU ELPA
?
Never
Do you accept Pull Requests
?
I prefer bug reports and feature requests.
LibreOffice
If you would like to customize the look of a document produced by this exporter, a good familiarity with LibreOffice
—this means working with styles
—is a must.
LibreOffice
comes with good set of User Guides. If you find that these guides are too detailed for your immediate needs, you may want to start with one of these: