I am writing a paper and would like to emphasize all software names using small caps. To easily manage this, I create a macro to set text to small caps, which works fine most of the time.
\usepackage{xspace}
\newcommand{\tool}[1]{\textsc{#1}\xspace}
% ...
\section{Analysis of \tool{software}} % doesn't work
This is my \tool{software}. % works perfectly
However, since my document type is scrartcl my macro doesn't work in titles and headers. This is most likely the case, because the font used for titles does not have small caps.
Is there a way to create a macro like the one above that works in headers? There are other solutions which completely change the header font to a small caps font, but I would like to keep the 'normal' header font.