I'm writing a textboox in latex, and I have things like
\textit{some definition}\index{Some Definition}
all over the place. I'd like to combine them into something like
\define{some definition}
and have it expand automagically. So I can have
\newcommand{\define}[2]{\textit{#1}\index{#2}}
which works, but forces me to include both arguments. The second argument is almost always the first argument with the first letter of each word uppercased. How can I write a command which uppercases the first character of each word?
Suggestions of better indexing best practices would also be appreciated.


{\itshape\@myuppercasewords}\index{#1@\@myuppercasewords}}. I edited also the code above and the output picture. – Dec 31 '10 at 06:50\foo, if you wrote\foo., it would typeset incorrectly asfoo .– Antal Spector-Zabusky Dec 31 '10 at 19:23\myMakeUpperCase{space of functions}would produceSpace of Functions, that is, no effect onof. Is it possible? Thanks. – Sigur Mar 16 '13 at 20:48\myMakeUpperCase{abc}not only produces Abc. It also make it italicised! – Viesturs Oct 12 '18 at 14:33