My bibliographic database contains pre-set shorthands for some items. However, sometimes I have to use the numeric citation style and the pre-set shorthands end up overriding the numeric labels. Is there a way to avoid this without modifying the bibliographic database?
2 Answers
If one does not want to use a sourcemap
definition, it is possible to nullify the values of the shorthand
(or other fields) using
\DeclareFieldInputHandler
Here the value of the field is read from the .bbl
file (so after it has been generated by biber
)
\DeclareFieldInputHandler{shorthand}{\def\NewValue{}}
If you just want to get rid of the shorthand
to make sure the label is just a normal numeric one, you can go with
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[fieldset=shorthand, null]
}
}
}
This makes sure the shorthand
is ignored by Biber before it comes to label generation.
(An \AtEveryCitekey
approach can not work here.)
MWE
\documentclass{article}
\usepackage{biblatex}
\addbibresource{biblatex-examples.bib}
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[fieldset=shorthand, null]
}
}
}
\begin{document}
\cite{kant:kpv}
\printbibliography
\end{document}
label
or ashorthand
field in the relevant.bib
entries? (A MWE would really help me to come up with an adequate solution quicker.)shorthand
field, not thelabel
field.shorthand
s. Is that fine with you?