[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: config files in xelatex



Frank Küster wrote:
"R (Chandra) Chandrasekhar" <chandra@ee.uwa.edu.au> wrote:

Norbert Preining wrote:

If you only need a new xetex binary, just compile one and put it into
/usr/bin/xetex (keeping a backup of the old one).

Shouldn't the new binary rather be put into /usr/local/bin/?

Would it be better to compile downloaded archive and give it a destination directory of TEXMFLOCAL which is /usr/local/share/texmf on my system? Or will this conflict with the installed Ubuntu TeX packages through wrong placement of files normally expected to be in /etc for example?

But what do I do with the .cfg files in TRUNK/texmf/tex/xelatex? Some
config files like geometry.cfg have been modified as recently as March
2008. Where do I put these config files? Can they be drop-in
replacements as well?

I'm not sure whether they can be drop-in replacements, but generally the
correct place is TEXMFLOCAL if the original is in TEXMFDIST (or
TEXMFMAIN), or TEXMFCONFIG if the original is already there.

Speaking of TEXMFCONFIG, the fact that geometry.cfg is not there means
that it was once decided that geometry.cfg is not meant for site-wide
configuration, but either not for configuration at all, or for a
per-document configuration. Looking at the file, I doubt that this was
correct. We actually have two versions, one is just comments except
\endinput and sits in texlive-latex-base-doc. The second one is the
xelatex-specific version which actually does something, *but* it does
not do the same as the comments in the other file suggest.

The LaTeX one has:

%% Uncomment and edit the line below to set default options.
%%\ExecuteOptions{a4paper,dvips}

Which looks like it should be in /etc/texmf/, and finally handled by our
once planned libpaper code.
The XeLaTeX one reads

\@ifundefined{XeTeXversion}{}{
	%% Use the "pdftex" driver (i.e., \pdfpagewidth, \pdfpageheight) with XeTeX
	\Gm@setdriver{pdftex}
	
	%% don't check this AtBeginDocument, just believe me!
	\let\Gm@checkdrivers\relax
}

Actually, the geometry.cfg from TRUNK and its contents are:
------------
%% geometry.cfg for XeLaTeX - version of 2008-03-26

\@ifundefined{XeTeXversion}{}{%
        %% override to use the "pdftex" driver
        %% (i.e., \pdfpagewidth, \pdfpageheight) with XeTeX
        \def\Gm@checkdrivers{%
              \Gm@setdriver{pdftex}%
        }%
}%

\endinput

%% End of file `geometry.cfg'.
------------

I do not know what difference this makes with respect to the one above that you have shown.

This piece of code is not really configuration, it's rather a question
of "installing" xelatex properly for geometry.sty.

Reading the geometry documentation, it seems to me that what xelatex
does is formally a misuse of the file, but it has no other choice
(except waiting for geometry.sty to get updated for xelatex, which won't
work).

I am getting different results from pdfcrop applied to a PDF generated with xelatex, depending on whether I use or do not use geometry.sty, to produce a standalone PDF. In both cases, though, the margins for pdfcrop have to be hand-tweaked to get usable results. I suspect that geometry.sty does affect the detected bounding box of the PDF in conjunction with xdvipdfmx, but whether the geometry.cfg file plays a part I again do not know.

I think the mid-term solution would be to discuss this with the TeXLive
team, and then decide on a recommmendation that every package which
contains driver-specific code should allow loading of an additional
file, ${packagename}.drv. This would make it possible to just put such a
file in the path where it is found only by the specific engine, and be
done.
For the time being, it seems to me that it would be best to move
geometry.cfg to TEXMFCONFIG - but that seems right, anyway.

On my system, TEXMFCONFIG expands to ~/.texmf-config

Regards, Frank

I have just been made aware again of the email at the xetex-users list at

http://tug.org/pipermail/xetex/2008-May/009730.html

which leads to an SVN version of the texlive-xetex .deb file at:

http://nlp.ipipan.waw.pl/~wolinski/xetex/

but again, I do not know if it contains the recent versions of xdvipdfmx and of the .cfg files, apart from the xetex executable.

I will get in touch with the author and see if that promises to be an easier path to get where I want to.

I will look forward to further guidance on this list.

Many thanks.

Chandra
24 May 08


Reply to: