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

Add support for corporate authors #44

Closed
lgoettgens opened this issue Oct 11, 2023 · 5 comments · Fixed by #47
Closed

Add support for corporate authors #44

lgoettgens opened this issue Oct 11, 2023 · 5 comments · Fixed by #47
Labels
enhancement New feature or request

Comments

@lgoettgens
Copy link
Contributor

In my bibliography, I have some authors that are not a person's name, but some corporation.
Example:

@Misc{OEIS,
  bibkey        = {OEIS},
  author        = {OEIS Foundation Inc.},
  title         = {The {O}n-{L}ine {E}ncyclopedia of {I}nteger {S}equences},
  howpublished  = {Published electronically at https://oeis.org},
  year          = {2023},
  url           = {https://oeis.org}
}

Unfortunately, this name gets printed as O. F. Inc. in the bibliography due to the first and middle names being abbreviated.
Once Humans-of-Julia/BibInternal.jl#21 is released as BibInternal.jl v0.3.5, one can provide such names with double-braces, e.g. author = {{OEIS Foundation Inc.}} to the parser. It remains for DocumenterCitations.jl to remove one layer of braces before printing (and to bump the compat of BibInternal.jl).

@goerz
Copy link
Member

goerz commented Oct 13, 2023

The official way to have "corporate authors" in LaTeX is to enclose the name in braces. So, the .bib file should definitely look as

@Misc{OEIS,
  author        = {{OEIS Foundation Inc.}},
  title         = {The {O}n-{L}ine {E}ncyclopedia of {I}nteger {S}equences},
  howpublished  = {Published electronically at https://oeis.org},
  year          = {2023},
  url           = {https://oeis.org}
}

Unfortunately, though, as you point out, this has to be fixed by Azzaare in Bibliography.jl/BibInternal.jl with a new release. I've added 87a14ca (in #47) with a test to track the issue here. If you run that test, you'll see that Bibliography.jl parses the name as

BibInternal.Name
  particle: String ""
  last: String "Inc.}"
  junior: String ""
  first: String ""
  middle: String ""

which is very very wrong.

I figured out a workaround, though: use non-breaking spaces ("\u00A0") for the name in the .bib file.

@goerz
Copy link
Member

goerz commented Oct 13, 2023

This is the workaround: 6aa7f8f

You can't see it in the Github UI (cf. #46 (comment)), but the .bib file contains non-breaking spaces, which you'll have to figure out how to type, or paste from a unicode table

@lgoettgens
Copy link
Contributor Author

lgoettgens commented Oct 17, 2023

https://github.com/Humans-of-Julia/BibInternal.jl/releases/tag/v0.3.5 is now available, including Humans-of-Julia/BibInternal.jl#21. So the only work needed here is to adapt the compat bound, and remove some braces from such entries (which is a special instance of #15).

@goerz
Copy link
Member

goerz commented Oct 24, 2023

Oh, wow, I totally missed that, somehow!

Ok, I’ll verify the test on top of #52, and if everything works, we can close this.

I’ll probably leave the compat bound as-is: fundamentally the plugins still works even with the older version. And unless someone specifically pins the old version, they should get the newest release anyway. If they do pin the old version, they’ll have to deal with any bugs in that version (and presumably, they have a reason for wanting the exact old behavior)

@goerz
Copy link
Member

goerz commented Oct 24, 2023

I've verified that the test passes now, so I'll update and merge #47 after #52 is merged. 🎉

I’ll probably leave the compat bound as-is:

Just to clarify: we don't have an explicit dependency on BibInternal.jl, only Bibliography.jl. I'd be reluctant to change that, when BibInternal is not explicitly used in the code.

However, BibInternal v0.3.5 is compatible even with the oldest compat bound Bibliography v0.2.15. I'm explicitly testing in the CI that the minium compat bounds work correctly, so that should be good enough.

@goerz goerz closed this as completed in #47 Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants