<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body>
what about
<pre wrap="">\formal{proper name} returning 'Proper Name'</pre>
i want to capitalize only the first character of all the words.<br>
<br>
raj<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:pavpen@uclink.berkeley.edu">pavpen@uclink.berkeley.edu</a> wrote:<br>
<blockquote type="cite" cite="mid20031126084754.GB14638@smash.it.local">
<pre wrap="">On Wed, Nov 26, 2003 at 10:38:53AM +0800, Raj wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Dear All,
Like
\uppercase{uppercase} returns 'UPPERCASE'
\lowercase{lOwErCaSe} returns 'lowercase'
is there a way to produce "Formal" and "Sentence" cases in TeX/LaTeX.
e.g.
i want something like
\formal{proper name} returning 'Proper Name'
\sentence{this is a sentence} returning 'This is a sentence'
</pre>
</blockquote>
<pre wrap=""><!---->
Sure, you can always have macro that chops the first token as a first
argument, and all other tokens up to a marker (one that will *never*
appear in normal text) as a second argument. Try this:
[-- Begin LaTeX code: ---]
\makeatletter
% Split the first letter from all following ones; terminate at
% "@StrEndMarker@" (without quotes). Example:
% \CapitalfirstParse abcDEF@StrEndMarker@
% #1 is {a},
% #2 is {bcDEF}
\def\CapitalfirstParse#1#2@StrEndMarker@{\uppercase{#1}\lowercase{#2}}
% Add a marker at the end of the string to capitalize, and pass the
% result to the parser:
\newcommand{\Capitalfirst}[1]{\CapitalfirstParse #1@StrEndMarker@}
\makeatletter
[-- End LaTeX code. ---]
May TeXnology take care of us all,
</pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
Your favorite stores, helpful shopping tools and great gift ideas. Experience
the convenience of buying online with Shop@Netscape! <a class="moz-txt-link-freetext" href="http://shopnow.netscape.com/">http://shopnow.netscape.com/</a>
</div>
<br>
</body>
</html>