[Tex/LaTex] biblatex: Handling secondary (“quoted in”) citations

biblatexciting

This question and the answer became part of a package:
biblatex-musuos

How can I qoute secondary quotes which I’ve taken form another book.

Example

Jon Doe writes a book an cites Fred Bloggs in it. Now I read the book of Doe an want to cite his cite of Bloggs. So my bibliography entry must look like

Bloggs, Fred: A nice old book, 1850, p. 35. Quoted in Doe, John: A bad new Book, 2011, p. 67.

Doe’s book should not be listed separately in the bibliography.

I know that there’s a bibstring quotedin containing “quoted in” (p. 159 of biblatex’s manual) but I don’t know if theres a (predefined) way to use it …

Update

It seems that there’s no predefined way, so I decided to use userc for crossreferences like this. This works for the bibliography but not for cite commands. At the moment I create the “in text cite” manually.

It would be great to have a macro like

\QIautocite[<prenote a>][<postnote a>]{<author a>}[<prenote b>][<postnote b>]{<author b>}

that expands to the above given example.

That’s my new code, which gives the right results for bibliography and “in text cite” but the latter not automatically …

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@BOOKLET{autora,
  title = {A nice old book},
  userc={autorb},
  author = {Fred Bloggs},
  year = {1850},
}
@BOOKLET{autorb,
  title = {A bad new book},
  author = {Jon Doe},
  year = {2011},
}
\end{filecontents}

\documentclass[ngerman]{scrartcl}

\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}

\usepackage{babel,csquotes,blindtext}

\usepackage[%
    bibstyle=authortitle,
    citestyle=verbose-ibid,
]{biblatex}
\addbibresource{\jobname.bib}

\NewBibliographyString{bibcitedas}
\DefineBibliographyStrings{german}{%
  bibcitedas = {{zitiert als}{zit. als}},
}

% Put the 'quoted in text' behind the bibentry.
\renewbibmacro*{finentry}{%
  \ifbibliography{%
    \iffieldundef{userc}{}{%
      \newunit\bibstring{quotedin}\addspace\fullcite{\thefield{userc}}
    }
  }{}%
  \finentry%
}

\begin{document}
\blindtext
\begin{quotation}
    \blindtext\footnote{\cite[36]{autora}. Zit. nach \cite[89]{autorb}}
\end{quotation}
\blindtext\footnote{\cite[36]{autora}. Zit. nach \cite[89]{autorb}}

\printbibliography
\end{document}

Example 2

In addition to my comment (Hi @Audrey. This works fine 🙂 but theres a little thing …) on Audrey’s answer:

If I use the quotecite command like this

\quotecite[1]{reese}[5]{weinberg}
\quotecite[1]{reese}[5]{weinberg}
\pagebreak
\quotecite[1]{reese}[5]{weinberg}
\quotecite[1]{reese}[5]{weinberg}

the footnotes should look like

1 Reese [full cite], p. 1. Zit. nach Weinberg [full cite], p. 65
2 Ebd.
———— page break ————
3 Rese [short cite], p 1. Zit nach Weinberg [short cite], p. 65
4 Ebd.

Everything works like expected except footnote 3 which is

3 Rese [short cite], p 1. Zit nach Weinberg [full cite], p. 65

at the moment

Update 2

Since it seems not possible to react to autocite I created a new plain command with

\DeclareMultiCiteCommand{\quoteciteplain}[\cbx@qcwrapperplain]{\cbx@quotecite}{\cbx@qcdelim}

\newrobustcmd{\cbx@qcwrapperplain}[1]{%
  \global\toggletrue{cbx@isquote}%
  #1%
  \global\togglefalse{cbx@isquote}%
  \global\togglefalse{cbx@iflastibid}%
  \global\togglefalse{cbx@ifquoteepost}%
  \global\togglefalse{cbx@ifquoterpost}}

Best Answer

Some categories can help facilitate the output of quoted-in data and the suppression of "quoter" entries in the bibliography.

Your proposed "quoted-in" citation command can be defined via \DeclareMultiCiteCommand, where the delimiter can make use of quotedin. With some help from etoolbox, you can collect all of the quoted-in data through this new citation command and avoid the need to edit your bib file entirely.

The code below demonstrates these ideas, but accounts for the case where a quoter plays the role of a primary reference elsewhere. "Quotee"-only bibliography entries include quoted-in data. When a quotee has more than one quoter, the quoting entries are printed in the cite order. Quoter-only entries are suppressed. All other entries are treated normally.

Thanks to Tobi for finding bugs.

\documentclass{report}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{csquotes}
\usepackage[style=verbose-ibid,ibidpage=true]{biblatex}
\bibliography{biblatex-examples}

% Just for demonstration. Above options are necessary, including
% default and verbose-ibid tracking options: opcittracker=false,
% loccittracker=false, idemtracker=false, citetracker=context,
% ibidtracker=constrict and pagetracker=true.
\ExecuteBibliographyOptions{citepages=omit}

