Move a tag
[latex2e.git] / latex2e-20160201 / required / babel / testfiles / tlb3262.lvt
blob105dc4a1dd142769db2d9b9c7bb5bad457970b2f
1 \iffalse
2 >Number:         3262
3 >Synopsis:       Shorthand are off in optional argument of \cite
4 >Arrival-Date:   Sat Sep 30 17:41:04 2000
5 >Originator:     jbezos@wanadoo.es  ( Javier Bezos )
6 >Release:        LaTeX2e <1998/12/01>
7 >Environment:
8  Hyphenation: standard
9  \@TeXversion: undefined (Standard setting for TeX3.141 and later)
10  \@currdir: macro:->:
11  \input@path: undefined (Standard setting)
12 >Description:
13 Description of bug:
15 Shorthands are not active in the optional argument of
16 \cite, which is expected to contain text. For example,
17 in Spanish:
18 \cite[secci'on 1]{huh}
19 prints secci'on 1 (literally).
21 A possible fix is given in the sample. [BTW. Johannes,
22 I'm going to send to you a new Spanish style in a few
23 days.]
24 \makeatletter
25 \def\@citex[#1]#2{%
26   \@safe@activestrue
27   \edef\@tempa{#2}%
28   \@safe@activesfalse
29   \org@@citex[#1]{\@tempa}%
30   }
31 % The variant for natbib would be
33 % \def\@citex[#1][#2]#3{%
34 %   \@safe@activestrue
35 %   \protected@edef\@tempa{#3}%
36 %   \@safe@activesfalse
37 %   \org@@citex[#1][#2]{\@tempa}%
38 %   }\makeatother
41 >How-To-Repeat:
42 Sample file which indicates the problem:
43 ========================================
44 \fi
46 \input{test2e}
47 \documentclass{book}
49 \START
50 \FORMAT{LaTeX2e <1998/12/01>}
51 \AUTHOR{jbezos@wanadoo.es  ( Javier Bezos )}
52 \PACKAGE[activeacute,catalan]{babel}
53 \showboxbreadth=50
54 \showboxdepth=50
55 \def\testit#1{%
56   \setbox0=\hbox{#1}\showbox0}
57 \OMIT
59 \usepackage[activeacute,catalan]{babel}
61 \begin{document}
62 \TIMO
64 \testit{A cite \cite[cap'itol 5]{huh}}
66 \end{document}