[OS X TeX] encoding and special characters in TexShop

Morten Høgholm morten.hoegholm at gmail.com
Fri Sep 15 16:52:09 CEST 2006


On Fri, 15 Sep 2006 15:34:43 +0200, Claus Gerhardt  
<gerhardt at math.uni-heidelberg.de> wrote:

> It is my understanding that you have to use the special babel[german]  
> commands for the Umlaute, like "u instead of \"u, to get proper  
> hyphenation.

A brief summary of which parts do what:

  * The language options of babel control the hyphenation patterns (plus  
shorthands and layout aspects for some languages).
  * The font encoding controls which glyphs are available and which have to  
be manually constructed via \accent etc.
  * If a word contains glyphs not present in the font, it cannot be  
hyphenated automatically by TeX.
  * inputenc basically turns input from the upper half of ascii-8 into an  
internal 7-bit form. This means that ü is nothing more than an active  
character with definition \"u.


As for your example, the babel definitions for german contain the line

\declare at shorthand{ngerman}{"u}{\textormath{\"{u}\allowhyphens}{\ddot u}}

so "u is really just \"u with \allowhyphens added.


At the end of the day it is a matter of getting the right mixture of  
settings. Try this:

\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\begin{document}

Farvergnügen
\showhyphens{Farvergnügen}

Farvergn\"ugen
\showhyphens{Farvergn\"ugen}

Farvergn\"ugen
\showhyphens{Farvergn"ugen}

\end{document}

Now try to remove the fontenc and/or input packages and see what  
happens... (Yes, there is a certain element of surprise in this exercise.)
-- 
Morten
------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the macostex-archives mailing list