Skip to content

Could en be recognised as a langid for English? #10764

@kopeckyf

Description

@kopeckyf

Zotero sometimes exports .bib files that contain the ISO code en in the langid field instead of the spelled out english, american, etc., that are expected in this field. en is not currently in the list of values that citeproc recognises for English.

This is sub-optimal for citation styles that enforce sentence casing for English entries, such as APA. Citeproc with APA will not apply sentence casing to entries that have langid = {en}.

Could en be added to the list of strings that are recognised by citeproc as referring to English?

Here's a simple test file together with a simple bibliographical database:

# Test file

Test citation [@DawsonSzmukler2006]
@article{DawsonSzmukler2006,
    author = {Dawson, John and Szmukler, George},
    title = {Fusion of mental Health and Incapacity Legislation},
    journal = {The British Journal of Psychiatry},
    volume = {188},
    number = {6},
    pages = {504-509},
    date = {2006},
    doi = {10.1192/bjp.188.6.504},
    langid = {en}
}

When both are converted to PDF via:

pandoc test.md --citeproc --csl apa --bibliography test.bib -s -t pdf -o test.pdf

The title is not being converted to sentence case, i.e. remains as “Fusion of mental Health and Incapacity Legislation”.

However, if langid in the above example is set to a string that citeproc recognises as referring to English, then the title would be converted to sentence casing, as intended in APA.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions