# Change the way shorthands are used in the biblatex verbose style

I'm using biblatex with the verbose style. I'd like to change the way that it uses shorthands. At the moment, for all first entries it gives the full citation followed by (henceforth cited as [shorthand]). I want to change this in two ways:

(1) I want, in the first entry, the shorthand to appear in square brackets immediately after the long title. I also want the shorthand to reflect the style of the original entry: i.e. if it is an article it would be enclosed in quotes ('Line & Cave') and if it is a book it would be in italics (Ethics). So at the moment the working example I give below produces:

John Malcolm. ‘The Line and the Cave’. In: Phronesis 7 (1962), pp. 38-45 (henceforth cited as Line & Cave)

Terence Irwin. Plato's Ethics. Oxford: Oxford University Press, 1995 (henceforth cited as Ethics)

What I want to achieve would look like this:

John Malcolm. ‘The Line and the Cave’ [‘Line & Cave’]. In: Phronesis 7 (1962), pp. 38-45

Terence Irwin. Plato's Ethics [Ethics]. Oxford: Oxford University Press, 1995

(2) I want the shorthand to be introduced only if there exists a second citation that uses the shorthand. That is, if a work is cited only once in the text, then no shorthand is introduced.

\documentclass{article}

\begin{filecontents}{\jobname.bib}
@ARTICLE{Malcolm1962,
author = {John Malcolm},
title = {The Line and the Cave},
year = {1962},
volume = {7},
pages = {38-45},
shorthand = {Line \& Cave},
journal = {Phronesis}
}
@BOOK{Irwin1995,
author = {Terence Irwin},
title = {Plato's Ethics},
year = {1995},
publisher = {Oxford University Press},
shorthand= {Ethics}
}

\end{filecontents}
\usepackage[british]{babel}
\usepackage{csquotes}
\usepackage[style=verbose, backend=biber]{biblatex}

\begin{document}
\cite{Malcolm1962}

\cite{Irwin1995}

\cite{Irwin1995}
\end{document}

-

The following must be done:

• Enable the citecounter feature;

• Remove the shorthandintro bibmacro from cite:full;

• Define a new bibmacro (say, shorthand:ifcitation:ifmultiplecited) that will print the shorthand field if we're outside the bibliography and the current entry was cited multiple times;

• Add the new bibmacro to the (type-dependend) format of the title field;

• Redefine the format of the shorthand field, modelled on the original definition of the title field.

\documentclass{article}

\usepackage[style=verbose,citecounter=true]{biblatex}

\renewbibmacro*{cite:full}{%
\usebibmacro{cite:full:citepages}%
\printtext[bibhypertarget]{%
\usedriver
{\DeclareNameAlias{sortname}{default}}
{\thefield{entrytype}}}%
%  \usebibmacro{shorthandintro}}% DELETED
}% NEW

\newbibmacro{shorthand:ifcitation:ifmultiplecited}{%
\ifbibliography{%
}{%
\ifnumgreater{\value{citecounter}}{1}{%
\iffieldundef{shorthand}{%
}{%
\nopunct\printtext[brackets]{\printfield{shorthand}}%
}%
}{%
}%
}%
}

\DeclareFieldFormat{title}{%
\mkbibemph{#1}%
\usebibmacro{shorthand:ifcitation:ifmultiplecited}%
}
\DeclareFieldFormat
[article,inbook,incollection,inproceedings,patent,thesis,unpublished]
{title}{%
\mkbibquote{#1\isdot}%
\usebibmacro{shorthand:ifcitation:ifmultiplecited}%
}
\DeclareFieldFormat
[suppbook,suppcollection,suppperiodical]
{title}{%
#1%
\usebibmacro{shorthand:ifcitation:ifmultiplecited}%
}

\DeclareFieldFormat{shorthand}{\mkbibemph{#1}}
\DeclareFieldFormat
[article,inbook,incollection,inproceedings,patent,thesis,unpublished]
{shorthand}{\mkbibquote{#1\isdot}}
\DeclareFieldFormat
[suppbook,suppcollection,suppperiodical]
{shorthand}{#1}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@ARTICLE{Malcolm1962,
author = {John Malcolm},
title = {The Line and the Cave},
year = {1962},
volume = {7},
pages = {38-45},
shorthand = {Line \& Cave},
journal = {Phronesis},
}
@BOOK{Irwin1995,
author = {Terence Irwin},
title = {Plato's Ethics},
year = {1995},
publisher = {Oxford University Press},
shorthand= {Ethics},
}
\end{filecontents}

\begin{document}

\null\vfill% just for the example

\cite{Malcolm1962}

\cite{Irwin1995}

\cite{Irwin1995}

\printbibliography

\end{document}


-
Thanks! This works beautifully. – D.S. Sep 23 '12 at 16:37
Ah, noticed one small irregularity. I have a couple of entries with shorthand fields that haven't been filled yet. In this case, verbose defaults to the author-title (or, if present, shorttitle) for subsequent citations. But with the above the original citation still has square brackets after the title (but empty, [], since there's no shorthand). – D.S. Sep 23 '12 at 16:47
@D.S. Answer updated. – lockstep Sep 23 '12 at 16:55