Skip to content
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

Dollar sign is not escaped in file field when exported to Better BibTeX or Better BibLaTeX #1895

Closed
yuuyins opened this issue Aug 25, 2021 · 4 comments
Labels

Comments

@yuuyins
Copy link

yuuyins commented Aug 25, 2021

Support log ID:
59LVUYVM-refs-euc

Exporter used:
Better BibTeX and Better BibLaTeX

Expected behavior:
Given an item which has attached a stored copy of a file which has in its filename a dollar sign file $ name.ext, exporting this item to either Better BibTeX or Better BibLaTeX escapes the dollar sign for the file field.

@book{test-2021-test,
  title = {Test},
  author = {{Test}},
  year = {2021},
  file = {/home/yuu/Zotero/storage/4R5EZIUE/test \$ test.epub}
}

Actual behavior:
Given an item which has attached a stored copy of a file which has in its filename a dollar sign file $ name.ext, exporting this item to either Better BibTeX or Better BibLaTeX doesn’t escape the dollar sign for the file field.

@book{test-2021-test,
  title = {Test},
  author = {{Test}},
  year = {2021},
  file = {/home/yuu/Zotero/storage/4R5EZIUE/test $ test.epub}
}

Reproduce

  1. On your system, create a new file named test $ test.epub
  2. On Zotero, create a new book item with the following
    • Title: Test
    • Author: Test
    • Date: 2021
    • Add attachment > Attach stored copy of file > test $ test.epub
  3. Export the book item to either Better BibTeX or Better BibLaTeX

(Notice this is also reproducible when exporting collections).

@yuuyins yuuyins added the export label Aug 25, 2021
@retorquere
Copy link
Owner

retorquere commented Aug 25, 2021

file is a verbatim field; the dollar sign should not be escaped in it. Which program is having difficulty reading the verbatim dollar sign?

@yuuyins
Copy link
Author

yuuyins commented Aug 25, 2021

It's the highlighting on bibtex-mode from Emacs (https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/textmodes/bibtex.el).

emacs-bibtex-mode-dollar-sign

I assumed this was an issue with Better BibTeX. Just tested on Emacs, opening the file with org-ref-cite-open-pdf with the cursor on the citation works, so I guess it's just a bug with the highlighting.

@github-actions
Copy link

Thanks for the feedback; there's no way you could have known, but @retorquere prefers to keep bugreports/enhancements open as a reminder to merge the change into a new release.

@github-actions github-actions bot reopened this Aug 25, 2021
@retorquere
Copy link
Owner

I really need to find out why the bot won't let people close questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants