subhramit / jabref

Graphical Java application for managing BibTeX and biblatex (.bib) databases
https://devdocs.jabref.org
MIT License
3 stars 0 forks source link

Citation Styles that should be cross-checked in the code #11

Closed ThiloteE closed 1 month ago

ThiloteE commented 1 month ago

JabRef version

Latest development branch build (please note build date below)

Operating system

Windows

Details on version and operating system

Windows 10

Checked with the latest development build (copy version output from About dialog)

Steps to reproduce the behaviour

This is a living issue. Can be edited and updated on the fly. These are styles that differ between entry preview and cited in Libreoffice. I started at History of the Human Sciences and am working my way up the list.

Appendix

No response

subhramit commented 1 month ago

Expected: image image Got: image

Seems fine to me, there is a space expected after vol. in the input HTML as well. Could you confirm if this is what you were talking about?

ThiloteE commented 1 month ago

Yes, I know it looks similar to human eye, but try with copy and then ctrl + f. It doesn't match.

subhramit commented 1 month ago

Yes, I know it looks similar to human eye, but try with copy and then ctrl + f. It doesn't match.

Oh, that has a different implication, actually. Remember we were trying to copy the preview from the select styles dialog, and on pasting as plain text, the text changed?

It's probably a difference in how text is formatted and parsed when produced in an OO document vs in the Preview.

For instance, take a look at the Histoire@Politique (the second style you mentioned in the issue): image The one on the left is copy pasted from what's rendered in OO, the one on the right is copy pasted from the preview. Diff checker suggests that there is some difference in the entry," BibTeX part, and not at the vol. 34.

My guess: When we copy paste entries from the preview, the format is not parsed the same way as it was being done in the preview (here, "BibTeX" was supposed to be in italics, as it appears in the preview, but on copy-paste, that's lost). If you copy to the OO doc as well, the italics go away: image Above: Rendered by cite, below: copy-pasted from Preview. Similarly, when I copy pasted both in diff-checker, both lost the italics formatting.

Another example: what's rendered as a normal space in the preview may be rendered as a non-breaking space (&nbsp in escaped HTML) in OO, hence even if they look same to the eye, ctrl+f won't be able to match them. It means that the preview generator's processor parsed &nbsp but converted/produced it as a normal space.

ThiloteE commented 1 month ago

Won't fix for now.

subhramit commented 1 month ago

Update: Not an issue from our side, we are rendering citations as per the specification format. Implications:

  1. Ctrl+F won't always work with keyboard-typed special characters e.g. spaces (what we might be looking for may be a non-breaking space, which we rendered into the document correctly as per the specification).
  2. We are unsure how Preview is rendered, and how it interprets the escaped HTML characters. This may cause disparity between the actual citation and the preview, although not to the human eye. (Issue with the preview viewer, not CSL4LibreOffice). Ref. https://github.com/subhramit/jabref/issues/10
subhramit commented 1 month ago

I am closing this issue, as it is not a definite issue here. Superseded by https://github.com/subhramit/jabref/issues/18 and https://github.com/subhramit/jabref/issues/13