I am trying to use the KOMA-Script command \newcaptionname
which takes a macro name as its second argument, but I need spaces in it:
\documentclass{scrartcl}
\newcaptionname{english}{\namewithoutspaces}{With spaces.}
\newcaptionname{english}{\csname name with spaces\endcsname}{Without Spaces} % fails
\usepackage[english]{babel}
\begin{document}
\namewithoutspaces
\csname name with spaces\endcsname
\end{document}
\namewith
is properly defined, but obviously, the definition of \csname name with spaces\endcsname
fails. I know that this has something to do with expansion, but I think I still do not fully understand this concept (together with all related commands like \expandafter
, \noexpand
, \edef
, ...).
How do I have to modify
\newcaptionname{english}{\csname name with spaces\endcsname}{Without Spaces}
to make it work?
\csname
usage you show does that, but it is hard to see why you need that here?\newcaptionname
come from a list of predefined keywords which in my case contain spaces.