15

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

14

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

  • 3
    A directive identical to myplain comes predefined in biblatex.def - it's called noformat. – Audrey Dec 8 '12 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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