I'm trying to combine Uppercase, italics and hyperlinks in toc of scrartcl without using tocstyle and Uppercase chapter with KOMA-script:
\renewcommand\addsectiontocentry[2]{%
\addtocentrydefault{section}{#1}{\texorpdfstring{\MakeUppercase{#2}}{#2}}%
}
\renewcommand\addsubsectiontocentry[2]{%
\addtocentrydefault{subsection}{#1}{\texorpdfstring{\MakeUppercase{#2}}{#2}}%
}
\renewcommand\addsubsubsectiontocentry[2]{%
\addtocentrydefault{subsubsection}{#1}{\texorpdfstring{\MakeUppercase{#2}}{#2}}%
}
\makeatletter
\renewcommand\sectionlinesformat[4]{%
@hangfrom{\hskip#2#3}{\MakeUppercase{#4}}%
}
\makeatother
However, the TOC links do not lead anywhere. Any ideas how to fix this?
I tried to replace
\addtocentrydefault{section}{#1}{\texorpdfstring{\MakeUppercase{#2}}{#2}}%
with
\addtocentrydefault{section}{#1}{\texorpdfstring{\MakeUppercase{#2}}{\MakeUppercase{#2}}}%
but I get the \MakeUppercase ...ppercaseUnsupportedInPdfStrings error. The document is produced with pandoc, so I can only add some latex snippets.
I'm completely new to LaTeX, so I would really appreciate not only a solution, but also any hints on how to debug such problems myself.
UPD: below is a minimal reproducible example:
% Run "xelatex example.tex" (twice) to compile to pdf
\documentclass{scrartcl}
\usepackage{blindtext}% only for dummy text
\setcounter{tocdepth}{\subsubsectiontocdepth}
\renewcommand\addsectiontocentry[2]{%
\addtocentrydefault{section}{#1}{\texorpdfstring{\MakeUppercase{#2}}{#2}}%
}
\renewcommand\addsubsectiontocentry[2]{%
\addtocentrydefault{subsection}{#1}{\texorpdfstring{\MakeUppercase{#2}}{#2}}%
}
\renewcommand\addsubsubsectiontocentry[2]{%
\addtocentrydefault{subsubsection}{#1}{\texorpdfstring{\MakeUppercase{#2}}{#2}}%
}
\makeatletter
\renewcommand\sectionlinesformat[4]{%
@hangfrom{\hskip #2#3}{\MakeUppercase{#4}}%
}
\makeatother
\renewcommand{\sectioncatchphraseformat}[4]{%
\hskip #2#3\MakeUppercase{#4}%
}
\usepackage{hyperref}
% This command breaks TOC hyperlinks
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
\begin{document}
\tableofcontents
\blinddocument
\blinddocument
\end{document}


\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
So I guess there is some conflict between MakeUppercase and this line. Any ideas how to fix that?
– Max Arnold Sep 07 '20 at 14:07sudo tlmgr update --selfand thensudo tlmgr update koma-script. I would have never figured that out myself... You rock! – Max Arnold Sep 09 '20 at 14:22