Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upBibTeX CSL output missing last character "}" #3568
Comments
This comment has been minimized.
This comment has been minimized.
I disagree with citeproc-php here -- which identical consecutive suffixes should be removed should be handled more judiciously than extending this to all characters. But I'd take a PR that adds the space there (not the |
This comment has been minimized.
This comment has been minimized.
The best solution is to not use CSL styles to generate BibTeX. We know there is a BibTeX CSL style in the repository, but its use should be avoided if possible. The whole CSL ecosystem was built for human-readable output, and CSL styles and CSL processors are limited in their ability to generate correct computer-readable output, which often has requirements CSL can't satisfy. There are dedicated software libraries for converting bibliographic formats, such as https://citation.js.org/ (open source and can handle CSL JSON and BibTeX). |
rmzelle
changed the title
BIBITEX format missing last character "}" when exporting
BibTeX CSL output missing last character "}"
Jun 28, 2018
This comment has been minimized.
This comment has been minimized.
(that said, it would be better if the CSL specification was explicit about how punctuation collapsing should work, and as @adam3smith mentioned, this automatic collapsing should probably not extend to curved brackets) |
This comment has been minimized.
This comment has been minimized.
Sorry for the delay in following up on this. I understand building bibtex with CSL is stretching things. But we would prefer not to introduce an additional conversion dependency into our platform if possible. @adam3smith are you still open to a PR to add the space? If so, I've opened one here: #3651 |
This comment has been minimized.
This comment has been minimized.
This can be closed now that #3651 has been merged. Thanks everyone! |
israelcefrin commentedJun 27, 2018
Hi
We use OJS with
citeproc-php
CSL parser. We have found an issue when we try export a citation format based on BibTex, it is missing last closing character "}".We've opened an issue on
citeproc-php
Github project and they pointed that this bug is related to identical consecutive suffixes that are removed . In fact this behavior is desirable because there are styles where consecutive identical characters have to be removed (especially punctuation characters).As workaround they've suggested change the style (line 146):
<group prefix="{" suffix="}" delimiter=", ">
with
<group prefix="{" suffix=" }" delimiter=", ">
or
<group prefix="{" suffix="\n}" delimiter=", ">.
And it has solved our problem.
But, my question is: would you happen have an alternative solution if someone has already face such bug?
Or is this only and best feasible solution for now?
Cheers,
Israel