6

According to Biblatex's manual, the standard styles treat @review as an alias for @article:

Reviews of some other work. This is a more specific variant of the @article type. The standard styles will treat this entry type as an alias for @article.

This led me to expect the same formatting to be applied to both kinds of entry. However, this does not appear to be the case:

\begin{filecontents}{\jobname.bib}
@article{article,
  author    =   {Mouse, A.},
  title     =   {A Tall Tail},
  journal   =   {Tales to Nibble By},
  pages     =   {1--9},
  volume    =   31,
  number    =   4,
  year      =   1989,
}
@review{review,
  author    =   {Vole, Adrian},
  title     =   {Review of \emph{Great Grasses}, by A. N. Other-Mouse},
  journal   =   {Tales to Nibble By},
  pages     =   {23--4},
  volume    =   32,
  number    =   2,
  year      =   1990
}
\end{filecontents}

\documentclass{article}
\usepackage{biblatex}
\bibliography{\jobname}

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

Rodent References

Note two differences:

  • The @review title is italicised; the @article title is quoted.

  • vol. is included in the @review case but not the @article case.

Yet the only standard .bbx file to include the string review at all is standard.bbx which includes this line:

\DeclareBibliographyAlias{review}{article}

Moreover, nothing obvious to me in the .sty or .def files etc. explains the differences. There are some mentions of review here, but mostly as strings e.g. reviewof etc. which I take it are not responsible for formatting entries of type @review.

What exactly is the relationship Biblatex refers to as an alias of an entry type? And how should the formatting of aliased entry types be configured?

  • 2
    That is a very interesting question indeed. I cannot give an authoritative answer, but form what I have researched so far \DeclareBibliographyAlias really only triggers use of the same driver (as defined in standard.bbx for the standard styles). The differences you are seeing are mainly those caused by \DeclareFieldFormat where a difference still exists. Maybe I can find the code to explain the latter (the former is straightforward). – moewe Sep 20 '15 at 16:17
  • 2
    Where the code is is a bit of a mystery. It would be really useful to produce a map of where things are defined in biblatex. But on the second part of your question, the alias sets the main type but there will also be a type field which is then used to control aspects of the formatting. – Alan Munn Sep 20 '15 at 16:31
  • 1
    @cfr I knew, I should have cut that comment when copying it. ;-) I saw that as well, I think that is an awkward way to distinguish between the two \bibstring{volume} and \bibstring{jourvolume}. I am guessing what happened here, but I think it might have gone like this: Supporting a @review type seemed like a good idea and broadly it is similar to @article types. But when it came to \DeclareFieldFormat in the standard styles, @review was somewhat forgotten about because it is just an alias. – moewe Sep 20 '15 at 16:57
  • 1
    @cfr But I agree that "[On @review] Reviews of some other work. This is a more specific variant of the @article type. The standard styles will treat this entry type as an alias for @article." in the docs is a bit misleading from what we could just see. – moewe Sep 20 '15 at 16:58
  • 1
    @moewe Cutting it wouldn't have helped. I'd read the source line before you posted your answer ;). – cfr Sep 20 '15 at 17:03
4

According to the biblatex documentation, p. 126, \DeclareBibliographyAlias{alias}{type} does the following:

If a bibliography driver covers more than one entry type, this command may be used to define an alias where entrytype is the name of a defined driver.

When you use \DeclareBibliographyAlias{alias}{type} what happens internally (see biblatex2.sty) is

