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] Allow deactivating case conversion when exporting files #119

Closed
dangom opened this issue Aug 17, 2022 · 7 comments
Closed

Comments

@dangom
Copy link

dangom commented Aug 17, 2022

Hi Andras,

following up on the thread started at the org-ref repo, I was wondering whether it be possible to deactivate the case conversion on a per export basis.
In specific, I'd like to be able to insert contents of the title field of a bibfile verbatim.

I should note it'd be great if this would apply not only to titles, but author and journal names as well (I could foresee McLaren, e.g., being converted to Mclaren, and NeuroImage to Neuroimage).

Regards,
Daniel

@dangom
Copy link
Author

dangom commented Aug 17, 2022

I should also note I'm not an expert in latex, but I never had any issues like this with standard LaTeX where the names of the journals would be capitalized. So I guess what I'm asking is for citeproc to mimic the bibtex/biblatex behaviour.

@bdarcus
Copy link
Collaborator

bdarcus commented Aug 17, 2022

Isn't the issue really that it turns an acronym into a standard word; e.g. you really want to preserve the case of that substring?

@dangom
Copy link
Author

dangom commented Aug 17, 2022

It turns acronyms into standard words, and also changes names (McDowell -> Mcdowell).
In org-ref importing citations into a bibfile also gets them case-converted so I have to manually fix them, and then they get converted again on export. I just wish capitalization would not ever be touched and bibfiles were used as sole source of truth.

@bdarcus
Copy link
Collaborator

bdarcus commented Aug 17, 2022

I just wish capitalization would not ever be touched and bibfiles were used as sole source of truth.

But that's not how publishing styles work in the main. Most specify rules for capitalization, which necessarily requires transformation.

So the bib formats require a way to specify text that doesn't get transformed, like those two cases.

 title =        {Deconvolution of Impulse Response in Event-Related {BOLD fMRI}},

Does citeproc not honor that?

@dangom
Copy link
Author

dangom commented Aug 17, 2022

Yes, citeproc does honor that. So I take the fix is to have the import of bibfiles automatically take care of acronyms

@andras-simonyi
Copy link
Owner

andras-simonyi commented Aug 18, 2022

To clarify, the bib(la)tex->CSL entry converter in citeproc-el is supposed to sentence-case only title fields; if it changes the case of other fields then that is a bug and please report it. As for sentence-casing titles, I've checked now the code and the function called by org-ref (citeproc-hash-itemgetter-from-any) already has an argument for turning off sentence-casing when no langid is given, so the simplest solution would be for org-ref (@jkitchin) to call it with no-sentcase-wo-langid set to non-nil, or maybe to introduce a user-customizable option for this (citeproc-el tries to avoid introducing user options by design).

Note that -- as @bdarcus wrote -- the final formatting of titles in the rendered bibliography is determined by the CSL style, the suggested changes would affect only the input of the CSL processor.

jkitchin added a commit to jkitchin/org-ref that referenced this issue Aug 18, 2022
I added a non-nil arg for no-sentcase-wo-langid which should stop case changes
with no langid.

Suggested in andras-simonyi/citeproc-el#119 (comment).
@andras-simonyi
Copy link
Owner

andras-simonyi commented Jun 20, 2024

I've now pushed a commit to org-mode's main branch which introduces a new user option, org-cite-csl-bibtex-titles-to-sentence-case, which can be used to turn off sentence-casing titles in entries that don't have an explicit English langid, and other packages relying on citeproc-el can introduce similar user options if they are needed, as the required citeproc arguments are already in place, so I'm planning to close this issue.

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

3 participants