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

Feature request: parse author names #15

Closed
andrechalom opened this issue Jun 9, 2017 · 2 comments · Fixed by #18
Closed

Feature request: parse author names #15

andrechalom opened this issue Jun 9, 2017 · 2 comments · Fixed by #18

Comments

@andrechalom
Copy link
Contributor

BibTex recognizes four parts of an author's name: First Von Last Jr.

For instance, the entry "Ludwig von Beethoven" has First: "Ludwig", von-part: "von" and Last: "Beethoven" and no Junior-part. The entry "Ford, Jr., Henry" has First: "Henry", no von-part, Last: "Ford" and Junior-part: "Jr.".

Is it possible to implement this parsing of names on bibtex-parser? The only PHP library I found that implements this is a very old and unmantained one, called Structures_BibTex.

References:
https://nwalsh.com/tex/texhelp/bibtx-23.html
https://github.com/pear/Structures_BibTex/blob/master/Structures/BibTex.php

@renanbr
Copy link
Owner

renanbr commented Jun 9, 2017

Is it possible to implement this parsing of names on bibtex-parser?

Yes, it's :) I think it could be a nice feature to add to this library

Thanks for the references, the parser code is "already" done and looks good at a glance https://github.com/pear/Structures_BibTex/blob/master/Structures/BibTex.php#L619-L751

Do you think the usage below is reasonable?

$listener->setTagValueProcessor(new AuthorProcessor());

Could you have time to start implementing this? If not, no problem

@andrechalom
Copy link
Contributor Author

andrechalom commented Jun 9, 2017 via email

andrechalom added a commit to andrechalom/bibtex-parser that referenced this issue Jun 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants