Issue: My Latex files are pretty big already, but lately I added the scalerel
package and since then get the error message
! Undefined control sequence.\calc@initB ->\calc@B\calc@A \addtocontents{toc}{\setcounter{tocdepth}{3}}
However the interesting thing is, once I remove the package I still run into errors, I need to reload my .tex file to make it work again.
I finally figured out that the package in combination with \addtocontents{toc}{\setcounter{tocdepth}{3}}
causes the error.
Question: Is there any incompatibility of the package scalerel with certain settings or other packages known? Or is there any altnerative to get my subspricts that small?
MWE:
\documentclass[a4paper,
12pt,
bibliography=totoc,
index=totoc,
parskip=false
]{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[style=authoryear]{biblatex}
\addbibresource{Literatur_Citavi.bib}
\usepackage{scalerel} % scale math even smaller
\begin{document}
\addtocontents{toc}{\setcounter{tocdepth}{3}} % here comes the trouble
$\varphi_{\scaleto{sig}{3pt}}$
\nocite{Kister.2019, Blankertz.2019}
\printbibliography
\end{document}
\protect\setcounter
probably works, but it seems a very strange construct)\DeclareMathSizes
to declare the font sizes to use for subscripts at each main font size.