emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ken Mankoff <mankoff@gmail.com>
To: Uwe Brauer <oub@mat.ucm.es>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-ref exports nicely to html but not to odt
Date: Fri, 04 Jan 2019 22:00:59 +0100	[thread overview]
Message-ID: <87va34yw6s.fsf@geus3064linuxwsm.geus.dk> (raw)
In-Reply-To: <87tviouz88.fsf@mat.ucm.es>


On 2019-01-04 at 18:08 +0100, Uwe Brauer <oub@mat.ucm.es> wrote:
> When I export it to html, the bibliography comes out nice. When I
> export it to odt, the resulting odt files contains a lot of rubbish.
>
> A kludge is to export it to html and then open it with LO/OO and copy
> it in an empty odt file, but is there any other solution?

I find the best ODT comes from LaTeX -> pandoc -> ODT. I have the following section at the bottom of my default Org template workbook.

  -k.



* DOCX                                                  :noexport:

Exporting to DOCX by using pandoc to convert the LaTeX export to DOCX seems to work much better than using Org directly. This means you need to export to LaTeX, properly compile the latex (to get the references correct), then run the BibTeX code block below 1x (and re-run each time you update any references), then run the Pandoc code block to convert the TeX file to DOCX.

** BibTeX                                               :noexport:
#+BEGIN_SRC sh :results verbatim :var fn=(file-name-sans-extension (buffer-name))
biber ${fn} --output_format bibtex
#+END_SRC
#+RESULTS:

** Pandoc
#+BEGIN_SRC sh :results verbatim :var fn=(file-name-sans-extension (buffer-name))
pandoc -f latex -t docx -o ${fn}.docx --bibliography ./${fn}_biber.bib ${fn}.tex
#+END_SRC
#+RESULTS:

  parent reply	other threads:[~2019-01-04 21:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-04 17:08 org-ref exports nicely to html but not to odt Uwe Brauer
2019-01-04 19:27 ` John Kitchin
2019-01-04 20:42   ` Uwe Brauer
2019-01-04 20:50     ` John Kitchin
2019-01-04 21:00 ` Ken Mankoff [this message]
2019-01-04 21:37   ` Uwe Brauer
2019-01-04 21:52     ` Ken Mankoff
2019-01-04 22:06       ` Uwe Brauer
2019-01-04 22:34         ` John Kitchin
2019-01-05  8:48           ` Uwe Brauer
2019-01-05 10:21             ` Eric S Fraga
2019-01-05 15:59               ` Uwe Brauer
2019-01-05 16:48                 ` Eric S Fraga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87va34yw6s.fsf@geus3064linuxwsm.geus.dk \
    --to=mankoff@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=oub@mat.ucm.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).