I was wondering if you would possibly have any input on how to manipulate the following MWE in a way that the Author-year Tag to the left of the bibliography entry in the following example is reduced to footnotesize or script size to prevent line-breaks. (I am using biblatex/Biber and XeTeX)
AUTHOR YEAR [space] SURNAME, Given Name (2017). A title. Place: Publisher.
Somebody had written a great code in a forum which I have applied here, it has all other features but the script-size.
MWE:
\documentclass[12pt,a4paper]{report}
\AtBeginDocument{\addbibresource{C://thesisbibfile/thesis.bib}}
\usepackage[
backend=biber,
autolang=hyphen, %which parameters are important when changing languages according to entry language id in the database
citestyle=authoryear, %style when citing,
bibstyle=authoryear-icomp, %style in the bibliography
language=auto,
%hyperref,
autocite=inline %plain %inline / footnote
url=true,
dashed=false,
doi=true,
sortlocale=auto,
]{biblatex}%this style compresses the numbering
\makeatletter
\setlength{\bibitemsep}{0.5\baselineskip plus 0.5\baselineskip}
\newsavebox\ay@labelbox
\newlength{\labwidthsameline}
\setlength{\labwidthsameline}{2em} % the {xem} defines the length of the label: best is either 2 or 9 em
\newbibmacro{labelwidthbib}{%
\begingroup
\DeclareFieldFormat{bibhyperref}{##1}%
\csuse{blx@hook@cite}%
\csuse{blx@hook@citekey}%
\citetrackerfalse\pagetrackerfalse\backtrackerfalse
\defcounter{maxnames}{\blx@maxcitenames}%
\usebibmacro{cite}%
\endgroup
}
%-----------------------
\newbibmacro{kicklabel}{%
\sbox\ay@labelbox{\usebibmacro{labelwidthbib}}%
\global\togglefalse{blx@insert}%
\ifdim\wd\ay@labelbox>\labwidthsameline
\leavevmode\newline
\fi
}
\defbibenvironment{bibliography}%
{\list
{\usebibmacro{labelwidthbib}}%
{\setlength{\labelwidth}{\labwidthsameline}%
\setlength{\leftmargin}{\labelwidth}%
\setlength{\labelsep}{\biblabelsep}%
\addtolength{\leftmargin}{\labelsep}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}%
\renewcommand*{\makelabel}[1]{##1\hss}}}%
{\endlist}%
{\item\usebibmacro{kicklabel}}
\makeatother
\begin{document}
\cite{Robertson1989}
\printbibliography
\end{document}
