[OS X TeX] Building new formats (MacTeX)

Rowland McDonnell rjmm-lists1 at fireflyuk.net
Fri Sep 15 16:32:11 EDT 2006

> On 13-sep-2006, at 1:58, Rowland McDonnell wrote:
> > So I've got a TeX installation that I can use to pdfLaTeX documents.
> >
> > But I'm still using the supplied formats, which have a lot of
> > built-in hyphenation patterns but not the one I need (UK English).
> The default TeXLive install come with pretty much everything enabled.
> Would that be an option for future MacTeX installs?

According to a note in the language.dat file, ukhyphen.tex is
unavailable in teTeX due to licensing problems.  I'd guess the same
applies to other distributions - are you sure UKEnglish is included with

> > I was thinking about modifying the Babel setup so that I could have
> > the existing languages plus the one I need, with the one I need set
> > up as the default.
> >
> > I see that to do this, I need to edit the appropriate language.dat
> > file.
> a simple find command in the terminal gives that these are all  
> language .dat files in the texmf trees.

Okay - I've printed out the `find' man page and learnt how to do this
(details on how to do so at the end of this email).  But how can I tell
which file is used for which format?

At some point, iniTeX will run, and I need to make sure it'll read the
appropriate file when it runs - for every format I'm rebuilding.
Finding language.dat files isn't the problem: the problem is making sure
that the one I want to be read, is the one that's read.

> /usr/local/teTeX/share/texmf.local/tex/generic/config/language.dat
> /usr/local/teTeX/share/texmf.gwtex/tex/generic/config/language.dat
> /usr/local/teTeX/share/texmf.tetex/tex/generic/config/language.dat
> /usr/local/teTeX/share/texmf.tetex/tex/lambda/config/language.dat
> /usr/local/teTeX/share/texmf.tetex/tex/platex/config/language.dat
> The first one shadows the next two for all tex formats, except lambda
> and platex. 

I don't understand what you mean by this.  Could you tell me where it's
explained in the documentation (if anywhere)?

>So it seems that in practice, you can just limit yourself
> to the first one.

What I actually get is this:

Hattie:teTeX rowland$ find . -name "language.dat"


[Gerben Wierda says elsewhere:}
> The first one probably does not exists on a pristine install of
> MacTeX. The second one does, but it should be copied to the location
> of the first one before being edited or it will be overwritten on a
> next install.
[end Gerben Wierda]

What I'd like to do is have a single local language.dat file that is
always read when I run iniTeX to rebuild all formats.

(and some sort of babel config file - damned if I can find any info on
how to set up Babel to give me a default language other than US English)

How can I find out how to do this?

> > I've no idea where to start looking - can anyone help me find out
> > how to invoke kpsewhich for this job?
> kpsewhich -help gives basic (somewhat cryptic) help. from that:

Umm.  The help is indeed cryptic.  I can't get anywhere with it.

> -progname=NAME : set the program name to NAME (latex, pdftex, lambda,
> -format=NAME : the file format to search for (or to limit the result  
> to).

And I'm afraid this is just as cryptic as the man page.

> The choice of the name 'format' in this context is a bit unfortunate:  
> you want the
> -progname argument, not the -format argument.

If I knew why you were explaining this, I might be able to follow you

Could you explain why you are telling me that there are `-progname' and
`-format' options?

I'm completely baffled by this.  Ah!  No, having read my original email
on the subject, I am now less baffled.   Perhaps you could [snip] less
of the original text?

> kpsewhich language.dat -progname=pdflatex
> gives the language settings file for pdflatex.

Okay.  But what does that mean, exactly?  Why do I need to know this?
How could I have worked it out for myself?

(Thank you for telling me, but I'd like to be able to find this sort of
thing out without having to ask - frankly, it'd be nice to have some
understanding of these commands instead of having to ask every time, and
I'm not sure that the answer you've given me is actually any help to me
at all, since I don't see how it applies to iniTeX.)

The question I still need an answer to is: how can I find out which
particular language.dat files will be used when I build formats?

- I take it that there are multiple methods of control, depending on
format building methods.

> Since most formats use the same file, I would advise to use
> sudo -H fmtutil-sys --all
> to recompile all formats at once. 

How do I find out what that command does?  That is, when you say `All
formats', how do I find out which formats will be rebuilt?  And
according to which scheme?

> This will probably prevent some
> surprises later on.


I need to find out how to replace all the format files used for Plain
TeXing and LaTeXing with the MacTeX distribution, and do so using my
local language.dat (and perhaps other config) files.

> The format of the language.dat file is documented in the file itself  

There is no explanation of the format of the file that I can see - not
an inadequate explanation: absolutely no explanation of any sort.

> (the languages are all there,
> but with most commented out, so there is no need to figure out what a  
> language should be called).

It's not the modifying of the file that's the problem, but working out
where to put my copy of the modified file so that it's 1) used and 2)
not overwritten; then I need to work out how to re-build all the

You say that using the fmutil command is the right thing to do - is
there anything to explain what I can expect to see happen if I use it as
directed on a default MacTeX installation?  The fmtutil man page is an
unusually terse piece of work, and I can find no other documentation for


How to make a printable (ps or pdf) version of a man page, from

How to Make PostScript and PDF MAN Pages

OSXFAQ Reader Tip By Scott Thompson

Mac OS X will give you the name(s) of the files used to generate a man
page if you use the -w switch:

man -w ls


You can then pass this file on to "grog" to find out about how you could
use "groff" to generate a PostScript version of that man page:

grog /usr/share/man/man1/ls.1

groff -mdoc /usr/share/man/man1/ls.1

Finally, execute the resulting command to generate a PostScript version
of the manpage:

groff -mdoc /usr/share/man/man1/ls.1 > ls.ps

[ new file in current directory named ls.ps]

You can print this .ps file on your default printer (assuming it's a
PostScript printer) with:

Print ls.ps

If you've installed the handy "Ghostscript" code then you can go a step
further and convert the PS file to PDF:

ps2pdf ls.ps ls.pdf

and you can open the man page with your favorite pdf viewer:

open ls.pdf

It's much nicer than simply looking at a text file of the man page.

Enjoy :-) 
------------------------- 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 MacOSX-TeX mailing list