Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

share|improve this question
2  
Closely related: tex.stackexchange.com/q/22980 –  Audrey Dec 8 '12 at 3:05
add comment

1 Answer 1

up vote 9 down vote accepted

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

share|improve this answer
1  
A directive identical to myplain comes predefined in biblatex.def - it's called noformat. –  Audrey Dec 8 '12 at 16:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.