\newrobustcmd*{\DeclareBibliographyAlias}[2]{%
  \csedef{blx@bbx@#1}{%
    \expandafter\noexpand\csname blx@bbx@#2\endcsname}}

So \blx@bbx@alias just expands to \blx@bbx@type. The command \blx@bbx@<type> is used when printing bibliography lists (and friends) and "calls" the driver declared via \DeclareBibliographyDriver{type}.

For all other purposes biblatex still knows the actual entry type. It is just that the driver is rerouted.

The differences you noted were due to different \DeclareFieldFormat directives. @article gets special handling, namely

\DeclareFieldFormat
  [article,inbook,incollection,inproceedings,patent,thesis,unpublished]
  {title}{\mkbibquote{#1\isdot}}
\DeclareFieldFormat[article,periodical]{volume}{#1}% volume of a journal

while @review doesn't and defaults to the standard

\DeclareFieldFormat{title}{\mkbibemph{#1}}
\DeclareFieldFormat{volume}{\bibstring{volume}~#1}% volume of a book

The formatting code is spread throughout biblatex2.sty. It mostly contains calls to \blx@getformat, which breaks down to a switch on a host of definitions of the form abx@#2@\blx@imc@thefield{entrytype}@#4 (where here #2 is a field "id" and #4 a field name). Here we can see that the actual entry type is used for formatting.

All in all, \DeclareBibliographyAlias really only is an alias for bibliography purposes and actually even less: only for the driver, formatting is still done with the usual (non-aliased) type.


For full aliasing, a Biber sourcemapping such as the ones defined in biblatex.def would be more appropriate (abridged code from biblatex.def)

\DeclareDriverSourcemap[datatype=bibtex]{
  \map{
    \step[typesource=conference, typetarget=inproceedings]
    \step[typesource=electronic, typetarget=online]
    \step[typesource=www,        typetarget=online]
  }
}
  • (+1) Shouldn't the documentation explain this? Given that BibTeX also has aliases and, as far as I know, those do get the same formatting. And this seems not a great way for aliases to work. It would seem to me better for the aliased type to set the default formatting, with then the possibility of overriding it. This way, either you lose the possibility of distinguishing them completely or the default formatting is actually something completely different. – cfr Sep 20 '15 at 16:38
  • @cfr Mhhh, the docs aren't overly clear on that maybe, but it says about \DeclareBibliographyAlias: "If a bibliography driver covers more than one entry type, this command may be used to define an alias where <entrytype> is the name of a defined driver." We really only talk about the driver here, but of course one needs to know that the driver and formatting work independently. – moewe Sep 20 '15 at 16:53
  • I meant more that on page 13, for example, there is no indication that alias has a specific, technical meaning which differs from, say, the BibTeX one. And there is no link there to the documentation on \DeclareBibliographyAlias. The introduction to that section says the types will be treated as @misc entries by standard styles. Then the type explanation says the standard styles will treat @review as an alias for @article. I wouldn't expect to need to figure out the command used to set the alias and read its documentation in order to know this is not alias in the BibTeX sense ;). – cfr Sep 20 '15 at 16:58
  • Of course, I'm making assumptions. Why should it use alias as BibTeX does? But I think it a not altogether unnatural reading to expect an alias to behave in the same way. (A shell alias, say, does just what the thing aliased would do.) I should add: I know you are not responsible for Biblatex's documentation! I'm just wondering if I alone find this confusing :(. – cfr Sep 20 '15 at 17:01
  • 1
    @cfr I just referred to exactly that passage in my comment above and I agree, that one is a bit misleading. The passage about @misc is right though at least de facto, because @misc does not have special formatting and there should really be no difference in output there. – moewe Sep 20 '15 at 17:01
2

moewe has provided a great answer to which I append this as a mere footnote, but I thought it might be useful to add details of the way I've now configured this for the @review type specifically.

In my biblatex.cfg, I added the following lines to configure the format of the volume and title fields. volume follows the format for @article; title follows that for @suppperiodical:

\DeclareFieldFormat[review]{volume}{#1}
\DeclareFieldFormat[review]{title}{#1}

Because I also have custom configuration of the in: macro for @article (from here), I also adjusted this code:

% https://tex.stackexchange.com/a/10686/
\renewbibmacro{in:}{%
  \ifentrytype{article}{}{%
    \ifentrytype{review}{}{% apply to @review entries, too
      \printtext{\bibstring{in}\intitlepunct}%
    }%
  }%
}

For the MWE in question (which lacks the in: modification), this produces:

Revised Rodent References

\begin{filecontents}{\jobname.bib}
@article{article,
  author    =   {Mouse, A.},
  title     =   {A Tall Tail},
  journal   =   {Tales to Nibble By},
  pages     =   {1--9},
  volume    =   31,
  number    =   4,
  year      =   1989,
}
@review{review,
  author    =   {Vole, Adrian},
  title     =   {Review of \emph{Great Grasses}, by A. N. Other-Mouse},
  journal   =   {Tales to Nibble By},
  pages     =   {23--4},
  volume    =   32,
  number    =   2,
  year      =   1990
}
\end{filecontents}

\documentclass{article}
\usepackage{biblatex}
\DeclareFieldFormat[review]{volume}{#1}
\DeclareFieldFormat[review]{title}{#1}
\bibliography{\jobname}

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

I'm not sure whether this is the best way to format the titles of reviews. (I realise it depends on the style.) But neither book-type formatting nor article-type seemed quite right.

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.