retorquere / zotero-better-bibtex

Make Zotero effective for us LaTeX holdouts
https://retorque.re/zotero-better-bibtex/
MIT License
5.39k stars 290 forks source link

For article, the publication (journaltitle) field should be case-protected with braces upon export #3017

Closed clarino closed 1 month ago

clarino commented 1 month ago

Debug log ID

NFIJDTTI-refs-euc/6.7.240-7

What happened?

When the publication (journaltitle) field of article is exported to biblatex format, it is not case-protected with braces. It should be case-protected just like title.

retorquere commented 1 month ago

@njbart is that correct?

njbart commented 1 month ago

No. See previous discussion at https://github.com/retorquere/zotero-better-bibtex/issues/383#issuecomment-154528863.

clarino commented 1 month ago

In that comment it says:

Traditionally, journal titles are in title case and never change – and, more important for BBT, styles don’t try to change them.

Unfortunately, this is not true. In style ext-authoryear-comp, which is the closest to what I need, journal titles are also affected when sentence case in article titles is preserved with \DeclareFieldFormat{titlecase}{\MakeSentenceCase*{#1}}

clarino commented 1 month ago

I just found a way around the problem. The following makes sentence case for the title of an article etc. but still allows title casing of the journaltitle. This feature is not very well documented, though.

\usepackage[style=ext-authoryear, backend=biber]{biblatex}
\DeclareFieldFormat
  [article,inbook,incollection,inproceedings,patent,thesis,unpublished]
  {titlecase:title}{\MakeSentenceCase*{#1}}
github-actions[bot] commented 1 month ago

Thanks for the feedback! Just so you know, GitHub doesn't let me control who can close issues, and @retorquere likes to leave bug reports and enhancements open as a nudge to merge them into the next release.

njbart commented 1 month ago

Just for the record and/or future reference:

  1. biblatex-ext is the first style I've ever encountered that provides an option to sentence-case journal titles – but it also does offer options to sentence-case all title-like material with the exception of journal titles, so there is no need to modify BBT's behaviour.
  2. I still maintain I've never seen sentence-cased journal titles in the wild. Even the biblatex-ext manual does not seem to contain a single example of a sentence-cased journal title.
  3. Tellingly, biblatex-ext, in its sole example for “changes to titlecase field formats” (p. 25), contains an instruction to sentence-case titles in general, only to immediately reverse this for journal titles:

    \DeclareFieldFormat{titlecase:title}{\MakeSentenceCase*{#1}}
    \DeclareFieldFormat{titlecase:journaltitle}{#1}
  4. Finally, probably the most important argument wrt BBT: If BBT were to enclose the "journaltitle" field in curly braces, this would prevent users from using the option that biblatex-ext provides for sentence-casing journaltitle (if they actually wanted to do so, as misguided as it probably is).
clarino commented 1 month ago

I agree that case-protection of journaltitle is not necessary, as long as users are aware of the special behavior of biblatex-ext so that an exception like your line 2 of point 3 may be necessary. Close issue if you want.