From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ken Mankoff Subject: Re: org-ref exports nicely to html but not to odt Date: Fri, 04 Jan 2019 22:00:59 +0100 Message-ID: <87va34yw6s.fsf@geus3064linuxwsm.geus.dk> References: <87tviouz88.fsf@mat.ucm.es> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:46469) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gfWaa-0000zT-9q for emacs-orgmode@gnu.org; Fri, 04 Jan 2019 16:01:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gfWaX-0006jC-5t for emacs-orgmode@gnu.org; Fri, 04 Jan 2019 16:01:08 -0500 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]:44433) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gfWaV-0006dk-R4 for emacs-orgmode@gnu.org; Fri, 04 Jan 2019 16:01:04 -0500 Received: by mail-lf1-x130.google.com with SMTP id z13so26279692lfe.11 for ; Fri, 04 Jan 2019 13:01:03 -0800 (PST) In-reply-to: <87tviouz88.fsf@mat.ucm.es> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Uwe Brauer Cc: emacs-orgmode@gnu.org On 2019-01-04 at 18:08 +0100, Uwe Brauer 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: