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

Citation key formula not generating lowercase for Chinese authors #2450

Closed
TomBener opened this issue Mar 15, 2023 · 2 comments
Closed

Citation key formula not generating lowercase for Chinese authors #2450

TomBener opened this issue Mar 15, 2023 · 2 comments
Labels

Comments

@TomBener
Copy link

TomBener commented Mar 15, 2023

Debug log ID

ISJLK9NE-refs-apse

What happened?

I encountered a bug in the citation key formula of Better BibTeX for Zotero. Specifically, when using the formula auth.lower+year, the generated citation key is not in lowercase for Chinese authors.

For example, I have an item with the author 作者 and the year 2023. According to the citation key formula, the expected key should be zuozhe2023. However, the actual key generated is ZuoZhe2023, which is not in lowercase as expected.

Steps to reproduce:

  1. Set the citation key formula as auth.lower+year.
  2. Add an item with a Chinese author and a year.
  3. Check the generated citation key.

Expected result: The generated citation key should be in lowercase for all authors, regardless of their language.

Actual result: The generated citation key is not in lowercase for Chinese authors.

Please let me know if you need any additional information or clarification on this issue. Thank you for your help in resolving this bug.

@retorquere
Copy link
Owner

retorquere commented Mar 15, 2023

try auth.transliterate.lower+year. Without .transliterate, the key manager will try to lowercase 作者, and javascript toLowerCase() doesn't know how to do that. If you have the checkbox Force citation key to plain text on, that will apply transliteration after all other work is done, and in the process, the .lower action will have been a no-op.

@retorquere retorquere changed the title [Bug]: Citation key formula not generating lowercase for Chinese authors Citation key formula not generating lowercase for Chinese authors Mar 15, 2023
@TomBener
Copy link
Author

@retorquere Thanks, It works!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Status: Done
Development

No branches or pull requests

2 participants