2

In the reference of a book review that reviews more than one book I am trying to have it include the titles/authors of all the books reviewed, following the Chicago Manual of Style as implemented in biblatex-chicago. This is an example how it should look:

Geertz, Clifford. 1998. “Deep Hanging out.” Review of Chronicle of the Guayaki Indians, by Pierre Clastres, translated by Paul Auster, and Routes: Travel and Translation in the Late Twentieth Century, by James Clifford. The New York Review of Books, October 22. Accessed 2014-05-01. http://www.nybooks.com/articles/archives/1998/oct/22/deep-hanging-out/.

I have tried to follow the answer to this question, but unfortunately it is beyond my skills to modify it so that includes two or more titles and authors.

I thought about including revdauthor2, revdtitle2, revdauthor3, revdtitle3, and so forth, in the .bib file, adding these to chicago-authordate.dbx and then modifying the preamble accordingly so depending on the number of revd... fields found it would use the right syntax ("Review of X, Y, and Z"). But I don't even know if that would be the right approach.

This is the bib-entry:

@review{geertz1998deep-hanging,
    author = {Geertz, Clifford},
    revdauthor = {Clastres, Pierre},
    revdauthor2 = {Clifford, James},
    revdtitle = {Chronicle of the {Guayaki} {Indians}},
    revdtitle2 = {Routes: Travel and Translation in the Late Twentieth Century},
    journal = {The New York Review of Books},
    title = {Deep Hanging out},
    revdtranslator = {Auster, Paul},
    url = {http://www.nybooks.com/articles/archives/1998/oct/22/deep-hanging-out/},
    urldate = {2014-05-01},
    year = {1998}
}

Furthermore, one of the books reviewed is translated, and since it's a somewhat important translation I was wondering whether it'd be possible to also include revdtranslator? Any hints much appreciated.

jan
  • 2,236
  • It would certainly be possible to add support for a second review by adding all the *2 fields. But I can't see a way to generalise this for a variable number of reviews. I guess those reviews are not that common, in which case you could opt for the manual solution. – moewe Jul 05 '16 at 05:57
  • The only generalisation I could come up with uses the related feature. – moewe Jul 05 '16 at 06:28

1 Answers1

1

This solution builds on my answer to Book reviews entry in biblatex-chicago, but extends it so we can also make use of the related-feature. That allows for a variable number of reviewed titles, because we can simply loop over all the related entries.

The type we are going to use is relatedtype={reviewof}

@review{geertz,
  author      = {Geertz, Clifford},
  journal     = {The New York Review of Books},
  title       = {Deep Hanging out},
  url         = {http://www.nybooks.com/articles/archives/1998/oct/22/deep-hanging-out/},
  urldate     = {2014-05-01},
  year        = {1998},
  related     = {clastres,clifford},
  relatedtype = {reviewof},
}
@book{clastres,
  author     = {Clastres, Pierre},
  title      = {Chronicle of the {Guayaki} {Indians}},
  translator = {Auster, Paul},
}
@book{clifford,
  author = {Clifford, James},  
  title  = {Routes: Travel and Translation in the Late Twentieth Century},
}

Firstly, we define a macro for the presentation of reviewofs

\newbibmacro*{related:reviewof}[1]{%
  \entrydata*{#1}{%
    \usebibmacro{title}%
    \setunit{\addcomma\space}%
    \usebibmacro{bytypestrg}{author}{author}%
    \setunit{\addspace}%
    \printnames[byauthor]{author}
    \setunit{\addcomma\space}%
    \usebibmacro{byeditor+others}%
    \setunit{\addcomma\space}}}

Then we get this macro into the driver at the appropriate position. Note that we effectively have the related-block twice, with a guard to execute it at the appropriate location.

\DeclareBibliographyDriver{review}{%
  \usebibmacro{bibindex}%
  \iffieldequalstr{entrysubtype}{magazine}%
    {\usebibmacro{mag+news+author}}%
    {\usebibmacro{author/editor}}%
  \setunit{\addspace}%
  \printfield{nameaddon}%
  \newunit\newblock
  \ifboolexpr{test {\ifundef{\bbx@lasthash}}  and not test {\iffieldundef{title}}}
    {\printtext[title]{%
       \printfield[titlecase]{title}%
       \setunit{\subtitlepunct}%
       \printfield[titlecase]{subtitle}}%
     \newunit}%
    {}%
  \usebibmacro{cmsbibsortdate}%
  \newunit\newblock
  \ifboolexpr{test {\ifundef{\bbx@lasthash}} or test {\iffieldundef{title}}}
    {}%
    {\printtext[title]{%
       \printfield[titlecase]{title}%
       \setunit{\subtitlepunct}%
       \printfield[titlecase]{subtitle}}}%
  \newunit\newblock
  \iffieldequalstr{relatedtype}{reviewof}
    {\renewcommand*{\relateddelim}{%
     \ifnumless{\value{bbx:relatedcount}}{\value{bbx:relatedtotal}}{\multilistdelim}{\finallistdelim}}%
     \usebibmacro{related:init}%
     \usebibmacro{related}}
    {\ifboolexpr{
       test {\iffieldundef{revdtitle}}
       and
       test {\iffieldundef{revdsubtitle}}
     }
       {}
       {\bibstring{reviewof}%
        \setunit{\addspace}%
        \printtext[emph]{%
          \printfield[titlecase]{revdtitle}%
          \setunit{\subtitlepunct}%
          \printfield[titlecase]{revdsubtitle}}%
        \setunit{\addcomma\space}}%
     \ifnameundef{revdauthor}
       {}
       {\bibstring{byauthor}%
        \setunit{\addspace}%
        \printnames[byauthor]{revdauthor}}}%
  \newcunit\newblock
  \usebibmacro{music+eventdate}% 16th ed.
  \setunit{\addspace}%
  \usebibmacro{language+transtitle}%
  \newunit\newblock%
  \usebibmacro{part+editor+translator}%
  \newunit\newblock%
  \usebibmacro{bibreprint}%
%  \newunit\newblock
  \usebibmacro{issuetitle}%
  \setunit*{\addcomma\addspace}%
  \usebibmacro{byeditor+others}%
  \usebibmacro{editorpunct}%\newunit\newblock
  \printfield{note}%
  \setunit*{\addcomma\addspace}\newblock%
  \iffieldequalstr{entrysubtype}{magazine}
    {\usebibmacro{mag+news+date}%
     \newcunit\newblock
     \usebibmacro{chap+pag}}%
    {\usebibmacro{journal+issue+year+pages}}%
  \newunit\newblock
  \usebibmacro{pubstate}%
  \newunit\newblock
  \printfield{addendum}%
  \setunit*{\addcomma\addspace}\newblock%
  \iftoggle{cms@isbn}%
    {\printfield{issn}}%
    {}%
  \setunit*{\addcomma\addspace}\newblock%
  \usebibmacro{bib+doi+url}%
  \newunit\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \ifboolexpr{test {\iftoggle{cms@related}} and not test {\iffieldequalstr{relatedtype}{reviewof}}}%
  {\usebibmacro{related:init}%
    \usebibmacro{related}%
    \newunit}%
  {}%
  \usebibmacro{originally+published+as}%
  \usebibmacro{finentry}}

In total (uses filecontents to create the .dbx and .bib files: if you have files of the same name they will be overwritten)

\documentclass[american]{article}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage[autostyle=true]{csquotes}
\usepackage[authordate, backend=biber]{biblatex-chicago}
\usepackage{filecontents}
\usepackage{hyperref}


\begin{filecontents}{chicago-authordate.dbx}
\ProvidesFile{chicago-authordate.dbx}
\RequireBiber[3]

\DeclareDatamodelFields[type=field,datatype=literal]{revdtitle,revdsubtitle}
\DeclareDatamodelEntryfields[review]{revdtitle,revdsubtitle}
\DeclareDatamodelFields[type=list,datatype=name]{revdauthor}
\DeclareDatamodelEntryfields[review]{revdauthor}

\DeclareDatamodelConstraints[review]{
  \constraint[type=mandatory]{
    \constraintfield{author}
    \constraintfield{revdtitle}
    \constraintfieldsxor{
      \constraintfield{date}
      \constraintfield{year}
    }
  }
}

\DeclareDatamodelEntryfields[review]{
  author,
  journaltitle,
  title,
  day,
  endday,
  endmonth,
  endyear,
  month,
  year,
  addendum,
  annotator,
  commentator,
  doi,
  editor,
  editora,
  editorb,
  editorc,
  editoratype,
  editorbtype,
  editorctype,
  eid,
  eprint,
  eprintclass,
  eprinttype,
  issn,
  issue,
  issuetitle,
  issuesubtitle,
  journalsubtitle,
  language,
  note,
  number,
  origlanguage,
  pages,
  pubstate,
  series,
  subtitle,
  titleaddon,
  translator,
  url,
  urlday,
  urlendday,
  urlendmonth,
  urlendyear,
  urlmonth,
  urlyear,
  version,
  volume}

\endinput
\end{filecontents}

\DeclareLanguageMapping{american}{cms-american}
\renewcommand{\subtitlepunct}{\addcolon\space}

\DefaultInheritance[\except{*}{review}{all=false}]{all=true,override=false}

\DeclareDataInheritance{book}{review}{
  \inherit{author}{revdauthor}
  \inherit{title}{revdtitle}
  \inherit{subtitle}{revdsubtitle}
}

\DeclareFieldFormat[review]{citetitle}{\mkbibquote{#1\isdot}}
\DeclareFieldFormat[review]{title}{\mkbibquote{#1\isdot}}

\makeatletter
\DeclareBibliographyDriver{review}{%
  \usebibmacro{bibindex}%
  \iffieldequalstr{entrysubtype}{magazine}%
    {\usebibmacro{mag+news+author}}%
    {\usebibmacro{author/editor}}%
  \setunit{\addspace}%
  \printfield{nameaddon}%
  \newunit\newblock
  \ifboolexpr{test {\ifundef{\bbx@lasthash}}  and not test {\iffieldundef{title}}}
    {\printtext[title]{%
       \printfield[titlecase]{title}%
       \setunit{\subtitlepunct}%
       \printfield[titlecase]{subtitle}}%
     \newunit}%
    {}%
  \usebibmacro{cmsbibsortdate}%
  \newunit\newblock
  \ifboolexpr{test {\ifundef{\bbx@lasthash}} or test {\iffieldundef{title}}}
    {}%
    {\printtext[title]{%
       \printfield[titlecase]{title}%
       \setunit{\subtitlepunct}%
       \printfield[titlecase]{subtitle}}}%
  \newunit\newblock
  \iffieldequalstr{relatedtype}{reviewof}
    {\renewcommand*{\relateddelim}{%
     \ifnumless{\value{bbx:relatedcount}}{\value{bbx:relatedtotal}}{\multilistdelim}{\finallistdelim}}%
     \usebibmacro{related:init}%
     \usebibmacro{related}}
    {\ifboolexpr{
       test {\iffieldundef{revdtitle}}
       and
       test {\iffieldundef{revdsubtitle}}
     }
       {}
       {\bibstring{reviewof}%
        \setunit{\addspace}%
        \printtext[emph]{%
          \printfield[titlecase]{revdtitle}%
          \setunit{\subtitlepunct}%
          \printfield[titlecase]{revdsubtitle}}%
        \setunit{\addcomma\space}}%
     \ifnameundef{revdauthor}
       {}
       {\bibstring{byauthor}%
        \setunit{\addspace}%
        \printnames[byauthor]{revdauthor}}}%
  \newcunit\newblock
  \usebibmacro{music+eventdate}% 16th ed.
  \setunit{\addspace}%
  \usebibmacro{language+transtitle}%
  \newunit\newblock%
  \usebibmacro{part+editor+translator}%
  \newunit\newblock%
  \usebibmacro{bibreprint}%
%  \newunit\newblock
  \usebibmacro{issuetitle}%
  \setunit*{\addcomma\addspace}%
  \usebibmacro{byeditor+others}%
  \usebibmacro{editorpunct}%\newunit\newblock
  \printfield{note}%
  \setunit*{\addcomma\addspace}\newblock%
  \iffieldequalstr{entrysubtype}{magazine}
    {\usebibmacro{mag+news+date}%
     \newcunit\newblock
     \usebibmacro{chap+pag}}%
    {\usebibmacro{journal+issue+year+pages}}%
  \newunit\newblock
  \usebibmacro{pubstate}%
  \newunit\newblock
  \printfield{addendum}%
  \setunit*{\addcomma\addspace}\newblock%
  \iftoggle{cms@isbn}%
    {\printfield{issn}}%
    {}%
  \setunit*{\addcomma\addspace}\newblock%
  \usebibmacro{bib+doi+url}%
  \newunit\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \ifboolexpr{test {\iftoggle{cms@related}} and not test {\iffieldequalstr{relatedtype}{reviewof}}}%
  {\usebibmacro{related:init}%
    \usebibmacro{related}%
    \newunit}%
  {}%
  \usebibmacro{originally+published+as}%
  \usebibmacro{finentry}}


\newbibmacro*{related:reviewof}[1]{%
  \entrydata*{#1}{%
    \usebibmacro{title}%
    \setunit{\addcomma\space}%
    \usebibmacro{bytypestrg}{author}{author}%
    \setunit{\addspace}%
    \printnames[byauthor]{author}
    \setunit{\addcomma\space}%
    \usebibmacro{byeditor+others}%
    \setunit{\addcomma\space}}}
\makeatother

\begin{filecontents}{\jobname.bib}
@review{barcott:review,
  journaltitle  = {New York Times Book Review},
  author        = {Barcott, Bruce},
  date          = {2000-04-16},
  entrysubtype  = {magazine},
  revdtitle     = {The Last Marlin},
  revdsubtitle  = {Story of a Family at Sea},
  revdauthor    = {Fred Waitzkin},
  pages         = 7,
}
@review{geertz,
  author      = {Geertz, Clifford},
  journal     = {The New York Review of Books},
  title       = {Deep Hanging out},
  url         = {http://www.nybooks.com/articles/archives/1998/oct/22/deep-hanging-out/},
  urldate     = {2014-05-01},
  year        = {1998},
  related     = {clastres,clifford},
  relatedtype = {reviewof},
}
@book{clastres,
  author     = {Clastres, Pierre},
  title      = {Chronicle of the {Guayaki} {Indians}},
  translator = {Auster, Paul},
}
@book{clifford,
  author = {Clifford, James},  
  title  = {Routes: Travel and Translation in the Late Twentieth Century},
}
\end{filecontents}

\addbibresource{\jobname.bib}


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

example output

moewe
  • 175,683
  • Wow, thank you so much! This looks exactly what I need. I do have some trouble though, it gives me a Package etoolbox error, Toggle 'cms@related' undefined. Any ideas? – jan Jul 05 '16 at 08:38
  • 1
    @jan Do you perhaps run an older version of biblatex-chicago? I noticed that in my earlier answer there was no related code in the driver, which makes me think it was added in the recent update. Update biblatex-chicago, biblatex and Biber. (To be more precise, the example should work with biblatex 3.4, Biber 2.5, biblatex-chicago 1.0rc1 from 2016-06-07.) – moewe Jul 05 '16 at 08:40
  • @jan If for some reason you can't update (you should), \providetoggle{cms@related}\settoggle{cms@related}{true} might just help (I couldn't test that), but you may run into further problems if you run an outdated version of this package. – moewe Jul 05 '16 at 08:47
  • Oh, I hadn't realized that TeX-Live 2016 is out (oops) so I need to upgrade that first (will take an hour). I'll post back should it not resolve it ... – jan Jul 05 '16 at 08:51
  • Updated, and ... Works like a charm! Tried with up to four books. I hadn't used the related feature yet as I had never bothered updating my crossrefs after switching to biblatex, but this is really great, I should invest a bit time and update by bibliography ;) Thank you so much for your help! – jan Jul 05 '16 at 16:22