On 2019-01-04 at 18:08 +0100, Uwe Brauer <[email protected]> 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: