I'm working in LaTeX. Suppose that I have a macro defined by
\newcommand{\FOO}{\textsc{foo}}
How do I define macro, call it \upcase, such that
word --> word % nothing special here
\FOO --> \textsc{foo} % nothing special here
\upcase word --> Word % capital 'W'
\upcase \FOO --> \textsc{Foo} % capital 'F'
Thanks,
Brian
Hi Brian,
Please check my below methodology. It may helpful for you.
\documentclass{article}
\makeatletter
\def\upcase{\expandafter\makeupcase}
\def\makeupcase#1{\uppercase{#1}}
\newcommand{\FOO}{\textsc{\upcase foo}}
\makeatother
\begin{document}
\upcase word
\FOO
\end{document}
Kumaresh PS
You could try \makefirstuc in mfirstuc package. For example,
\makefirstuc{foo} will produce Foo and \makefirstuc{\textsc{foo}} will
produce \textsc{Foo}.
Regards
Nicola Talbot
--
Home: http://theoval.cmp.uea.ac.uk/~nlct/
LaTeX Related Information: http://theoval.cmp.uea.ac.uk/~nlct/latex/
Creating a LaTeX Minimal Example:
http://theoval.cmp.uea.ac.uk/~nlct/latex/minexample/