I would like to define a command that does this:
\command word1 word2 ... n-word --> Word1 Word2 ... n-Word
with first letter bold and capital.
I wrote this:
\makeatletter % we need to use kernel commands
\newcommand{\boldAcr}{%
\@boldAcrOne
}
\newcommand\@boldAcrOne{
\@ifnextchar\stopbold{\@boldSend}{\@boldAcrTwo}
}
\newcommand\@boldAcrTwo[1]{%
\@boldAcrThree{#1}
\@boldAcrOne % restart the recursion
}
\newcommand\@boldAcrThree[1]{%
\fb{#1}
}
\newcommand\@boldSend[1]{% The argument is \stopbold
}
\makeatother
\newcommand{\fb}[1]{\dofb#1}
\newcommand{\dofb}[1]{\MakeTextUppercase{\textbf{#1}}}
and then in the document
\boldAcr
{hello}{hi}
\stopbold
The result is:
Hello
Hi
but i would like the output to be in the same line. Is there a way to do that?
%(https://tex.stackexchange.com/q/7453/35864). – moewe Jan 30 '19 at 11:13