moewew / biblatex-trad

traditional bibliography styles with biblatex
LaTeX Project Public License v1.3c
31 stars 7 forks source link

Sentence-case titles #2

Closed russella closed 11 years ago

russella commented 11 years ago

Dear Marco,

Thanks again for your work on this project. I think that default treatment (in plain, e.g.) is for titles to appear in sentence-case. In the version of this that I mocked up, I did it this way; I think you could incorporate this into your base bbx file:

\DeclareFieldFormat{sentencecase}{\MakeSentenceCase{#1}}

\renewbibmacro*{title}{%
  \ifthenelse{\iffieldundef{title}\AND\iffieldundef{subtitle}}
    {}
    {\ifthenelse{\ifentrytype{article}\OR\ifentrytype{inbook}%
      \OR\ifentrytype{incollection}\OR\ifentrytype{inproceedings}%
      \OR\ifentrytype{inreference}}
      {\printtext[title]{%
        \printfield[sentencecase]{title}%
        \setunit{\subtitlepunct}%
        \printfield[sentencecase]{subtitle}}}%
      {\printtext[title]{%
        \printfield[titlecase]{title}%
        \setunit{\subtitlepunct}%
        \printfield[titlecase]{subtitle}}}%
     \newunit}%
  \printfield{titleaddon}}

All the best, Alex

marcodaniel commented 11 years ago

HI Alex,

also thanks for this issue. In my opinion it's borderline. Of course the standard styles are sentence-case. However this is one bib drawback of the standard styles. On the other hand if someone uses the old bib-file this case must be considered. Difficult.


EDIT 1:

After feedback of Joseph Wright (Thanks Joseph) I will provide the sentence-case.


EDIT 2:

After some tests I think the following declaration does the job:

\DeclareFieldFormat*{titlecase}{\MakeSentenceCase{#1}}

I insert this line in the file trad-standard.bbx.

Regards Marco

russella commented 11 years ago

Dear Marco, Great--that's much better than my solution. The biblatex layout hooks are really powerful tools.

All the best, Alex

marcodaniel commented 11 years ago

This solution leads to a new bug. See issue 7