6

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?

6
  • Do you happen to use Biber?
    – moewe
    Commented May 13, 2015 at 15:21
  • Yes, I am using Biber.
    – Zhen Lin
    Commented May 13, 2015 at 15:28
  • I'll be back with a solution shortly. But just to be sure I understood you correctly, do you have a label or a shorthand field in the relevant .bib entries? (A MWE would really help me to come up with an adequate solution quicker.)
    – moewe
    Commented May 13, 2015 at 15:33
  • I am using the shorthand field, not the label field.
    – Zhen Lin
    Commented May 13, 2015 at 16:01
  • OK, I can get rid off all shorthands. Is that fine with you?
    – moewe
    Commented May 13, 2015 at 16:10

2 Answers 2

3

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{}}
1
  • This seems like the more flexible approach. Thanks!
    – Zhen Lin
    Commented May 14, 2015 at 8:54
8

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}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .