org-mode-ox-odt
org-mode-ox-odt copied to clipboard
installation?
How does one install this exporter? Does one have to replace their entire org-mode version?
Thanks for this!
I have gotten things working with the repo loaded as org src code. Org mode version 8.3.5 (release_8.3.5-2447-g417081 @ /path/to/org-mode-ox-odt-kjambunathan/lisp/)
Is this the intended usage, or is there a method for using this exporter with newer versions of org?
No, there are some changes from the upstream org that need to be merged. you can't use this exporter with newer versions of org. But you can help to incorporate this exporter to the main org distribution by writing to the maintainer of org mode.
Thanks! I'll do that.
Also I'd be happy to help with documentation to get this into main Org.
Hello,
I have gotten things working with the repo loaded as org src code. Org mode version 8.3.5 (release_8.3.5-2447-g417081 @ /path/to/org-mode-ox-odt-kjambunathan/lisp/)
I would like to
- Upgrade this repo from Org-8.3.5 to Org-9.1.14+
- Distribute just ODT-related files as part of MELPA
While doing (1), I ran in to issue #49. That issue is an upstream issue and it is better addressed by the upstream maintainers. Would any of you like to forward issue #49 to the Orgmode mailing list? Once that is done, I will take up (1) and (2).
The ODT and JabRef exporters can now be with Emacs Package Mananger's M-x list-packages
. The package is available at https://raw.githubusercontent.com/kjambunathan/org-mode-ox-odt/master/elpa/. See below for a typical configuration.
(custom-set-variables
'(package-archives
(quote
(("gnu" . "https://elpa.gnu.org/packages/")
("ox-odt" . "https://raw.githubusercontent.com/kjambunathan/org-mode-ox-odt/master/elpa/")))))
When you install ox-odt
from the above archive, it will upgrade your Org
to 9.1.14, if needed. Once you have installed the ox-odt
package and restart your Emacs. Run M-x locate-library RET org
and M-x locate-library RET ox-odt
and ensure that you see something along the following lines.
Library is file ~/.emacs.d/elpa/org-9.1.14/org.elc
Library is file ~/.emacs.d/elpa/ox-odt-9.1.14.145/ox-odt.elc
After you export an Org
file to ODT
, look at your *Messages*
buffer and ensure that the ODT exporter *uses` style and schema files from the ELPA package. i.e., You should see something like this
Debug (ox-odt): Using styles under ~/.emacs.d/elpa/ox-odt-9.1.14.145/etc/styles/ <--- Wrong
Debug (ox-odt): Using schema files under ~/.emacs.d/elpa/ox-odt-9.1.14.145/etc/schema/ <--- Right
As I am writing this, I am finding that style files are getting picked from the wrong place. I will fix it tomorrow.
Apart from the above issue, I would appreciate your feedback on how things are at your end.
Debug (ox-odt): Using styles under ~/.emacs.d/elpa/ox-odt-9.1.14.145/etc/styles/ <--- Wrong As I am writing this, I am finding that style files are getting picked from the wrong place
https://raw.githubusercontent.com/kjambunathan/org-mode-ox-odt/master/elpa/.
The above URL will NOT work any longer.
Please use https://kjambunathan.github.io/elpa/ instead.
Sorry for the trouble.
Thanks @kjambunathan! 📦🎉
This can be installed via Cask:
Cask
should include these two lines:
(source ox-odt "https://kjambunathan.github.io/elpa/")
[...]
(depends-on "ox-odt")
Would you be interested in a documentation PR here detailing installation methods with package-install
and Cask?
with
(source gnu) (source melpa) (source melpa-stable) (source ox-odt "https://kjambunathan.github.io/elpa/") [...] (depends-on "ox-odt")
M-x org-version RET gives Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ ~/.emacs.d/.cask/26.1/elpa/org-9.1.14/) Seems like the 9.1.9 is just a string somewhere that needs to be updates? org.el appears to be version 9.1.14...
The 9.1.9 ...
comes from org that comes with your Emacs 26.1. Once you close your Emacs and restart, the inconsistency you noticed will go away. i.e., the incosistency that you notice is transitory and you need not worry about it at all.
If you run in to such issues in the future, one way to examine the situation is through the command M-x list-load-path-shadows
.
If you do M-x list-load-path-shadows
and search for org-version.el
in the result, you will find the following line.
~/.emacs.d/elpa/org-9.1.14/org-version hides /usr/local/share/emacs/26.1/lisp/org/org-version
The above line suggests that org from elpa (i.e., `org-9.1.14/org-version) overrides the org that comes bundled with your stock emacs.
If you examine those two files, you will find that org-verison.el
that comes with GNU ELPA has the string "9.1.14-1-g4931fc-elpa"
and the org-version.el
that is bundled with GNU Emacs has the string "release_9.1.9-65-g5e4542"
.
I am trying to install the updated package, I got this error:
Error retrieving: https://kjambunathan.github.io/elpa/ archive-contents (error http 404)
I am trying to install the updated package, I got this error:
Error retrieving: https://kjambunathan.github.io/elpa/ archive-contents (error http 404)
Still having issues? https://kjambunathan.github.io/elpa/
is working for me alright (via Cask).
Sorry. It's caused by an extra space in the url : https://kjambunathan.github.io/elpa/ archive-contents
For the sake of record, the value of package-archives
that I use is this.
(custom-set-variables
'(package-archives
(quote
(("gnu" . "https://elpa.gnu.org/packages/")
("ox-odt" . "https://kjambunathan.github.io/elpa/")
("melpa" . "https://melpa.org/packages/")))))
Heads up
A few minutes back, I published ox-odt-9.1.14.169
. While doing so, I realized that my org
upgraded to org-9.2
. I haven't gotten around to test my changes with org-9.2
. So, if you run in to issues with org-9.2
please let me know.
I have published ox-odt-9.2.1.172.tar
a few minutes ago. The focus of the release was to rebase my ox-odt
changes over org's release_9.2.1
.
Hi, which is the last version of the ORG-MODE compatible with the ox-odt. I installed with the latest scimax, but nothing seems to work. Thanks in advance!
You can try org 9.3.7, which is the version found in ox-odt-pkg.el
Hi, which is the last version of the ORG-MODE compatible with the ox-odt. I installed with the latest scimax, but nothing seems to work. Thanks in advance!
The issue you are replying to has enough information to debug the issue. The gist is: M-x list-load-path-shadows
and `M-x locate-library ox-odt' are your friends.
If you are installing via the package manager, you don't have to worry about version compatibility. Package manager will do the right thing for you.
That said, any 9.x release should work. I am on Emacs master branch 28.0.50 and the org Version is 9.4.4. I don't have see any issues with ox-odt at all.
If you can provide additional details on specific issue you are facing, I will be happy to help you.
Thanks for your reply. I am not really good at Emacs/LISP. I started with vanilla Emacs installation (26.3). The config file is as the following:
(package-initialize)
(require 'org)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(org-odt-convert-process "LibreOffice")
'(org-odt-preferred-output-format "docx")
'(org-odt-transform-processes
'(("Optimize Column Width of all Tables"
"soffice" "--norestore" "--invisible" "--headless"
"macro:///OrgMode.Utilities.OptimizeColumnWidth(%I)")
("Update All"
"soffice" "--norestore" "--invisible" "--headless"
"macro:///OrgMode.Utilities.UpdateAll(%I)")
("Reload"
"soffice" "--norestore" "--invisible" "--headless"
"macro:///OrgMode.Utilities.Reload(%I)")))
'(org-jabref-command '("/snap/bin/jabref" "-n"))
'(org-latex-to-mathml-convert-command
"java -jar %j -unicode -force -df %o %I")
'(org-latex-to-mathml-jar-file
"/home/przemek/scimax/mathtoweb.jar")
'(package-archives
(quote
(("gnu" . "https://elpa.gnu.org/packages/")
("ox-odt" . "https://kjambunathan.github.io/elpa/")
("melpa" . "https://melpa.org/packages/"))))
'(package-selected-packages (quote (JabrefExportChicagoODF ox-odt))))
(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))))
I used the exact example from: here
I am not sure, maybe it is a problem with JabRef (v. 5.2). The citations are just not processed, the original citations stay untouched and are verbatim in the output odt file.
The output from the jabref -n -h
is as the following:
Available export formats: html, simplehtml, docbook5, docbook4, din1505,
bibordf, tablerefs, listrefs, tablerefsabsbib, harvard, iso690rtf,
iso690txt, endnote, oocsv, ris, misq, yaml, bibtexml, oocalc, ods,
MSBib, mods, xmp, pdf, Chicago.ODF.biblio, Chicago.ODF.abstract,
hicago.ODF.footend, Chicago.ODF.footend.short, Chicago.ODF.note,
Chicago.ODF.text, Chicago.ODF.reference
I do not get any errors in the Messages buffer, so I have no idea where to look for errors.
Thanks, M.
Maybe you can try JabRef-2.9.2.jar, it is mentioned somewhere that is the last version that works.
I used the exact example from: here
Did you also use the examples there. Specficially you need to have the following directives:
#+bib_file: "./biblatex-examples/novices.bib"
#+odt_jabref_citation_style: "Chicago (author-date)"
There are screenshots for both JabRef config and the output from ODT file. I have created those output using JabRef-5.0. There is really not much that has changed since I created that documentation. So, stuff should not be very badly broken.
Maybe you can try JabRef-2.9.2.jar, it is mentioned somewhere that is the last version that works.
The older versions of JabRef allowed plugins to be installed as a JAR file i.e., one could point JabRef to the JAR version of the plugin i.e., the jar version of JabrefExportChicagoODF-1.2.2
and JabRef's plugin importer will take care of further configuration.
But newer versions of JabRef no longer accept the JAR version of plugin. So, one has to setup the output formats individually, much like what you see in https://kjambunathan.github.io/org-mode-ox-odt/JabRefCustomizeExportFormats.png
i also had a heck of a time trying to get ox-odt from this repo to work alongside org-plus-contrib. when i updated the latter it would be later in the load-path list than this one, and show would shadow it.
my work around was to first remove this list then add it, using an after-init hook so it hopefully is run after org-plus:
(add-hook 'after-init-hook (lambda()
(remove "/path/to/elpa/ox-odt-9.3.7.320/" load-path)
(add-to-list 'load-path "/path/to/elpa/ox-odt-9.3.7.320/")
(require 'ox-odt)))
i also had a heck of a time trying to get ox-odt from this repo to work alongside org-plus-contrib. when i updated the latter it would be later in the load-path list than this one, and show would shadow it.
my work around was to first remove this list then add it, using an after-init hook so it hopefully is run after org-plus:
(add-hook 'after-init-hook (lambda() (remove "/path/to/elpa/ox-odt-9.3.7.320/" load-path) (add-to-list 'load-path "/path/to/elpa/ox-odt-9.3.7.320/") (require 'ox-odt)))
The probem with this approach is that you need to change the load-path
as when the version
of ox-odt
changes. A fool-proof way to do it is to replace the above expression with
(progn
(require 'package)
(setq load-path
(cons
(package-desc-dir (package--get-activatable-pkg 'ox-odt))
load-path))
(load-library "ox-odt"))
and add it right at the very end of your init file