[XeTeX] "Missing" system fonts

Bruno Voisin bvoisin at mac.com
Sun May 27 11:01:51 CEST 2007


Le 25 mai 07 à 20:32, John Was a écrit :

> There is no way that I'm going to get rid of my EmTeX distribution,  
> which
> has worked soundly for many years - each year I produce six periodical
> issues, one volume of a slow-moving medieval Latin dictionary, and  
> a lot
> more besides!  But it can't be causing any interference with  
> TeXLive since
> it doesn't even produce any Windows registry entries (it operates in a
> 4DosShell) and moves from one computer to another just by copying  
> all the
> files and directories over.  It is TeXLive that made its own  
> decisions when
> I installed it, without asking me what I would have thought were some
> obvious questions about my preferred paths and working  
> directories.  I'm
> sure I'll find some configuration files eventually which I can edit  
> so that
> the distribution will know where I like to keep all my files.

I don't think that way of proceeding is viable in the long run. You  
may end up fixing the problems you are having now, but then every  
time you'll be attempting to do a new thing with your TeX setup then  
you'll be facing another problem, which will take time and help to  
fix, and so forth, and so forth.

TeXLive is a very wide-ranging and powerful system, and also multi- 
platform, but that comes at a price: TeXLive is big, complex, some  
would say bloated, command-line-oriented, and without much  
flexibility. I see two problems here with respect to your EmTeX  
distribution:


Problem 1
=========

TeXLive is built upon the idea of multiple texmf trees, each with a  
particular function and searched in a particular order: there's a  
main tree, for core (indispensable) files, a dist tree, for standard  
(distribution) files, a config tree, for configuration files, a var  
tree, for runtime (automatically generated at the time TeXLive is  
installed or later configured) files, a local tree, for local  
additions (files you add yourself); and several of these trees exist  
in two versions, one at the system level (applying to all accounts on  
a given PC) and the other at the user level (applying to one account  
only).

All this is defined through environmental variables in a file  
texmf.cnf. For example, on my Mac setup the relevant part of  
texmf.cnf is in essence:

> % The tree containing the runtime files closely related to the  
> specific
> % program version used:
> TEXMFMAIN = /usr/texlive/2007/texmf
>
> % The main distribution tree:
> TEXMFDIST = /usr/texlive/2007/texmf-dist
>
> % A place for local additions to a "standard" texmf tree.
> TEXMFLOCAL=/usr/texlive/2007/../texmf-local
>
> % TEXMFSYSVAR, where texconfig-sys stores variable runtime data.
> TEXMFSYSVAR=/usr/texlive/2007/texmf-var
>
> % TEXMFSYSCONFIG, where texconfig-sys stores configuration data.
> TEXMFSYSCONFIG = /usr/texlive/2007/texmf-config
>
> % User texmf trees are allowed as follows.
> TEXMFHOME=~/Library/texmf
>
> % TEXMFVAR, where texconfig stores variable runtime data.
> TEXMFVAR = ~/.texlive2007/texmf-var
>
> % TEXMFCONFIG, where texconfig stores configuration data.
> TEXMFCONFIG = ~/.texlive2007/texmf-config
>
> % Now, list all the texmf trees. If you have multiple trees you can
> % use shell brace notation, like this:
> %   TEXMF = {$TEXMFHOME,!!$TEXMFLOCAL,!!$TEXMFMAIN}
> % The braces are necessary.
> TEXMF = {$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,!!$TEXMFSYSCONFIG,!! 
> $TEXMFSYSVAR,!!$TEXMFMAIN,!!$TEXMFLOCAL,!!$TEXMFDIST}

The last line defines in which order all these trees are searched.

You may try to edit texmf.cnf so as to make TeXLive and EmTeX coexist  
on your system, but beware: you need to really know what you're  
doing. I wouldn't attempt that myself.

You can find where texmf.cnf lives on your system by using the  
command kpsewhich. On my Mac:

Portable-de-Bruno:~ brunovoisin$ kpsewhich texmf.cnf
/usr/local/texlive/2007/texmf/web2c/texmf.cnf


Problem 2
=========

Each texmf tree is organized according to a very intricate structure  
called the TDS (TeX Directory Structure). This means each type of  
file (such as BibTeX style file) is searched at a specific place  
within the TDS, and at that place only, and that the place may differ  
depending on the application (such as TeX, LaTeX, XeLaTeX). I don't  
remember whether EmTeX was already using the TDS, maybe it already did.

The documentation of the TDS is for example <ftp://tug.ctan.org/pub/ 
tex-archive/tds/tds.pdf>, but I would rather recommend looking at  
kpathsea.pdf, the documentation of the kpathsea library used in  
TeXLive to search for files. It should be somewhere within TeXLive on  
your system, for me that's:

/usr/local/texlive/2007/texmf/doc/kpathsea/kpathsea.pdf

