[Tex/LaTex] Cite citation with BibTeX

bibtexciting

I want to cite a refrence in a primary source that is already a citation from a secondary source. As far as I know, I have to refer to both the citing author and the original author of the quote.

The quote is as follows:

"[…] a change made to the internal structure of software to make it easier to understand and cheaper to modify without changing its observable behavior."

I read it in Kerievsky, Refactoring to Patterns, 2005. It was originally written by Fowler in Refactoring: Improving the Design of Existing Code, 1999.

Citing in text, I would write something like this:

Refactoring is "…" [Fowler 1999 cited by Kerievsky 2005].

Here is a minimal working example, which just places both references in brackets:

\documentclass{memoir}    
\usepackage{natbib}    
\begin{document}

According to Martin Fowler, refactoring is ``a change made to the internal
structure of software to make it easier to understand and cheaper to modify
without changing its observable behavior''~\cite{Fow:1999,Ker:2005}.

\bibliographystyle{unsrt}
\bibliography{references}

\end{document}

Using BibTeX, this is not so straight forward anymore. I use numbers for citations and print the bibliography in the appendix. What would be a best practice solution for citing citations with BibTeX?

Best Answer

For the sake of argument, I'll assume that there are entries with keys Ker:2005 and Fow:1999 in your .bib file which point to the pieces by Kerievsky and Fowler, respectively. Assuming you use the natbib citation management package, you could proceed as follows.

  • Load the natbib package with the options square (to produce square brackets around the parenthetical citations) and numbers (to produce numeric-style citations).

  • Use a combination of \citep and \citealp to create the desired citation:

    Refactoring is "..." \citep[][cited by \citealp{Ker:2005}]{Fow:1999}.
    

If this syntax looks like it's going to be a bit hard to remember, you might want to define a macro named \citeprimsec in the preamble:

\newcommand{\citeprimsec}[2]{\citep[][cited by \citealp{#2}]{#1}}

and employ it in the body of the document as

Refactoring is "..." \citeprimsec{Fow:1999}{Ker:2005}.

The name of the macro will hopefully make it more or less obvious that the first argument should be the key of the primary reference and that its second argument should be the key of the secondary reference.


Addendum: I just noticed that your comment that you do not use natbib. Well, adding natbib to the list of packages you load in the preamble shouldn't be a big deal. Just be sure to load it with the options square and numbers. You needn't modify any of your existing \cite commands.