I have used the approach in this question: Add Text/Comment into bibliography in order to print shorthands before my bibitems (that have them).
I want them on the same line, so I modified the code to use a spacing command \quad after each shorthand instead of a new \item:
\\AtEveryBibitem{\printfield{shorthand}\clearfield{shorthand}\quad}
But I would like to suppress the space that \quad generates before bibitems that do not have any shorthand to print.
Maybe there is a spacing command that will be suppressed if nothing is printed before it?
MWE:
\documentclass{book}
\usepackage[bibstyle=authoryear, backend=bibtex8]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{Vismann2017Lagen-och-arkiv,
Author = {Cornelia Vismann},
Publisher = {Gl{\"a}nta produktion},
Shorttitle = {Lagen och arkivet},
Title = {Lagen och arkivet : Akternas mediehistoria},
Year = {2017},
}
@book{sou2018:25,
Address = {Stockholm},
Author = {Digitaliseringsr{\"a}ttsutredningen},
Keywords = {sou},
Publisher = {Norstedts juridik},
Shorthand = {SOU 2018:25},
Title = {Juridik som st{\"o}d f{\"o}r f{\"o}rvaltningens digitalisering},
Year = {2018},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\AtEveryBibitem{\printfield{shorthand}\clearfield{shorthand}\quad}
\begin{document}
\nocite{Vismann2017Lagen-och-arkiv,sou2018:25}
\printbibliography[keyword=sou,title={Utredningsbet{\"a}nkanden}]
\nopagebreak
\printbibliography[notkeyword=sou]
\end{document}

