I have ben using the \xcapitalisefmtwords from the mfirstuc package (mentioned in the questions in the References section). However, that fails if the content contain any math content.
Is there any easy way to disable the parsing of any math?
References:
Code:
\documentclass{article}
\usepackage{amsfonts}
\usepackage{mfirstuc}
\newcommand{\TitleCase}[1]{\xcapitalisefmtwords{#1}}%
\begin{document}
\TitleCase{hello world}
%\MFUnocap{$\mathbb{C}$}%
\TitleCase{hello $\mathbb{C}$ world}% <-- How do I get this to work
Desired Output: Hello $\mathbb{C}$ World
\end{document}


\TitleCase{hello\ \ensuremath{\mathbb{C}} world}works for me. – Jul 22 '19 at 20:16\ensuremathsince someone very knowledgable on this site scolded :-) me for it many years ago!! – Peter Grill Jul 22 '19 at 20:20ensuremathcommand? – Jul 22 '19 at 20:24