I need section titles to be uppercase. I've done this with sectsty, but have recently discovered an issue that it causes. In the table of contents, clicking on "References" does not bring me to the section, and there's the following warning:
pdfTeX warning (dest): name{section*.2} has been referenced but does not exist, replaced by a fixed one
For the LoF I can use \phantomsection and \addcontentsline, but when the bibliography is empty \printbibliography doesn't output a section, which would break this method (unless there's way of detecting if a \printbibliography command outputs nothing).
MWE:
\documentclass[12pt]{article}
\usepackage{float}
\usepackage{csquotes}
\usepackage{biblatex}
\usepackage[nottoc]{tocbibind}
\usepackage{hyperref}
\usepackage{sectsty}
\allsectionsfont{\fontsize{12pt}{12pt}\selectfont}
\sectionfont{\fontsize{12pt}{12pt}\selectfont\scshape\MakeUppercase} % Removing this fixes the problem
\begin{filecontents}[overwrite]{\jobname.bib}
@book{2people,
author = {John Smith1 and Alex Smith2},
title = {Some Other Thing},
date = {1971}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\tableofcontents
\clearpage\section{First}
\begin{figure}[H]\caption{Caption \parencite{2people}}\end{figure}
\clearpage\printbibliography[heading=bibintoc]
\clearpage\listoffigures
%\cleardoublepage % Using these instead of tocbibind fixes the LoF link in the ToC
%\phantomsection\addcontentsline{toc}{section}{\listfigurename}
%\listoffigures
\end{document}