moewew / biblatex-trad

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

Journal/booktitles shouldn't be sentence case. #7

Closed russella closed 12 years ago

russella commented 12 years ago

Dear Marco,

Thanks for your fast work and, more generally, your work on this package which I consider really valuable.

One issue I see with the current version is that it seems to layout journal titles in sentence case. Oddly, I wasn't able to identify the problem in the code. For example, trad-plain lays out the entry

@Article{     bard2,
  author    = {Martin Albrecht and Gregory Bard and William Hart},
  title     = {Algorithm 898: {Efficient} multiplication of dense
          matrices over {GF(2)}},
  journal   = {ACM Trans. Math. Softw.},
  volume    = {37},
  number    = {1},
  year      = {2010},
  doi       = {10.1145/1644001.1644010}
}

as

Martin Albrecht, Gregory Bard, and William Hart. Algorithm 898: Efficient multiplication of dense matrices over GF(2). Acm trans. math. softw., 37(1), 2010. DOI: 10.1145/1644001.1644010 (cited on page 502).

I just noticed that the same is true of booktitles in Inproceedings and Incollection. These shouldn't be sentence case.

All the best, Alex

marcodaniel commented 12 years ago

Hi,

thanks for the quick testing. The problem based on my solution for issue 2 -- sentence-case. The declaration of titlecase makes all titles in sentence case (i.e. first letter capitalized, the rest in lowercase).

This isn't the required output. So we have to use your previous definition. The same issue was discussed at tex.stackexchange: Sentence case for titles in biblatex. I think I will take the solution of Audrey which is more logical for me:

\DeclareFieldFormat{titlecase}{\MakeTitleCase{#1}}

\newrobustcmd{\MakeTitleCase}[1]{%
  \ifthenelse{\ifcurrentfield{booktitle}\OR\ifcurrentfield{booksubtitle}%
    \OR\ifcurrentfield{maintitle}\OR\ifcurrentfield{mainsubtitle}%
    \OR\ifcurrentfield{journaltitle}\OR\ifcurrentfield{journalsubtitle}%
    \OR\ifcurrentfield{issuetitle}\OR\ifcurrentfield{issuesubtitle}%
    \OR\ifentrytype{book}\OR\ifentrytype{mvbook}\OR\ifentrytype{bookinbook}%
    \OR\ifentrytype{booklet}\OR\ifentrytype{suppbook}%
    \OR\ifentrytype{collection}\OR\ifentrytype{mvcollection}%
    \OR\ifentrytype{suppcollection}\OR\ifentrytype{manual}%
    \OR\ifentrytype{periodical}\OR\ifentrytype{suppperiodical}%
    \OR\ifentrytype{proceedings}\OR\ifentrytype{mvproceedings}%
    \OR\ifentrytype{reference}\OR\ifentrytype{mvreference}%
    \OR\ifentrytype{report}\OR\ifentrytype{thesis}}
    {#1}
    {\MakeSentenceCase{#1}}}

What do you think?

regards Marco

marcodaniel commented 12 years ago

Hi Alex,

does it work for you?

regards Marco

russella commented 12 years ago

Hi Marco, That does it! --Alex