\NewBibliographyString{quotedfrom}
\NewBibliographyString{quotedon}
\DefineBibliographyStrings{german}{%
  quotedfrom = {zit\adddotspace aus},
  quotedon = {zit\adddotspace auf}}

\DeclareBibliographyCategory{quoter}
\DeclareBibliographyCategory{quotee}
\DeclareBibliographyCategory{primary}

\defbibheading{quoter}[Quoters]{\section*{#1}}
\defbibheading{quotee}[Quotees]{\section*{#1}}
\defbibheading{citedasprimary}[Bibliography as desired]{\section*{#1}}

\defbibcheck{citedasprimary}{% Suppress quoter-only entries
  \ifboolexpr{ test {\ifcategory{quoter}}
               and not test {\ifcategory{quotee}}
               and not test {\ifcategory{primary}} }
    {\skipentry}
    {}}

\makeatletter

\newtoggle{cbx@isquote}% Current citation quotecite?
\newtoggle{cbx@iflastquote}% Last citation quotecite?
\newtoggle{cbx@fullquote}% Print a full quotecite?
\newtoggle{cbx@iflastibid}% Last quotecite ibid?
\newtoggle{cbx@ifquoteepost}% Ibid quotecite outputs quotee postnote?
\newtoggle{cbx@ifquoterpost}% Ibid quotecite outputs quoter postnote?

\renewbibmacro*{finentry}{% Add quoted-in data to quotee-only entries
  \ifbibliography
    {\ifboolexpr{ test {\ifcategory{quotee}}
                  and not test {\ifcategory{primary}} }
       {\newunit%
        \bibstring{quotedin}%
        \addspace%
        \global\toggletrue{cbx@isquote}%
        \fullcite{\csuse{cbx@quoter@\thefield{entrykey}}}%
        \global\togglefalse{cbx@isquote}}
       {}}
    {}%
  \finentry}

\AtEveryCitekey{%
  \iftoggle{cbx@isquote}
    {}
    {\addtocategory{primary}{\thefield{entrykey}}%
     \global\togglefalse{cbx@iflastquote}}}

\newbibmacro*{cite:quotee}{%
  \savefieldcs{postnote}{cbx@post}%
  \ifboolexpr{ test {\ifciteseen} and not test {\iftoggle{cbx@fullquote}} }
    {\iffieldundef{shorthand}
       {\ifboolexpr{ not test {\iffirstonpage}
                     and test {\ifsamepage{\value{instcount}}{\value{instcount}-2}}
                     and test {\iftoggle{cbx@iflastquote}}
                     and test {\iffieldequalcs{entrykey}{cbx@lastquoteekey}} }
          {\printtext[bibhyperlink]{\bibstring[\mkibid]{ibidem}}%
           \iffieldequalcs{postnote}{cbx@lastquoteepost}
             {\clearfield{postnote}}
             {\global\toggletrue{cbx@ifquoteepost}}%
           \global\toggletrue{cbx@iflastibid}}
          {\usebibmacro{cite:short}}}
       {\usebibmacro{cite:shorthand}}}
    {\usebibmacro{cite:full}}%
  \csxdef{cbx@lastquoteepost}{\csuse{cbx@post}}}

\newbibmacro*{cite:quoter}{%
  \savefieldcs{postnote}{cbx@post}%
  \ifboolexpr{ not test {\iftoggle{cbx@fullquote}}
               and test {\iftoggle{cbx@iflastibid}}
               and test {\iffieldequalcs{entrykey}{cbx@lastquoterkey}} }
    {\iffieldequalcs{postnote}{cbx@lastquoterpost}
       {\clearfield{postnote}}
       {\global\toggletrue{cbx@ifquoterpost}}}
    {\iftoggle{cbx@iflastibid}
       {\quotedelim}
       {}%
     \global\togglefalse{cbx@iflastibid}%
     \ifboolexpr{ test {\ifciteseen} and not test {\iftoggle{cbx@fullquote}} }
       {\iffieldundef{shorthand}
          {\usebibmacro{cite:short}}
          {\usebibmacro{cite:shorthand}}}
       {\usebibmacro{cite:full}}}%
  \csxdef{cbx@lastquoterpost}{\csuse{cbx@post}}%
  \global\togglefalse{cbx@ifquoteepost}}

\DeclareCiteCommand{\cbx@quotecite}
  {\usebibmacro{prenote}}
  {\ifnumless{\value{multicitecount}}{2}% <loopcode>
     {\usebibmacro{citeindex}% Current entry is a quotee
      \addtocategory{quotee}{\thefield{entrykey}}%
      \xdef\cbx@quoteekey{\thefield{entrykey}}%
      \usebibmacro{cite:quotee}%
      \csxdef{cbx@lastquoteekey}{\thefield{entrykey}}}
     {\addtocategory{quoter}{\thefield{entrykey}}% Current entry is a quoter
      \xifinlistcs{\thefield{entrykey}}{cbx@quoterlist@\cbx@quoteekey}
        {}
        {\csxappto{cbx@quoter@\cbx@quoteekey}{\thefield{entrykey},}%
         \listcsxadd{cbx@quoterlist@\cbx@quoteekey}{\thefield{entrykey}}}%
      \usebibmacro{cite:quoter}%
      \csxdef{cbx@lastquoterkey}{\thefield{entrykey}}}}
  {\multicitedelim}
  {\iftoggle{cbx@iflastibid}
     {\iftoggle{cbx@ifquoteepost}
        {\let\postnotedelim=\quoteepostdelim}
        {\iftoggle{cbx@ifquoterpost}
           {\let\postnotedelim=\quoterpostdelim}
           {}}}
     {}%
   \usebibmacro{cite:postnote}%
   \global\toggletrue{cbx@iflastquote}}

\DeclareMultiCiteCommand{\quotecite}
  [\cbx@qcwrapper\relax\mkbibfootnote]
  {\cbx@quotecite}
  {\cbx@qcdelim}

\DeclareMultiCiteCommand{\fullquotecite}
  [\cbx@qcwrapper\cbx@mkfullquote\mkbibfootnote]
  {\cbx@quotecite}
  {\cbx@qcdelim}

\DeclareMultiCiteCommand{\parenquotecite}
  [\cbx@qcwrapper\relax\mkbibparens]
  {\cbx@quotecite}
  {\cbx@qcdelim}

\DeclareMultiCiteCommand{\plainquotecite}
  [\cbx@qcwrapper\relax\relax]
  {\cbx@quotecite}
  {\cbx@qcdelim}    

% Use first argument to override trackers, second to format
% the citation (e.g. \mkbibfootnote). The third is reserved
% for multicite output.
\newrobustcmd{\cbx@qcwrapper}[3]{%
  \global\toggletrue{cbx@isquote}%
  \global\togglefalse{cbx@fullquote}%
  #1#2{#3}%
  \global\togglefalse{cbx@isquote}%
  \global\togglefalse{cbx@iflastibid}%
  \global\togglefalse{cbx@ifquoteepost}%
  \global\togglefalse{cbx@ifquoterpost}}

\newrobustcmd{\cbx@mkfullquote}{%
  \AtNextCite{\citetrackerfalse}%
  \toggletrue{cbx@fullquote}}

\newrobustcmd{\cbx@qcdelim}{%
  \iftoggle{cbx@iflastibid}
    {}
    {\quotedelim}}

\newcommand*{\quoteepostdelim}{%
  \addcomma\space\bibstring{quotedfrom}\space}

\newcommand*{\quoterpostdelim}{%
  \addcomma\space\bibstring{quotedon}\space}

\newcommand*{\quotedelim}{%
  \adddot\space\bibsentence\bibstring{quotedin}\space}

\makeatother

\begin{document}
\null\vfill\noindent
First primary cite.\footcite{augustine}
Same cite.\footcite{augustine}
Quoted-in cite.\quotecite[10--15]{reese}[5]{weinberg}
Same quoted-in cite.\quotecite[10--15]{reese}[5]{weinberg}
Same quoted-in cite, but different quotee
  postnote.\quotecite[10--15]{reese}[10]{weinberg}
Same quoted-in cite, but different quoter
  postnote.\quotecite(See)()[10--15]{reese}[11]{weinberg}
Same quoted-in cite, but different
  postnotes.\quotecite[26--28]{reese}[5--10]{weinberg}
\pagebreak

Same quoted-in cite, but on next
  page\quotecite(See)()[10--15]{reese}[11]{weinberg}.
Different quoted-in cite, both quotee and quoter cited
  elsewhere as primary.\quotecite(See)()[10]{massa}[540]{augustine}
Same quotee, different quotee postnote and different
  quoter.\quotecite[11]{massa}[540]{companion}
Primary cite, same as quotee (NB: ibidem not applied
  here)\footcite{massa}
New quoted-in cite.\quotecite(See)()[20]{shore}[11]{springer}
Same quotee, but different quoter.\quotecite[20]{shore}[100]{iliad}
Same, but full quoted-in cite.\fullquotecite[20]{shore}[100]{iliad}

\pagebreak
\printbibliography[category=quoter,heading=quoter]
\printbibliography[category=quotee,heading=quotee]
\printbibliography[check=citedasprimary,heading=citedasprimary]
\end{document}

Here are citations from the first page from the resulting document: enter image description here

Citations from the second page: enter image description here

The final bibliography: enter image description here

Some notes on requested extensions and refinements of the original answer:

  • Ibidem abbreviations. This extension isn't trivial; we need to examine two previous citations, but the existing citation tracker just looks at the last one. We can get around this by tracking the quoted-in citation manually, using some tests from both biblatex and etoolbox. A drawback of this approach is that use of ibidem for quoted-in citations is somewhat independent of the biblatex tracking options. Here I've attempted to mimic the default and verbose-ibid option settings.
  • Inline citations. verbose-ibid is intended for primarily citations in footnotes, but inline versions of the quoted-in citation can be defined by altering the wrapper used in \DeclareMultiCiteCommand.
  • "Full" citations. These can also be defined via the wrapper, provided that we have an additional flag to indicate that the citation should be printed with cite:full.
Related Question