Move a tag
[latex2e.git] / latex2e-20160201 / required / babel / testfiles-disabled / tlb2650.lvt
bloba07bce61bc594b5b7971d05bed97d904cc4bb3f3
1 %>Number:         2650\r
2 %>Synopsis:       wrong output using a new command for index\r
3 %Description of bug:\r
4 %\r
5 %BEFORE THE UPDATE FROM 12/96  A HAVE NO PROBLEM WITH THIS COMMAND!!!!!\r
6 \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
9 %\ifthenelse).\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
14 %\fi\r
16 \input{test2e}\r
18 \documentclass{article}\r
20 \START\r
21 \FORMAT{LaTeX2e<1996/12/01>}\r
22 \CLASS{article}\r
23 \PACKAGE[spanish,activeacute]{babel}\r
24 \PACKAGE{ifthen,makeidx}\r
26 \OMIT\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
30                                                 % problems.\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
41 \makeindex\r
42 \begin{document}\r
43 \TIMO\r
44 testing...\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
53 more test\r
54 \myindex{hur'istico}\r
56 \showboxbreadth=30\r
57 \showboxdepth=30\r
58 \makeatletter\r
59 \setbox0\vbox{\@parboxrestore\printindex}\r
60 \showbox0\r
61 \end{document}\r