16

To force reference titles to a sentence case I use the following line in my .bbx style file:

\DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]{titlecase}{\MakeSentenceCase*{#1}}

But this also causes the journal name to be written in sentence case, which is unwanted.
Why is that and how can I circumvent that?

A minimal example:

\documentclass{article}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@article{ref1,
  author = {Doe, J. and Dane, D., and Dewy, R.},
  year = {2000},
  title = {This and That},
  journal = {Journal of Deep Understanding of Things},
}

@article{ref2,
  author = {Doe, J. and Dewy, D., and Dane, R.},
  year = {2000},
  title = {The Other},
  journal = {Journal of deep understanding of things},
}
\end{filecontents}

\usepackage[style=authoryear-comp,natbib=true, 
    maxcitenames = 2, 
    mincitenames = 1, 
    firstinits = true,
    labelyear=true,  
    uniquename=false, 
    uniquelist=false,
    terseinits = false,
    backend=biber]{biblatex}
\DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]{titlecase}{\MakeSentenceCase*{#1}}
\addbibresource{\jobname.bib}

\begin{document}

Some text and a ref \citep{ref1}.
Then another ref with same first author and year \citep{ref2}

\printbibliography

\end{document}

gives:

is

instead of:

enter image description here

1

3 Answers 3

15

The original definition of the bibmacro used to print the journal information is

\newbibmacro*{journal}{%
  \iffieldundef{journaltitle}
    {}
    {\printtext[journaltitle]{%
       \printfield[titlecase]{journaltitle}%
       \setunit{\subtitlepunct}%
       \printfield[titlecase]{journalsubtitle}}}}

Thus the instruction \DeclareFieldFormat[article]{titlecase}{\MakeSentenceCase*{#1}} impact the journal title as well. The solution is to modify the definition of the journal bib macro

\newbibmacro*{journal}{%
  \iffieldundef{journaltitle}
    {}
    {\printtext[journaltitle]{%
       \printfield[myplain]{journaltitle}%
       \setunit{\subtitlepunct}%
       \printfield[myplain]{journalsubtitle}}}}

where we can define a myplain field format that just produce an unformatted value.

\DeclareFieldFormat{myplain}{#1}

enter image description here

1
  • 3
    A directive identical to myplain comes predefined in biblatex.def - it's called noformat.
    – Audrey
    Commented Dec 8, 2012 at 16:34
2

If you are trying to get the IEEE style you may want to use the following settings (details):

\usepackage[
bibstyle=ieee,% IEEE citation style
citestyle=numeric-comp,% citing multiple papers will produce format similar to [2,4-8,12] instead of [2,4,5,6,7,8,12] (optional) 
sorting=none,
backend=biber,
maxnames=100,% show up to 100 authors per author in the bibliography (optional)
isbn=false,url=false,doi=false% remove extra info (optional)
] {biblatex}

It will produce the intended results but it might modify other things too.

1

As shown in Sentence case for titles in biblatex the styles from my biblatex-ext bundle offer a finer control over the title casing of particular fields. If you only want to sentence case titles, but not journal(title) or booktitles of @articles, @inbooks, @incollections and friends, you can use the field format titlecase:title.

\documentclass{article}

\usepackage[style=ext-authoryear-comp,
    backend=biber]{biblatex}

\DeclareFieldFormat
  [article,inbook,incollection,inproceedings,patent,thesis,unpublished]
  {titlecase:title}{\MakeSentenceCase*{#1}}

\begin{filecontents}[force]{\jobname.bib}
@article{ref1,
  author  = {Doe, J. and Dane, D. and Dewy, R.},
  year    = {2000},
  title   = {This and That},
  journal = {Journal of Deep Understanding of Things},
}
@article{ref2,
  author  = {Doe, J. and Dewy, D. and Dane, R.},
  year    = {2000},
  title   = {The Other},
  journal = {Journal of deep understanding of things},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
Some text and a ref \autocite{ref1}.
Then another ref with same first author and year \autocite{ref2}

\printbibliography

\end{document}

Doe, J., D. Dane, and R. Dewy (2000). “This and that”. In: Journal of Deep Understanding of Things.//Doe, J., D. Dewy, and R. Dane (2000). “The other”. In: Journal of deep understanding of things.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .