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

Supporting non-numeric values in month field #26

Open
hertg opened this issue Jan 2, 2024 · 0 comments
Open

Supporting non-numeric values in month field #26

hertg opened this issue Jan 2, 2024 · 0 comments

Comments

@hertg
Copy link

hertg commented Jan 2, 2024

Note

This issue was originally posted in getzola/zola#2367

Issue

When loading a BibTeX file that has a non-numeric month field, the parsing fails. Using a three letter abbreviation for the month seems to be at least somewhat common practice.

Here is a BibTeX as provided by the IETF for an RFC (https://datatracker.ietf.org/doc/rfc6749/bibtex/)

@misc{rfc6749,
    series =    {Request for Comments},
    number =    6749,
    howpublished =  {RFC 6749},
    publisher = {RFC Editor},
    doi =       {10.17487/RFC6749},
    url =       {https://www.rfc-editor.org/info/rfc6749},
    author =    {Dick Hardt},
    title =     {{The OAuth 2.0 Authorization Framework}},
    pagetotal = 76,
    year =      2012,
    month =     oct,
    abstract =  {The OAuth 2.0 authorization framework enables a third-party application to obtain limited access to an HTTP service, either on behalf of a resource owner by orchestrating an approval interaction between the resource owner and the HTTP service, or by allowing the third-party application to obtain access on its own behalf. This specification replaces and obsoletes the OAuth 1.0 protocol described in RFC 5849. {[}STANDARDS-TRACK{]}},
}

Workaround

My current workaround is to either manually change the month to its numerical representation (i.e. month = 10 instead of month = oct), or to add the following lines at the top of my bibtex file:

@string (jan="1")
@string (feb="2")
@string (mar="3")
@string (apr="4")
@string (may="5")
@string (jun="6")
@string (jul="7")
@string (aug="8")
@string (sep="9")
@string (oct="10")
@string (nov="11")
@string (dec="12")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant