Description
I'm experiencing persistent issues when using CSL (Citation Style Language) files with the Pandoc Reference List plugin in Obsidian, specifically when the "Custom citation style" setting is configured to "Português (Brasil)" (pt-BR). When set to "English (US)" (en-US), the same CSL files work as expected.
This behavior is observed with both the ABNT (Associação Brasileira de Normas Técnicas) CSL file (which is a custom style for Brazilian standards) and the official APA 7th Edition CSL file downloaded directly from the CSL repository.
The problem manifests as two distinct errors appearing in the Obsidian Developer Tools console, which suggests a deeper issue related to how the plugin handles localization (locale) settings for pt-BR.
Steps:
Use the ABNT CSL file (http://www.zotero.org/styles/associacao-brasileira-de-normas-tecnicas).
In Obsidian: Settings > Community plugins > Pandoc Reference List >Set "Custom citation style" to "Português (Brasil)".
Point "Path to CSL file" to either apa-7th-edition.csl or your ABNT CSL file.
Ensure Zotero is running and your bibliography is accessible (e.g., "Pull bibliography from Zotero" enabled, or "Path to bibliography file" pointing to a valid export from Better BibTeX).
Attempt Citation: Try to insert a citation in a note (e.g., [@author2024]).
Observe Errors: Open Obsidian Developer Tools Console.
Expected Behavior
Citations should render correctly according to the chosen CSL style, regardless of the "Custom citation style" locale setting (pt-BR or en-US), assuming the CSL file itself is valid.
Actual Behavior
When "Custom citation style" is set to "Português (Brasil)", the following errors appear in the console:
Using ABNT CSL
- citeproc-js error: unable to parse XML input
Using APA-7th CSL
- citeproc-js error: unable to parse XML input
- SyntaxError: Unexpected end of JSON input
Howerver, if I change the "Custom citation style" setting to "English (US)" (using the exact same apa-7th-edition.csl file), the plugin works perfectly, and citations render as expected without any errors.
This behavior is consistently reproducible and indicates a specific problem with the plugin's handling of the pt-BR locale, possibly related to internal citeproc-js locale files (locales-pt-BR.xml) or the interaction with JSON data fetching under this locale.
Environment
Obsidian Version: (v1.8.10)
Pandoc Reference List Plugin Version: (2.0.25)
Zotero Desktop Version: (7.0.15)
Zotero Integration version: (3.2.1)
Better BibTeX for Zotero Version: (7.0.32)
Operating System: (Win11)
Additional Context
- The ABNT CSL file I'm using has been checked for invisible characters (like NBSP) and confirmed to be UTF-8 encoded.
- The same ABNT CSL file works flawlessly with the Obsidian Zotero Integration plugin using pt-BR locale settings, suggesting the CSL file itself is not inherently malformed or invalid for pt-BR. This further points to an issue within the Pandoc Reference List plugin's specific implementation.
- The SyntaxError: Unexpected end of JSON input appearing alongside the XML parsing error suggests the pt-BR locale might be causing issues not only with CSL parsing but also with the communication/data retrieval from Zotero.
Description
I'm experiencing persistent issues when using CSL (Citation Style Language) files with the Pandoc Reference List plugin in Obsidian, specifically when the "Custom citation style" setting is configured to "Português (Brasil)" (pt-BR). When set to "English (US)" (en-US), the same CSL files work as expected.
This behavior is observed with both the ABNT (Associação Brasileira de Normas Técnicas) CSL file (which is a custom style for Brazilian standards) and the official APA 7th Edition CSL file downloaded directly from the CSL repository.
The problem manifests as two distinct errors appearing in the Obsidian Developer Tools console, which suggests a deeper issue related to how the plugin handles localization (locale) settings for pt-BR.
Steps:
Use the ABNT CSL file (http://www.zotero.org/styles/associacao-brasileira-de-normas-tecnicas).
In Obsidian: Settings > Community plugins > Pandoc Reference List >Set "Custom citation style" to "Português (Brasil)".
Point "Path to CSL file" to either apa-7th-edition.csl or your ABNT CSL file.
Ensure Zotero is running and your bibliography is accessible (e.g., "Pull bibliography from Zotero" enabled, or "Path to bibliography file" pointing to a valid export from Better BibTeX).
Attempt Citation: Try to insert a citation in a note (e.g., [@author2024]).
Observe Errors: Open Obsidian Developer Tools Console.
Expected Behavior
Citations should render correctly according to the chosen CSL style, regardless of the "Custom citation style" locale setting (pt-BR or en-US), assuming the CSL file itself is valid.
Actual Behavior
When "Custom citation style" is set to "Português (Brasil)", the following errors appear in the console:
Using ABNT CSL
Using APA-7th CSL
Howerver, if I change the "Custom citation style" setting to "English (US)" (using the exact same apa-7th-edition.csl file), the plugin works perfectly, and citations render as expected without any errors.
This behavior is consistently reproducible and indicates a specific problem with the plugin's handling of the pt-BR locale, possibly related to internal citeproc-js locale files (locales-pt-BR.xml) or the interaction with JSON data fetching under this locale.
Environment
Obsidian Version: (v1.8.10)
Pandoc Reference List Plugin Version: (2.0.25)
Zotero Desktop Version: (7.0.15)
Zotero Integration version: (3.2.1)
Better BibTeX for Zotero Version: (7.0.32)
Operating System: (Win11)
Additional Context