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

Chinese author of essay reference section displays extra space #7199

Closed
1 task
xiaodongcentury opened this issue Dec 17, 2020 · 16 comments · Fixed by #7210
Closed
1 task

Chinese author of essay reference section displays extra space #7199

xiaodongcentury opened this issue Dec 17, 2020 · 16 comments · Fixed by #7210
Labels
keygenerator status: waiting-for-feedback The submitter or other users need to provide more information about the issue

Comments

@xiaodongcentury
Copy link

xiaodongcentury commented Dec 17, 2020

Hi, i am using JabRef (JabRef 5.2--2020-12-14--e9be339 Linux 5.9.0-4-amd64 amd64 Java 15.0.1) on Debian sid.

JabRef version on

After importing the Chinese essay, manually insert a space or comma, such as 杨 秀群, the citationkey will generate successfully, but the Reference section of essay will display "杨 秀群 "(there is a space between杨 and 秀群) , not "杨秀群".
How could you resolve this problem, thanks!

image
The JabRef screenshot.
image
The corresponding pdf file screenshot.
And the bibliography file is
image

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Member

Hi @xiaodongcentury! I just have some follow up questions,

citationkey will generate successfully

You mean without space/comma?

Reference section of essay will display

  1. Do you mean the preview section in JabRef?
  2. Do you mean the citation key?

comma

Are you referring to an ideographic comma? Should it not be included?

@xiaodongcentury
Copy link
Author

Thanks.
Without space/comma, the citationkey will not generate successfully.
What i mean is for most Chinese article, the author name of reference section will be a whole, such as "杨秀群", but not "杨 秀群". For example:
image

But now, I insert the citation item to a tex file from the JabRef, the pdf file generated will display"杨 秀群", but not "杨秀群", the former has a space between last name and first name of a Chinese name.

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Member

If it is the author's name in the pdf file that has an extra space, I don't think there is anything you can do in JabRef. The reason why you need that space/comma in the authors' name field has to do with how BibTeX/biblatex handles name (there are a lot of post/discussions on the topic, e.g., https://nwalsh.com/tex/texhelp/bibtx-23.html) and cannot be changed by JabRef.

In theory the gb7714 package should deal with this situation correctly, but I can't find enough English documentation to say for sure. I'd recommend that you ask in a TeX/LaTeX/Biblatex forum regarding the usage of xeCJK/gb7714 because I am not familiar enough with their use to help you out =/

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Member

A potential workaround could be to remove the space after generating the key or to use a different citation key pattern but I'd guess that might lead to further issues later on.

@xiaodongcentury
Copy link
Author

Thanks!
From the https://www.fosshub.com/JabRef-old.html, i download the jar file ([v5.0-alpha] JabRef Platform independent runnable JAR),
image
then open it.
Although there is no space/comma in Chinese author name, the citationkey is successfully generated, and the pdf file generated displays correctly according to gb7714-2015.
image
I just change "韦金育", but do not the other author names.

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Member

Good that you got it to work! In the interest of keeping it working for future releases, I hope you don't mind answering some further questions?

  • You are using the default citation key pattern [auth][year]?
  • The correct citation key should be 秀群2020 (not 杨秀群2020)?
  • When the citation key does not generate successfully, do you mean that the resulting key is 2020?

@xiaodongcentury
Copy link
Author

Thank you!
The old version ([v5.0-alpha] JabRef Platform independent runnable JAR) works, but not the newer master version (JabRef 5.2-1).

  1. yes, i am using default citation key patter.
  2. the citation key of old version is 杨秀群2020, and the pdf file generated displays correctly. While the mater version is 秀群2020, and the pdf file generated displays incorrectly.
  3. If there is no space/comma between first name and last name of Chinese author in Required field, the resulting key is 2000, the [auth] doesn't display. If add a space/comma to author name, the resulting key is 秀群2020, but the generated pdf file displays" 杨 秀群", there is a space in the author, which is not correct according to gb7714-2015, in that Chinese author name has no space.

@tobiasdiez
Copy link
Member

I did a bit of research, but it seems there is no agreed standard of how to put Chinese names in bibtex. By default the naming parsing of biblatex and JabRef assume that name parts are separated by space. Maybe the strategy outlined at
plk/biblatex#416 (comment) works for you.

@tobiasdiez tobiasdiez added the status: waiting-for-feedback The submitter or other users need to provide more information about the issue label Dec 20, 2020
@xiaodongcentury
Copy link
Author

Thanks!
But the older version ([v5.0-alpha] JabRef Platform independent runnable JAR) does works.
I'll check your solution whether it works.

@tobiasdiez
Copy link
Member

We have improved the author parsing from 5.0 to 5.1, and made it align better with biblatex. So the reason why it works in the alpha is actually a bug that was fixed later (unfortunately it leads to problems for chinese names).

Another idea would be to put the name (or parts of it?) in braces, e.g. {杨秀群} or 杨{秀群}. That's actually a syntax used for organizations (e.g. {United Nations}) but maybe it works for your case as well.

@xiaodongcentury
Copy link
Author

Ah, that's a lot of work to do.
Anyway, thank you.

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Member

I don't have time to write a full answer to this right now but you both are right.
The handling was improved but there is a bug because the name in this specific instance is considered by Java to start with a lower case letter (and therefore gets removed).
I'll submit a PR for this and another issue in ≈ 8 hours.

@xiaodongcentury
Copy link
Author

@k3KAW8Pnf7mkmdSMPHz27 Thanks

@xiaodongcentury
Copy link
Author

@tobiasdiez it seems like the {} doesn't work, whether whole name or part of it.
image
The generated key only contain year, there is no author.

@tobiasdiez
Copy link
Member

Thanks to @k3KAW8Pnf7mkmdSMPHz27 this should be fixed in the latest development version. Could you please check the build from http://builds.jabref.org/master/. Thanks! Please remember to make a backup of your library before trying-out this version.

@xiaodongcentury
Copy link
Author

Thank you ALL!
The JabRef 5.3--2020-12-28--78b08b5 works perfectly with Chinese names.
Thanks again.
And i believe this issue will be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keygenerator status: waiting-for-feedback The submitter or other users need to provide more information about the issue
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants