Capitalization of index entries

Herbert Voss Herbert.Voss at fu-berlin.de
Fri Mar 20 08:04:17 CET 2020



Am 19.03.20 um 19:46 schrieb Djones9976:
> Sorry, but I am not as far out of the woods as I thought.   The code 
> you sent works well; it converts the first letter of all the lower 
> case indexed words to upper case but the problem now is that it 
> indexes all the words converted to capitals and adds that list to the 
> original list of words that were already capitalized.   How can I get 
> it to combine all the indices into one list.
>
> For example what I had was an alphabetical list with some words 
> capitalized and some lower case:
>
> charles, 79
> Friction, 82
> Henry, 84
> Newton, 75
> pulley, 78
> windlass, 82
>
>
> Now what I get with the code you sent me is two alphabetical lists one 
> with the originally capitalized words and one with the the lower case 
> words that have now been capitalized,
>
>
> Friction, 82
> Henry, 84
> Newton, 75
> Charles, 79
> Pulley, 78
> Windlass, 82
>
> So the question I have been so far unable to solve is how to mesh the 
> two lists together.
>
>
> \documentclass{article}
> \usepackage{makeidx}\makeindex
> \let\myIndex\index
> \makeatletter
> \renewcommand\index[1]{\index at i <mailto:index at i>#1\@nil}
> \def\index at i <mailto:index at i>#1#2\@nil{\myIndex{\MakeUppercase{#1}#2}}


define it this way:

\def\index at i#1#2\@nil{\myIndex{#1#2@\MakeUppercase{#1}#2}}

Herbert



More information about the texhax mailing list.