<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
> I don't understand -- how can the order be wrong if the names are all<br>> the same? :) But if you mean, relative to other ("non-architect")<br>> entries, then the problem is again with non-expanding \name, because<br>> makeindex sorts the string "\name" instead of what this macro stands<br>> for.<br><br>> \makeatletter<br>> <br>> \newtoks\arch@name<br>> \newtoks\arch@loc<br>> <br>> \def\architect#1{%<br>> \arch@name={#1}%<br>> \@getoptionalarg\finisharchitect<br>> }<br>> <br>> \def\finisharchitect{%<br>> \arch@loc=\expandafter{\@optionalarg}%<br>> \ifx\@optionalarg\empty<br>> % No optional argument present.<br>> \expandafter\sidx\expandafter{\the\arch@name}<br>> \else<br>> % One was present.<br>> \edef\temp{architects!\the\arch@name, {\noexpand\it \the\arch@loc}}%<br>> \expandafter\sidx\expandafter{\temp}%<br>> \edef\temp{\the\arch@name, {\noexpand\it architect, \the\arch@loc}}%<br>> \expandafter\sidx\expandafter{\temp}%<br>> \fi<br>> }<br>> <br>> \resetatcatcode<br><br>I've just noticed that there is something not quite right here.<br><br>If you run TeX on<br><br>\architect{Smith, John}<br><br>\architect{Smith}<br><br>the index is correctly typeset as<br><br>Smith, 1<br>Smith, John, 1<br><br>However, if you include the optional argument<br><br>\architect{Smith, John}[London]<br><br>\architect{Smith}[London]<br><br>then the index is incorrectly typeset<br><br>Smith, John, architect, of London, 1<br>Smith, architect, of London<br><br>Any ideas how I can sort this out?<br><br>TIA<br>Adam.<br><br /><hr />Share your photos with Windows Live Photos – Free. <a href='http://clk.atdmt.com/UKM/go/134665338/direct/01/' target='_new'>Try it Now!</a></body>
</html>