Move a tag
[latex2e.git] / latex2e-20151001 / required / tools / testfiles / tlb3747e.lvt
blob93b94b3e8ebce4301c406b21400cc9aec5a71323
1 \iffalse
3 Subject:
4 tools/3747: xspace doesn't work with babel
6 Description of bug: All tests inside \@xspace fail when the
7 characters are active so using xspace in conjunction with babel is
8 great fun. As an example, using "!" after a command using \xspace in
9 French works because "!" starts with \unskip, but when switching to
10 English you get a space before the "!".
13 This version runs *with* eTeX as compiler.
15 The logfile should show xspace not inserting a space in all the
16 cases except for |\Gb a| and |\GB \textbf{a}|. The seven tokens
17 ";:?!,'-" are recognized both when active and when having category
18 code 12 courtesy of |\scantokens|.
20 Morten H\o gholm
21 \fi
23 \input{test2e}
24 \documentclass{article}
25 \START
26 \AUTHOR{Morten H\o gholm}
27 \PACKAGE{xspace v1.08 Space after command names (DPC,MH)}
28 \PACKAGE{alltt}
29 \OMIT
30 \usepackage[T1]{fontenc}
31 \usepackage{alltt}
32 \usepackage{xspace}
33 \newcommand*\GB{x\xspace}
34 \newcommand*\GBi[1]{#1\xspace}
35 \begin{document}
36 \catcode`\?=13
37 \catcode`\;=13
38 \catcode`\:=13
39 \catcode`\!=13
41 \def?{\,\string?}
42 \def;{\,\string;}
43 \def:{\,\string:}
44 \def!{\,\string!}
46 % the exception list:
47 %  ,.'/?;:!~-)\ \/\bgroup\egroup\@sptoken\space\@xobeysp
48 % \footnote\footnotemark
49 \TIMO \noindent
50 \GB? a \\
51 \GB; a \\
52 \GB: a \\
53 \GB! a \\
54 \GB~a \\
55 \GB- a \\
56 \GB) a \\
57 \GB\ a \\
58 \GB\/ a \\
59 \GB{} a \\
60 {\GB} a \\
61 \GBi{x} a \\
62 \GB\space a \\
63 \GB\footnote{a} \\
64 \GB\footnotemark{} a \\
65 \GB a \\
66 \GB \textbf{a}\\
67 \catcode`\?=12
68 \catcode`\;=12
69 \catcode`\:=12
70 \catcode`\!=12
71 \GB? a \\
72 \GB; a \\
73 \GB: a \\
74 \GB! a 
76 \begin{alltt}
77   \GB normal
78   \GB,
79   \GB'
80   \GB-
81   \GB.
82 \end{alltt}
84 \xspaceaddexceptions{\textbf}
85 \GB \textbf{a}\\
86 \xspaceremoveexception{\textbf}
87 \GB \textbf{a}
89 \showoutput
90 \end{document}