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

Month, day and date formatting in bibliography references #2027

Open
Omikhleia opened this issue May 9, 2024 · 2 comments · May be fixed by #2082
Open

Month, day and date formatting in bibliography references #2027

Omikhleia opened this issue May 9, 2024 · 2 comments · May be fixed by #2082
Assignees
Labels
bug Software bug issue modules:packages Issue relates to core or 3rd party packages

Comments

@Omikhleia
Copy link
Member

As of today, the bibtex package does it wrong

  1. The Chicago style implementation ignores the day although it shall be used when available for some formats (typically, journal articles)
  2. The month is output as set in the .bib file, but it should be replaced by a true month name (abbreviated or not depending on the citation style, Chicago if I read it correctly recommends the full month name). The problem is, BibTeX has a loose definition for month, which can be a number (e.g. "3") or a full string (e.g. "March") or a "standard" 3-letter code (= "mar"); the recommendation is to use the latter.1

Moreover, the date shall likely be formatted according to language-specific rules.2

Example: @article{..., day= {14}, month = {apr}, year = {2024} ...}

  • With the current implementation, we get apr, 2024.
  • We should actually get April 14, 2024 in English Chicago citation style
  • And, say, 14 août 2024 in a French document3 -- however formatted, certainly not "apr" or "April" ;)

Footnotes

  1. Some references for month in BibTeX format:
    - https://www.bibtex.com/f/month-field/
    - Q13 in https://mirror.ibcp.fr/pub/CTAN/biblio/bibtex/contrib/doc/btxFAQ.pdf
    - p. 10 in https://ctan.mines-albi.fr/biblio/bibtex/base/btxdoc.pdf

  2. Note that babel for LaTeX has tables of month names and date rules for all supported languages... But it seems that language support for bibliographies comes with babelbib which also has month name translations. I'm a bit lost here, regarding how it works in the LaTeX world...

  3. At least according to some online citation tools I tried. I haven't looked deeply into CSL examples...

@Omikhleia Omikhleia added bug Software bug issue modules:packages Issue relates to core or 3rd party packages labels May 9, 2024
@Omikhleia Omikhleia self-assigned this May 11, 2024
@Omikhleia
Copy link
Member Author

Omikhleia commented Jun 15, 2024

Moreover, at syntax level, we also need to support the more modern (biblatex) extended date field (noted in passing when working on biblatex aliases, this one is of a slightly different nature). I've written an ISO 8601-2 EDTF parser in Lpeg, so I will contribute it.

@Omikhleia
Copy link
Member Author

I've written an ISO 8601-2 EDTF parser in Lpeg, so I will contribute it.

I've added the ISO date-time parser, support for the date field, and slightly better date formatting in #2071 -- But there's more things needed to fully address the topic. Having to do our own "hand-made" implementation of the Chicago style, and to add a huge number of localization strings in our fluent files is cumbersome.

Omikhleia mutters: CSL would be the way, and is not that hard, compared to DocBook, USX or TEI... 😸

@Omikhleia Omikhleia linked a pull request Jun 29, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Software bug issue modules:packages Issue relates to core or 3rd party packages
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

1 participant