# How to avoid superfluous punctuation for shorthand in bibliography?

I would like to have the shorthand printed in the bibliography in square brackets before the bibliography item. I adapted this answer by lockstep which works with one problem: if there is no author, there is a superfluous dot. This comes obviously from the \labelnamepunct which is set by the \setunit command of the bibliography drivers. Is there an easy way to avoid the output of the \labelnamepunct?

Here is an example that illustrates the problem (KpV is correct, CTAN has the superfluous punctuation):

\listfiles
\documentclass[ngerman]{scrartcl}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@InBook{kant:kpv,
shorthand   = {KpV},
hyphenation     = {german},
author      = {Kant, Immanuel},
bookauthor      = {Kant, Immanuel},
title       = {Kritik der praktischen Vernunft},
shorttitle      = {Kritik der praktischen Vernunft},
booktitle   = {Kritik der praktischen Vernunft. Kritik der Urtheilskraft},
maintitle   = {Kants Werke. Akademie Textausgabe},
volume      = {5},
publisher   = {Walter de Gruyter},
location    = {Berlin},
date        = {1968},
pages       = {1--163}
}
@Online{ctan,
shorthand       = {CTAN},
hyphenation     = {american},
title       = {CTAN},
subtitle    = {The Comprehensive TeX Archive Network},
date        = {2006},
url         = {http://www.ctan.org},
urldate     = {2006-10-01}
}
\end{filecontents}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel,csquotes}

\usepackage[
style=authortitle,
backend=biber
]{biblatex}

\renewbibmacro*{begentry}{%
\iffieldundef{shorthand}
{}
{\printtext[brackets]{\usebibmacro{cite}}%

\begin{document}
\nocite{*}

\printbibliography
\end{document}


And here is what I get:

-

Add \nopunct to the redefinition of the begentry bibmacro. This way, the next punctuation command will print nothing.

\renewbibmacro*{begentry}{%
\iffieldundef{shorthand}
{}
{\printtext[brackets]{\usebibmacro{cite}}%

Wow, this was easy! How come that I did not know \nopunct yet …? Shame on me. –  domwass Jun 12 '12 at 14:16