summaryrefslogtreecommitdiff
path: root/usergrps/uktug/baskervi/6_2/faqery/colmy96.tex
blob: 29a01351bc2fde80941ce56c82f501f7e13ae867 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
\documentclass{article}
\usepackage{faq,bv-emu,shortvrb,multicol}
\renewcommand\Qref[3][]{see question 89 in \BV{} 5.6}
\MakeShortVerb\|
\input dirctan % This may be seen
\input filectan
\providecommand\Article[1]{\section*{#1}}
\begin{document}
\begin{multicols}{2}
\Article{The frequent supplement}
A couple of questions answered this month.

The first (on multilingual typesetting) was posed by Allan Reese; what
we have here is merely a start towards solving the problem that
concerns him.  A comprehensive review of what makes up the Babel
system is due in a future part of David Carlisle's \LaTeX{} tour, but
I suspect that even so, questions remain to be answered.  Do feel free
to send them in!

\Question{\upshape\bfseries 69a\quad Multilingual typesetting in \LaTeX{}}

\TeX{} itself defines a mechanism to define a `language', which
provides a hook for hyphenation patterns: each `language' (in \TeX{}'s
sense) has its own set of hyphenation patterns.

Babel, the standard multilingual package for \LaTeX{}, uses the
primitive \TeX{} concept of `language' as part of its own concept of
language; Babel's `language' also encompasses culturally appropriate
typesetting rules for the language; for further details, see Babel's
documentation.

Assuming that you have a current \LaTeX{} installation, creating a
multiple-language version from it involves three steps:
\begin{enumerate}
\item Install babel (\CTANref{babel}); move the |.sty| and |.ldf| files
  somewhere appropriate.  The installation also generates |hyphen.cfg|
  and |language.dat|; these must be around when you generate the new
  \LaTeX{} in step 3.
\item Edit |language.dat| to record the languages whose hyphenation
  patterns you want to support.  For example, my installation's
  version says:
  \begin{verbatim}
    english   hyphen.tex
    UKenglish ukhyph.tex
    french    f8hyph.tex
  \end{verbatim}
  (the upper-case `UK' is one of Babel's little quirks: one can also
  call the language `british'; whatever, it's a different language as
  far as \TeX{} is concerned).
\item Generate a new version of \LaTeX{}, from the same |latex.ltx|,
  etc., that came with your current installation.  Since the
  |hyphen.cfg| is `around', it will be used in preference to the
  |hyphen.ltx| which is generated when \LaTeX{} is unpacked.  The
  \LaTeX{} format you've built will have the hyphenation patterns
  installed.
\end{enumerate}
Of course, your \TeX{} has to be big enough to hold all these
hyphenation patterns.  I've not encountered problems with the
\Package|Web2c|-based Unix installation I use at work, but the
em\TeX{} I have on my \acro{PC} at home isn't, by default, large
enough.  Using \Package|htex386|, I increase the pattern memory by
adding the line:
\begin{verbatim}
    set emtexopt=/mt25000
\end{verbatim}
to my |autoexec.bat|

\Question{\upshape\bfseries 75a\quad Footnotes in tables}
The standard LaTeX \footnote command doesn't work in tables; the table
traps the footnotes and they can't escape to the bottom of the page.

If your table is floating, your best bet is (unfortunately) to put the
table in a \textsf{minipage} environment and to put the notes
underneath the table, or to use Donald Arseneau's package
\CTANref{threeparttable}

Otherwise, if your table is not floating (it's just a
`\textsf{tabular}' in the middle of some text), there are several
things you can do to fix this.
\begin{enumerate}
\item Use \cs|footnotemark| to position the little marker
  appropriately, and then put in \cs|footnotetext| commands to fill in
  the text once you've closed the tabular environment.  This is
  described in Lamport's book, but it gets messy if there's more than
  one footnote.
\item Stick the table in a \textsf{minipage} anyway.  This provides
  all the ugliness of footnotes in a minipage with no extra effort.
\item Use \textsf{threeparttable} (\CTANref{threeparttable}) anyway;
  the package is intended for floating tables, and the result might
  look odd if the table is not floating, but it will be reasonable.
\item Use \File|tabularx| or \File|longtable| from the \LaTeX{} tools
  distribution (\CTANref{2etools}); they're noticeably more
  inefficient than the standard \textsf{tabular} environment, but they
  do allow footnotes.
\item Grab hold of \File|footnote.sty| from \acro{CTAN}, lurking in
  \CTANref{mdwtools}

  Then put your tabular environment inside a \textsf{savenotes}
  environment.  Alternatively, say \cs|makesavenoteenv{tabular}| in
  the preamble of your document, and tables will all handle footnotes
  correctly.
\item Use \File|mdwtab.sty| from the same directory
  (\CTANref{mdwtools}).

  This will handle footnotes properly, and has other facilities to
  increase the beauty of your tables.  It may also cause other
  table-related packages (not the standard `tools' ones, though) to
  become very unhappy and stop working.
\end{enumerate}
\end{multicols}
\end{document}