# Specify left-hand margins for different bibliography segments - Biblatex

In my document, I am printing varies subbibliographies using biblatex. Since I cite some norms and would like to use their full number for a shorthand, I get really wide margins on the left side.

Is there a possibility to specify these margins to either

• be set to the maximum width of citation shorthands in this subbibliography

• be set to a manually chosen value.

One of this options would suffice.

My MWE looks as follows:

\documentclass{article}
\usepackage[style=alphabetic,   % Zitierstil
maxbibnames=6,          % Anzahl an AUtoren, die in Bibliographie gezeigt werden
minbibnames=2,
sorting=anyt,
backend=biber]{biblatex}

\begin{document}
\nocite{*}

\end{document}


With the following in the file test.bib:

@book{adams,
title =    {The hitchhikers guide to the universe},
publisher =    {Publisher},
year =     {2042}
}

@online{myboringexamplewebpage,
title = {My boring example webpage},
url = {http://www.example.com},
author = {{Myself}},
urldate = {2015-02-04},
shorthand = {myexamplewebpagefrom2015}
}


Here the online resource works as an example for the norms with long shorthands. So I would like the space between shorthand and reference in the first subbibliography to be smaller, according to the actual width of the shown shorthand.

• Quick and dirty and relatively ad hoc: \begingroup \settowidth\labelalphawidth{[Ada42]} \printbibliography[type=book,heading=subbibliography,title=Books] \endgroup. – jon Feb 8 '15 at 19:06
• @jon wow, thanks, that works nicely! In this case I prefer quick and dirty over laborious and clean. Feel free to post it as an answer – Paul Paulsen Feb 8 '15 at 19:36
• Glad it suits your needs! – jon Feb 8 '15 at 20:33

The locallabelwdith option can help here. See Reset spacing between label and entry in different bibliographies.

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
title     = {The hitchhikers guide to the universe},
publisher = {Publisher},
year      = {2042}
}

@online{myboringexamplewebpage,
title     = {My boring example webpage},
url       = {http://www.example.com},
author    = {{Myself}},
urldate   = {2015-02-04},
shorthand = {myexamplewebpagefrom2015}
}
\end{filecontents*}

\usepackage[style=alphabetic,
maxbibnames=6,
minbibnames=2,
sorting=anyt,
locallabelwidth,
backend=biber]{biblatex}

\begin{document}
\nocite{*}

\end{document}


Here's the "manually chosen value" approach:

Set the relevant 'labelwidth' inside a group. If you know the 'exact' width you want -- e.g., the width of the string [Ada42] -- you can use the command \settowidth; otherwise a \setlength could be used.

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
title =    {The hitchhikers guide to the universe},
publisher =    {Publisher},
year =     {2042}
}

@online{myboringexamplewebpage,
title = {My boring example webpage},
url = {http://www.example.com},
author = {{Myself}},
urldate = {2015-02-04},
shorthand = {myexamplewebpagefrom2015}
}
\end{filecontents*}

\usepackage[style=alphabetic,   % Zitierstil
maxbibnames=6,          % Anzahl an AUtoren, die in Bibliographie gezeigt werden
minbibnames=2,
sorting=anyt,
backend=biber]{biblatex}

\begin{document}
\nocite{*}