kjambunathan / org-mode-ox-odt

The Authoritative fork of Org mode's ODT exporter
GNU General Public License v3.0
45 stars 9 forks source link

Exporting test-new.org, with unfiltered bibiliography fails. #33

Open kjambunathan opened 6 years ago

kjambunathan commented 6 years ago
  1. Customize org-jabref-citation-styles's "Chicago (full-note)" style with :dont-filter t.
(custom-set-variables
 '(org-jabref-citation-styles
   (quote
    (("odt"
      ("Chicago (author-date)" :in-text
       (:jabref-format "chicago.ODF.text" :formatter "Simple (but strip braces)")
       :bibliography
       (:jabref-format "chicago.ODF.reference" :formatter "Bibliography"))
      ("Chicago (full-note)" :in-text
       (:jabref-format
    ("chicago.ODF.footend" . "chicago.ODF.footend.short")
    :formatter "Footnote")
       :bibliography
       (:jabref-format "chicago.ODF.biblio" :dont-filter t :formatter "Bibliography"))
      ("Numeric" :in-text
       (:jabref-format "Numeric" :formatter "Simple")
       :bibliography
       (:jabref-format "chicago.ODF.reference" :formatter "Bibliography (Numbered)")))))))
  1. Export test-new.org and open the resulting with LibreOffice.

  2. Note that LibreOffice complains about malformed content.xml.

<text:p text:style-name="Bibliography">
  <text:bookmark-start text:name="cite-iliad"/>
  Homer. 
  <text:span text:style-name="Emphasis">Die Ilias</text:span>.
  3

  Düsseldorf and Zürich:
  Artemis & Winkler,
  2004.
  <text:bookmark-end text:name="cite-iliad"/>
</text:p>

To fix this issue, don't use & in XML output, but replace it with &amp;

kjambunathan commented 6 years ago

After applying the above update, LibreOffice continues to complain about malformed content.xml. Here is a partial set of malformed content.xml.

Hint: Note the absence of trailing ; in &#44, Aks&#305, n&#44, &#214, zge etc,

<text:p text:style-name="Footnote">
de Geer&#44 and Ingrid Earl&#44; Saint&#44; Bishop&#44; Skald&#160;&#x2013; and Music.
, Uppsala Universitet
, Uppsala
(1985)
.</text:p>

<text:p text:style-name="Bibliography">
  <text:bookmark-start text:name="cite-aksin"/>
  Aks&#305, n&#44, &#214, zge, T&#252, rkmen&#44, Hayati, Artok&#44, Levent, &#199, etinkaya&#44, Bekir, Ni&#44, Chaoying, B&#252, y&#252, kg&#252, ng&#246, r&#44, Orhan, &#214, zkal&#44 and Erhan. 
  "Effect of immobilization on catalytic characteristics of saturated Pd&#45;N&#45;heterocyclic carbenes in Mizoroki&#45;Heck reactions." <text:span text:style-name="Emphasis">J.&#160;Organomet. Chem.</text:span>
  691
  , no. 13
  (
  2006)
  : 3027-3036.
  <text:bookmark-end text:name="cite-aksin"/>
</text:p>

I am using the following version of JabRef.

$ dpkg -l jabref
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                            Version              Architecture         Description
+++-===============================-====================-====================-====================================================================
ii  jabref                          3.8.2+ds-2           all                  graphical frontend to manage BibTeX and BibLaTeX databases