2 %>Synopsis: wrong output using a new command for index
\r
5 %BEFORE THE UPDATE FROM 12/96 A HAVE NO PROBLEM WITH THIS COMMAND!!!!!
\r
7 %I define a extended index command in a similar way like in the
\r
8 %example of pag. 471-472 of the book LaTeX Companion( using the command
\r
10 %This new command has 3 parameters with the purpouse
\r
11 %to cover all type of index citing in my document, but
\r
12 %LaTeX gives me wrong output in my document(it does not
\r
13 %put the spanish accent). The index part and O.K.
\r
18 \documentclass{article}
\r
21 \FORMAT{LaTeX2e<1996/12/01>}
\r
23 \PACKAGE[spanish,activeacute]{babel}
\r
24 \PACKAGE{ifthen,makeidx}
\r
27 \usepackage[spanish,activeacute]{babel}
\r
28 \usepackage{ifthen,makeidx}
\r
29 \newcommand{\myindex}[1]{\textsf{#1}\index{#1}} %With this command I have no
\r
31 % A general definition of the index command
\r
32 \newcommand{\idxsf}[3][d]{%
\r
33 \ifthenelse{\equal{#1}{}}{\index{#2!#3}}{%
\r
34 \ifthenelse{\equal{#1}{d}}{\textsf{#3}\index{#2!\textsf{#3}}}{%
\r
35 \ifthenelse{\equal{#1}{em}}{\emph{\textsf{#3}}%
\r
36 \index{#2!\textsf{#3}|textbf}}{%
\r
37 \ifthenelse{\equal{#1}{bf}}{\textsf{#3}%
\r
38 \index{#2!\textsf{#3}|textbf}}{%
\r
39 \ifthenelse{\equal{#1}{nn}}{\textsf{#3}\index{#2!\textsf{#3}|nn}}%
\r
40 {ERROR\index{#2!\textsf{ERROR}}}}}}}}
\r
45 \idxsf{m'etodo}{heur'isticod},
\r
46 \idxsf[d]{m'etodo}{heur'isticod},
\r
47 \idxsf[em]{m'etodo}{heur'isticoem},
\r
48 \idxsf[bf]{m'etodo}{heur'isticobf},
\r
49 % \idxsf[nn]{m'etodo}{heur'isticonn},
\r
50 % in case of nn, I need to define
\r
51 % the command \nn in a new index style file.
\r
54 \myindex{hur'istico}
\r
59 \setbox0\vbox{\@parboxrestore\printindex}
\r