Skip to content

[OO] Allow slashes in citation keys for reference marks #12961

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 20, 2025

Conversation

subhramit
Copy link
Member

@subhramit subhramit commented Apr 18, 2025

Follow-up to #12474

To accommodate the following auto-generated default citation key from the bibtex entry mentioned in #12930 (comment):

@Online{,
  author = {{The PGF/TikZ Team}},
  date   = {2023-01-16},
  title  = {pgf – Create PostScript and PDF graphics in TeX},
  url    = {https://ctan.org/pkg/pgf},
}

image
[contains forward slashes("/")]

Earlier behavior: The key would not be parsed properly as it was not flexible enough to allow slashes. After citation, on trying to generate bibliography, following dialog was observed:

image
And then the exception:
image

Mandatory checks

  • I own the copyright of the code submitted and I license it under the MIT license
  • Change in CHANGELOG.md described in a way that is understandable for the average user (if change is visible to the user)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (if change is visible to the user)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

Signed-off-by: subhramit <subhramit.bb@live.in>
Signed-off-by: subhramit <subhramit.bb@live.in>
Signed-off-by: subhramit <subhramit.bb@live.in>
Signed-off-by: subhramit <subhramit.bb@live.in>
Signed-off-by: subhramit <subhramit.bb@live.in>
Copy link

trag-bot bot commented Apr 18, 2025

@trag-bot didn't find any issues in the code! ✅✨

@subhramit subhramit added component: libre-office status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers labels Apr 18, 2025
@calixtus
Copy link
Member

I tried to find some documentation on what characters are allowed in the citation key, but unfortunately i dont see that the biblatex doc provides any information about that.

@subhramit subhramit requested a review from Siedlerchr April 19, 2025 17:24
@Siedlerchr
Copy link
Member

Backslash is used for escaping. I think the key field is treated like the other fields as well regarding the characters

@subhramit
Copy link
Member Author

Backslash is used for escaping. I think the key field is treated like the other fields as well regarding the characters

This one is a forward slash

@subhramit
Copy link
Member Author

May need a third opinion to finalize this.
@koppor are you aware if slashes are allowed/disallowed in citation keys?
At least JabRef does not complain (and in fact, auto generates if needed) - so I thought LibreOffice should not complain as well.

@koppor
Copy link
Member

koppor commented Apr 20, 2025

May need a third opinion to finalize this.
@koppor are you aware if slashes are allowed/disallowed in citation keys?

I bet they are allowed. I need to try out with a minimal .tex and .bib file. - This file should be committed to the repo. Nearby the IEEE.tex. (I'm on mobile writing a quick answer. As soon as I am on the PC, I can craft such files and tests)

@subhramit subhramit mentioned this pull request Apr 20, 2025
1 task
@subhramit
Copy link
Member Author

subhramit commented Apr 20, 2025

I bet they are allowed. I need to try out with a minimal .tex and .bib file. - This file should be committed to the repo. Nearby the IEEE.tex. (I'm on mobile writing a quick answer. As soon as I am on the PC, I can craft such files and tests)

I tried generating some using Claude. You can merge the commit and test when convenient.
#12971

@koppor
Copy link
Member

koppor commented Apr 20, 2025

I will create a new repository with.tex and .bib files with a separate CI Pipeline.

@koppor
Copy link
Member

koppor commented Apr 20, 2025

Cant test the next days

@koppor
Copy link
Member

koppor commented Apr 20, 2025

Future work: use logic of jabref logic for making valid citation keys maybe?

@koppor koppor added this pull request to the merge queue Apr 20, 2025
Merged via the queue into JabRef:main with commit 68923ad Apr 20, 2025
1 check passed
@koppor koppor deleted the ref-marks branch April 20, 2025 09:21
@subhramit subhramit removed the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants