[OS X TeX] plain TeX Live hyphenation

Bruno Voisin bvoisin at mac.com
Sat Mar 8 15:44:43 EST 2008

Le 8 mars 08 à 17:36, Gianluca Gorni a écrit :

> So I resigned myself to install TeXLive2007 from the DVD.

I take it you installed the MacTeX package, right?

> Trying to replicate the steps that had worked for
> gw-teTeX, I looked everywhere for a file named language.def.
> I finally located it in
> /usr/local/texlive/2007/texmf-dist/tex/plain/config/language.def
> The trick should be to add the line
> \addlanguage {Italian}{ithyph}{}{2}{2}
> to language.def. I have saved the modified file in what looks
> like the only obvious location:
> /usr/local/texlive/texmf-local/tex/plain/local/
> Is that OK? Would it work if I placed it somewhere inside
> ~/Library/texmf/tex/plain/ ? That would be much easier to
> maintain.

It's not the file that's used. The one that is used is


The organization of TeXLive directories is described for example in


Adapting Section 2.2 "Top level directories", and assuming I  
understood correctly:

- texmf: tree for the programs (pdfTeX, TeX, dvips and the like),  
along with their support files and documentation.

- texmf-dist: main tree of formats, fonts and packages (LaTeX packages  
and the like).

- texmf-doc: tree for self-contained pure documentation (LaTeX manuals  
and the like), arranged by language.

- texmf-config: tree with default config files.

- texmf-var: tree for files automatically generated and stored (like  
format files, and config files modified at install time through the  
action of updmap and fmtutil).

- texmf-local: local tree of formats, fonts and packages.

The rules related to the order in which these directories are searched  
are a bit mysterious to me. They are defined in


You can find out exactly how the directories are searched, at system  
and user level, by using kpsewhich in Terminal. After minor editing

$ kpsewhich --progname=tex --show-path=.tex | tr : '\n'

Thus you see, putting your modified language.def in


won't help, as the one in


will be found first.

Again, for such things you can use kpsewhich and fmtutil:

$ kpsewhich language.def
$ fmtutil --showhyphen pdflatex
$ fmtutil --showhyphen pdfetex
$ fmtutil --showhyphen etex
$ fmtutil --showhyphen tex

The last line seems to imply that language.def is used only when  
building pdfTeX (actually pdfeTeX) and eTeX, but not when building the  
original TeX (the one written and frozen by Don Knuth). Hence, for  
example, when typesetting in pdfTeX mode you will include the  
hyphenation patterns called by language.def, but when typesetting in  
TeX and GhostScript mode you won't.

Two more things:

- After editing language.def as you described, language.def seems to  
imply you can switch to Italian hyphenation in your document by typing  
in \uselanguage{Italian}. I'm not sure were this command is defined,  
and similarly for \addlanguage. Maybe these are new eTeX primitives, I  
don't know (and I have no copy of the TeXbook at hand). I only knew  
\language=0 for English (being always the first loaded pattern), and  
\language=1 for the second language read when compiling the format  
(hence Italian here).

- How to recompile the formats after modifying language.def depends on  
what you want to achieve:

* If you want to modify your installation system-wide (as gwTeX did by  
default), you need to modify


and then run in Terminal

sudo -H fmtutil-sys --all

* If you want to modify your installation for your account only, you  
need to modify


and then run

fmtutil --all

Beware though: in the latter case the modified format files will be  
created in your user directory, meaning that if at some point in the  
future you update your TeX installation (for example with TeXlive  
2008) then your custom formats will stay there unchanged and take  
precedence over those (in /usr/local/texlive/) from the updated  

Sorry for this long and unordered post, I'm tired and short of time  
and am writing stuff as it comes to mind. I hope you'll find helpful  
info in it though.

Bruno Voisin

More information about the MacOSX-TeX mailing list