summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-tabacc.html
blob: 5af40c48aead451102c5d53258ef7fada82bb251 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<head>
<title>UK TeX FAQ -- question label tabacc</title>
</head><body>
<h3>Accents misbehave in <code>tabbing</code></h3>
<p/>So you are constructing a <code>tabbing</code> environment, and you
have the need of some diacriticised text &mdash; perhaps something as simple
as <code>\</code><code>&rsquo;{e}</code> &mdash; and the accent disappears because it has been
interpreted as a <code>tabbing</code> command, and everything goes
wrong.
<p/>This is really a rather ghastly feature of the <code>tabbing</code>
environment; in order to type accented characters you need to use the
<code>\</code><code>a</code> kludge: so <code>\</code><code>a&rsquo;{e}</code> inside <code>tabbing</code> for
<code>\</code><code>&rsquo;{e}</code> outside, and similarly <code>\</code><code>a&lsquo;</code> for <code>\</code><code>&lsquo;</code> and <code>\</code><code>a=</code>
for <code>\</code><code>=</code>.  This whole procedure is of course hideous and
error-prone.
<p/>The simplest alternative is to type in an encoding that has the
diacriticised characters in it, and to use an appropriate encoding
definition file in the <i>inputenc</i> package.  So for example,
type:
<blockquote>
  <code>\</code><code>usepackage[latin1]{inputenc}</code><br>
  <code>...</code><br>
  <code>\</code><code>begin{tabbing}</code><br>
  <code>...</code><br>
  <code>...</code> <code>\</code><code>&gt;</code> <code>voil&agrave;</code> <code>\</code><code>&gt;</code> <code>...</code>
</blockquote><p>
for:
<blockquote>
  &hellip;\quad voil&agrave;\quad &hellip;
</blockquote><p>
and the internal mechanisms of the <i>inputenc</i> package will put
the right version of the accent command in there.
<p/>A witty reversal of the r\^oles is introduced by the package
<i>Tabbing</i> (note the capital &ldquo;T&rdquo;): it provides a
<code>Tabbing</code> environment which duplicates
<code>tabbing</code>, but all the single-character commands become
complicated objects.  So <code>tabbing</code>&rsquo;s <code>\</code><code>&gt;</code> becomes
<code>\</code><code>TAB&gt;</code>, <code>\</code><code>=</code> becomes <code>\</code><code>TAB=</code>, and so on.  The above trivial
example would therefore become:
<blockquote>
<pre>
\usepackage{Tabbing}
...
\begin{Tabbing}
  ...  ... \TAB&gt; voil\`a \TAB&gt; ...
</pre>
</blockquote><p>
<dl>
<dt><tt><i>Tabbing.sty</i></tt><dd><a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/Tabbing.zip">macros/latex/contrib/Tabbing</a> (or <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/Tabbing/">browse the directory</a>)
</dl>
<p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=tabacc">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=tabacc</a>
</body>