Next: , Previous: , Up: Top   [Contents][Index]

3 Getting Started with ODT export

3.1 Pre-requisites for ODT export

The ODT backend depends on the following programs

zip1To produce OpenDocument files
unzip2To unzip custom styles
identify3To identify the size of an inline image
latex4To compile LaTeX fragments to ‘dvi’ images
dvisgm5To convert ‘dvi’ images to ‘svg
dvipng6To convert ‘dvi’ images to ‘png
convert7To convert inline ‘pdf’ to ‘png
latexmlmath8To convert LaTeX math snippets to MathML
jabref10To handle bibliography and citations

Of these, ‘zip’ is essential. Rest are optional.

3.2 Installation

You can install the OpenDocument Text export backend using the Emacs package manager. The archive URL for the package is

A typical configuration look like this

    (("gnu" . "")
     ("ox-odt" . "")))))

In the ‘*Packages*’ buffer, packages from this archive show up as below

JabrefExportChicagoODF 1.2.2      ... Jabref Plugin for export to Chicago Manual of Style in OpenDocumentFormat
ox-odt         ... OpenDocument Text Exporter for Org Mode

3.3 Configuration

Here is a sample configuration.

 '(org-odt-convert-process "LibreOffice")
 '(org-odt-preferred-output-format "docx")
   '(("Optimize Column Width of all Tables"
      "soffice" "--norestore" "--invisible" "--headless"
     ("Update All"
      "soffice" "--norestore" "--invisible" "--headless"
      "soffice" "--norestore" "--invisible" "--headless"
 '(org-jabref-command '("/opt/jabref/bin/JabRef" "-n"))
   "java -jar %j -unicode -force -df %o %I")

(require 'ox-odt)
(require 'ox-jabref)

;; (setcdr (assq 'system org-file-apps-defaults-gnu) "xdg-open %s")
(setcdr (assq 'system org-file-apps-gnu) "xdg-open %s")

(advice-add 'org-open-file :around
            (lambda (orig-fun &rest args)
              ;; Work around a weird problem with xdg-open.
              (let ((process-connection-type nil))
                (apply orig-fun args))))

Above configuration sets up the ODT backend as follows:

  1. Use ‘"LibreOffice"’ (i.e., ‘soffice’ executable) as the document converter
  2. Generate a ‘docx’ document for every ‘odt’ document
  3. Process the ‘odt’ document with a set of LibreOffice Basic Macros to
  4. Tell where your ‘JabRef’ and ‘mathtoweb’ executables are located, and how they are invoked.
  5. (if you are using a GNU system) open the ‘odt’ document with your preferred OpenDocument viewer, presumably ‘LibreOffice’.
  6. Load ‘ox-jabref’ so as to produce documents with bibliography and citations .









TeX Live


TeX Live











Previous: , Up: Getting Started with ODT export   [Contents][Index]