diff options
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.html | 72 |
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’s hyphenation rules are good, they’re not infallible: you +will occasionally find words TeX just gets <em>wrong</em>. So for +example, TeX’s default hyphenation rules (for American English) don’t +know the word “<em>manuscript</em>”, and since it’s a long word you +may find you need to hyphenate it. You <em>can</em> “write the +hyphenation out” 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’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 “hyphenation +exceptions”, in <i>TUGboat</i>; the hyphenation ‘man-u-script’ +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 “correct” hyphenation of the word, +in the current tables). However, there’s a problem here: just as +words with accents in them won’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 “improper”, and that it will be “flushed”. +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> |