I have been given a template that applies the same formatting command to all sections. I now added a bibliography and want the title of it to be formatted the same way. What is the simplest way to achieve this?
\documentclass{scrartcl}
\usepackage{xcolor,biblatex}
\addbibresource{\jobname.bib}
\begin{filecontents}{\jobname.bib}
@article{Test,
author = {Test, A},
title = {What a test}
}
\end{filecontents}
\newcommand{\headingformatting}[1]{\noindent\fcolorbox{black}{orange}{%
\begin{minipage}{\dimexpr\textwidth-2\fboxrule-2\fboxsep\relax}
#1
\end{minipage}}}
\begin{document}
\headingformatting{\section{Test}}
Here I am citing \cite{Test}
\printbibliography
\end{document}
Please ignore the fact, that my \headingformatting
is typographically not appeasing. I just wanted to show how the document looks from a technical point of view.
\section
is typeset as desired without having to invoke\headingformatting
for each\section
manually.