summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-hyphexcept.html
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-hyphexcept.html')
-rw-r--r--Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-hyphexcept.html72
1 files changed, 72 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-hyphexcept.html b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-hyphexcept.html
new file mode 100644
index 00000000000..50bcaf4f25e
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-hyphexcept.html
@@ -0,0 +1,72 @@
+<head>
+<title>UK TeX FAQ -- question label hyphexcept</title>
+</head><body>
+<h3>Hyphenation exceptions</h3>
+<p/>While TeX&rsquo;s hyphenation rules are good, they&rsquo;re not infallible: you
+will occasionally find words TeX just gets <em>wrong</em>. So for
+example, TeX&rsquo;s default hyphenation rules (for American English) don&rsquo;t
+know the word &ldquo;<em>manuscript</em>&rdquo;, and since it&rsquo;s a long word you
+may find you need to hyphenate it. You <em>can</em> &ldquo;write the
+hyphenation out&rdquo; each time you use the word:
+<blockquote>
+<pre>
+... man\-u\-script ...
+</pre>
+</blockquote><p>
+Here, each of the <code>\</code><code>-</code> commands is converted to a hyphenated break,
+if (<em>and only if</em>) necessary.
+<p/>That technique can rapidly become tedious: you&rsquo;ll probably only accept
+it if there are no more than one or two wrongly-hyphenated words in
+your document. The alternative is to set up hyphenations in the
+document preamble. To do that, for the hyphenation above, you would
+write:
+<blockquote>
+<pre>
+\hyphenation{man-u-script}
+</pre>
+</blockquote><p>
+and the hyphenation would be set for the whole document. Barbara
+Beeton publishes articles containing lists of these &ldquo;hyphenation
+exceptions&rdquo;, in <i>TUGboat</i>; the hyphenation &lsquo;man-u-script&rsquo;
+comes from one of those articles.
+<p/>What if you have more than one language in your document? Simple:
+select the appropriate language, and do the same as above:
+<blockquote>
+<pre>
+\usepackage[french]{babel}
+\selectlanguage{french}
+\hyphenation{re-cher-cher}
+</pre>
+</blockquote><p>
+(nothing clever here: this is the &ldquo;correct&rdquo; hyphenation of the word,
+in the current tables). However, there&rsquo;s a problem here: just as
+words with accents in them won&rsquo;t break, so <code>\</code><code>hyphenation</code> commands
+with accents in them produce an error:
+<blockquote>
+<pre>
+\usepackage[french]{babel}
+\selectlanguage{french}
+\hyphenation{r\'e-f\'e-rence}
+</pre>
+</blockquote><p>
+tells us that the hyphenation is &ldquo;improper&rdquo;, and that it will be &ldquo;flushed&rdquo;.
+But, just as hyphenation of words is enabled by selecting an 8-bit
+font encoding, so <code>\</code><code>hyphenation</code> commands are rendered proper again
+by selecting that same 8-bit font encoding. For the hyphenation
+patterns provided in the usual distributions, the encoding is
+<a href="FAQ-ECfonts.html">Cork</a>, so the complete sequence is:
+<blockquote>
+<pre>
+\usepackage[T1]{fontenc}
+\usepackage[french]{babel}
+\selectlanguage{french}
+\hyphenation{r\'e-f\'e-rence}
+</pre>
+</blockquote><p>
+<p/>The same sort of performance goes for any language for which 8-bit
+fonts and corresponding hyphenation patterns are available. Since you
+have to select both the language and the font encoding to have your
+document typeset correctly, it should not be a great imposition to do
+the selections before setting up hyphenation exceptions.
+<p/><p/><p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=hyphexcept">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=hyphexcept</a>
+</body>