[texhax] Change Case

Pavel Minev Penev pavpen at uclink.berkeley.edu
Thu Nov 27 07:15:38 CET 2003


On Wed, Nov 26, 2003 at 08:53:28AM -0500, Barbara Beeton wrote:
> raj asks,
> 
>     what about
> 
>     \formal{proper name}        returning       'Proper Name'
> 
>     i want to capitalize only the first character of all the words.
> 
> use the technique already provided, but parse until you
> reach a space, and start again there.
> 
> however, this doesn't take care of
> 
>     John von Neumann
>     Jeanne d'Arc
> 
> those require other kinds of knowledge that (la)tex
> doesn't have, and you'll have to figure out how to
> pass on that knowledge in order to do it right.
> i don't have a solution, just being devil's advocate.

Still, you provide insightful examples.  I just played a bit with LaTeX
and got it to handle correctly the above two, as well as cases like

	Adelson--Velskii

Unfortunately, the rules seem ambiguous for parts like "Mac" in

	Colin Maclaurin
	Old MacDonald

and are not handled.  (You should be able to extend my writings to
handle this case to your taste).  I, also, switched to LaTeX's
\MakeLowercase and \MakeUppercase, since they are more robust.  I am
attaching my scratch (making no promises as to how will it work).
Apologies to people with slow connections.

Gee, companies should sell LaTeX for Playstation,
-- 
Pav
                             ,.,
                           ,``:'',
Gain your human right of   {o ! o}  My GPG/PGP key is now available at
privacy: use cryptography! ] -+- [  x-hkp://search.keyserver.net:11371.
                            \ ! /
                             `-'
`shell$ gpg --keyserver x-hkp://search.keyserver.net:11371 --recv-key 164C028F`

http://www.againsttcpa.com/index.shtml
-------------- next part --------------
A non-text attachment was scrubbed...
Name: names.ltx
Type: text/x-tex
Size: 13110 bytes
Desc: not available
Url : http://tug.org/pipermail/texhax/attachments/20031126/46cd8a0c/names.bin


More information about the texhax mailing list