[tex-k] more on TDS 1.1

Olaf Weber olaf at infovore.xs4all.nl
Wed Aug 18 20:21:55 CEST 2004

Eddie Kohler writes:

> The procedure otftotfm uses is relatively simple:
> 1. Look for a writable TEXMF.
> 2. Put files under that TEXMF as follows:
>     TFM          TEXMF/fonts/tfm/VENDOR/TYPEFACE/
>     VF           TEXMF/fonts/vf/VENDOR/TYPEFACE/
>     PL           TEXMF/fonts/pl/VENDOR/TYPEFACE/
>     VPL          TEXMF/fonts/vpl/VENDOR/TYPEFACE/
>     Type 1       TEXMF/fonts/type1/VENDOR/TYPEFACE/
>     encoding     TEXMF/dvips/VENDOR/
>     psfonts.map  TEXMF/dvips/VENDOR/
> 3. Update TEXMF/ls-R as appropriate.

> This procedure was relatively easy to write and, much more
> importantly, easy to explain in the manual.

> Last night I coded up a "hack" for TDS 1.1/recent teTeX installations,
> namely to use kpathsea to look for an 'ENCFONTS' variable.  If that
> variable exists, then otftotfm assumes TDS 1.1, and changes the
> locations of encoding and psfonts.map files as follows:

>     encoding     TEXMF/fonts/enc/dvips/VENDOR/
>     psfonts.map  TEXMF/fonts/map/dvips/VENDOR/

> I suppose that the "right thing" would be to use kpathsea to expand
> the relevant search paths for each type of file, and put the files in
> the first writable directories found.  But I'm loath to code this up
> unless it's strictly necessary.

I believe it would be possible to encounter installations that use
newer kpathsea (with ENCFONTS defined) but TDS 1.0.  A slightly
different tack: if there is an ENCFONTS variable defined, _and_ it
ends on "/fonts/enc//" then you're dealing with a pure TDS 1.1

Actually, one thing you could do is use


to get the list of "root" directories.  Split at the PATH_SEP to get
directories.  You'll want to discard "." of course, but the rest are
candidate roots for installation, if they exist and are writable.
Still not that pretty.

So for a simple-minded test, if one of
exists as a directory then you can assume TDS 1.1.  Otherwise assume
TDS 1.0.  If $TEXMFMAIN is not defined, complain.  (The installation
is either heavily customized or broken, because the standard mktex*
scripts would not be able to find things.)

> * This more complex procedure would be harder to explain in the
> * manual; I feel like I'd start getting confused bug reports.
> * The search paths might contain directories not under any TEXMF; it's
> * not immediately clear how and when to update ls-R.
> * The kpathsea search paths don't tell you whether to append VENDOR/
> * or VENDOR/TYPEFACE/ or nothing.
> * Plus coding it would be kind of a pain in the ass.
> * If you have a special installation you can always turn off automatic
> * mode and install the files wherever you want.

> Does this make sense, or should I just bite the bullet?
> Eddie

What do you think of the simple-minded test above?

PS: In the future libkpathsea will likely provide direct support for
finding the right path in the texmf trees to install files.

Olaf Weber

               (This space left blank for technical reasons.)

More information about the tex-k mailing list