In particular, there's the description of the kpsewhich utility,  
allowing to investigate practically everything that kpathsea does.  
For example, to know where XeLaTeX will look for TeX input files and  
in which order, you use:

Portable-de-Bruno:~ brunovoisin$ kpsewhich --progname=xelatex --show- 
path=.tex
.
~/.texlive2007/texmf-config/tex/xelatex//
~/.texlive2007/texmf-var/tex/xelatex//
~/Library/texmf/tex/xelatex//
!!/usr/local/texlive/2007/texmf-config/tex/xelatex//
!!/usr/local/texlive/2007/texmf-var/tex/xelatex//
!!/usr/local/texlive/2007/texmf/tex/xelatex//
!!/usr/local/texlive/2007/../texmf-local/tex/xelatex//
!!/usr/local/texlive/2007/texmf-dist/tex/xelatex//
~/.texlive2007/texmf-config/tex/latex//
~/.texlive2007/texmf-var/tex/latex//
~/Library/texmf/tex/latex//
!!/usr/local/texlive/2007/texmf-config/tex/latex//
!!/usr/local/texlive/2007/texmf-var/tex/latex//
!!/usr/local/texlive/2007/texmf/tex/latex//
!!/usr/local/texlive/2007/../texmf-local/tex/latex//
!!/usr/local/texlive/2007/texmf-dist/tex/latex//
~/.texlive2007/texmf-config/tex/generic//
~/.texlive2007/texmf-var/tex/generic//
~/Library/texmf/tex/generic//
!!/usr/local/texlive/2007/texmf-config/tex/generic//
!!/usr/local/texlive/2007/texmf-var/tex/generic//
!!/usr/local/texlive/2007/texmf/tex/generic//
!!/usr/local/texlive/2007/../texmf-local/tex/generic//
!!/usr/local/texlive/2007/texmf-dist/tex/generic//
~/.texlive2007/texmf-config/tex///
~/.texlive2007/texmf-var/tex///
~/Library/texmf/tex///
!!/usr/local/texlive/2007/texmf-config/tex///
!!/usr/local/texlive/2007/texmf-var/tex///
!!/usr/local/texlive/2007/texmf/tex///
!!/usr/local/texlive/2007/../texmf-local/tex///
!!/usr/local/texlive/2007/texmf-dist/tex///

and to know where BibTeX will look for BibTeX style files:

Portable-de-Bruno:~ brunovoisin$ kpsewhich --progname=bibtex --show- 
path=.bst
.
~/.texlive2007/texmf-config/bibtex/bst//
~/.texlive2007/texmf-var/bibtex/bst//
~/Library/texmf/bibtex/bst//
!!/usr/local/texlive/2007/texmf-config/bibtex/bst//
!!/usr/local/texlive/2007/texmf-var/bibtex/bst//
!!/usr/local/texlive/2007/texmf/bibtex/bst//
!!/usr/local/texlive/2007/../texmf-local/bibtex/bst//
!!/usr/local/texlive/2007/texmf-dist/bibtex/bst//
~/.texlive2007/texmf-config/bibtex/csf//
~/.texlive2007/texmf-var/bibtex/csf//
~/Library/texmf/bibtex/csf//
!!/usr/local/texlive/2007/texmf-config/bibtex/csf//
!!/usr/local/texlive/2007/texmf-var/bibtex/csf//
!!/usr/local/texlive/2007/texmf/bibtex/csf//
!!/usr/local/texlive/2007/../texmf-local/bibtex/csf//
!!/usr/local/texlive/2007/texmf-dist/bibtex/csf//

So you see how unflexible TeXLive can be in some respects: for a  
given BibTeX style file to be found, it must be located inside texmf/ 
bibtex/bst/ within a texmf tree; just texmf/bibtex/ won't do.


Given all the above, I don't think you can get TeXLive and your  
former EmTeX distribution to coexist peacefully in the long run. What  
I did on the Mac when moving from Textures to gwTeX circa 2000, and  
when moving from gwTeX to TeXLive in early 2007, is devote some time  
seeing how the new distribution works, and then adding to this  
distribution all the bits that were specific to the old distribution,  
as well as all your personal additions (in-house style files, etc.),  
and then remove the old distribution and use the new (customized)  
distribution only. In my case the whole process (including testing)  
took about one week in total, practically full-time.

For this you could use either the TEXMFLOCAL tree or the TEXMFHOME  
tree. Personally I put all my local additions in TEXMFLOCAL, namely / 
usr/local/texlive/texmf-local/ on my Mac.

An alternative is of course to turn instead to more user-friendly TeX  
systems, for example on Windows the free MikTeX <http://miktex.org/>  
or the commercial PCTeX <http://www.pctex.com/>. MikTeX is more  
friendly to install than teXLive, and with PCTeX you could pay for  
commercial user support. But then you'll be losing the possibility to  
use XeTeX, and I think you'll have to devise yourself how to compile  
it and make it work with the rest of TeX.

Bruno


More information about the XeTeX mailing list