References being split inside XML of DOCX

edited October 13, 2023
Dear list,
I am facing a problem with importing some of my references with the chicago-note style.

By unzipping the docx and inspecting the files, the problem seems to be that inside the docx footnote.xml the reference is being split in inside multiple xml tags.


<w:footnote w:id="2">
<w:p w:rsidR="00E07E28" w:rsidRDefault="00E07E28">
<w:pPr>
<w:pStyle w:val="Funotentext"/>
<w:rPr>
<w:rFonts w:hint="eastAsia"/>
</w:rPr>
</w:pPr>
<w:r w:rsidRPr="006E3384">
<w:rPr>
<w:rStyle w:val="Funotenzeichen"/>
<w:rFonts w:hint="eastAsia"/>
</w:rPr>
<w:footnoteRef/>
</w:r>
<w:r>
<w:rPr>
<w:rFonts w:hint="eastAsia"/>
</w:rPr>
<w:t xml:space="preserve"></w:t>
</w:r>
<w:r>
<w:rPr>
<w:rFonts w:hint="eastAsia"/>
</w:rPr>
<w:fldChar w:fldCharType="begin"/>
</w:r>
<w:r w:rsidR="00B8660B">
<w:rPr>
<w:rFonts w:hint="eastAsia"/>
</w:rPr>
<w:instrText xml:space="preserve"> ADDIN ZOTERO_ITEM CSL_CITATION {"citationID":"NZSIcfhH","properties":{"formattedCitation":"Elgin, \\uc0\\u8222{}Die kognitiven Funktionen der Fiktion\\uc0\\u8220{}, 67.","plainCitation":"Elgin, </w:instrText>
</w:r>
<w:r w:rsidR="00B8660B">
<w:rPr>
<w:rFonts w:hint="eastAsia"/>
</w:rPr>
<w:instrText>„</w:instrText>
</w:r>
<w:r w:rsidR="00B8660B">
<w:rPr>
<w:rFonts w:hint="eastAsia"/>
</w:rPr>
<w:instrText>Die kognitiven Funktionen der Fiktion</w:instrText>
</w:r>
<w:r w:rsidR="00B8660B">
<w:rPr>
<w:rFonts w:hint="eastAsia"/>
</w:rPr>
<w:instrText>“</w:instrText>
</w:r>
<w:r w:rsidR="00B8660B">
<w:rPr>
<w:rFonts w:hint="eastAsia"/>
</w:rPr>
<w:instrText>, 67.","noteIndex":2},"citationItems":[{"id":808,"uris":["http://zotero.org/groups/4776909/items/GJN74WAS"],"itemData":{"id":808,"type":"chapter","container-title":"Kunst denken: die Beiträge dieses Bandes gehen größtenteils auf Vorträge der Konferenz \"Kunst und Kognition\" zur</w:instrText>
</w:r>
<w:r w:rsidR="00B8660B">
<w:rPr>
<w:rFonts w:hint="eastAsia"/>
</w:rPr>
<w:instrText>ü</w:instrText>
</w:r>
<w:r w:rsidR="00B8660B">
<w:rPr>
<w:rFonts w:hint="eastAsia"/>
</w:rPr>
<w:instrText>ck, die vom 9. bis zum 11. Juni 2005 in Erfurt stattgefunden hat","event-place":"Paderborn","ISBN":"978-3-89785-579-3","language":"ger","page":"77</w:instrText>
</w:r>
<w:r w:rsidR="00B8660B">
<w:rPr>
<w:rFonts w:hint="eastAsia"/>
</w:rPr>
<w:instrText>–</w:instrText>
</w:r>
<w:r w:rsidR="00B8660B">
<w:rPr>
<w:rFonts w:hint="eastAsia"/>
</w:rPr>
<w:instrText xml:space="preserve">89","publisher":"mentis-Verl","publisher-place":"Paderborn","source":"K10plus ISBN","title":"Die kognitiven Funktionen der Fiktion","editor":[{"family":"Burri","given":"Alex"},{"family":"Huemer","given":"Wolfgang"}],"author":[{"family":"Elgin","given":"Catherine Z."}],"issued":{"date-parts":[["2007"]]}},"label":"page","suffix":", 67"}],"schema":"https://github.com/citation-style-language/schema/raw/master/csl-citation.json"} </w:instrText>
</w:r>
<w:r>
<w:rPr>
<w:rFonts w:hint="eastAsia"/>
</w:rPr>
<w:fldChar w:fldCharType="separate"/>
</w:r>
<w:r w:rsidR="0088644B" w:rsidRPr="0088644B">
<w:rPr>
<w:rFonts w:cs="Times New Roman"/>
<w:szCs w:val="24"/>
</w:rPr>
<w:t>Elgin, „Die kognitiven Funktionen der Fiktion“, 67.</w:t>
</w:r>
<w:r>
<w:rPr>
<w:rFonts w:hint="eastAsia"/>
</w:rPr>
<w:fldChar w:fldCharType="end"/>
</w:r>
</w:p>
</w:footnote>

I have tried to put the json reference inside just one of the <w:r w:rsidR="00B8660B"> tags but that just breaks the docx file.
This doesn't seem to be a correct behaviour and pandoc will not recognize the references if they are not correctly formated in the XML. I have had cases where the problem appears in other styles, but sometimes changing the style will reformat the reference correctly.

Here is the example

https://www.dropbox.com/scl/fi/rku6ik1r8fei9grmp50wu/test-20231005-1good-1bad.docx?rlkey=fvryuas4b1w437unsbb3j0r0l&dl=0

Many thanks,

Joao Martins
  • I'm not sure what you're asking here. Is this a Zotero question? I don't think we have anything to do with how Word serializes a document to disk.
  • As I don't know how the plugin works, I thought this could be a question for the forum, and I was advised in the Pandoc forum to place the question here. Maybe others have had the same problem and found a solution.
  • It makes sense from a Pandoc perspective -- pandoc actually does write the XML in the docx file directly, but Zotero just uses Word's API to tell it "insert this field information here" and how that ends up written to the .docx is indeed entirely Word internal, so there's no solution to this that involves Zotero -- it'd either have to be MS or Pandoc.

    Could you say exactly what you're trying to do, though? I wasn't aware that pandoc reads Zotero citation information at all.
  • Indeed, pandoc can read zotero references with the flag `-f docx+citations` and produces the bilbiography in html and md with the flag `--citeproc`. My goal ist to convert a document to different formats.
  • Thanks for the comments. I understand this might be an edge case that happens primarily with the chicago-note style because in most of the documents the citation are normally serialised. This problem also breaks somehow graciously, as Pandoc will still recognize the content of the footnotes, but it will not build references into the bibliography. I managed to solve the problem by redoing some of the references in another style and then converting to the chicago-note style.
Sign In or Register to comment.