# Biblatex: How to tweak \volcite to remove comma and “vol.” if cited work has a shorthand

I am using biblatex with the authoryear-ibid style for inline citation, so somewhat close to the Harvard citation style. I could alternatively use the philosophy-classic or -modern style for the same goal (though I don't know whether they also do ibid, which I'd like)

The problem: I have a mvbook with a shorthand that I'd like to quote. When quoting that, I want the output to omit the comma and the "vol.", so it should look like this:

EXP 3, p. 5

Meanwhile, without tweaking, the output looks like this:

EXP, vol. 3, p.5

MWE:

\documentclass{article}

\usepackage[style=authoryear-ibid]{biblatex}

\begin{filecontents*}{example.bib}
@mvbook{exampl,
date = {2000},
author = {Examplus, Iannus},
title = {Lorem Ipsum},
shorthand = {EXP}
}
\end{filecontents*}
\addbibresource{example.bib}

\begin{document}
\volcite{2}[5]{exampl}
\end{document}

The related questions on here are unfortunately using biblatex-chicago and their solutions seem to include some stuff that the styles I'd use don't provide and I haven't been able to find out how to adapt those to my case.

## 1 Answer

Try this, taken mostly from https://github.com/plk/biblatex/issues/868.

Much of the code won't be needed once biblatex 3.13 is released. But is still required for biblatex 3.12.

# MWE

\documentclass{article}

\usepackage[style=authoryear-ibid]{biblatex}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@mvbook{exampl,
date = {2000},
author = {Examplus, Iannus},
title = {Lorem Ipsum},
shorthand = {EXP}
}
@mvbook{test,
date = {2019},
author = {Author, An},
title = {Some Title}
}
\end{filecontents}
\addbibresource{\jobname.bib}

% Work arounds not needed from biblatex 3.13
\makeatletter
\newtoggle{blx@volcite}
\protected\def\ifvolcite{%
\iftoggle{blx@volcite}}
\DeclareDelimFormat{postnotedelim}{\addcomma\space}
\renewbibmacro*{postnote}{%
\iffieldundef{postnote}
{}
{\setunit{\printdelim{postnotedelim}}%
\printfield{postnote}}}
\renewrobustcmd*{\volcitecmd}{%
\AtNextCite{%
\DeclareFieldAlias{postnote}{volcitenote}%
\toggletrue{blx@volcite}}%
\begingroup\let\blx@citeargs\blx@volciteargs}
\long\def\blx@volciteargs@i#1[#2]#3{%
\def\abx@field@volcitevolume{#3}%
\undef\abx@field@volcitepages
\eappto\blx@tempe{%
\def\noexpand\abx@field@volcitevolume{#3}%
\undef\noexpand\abx@field@volcitepages}%
\@ifnextchar[%]
{\blx@volciteargs@ii{#1}{#2}{#3}}
{\blx@citeargs@iii{#1{#2}{{#3}{}}}}}
\long\def\blx@volciteargs@ii#1#2#3[#4]{%
\def\abx@field@volcitepages{#4}%
\eappto\blx@tempe{\def\noexpand\abx@field@volcitepages{#4}}%
\blx@citeargs@iii{#1{#2}{{#3}{#4}}}}
\renewrobustcmd*{\multivolcitecmd}{%
\AtNextCite{%
\DeclareFieldAlias{postnote}{volcitenote}%
\toggletrue{blx@volcite}}%
\def\blx@hook@mcite@before{%
\global\undef\blx@hook@mcite@before
\let\blx@citeargs\blx@volmciteargs}}
\makeatother

% user level changes

\DeclareDelimFormat[shorthandvolcite]{postnotedelim}{\addspace}
\DeclareFieldFormat{volcitevolume}{%
\iffieldundef{shorthand}
{\bibstring{volume}\ppspace#1}
{#1}}
\renewbibmacro*{cite:shorthand}{%
\ifvolcite
{\delimcontext{shorthandvolcite}}
{}%
\printtext[bibhyperlink]{\printfield{shorthand}}}

\begin{document}
\volcite{2}[5]{exampl}

\volcite{2}{exampl}

\cite[5]{exampl}

\volcite{2}[5]{test}

\volcite{2}{test}

\cite[5]{test}

\volcites{2}[5]{exampl}{2}[5]{test}

\volcites{2}{exampl}{2}{test}

\cites[5]{exampl}[5]{test}
\end{document}

• Thank you a lot, this has done the trick for me! – Ecila Aug 9 at 12:45