In my header I would like to specify a different font for the title like I did for the section and subsection headings, however when I try adding a title font I get the error
LaTeX3 Error: Command '\titlefont' already defined!
However, i'm not sure where the titlefont is already defined. I tried running it without the sansfont specification since I thought that it applied to all titles and headings, but I still got the same error.
format:
pdf:
mainfont: Calibri
mainfontoptions:
- Color=154a39
sansfont: Overpass-Light
include-in-header:
text: |
\newfontfamily\sectionfont[Color=ff7832]{Overpass-ExtraBold}
\newfontfamily\subsectionfont[Color=ff7832]{Overpass-ExtraBold}
\newfontfamily\titlefont[Color=154a39]{Overpass-Light}
\addtokomafont{section}{\sectionfont}
\addtokomafont{subsection}{\subsectionfont}
\addtokomafont{title}{\titlefont}