-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix note index code to use the LibreOffice internal index property
- Loading branch information
Showing
2 changed files
with
3 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
bb21e3c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A side-effect of this fix will be that back-references in note styles that use
first-reference-note-number
will no longer be guaranteed to align with the note number printed in the text.For per-page footnote counts, that form of back-reference will be broken anyway (citation would need to track both page and note number, but only tracks the latter), so maybe it's not worth worrying about; but will mention to the CSL group just in case they want to do something with it in future.
bb21e3c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I know this just brings LibreOffice inline with what Word produces anyway, but I am rather ignorant of CSL and how citeproc works to know what this is about.
We are changing this because citeproc now throws an error and refuses to process citations in note indices are in a wrong/nonsensical order. It has helped us find a bug with note citation ordering in tables in LO, but I would suggest that citeproc should output a warning in the console, rather than resort to throwing an error, since Zotero might not be the only citeproc clients with issues in note index ordering.
bb21e3c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad to hear it was useful. You can turn off sanity checking, but out-of-sequence numbering can lead to excessive memory consumption or failure on large documents.
bb21e3c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we turn this off if necessary and will citeproc instead produce warnings in the console?
bb21e3c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From 1.2.13, it will just issue a warning for out-of-sequence numbering. Repeated citation IDs in citationsPre/citation/citationsPost will still throw an error. You can disable both checks by setting a toggle on the processor after instantiation:
Note that if you set
strict_inputs
tofalse
, it will completely disable sanity checking, and in that case you're on your own: repeated IDs will most definitely break things inside the processor, although it will try to process the input and may not throw an explicit error.If the default logging doesn't work, you can redefine CSL.debug.