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.

I'd like to cite an article with biblatex, but I'm failing to add "Vol." and "No." in front of the corresponding number.

Here is the entry, of type @article, in the .bib file:

@article{kakimoto_monitoring_2006,
    title = {Monitoring of Interarea Oscillation Mode by Synchronized Phasor Mesurement},
    volume = {21},
    issn = {0885-8950},
    doi = {10.1109/TPWRS.2005.861960},
    number = {1},
    journal = {{IEEE} Transactions on Power Systems},
    author = {Kakimoto, Naoto and Sugumi, Masahiro and Makino, Tohru and Tomiyama, Katsuyuki},
    month = feb,
    year = {2006},
    pages = {260 -- 268}
}

I cite it in this minimal example:

\documentclass{scrartcl} 
\usepackage[T1]{fontenc}
\usepackage{selinput}
\SelectInputMappings{
    adieresis={ä},
    germandbls={ß},
    Euro={€},
}

\usepackage[ngerman]{babel}
% erweiterete Literaturverwaltung
\usepackage[  backend = biber   % (bibtex, biber)
        , bibwarn = true    % Warnung bei fehlerhafter bib-Datei
        , style = authoryear
        , natbib = true
          ]{biblatex}
% Einstellung der Anführungszeichen bei Zitaten („x“, »x«, “x”)
\usepackage[autostyle = true]{csquotes}

% Lokalisierung für biber ergänzen % wirkt nicht
\DefineBibliographyStrings{ngerman}{%
      jourvol = {V1ol. }
    , volume = {VolB. }
    , volumes = {VolBs. }
    , edition = {No. }
    %, andothers = {and others}
}
% Trenner zwischen den Namen ein Semikolon
\renewcommand*{\multinamedelim}{\addsemicolon\space}

% Literaturliste laden
\addbibresource{L:/Uni/Literatur.bib} 

\begin{document}

\cite{kakimoto_monitoring_2006}

\printbibliography

\end{document}

But I get in my bibliography this entry:

Kakimoto, Naoto u.a. (Feb. 2006). „Monitoring of Interarea Oscillation Mode by Syn-
chronized Phasor Mesurement“. In: IEEE Transactions on Power Systems 21.1, S. 260–
268. issn: 0885-8950. doi: 10.1109/TPWRS.2005.861960.

As you can see, instead of "Vol. 21, No. 1" I get "21.1".

In my code I tried to change this behaviour with the \DefineBibliographyStrings macro, but without success. It is interesting, that the commented andother localisation string works, the others don't.

share|improve this question
add comment

2 Answers

up vote 5 down vote accepted

To make use of the excellent localisation features of biblatex, the following approach might be more apt.

\DeclareFieldFormat[article]{volume}{\bibstring{volume}\addnbspace #1}
\DeclareFieldFormat[article]{number}{\bibstring{number}\addnbspace #1}

Note the use of a non-breaking space (\addnbspace), if you prefer a normal space, go with \addpspace.

This, however, results in "Bd. 21.Nr. 1", so we modify the bibmacro volume+number+eid a bit to include a comma (and a space) between the volume and number.

\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
  \setunit{\addcomma\space}%<---- was \setunit*{\adddot}%
  \printfield{number}%
  \setunit{\addcomma\space}%
  \printfield{eid}}

So the MWE

\documentclass{scrartcl} 
\usepackage[T1]{fontenc}

\usepackage[ngerman]{babel}
\usepackage[backend = biber,style = authoryear,natbib = true]{biblatex}
\usepackage[autostyle = true]{csquotes}

\begin{filecontents}{\jobname.bib}
@article{kakimoto_monitoring_2006,
    title = {Monitoring of Interarea Oscillation Mode by Synchronized Phasor Mesurement},
    volume = {21},
    issn = {0885-8950},
    doi = {10.1109/TPWRS.2005.861960},
    number = {1},
    journal = {{IEEE} Transactions on Power Systems},
    author = {Kakimoto, Naoto and Sugumi, Masahiro and Makino, Tohru and Tomiyama, Katsuyuki},
    month = feb,
    year = {2006},
    pages = {260 -- 268}
}
\end{filecontents}

\DeclareFieldFormat[article]{volume}{\bibstring{volume}\addnbspace #1}
\DeclareFieldFormat[article]{number}{\bibstring{number}\addnbspace #1}

\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
  \setunit{\addcomma\space}%
  \printfield{number}%
  \setunit{\addcomma\space}%
  \printfield{eid}}

\renewcommand*{\multinamedelim}{\addsemicolon\space}

\addbibresource{\jobname.bib} 

\begin{document}
  \cite{kakimoto_monitoring_2006}
  \nocite{*}
  \printbibliography
\end{document}

yields enter image description here


If you wish to include a comma before the volume, add to your preamble.

\renewbibmacro*{journal+issuetitle}{%
  \usebibmacro{journal}%
  \setunit*{\addcomma\space}% was: \setunit*{\addspace}
  \iffieldundef{series}
    {}
    {\newunit
     \printfield{series}%
     \setunit{\addcomma\space}}% was: \setunit{\addspace}
  \usebibmacro{volume+number+eid}%
  \setunit{\addspace}%
  \usebibmacro{issue+date}%
  \setunit{\addcolon\space}%
  \usebibmacro{issue}%
  \newunit}
share|improve this answer
    
this is perfect, except for a missing comma in front of Bd.! How can we add this? –  Ingo Oct 23 '13 at 14:31
1  
@Ingo Have a look a the edited answer. If you want more, it might be better to ask a new question. –  moewe Oct 23 '13 at 20:24
add comment

As far as I can see, this is not a localization issue, so \DefineBibliographyStrings cannot do anything for you here. You have to modify the field formats. Try:

\DeclareFieldFormat[article]{volume}{Vol. #1}
\DeclareFieldFormat[article]{number}{No. #1}

You can suppress the optional [article] argument if you want this to hold whatever the entry type.

share|improve this answer
1  
Thank you! This works. But for what are the localisation string volume and jourvol? And what should I do, if I want an edition localised? In german it is "Auflage" and in english "edition"? This doesn't work with your approach, doesn't it? –  Dirk Feb 8 '13 at 16:41
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.