[texhax] Uppercase index entries

Michael Barr mbarr at math.mcgill.ca
Thu Mar 3 14:27:22 CET 2005


I am coordinating a project to reprint a book.  A dozen or so people have 
typed a dozen or so pages each and naturally there were some 
inconsistencies, most of which I have regulated.  I am now working on the 
index.  Some of the typists followed the original in having all index 
entries capitalized and some of them didn't.  I decided to try to automate 
the uppercasing and tried the following:

\let\Index\index
\def\index#1{\Index{\Cap{#1}}}
\def\Cap#1{\CAP#1*}
\def\CAP#1#2*{\uppercase{#1}#2}
\index{michael}
\index{Barr}

Despite trying putting \expandafter in various places, the only index 
entries I ever got were

  \item \uppercase {B}arr, 1
  \item \uppercase {m}ichael, 1

Does anyone know how to actually carry this out?

michael Barr



More information about the texhax mailing list