Following on from a question yesterday for which a successful answer was provided (`biblatex` and `\includestandalone` is causing unexpected indents in a `tikzpicture` nodes printed bibliography), a minor issue was encountered where the hanging indent was "off" for the references in the tikzpicture
as can be seen in my main document:
I have reduced the code down to a minimal example to reproduce the issue which can be seen here:
I read from the documentation and the answer provided from the linked question by Ulrike that you can set locallabelwidth=true
locally within a \printbibliography[...]
options which I have done for the tikzpicture
bibliography so the indent is correct in my main bibliography for the numeric-comp
style - how can I control the hanging indent within a tikzpicture
node so that it doesn't change the indent of my main bibliography please? I am not sure what needs changing to make the indent set. Not using locallabelwidth=true
doesn't appear to be an option as it broke the indention of the entire tikzpicture
bibliography (from the linked question) but I am not sure how to set the indent properly. My references in the tikzpicture
vary from the double and triple digits so manually setting the double digit values would probably break the triple digit indentation.
\documentclass[oneside]{book}
\usepackage{tikz}
\usepackage[backend=biber,style=numeric-comp]{biblatex}
\addbibresource{biblatex-examples.bib}
\DeclareBibliographyCategory{flowchart}
\newcommand\ccite[1]{\cite{#1}\addtocategory{flowchart}{#1}}
\newcounter{num}
\newcommand{\increase}[1]{\setcounter{num}{#1}\addtocounter{num}{+98}\thenum}
\begin{document}
\begin{figure}[t]
\DeclareFieldFormat{labelnumber}{\increase{#1}}
\begin{tikzpicture}
\node at (2,0) {\ccite{baez/article}, \ccite{bertram}};
\node[align=left,text width=20cm] (refmenu) at (15,2) {\textbf{References}};
\node[align=left,text width=20cm] (refs) at (15,1) {\printbibliography[heading=none,category=flowchart,locallabelwidth=true]};
\end{tikzpicture}
\caption{Test figure}
\end{figure}
\end{document}
defernumbers=true,
, so that could be a workaround, but I'm not sure if that works in your actual document.defernumbers=true
but I prefer the numbering to start at 1 from the first citation, the tikzpicture is an appendix, I can live with the offset indent if needed more pedantic then anything! Thanks for opening an issue :)