# Citation appears within pipes not brackets

When citing within the text, the citation appears within lines like so: |1| instead of within brackets like so: [1]. Within the bibliography, the citations appear correct. I have a hunch that there is a problem with the display, making the citations look like it's between lines because the serifs aren't displaying properly, but I can't figure out the problem.

Here is the preamble:

\documentclass[12pt,a4paper,bibtotoc]{scrreprt}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{csquotes}
\usepackage{blindtext}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{textcomp}
\usepackage{gensymb}
\usepackage{graphicx}
\usepackage{float}
\usepackage{siunitx}
\usepackage[onehalfspacing]{setspace} %1,5-facher Zeilenabstand
\usepackage{colortbl}
\usepackage{xcolor}
\restylefloat{table}
\graphicspath{{Bilder/}}
\usepackage[backend=biber,style=numeric]{biblatex}
\newcommand{\chapterref}[1]{Kapitel~\ref{#1}}
\newcommand{\sectionref}[1]{Abschnitt~\ref{#1}}
\newcommand{\subsectionref}[1]{Unterabschnitt~\ref{#1}}
\newcommand{\equationref}[1]{Gl.~(\ref{#1})}
\newcommand{\figureref}[1]{Figur~\ref{#1}}
\newcommand{\tableref}[1]{Tabelle~\ref{#1}}
\def\SymbReg{\textsuperscript{\textregistered}}

\usepackage[breaklinks,pdfpagelabels,pdfstartview = FitH,bookmarksopen = true,bookmarksnumbered = true, colorlinks = false, urlbordercolor = {white}, linkbordercolor = {white}, citebordercolor = {white}, plainpages = false, hypertexnames = false, citecolor = black] {hyperref}

\automark{chapter}
\cfoot[]{}


And here are pictures of what I mean: The citation within the text: The citation within the bibliography, how I also would prefer them within the text, with square brackets:

• Welcome to TeX.SE.
– Mico
Dec 4 '20 at 23:40

The same effect can be reproduced in the following smaller document.

\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{csquotes}

\usepackage[backend=biber,style=numeric]{biblatex}

\usepackage{xcolor}

\usepackage[
urlbordercolor = {white},
citebordercolor = {white},
citecolor = black
]{hyperref}

\begin{document}
Lorem \autocite{sigfridsson}

\printbibliography
\end{document}


The problem is your hyperref setup, which adds a white border around clickable links. Since the citation is a link, you get a white borer around the number, which overlaps the surrounding square brackets (on screen).

The effect is visible more clearly if you just load hyperref as

\usepackage{hyperref}


where you get a green link border overlapping the square bracket

If you do not want to visually distinguish clickable links from other bits of the text, you may want to use the hidelinks option

\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{csquotes}

\usepackage[backend=biber,style=numeric]{biblatex}

\usepackage[
]{hyperref}

\begin{document}
Lorem \autocite{sigfridsson}

\printbibliography
\end{document}


In your larger document, you could replace

\usepackage[breaklinks,pdfpagelabels,pdfstartview = FitH,bookmarksopen = true,bookmarksnumbered = true, colorlinks = false, urlbordercolor = {white}, linkbordercolor = {white}, citebordercolor = {white}, plainpages = false, hypertexnames = false, citecolor = black] {hyperref}


with

\usepackage[
pdfstartview = FitH,
bookmarksopen = true, bookmarksnumbered = true,
hypertexnames = false,
]{hyperref}


(where we replaced the white borders with the hidelinks option and dropped options that are the default to make things slightly easier to digest).