[XeTeX] Re: [MacTeX] XeTeX

Jonathan Kew jonathan_kew at sil.org
Thu Apr 15 10:26:14 CEST 2004


On 15 Apr 2004, at 2:52 am, Ross Moore wrote:

>
> On 14/04/2004, at 10:24 PM, Jonathan Kew wrote:
>
>> Thanks for this, Ross; yes, I see the same results you do, and 
>> clearly something's wrong. Hope to look into it soon; I'll let you 
>> know when I have a fixed version to try. It's pretty amazing that any 
>> math works at all, considering this!
>
> Well, for me the math does not work at all.
> Rather, the CM fonts don't work; as yet I don't know why.
> It may have something to do with my teTeX file-structure,
> but there's no -debug tracing in  xdv2pdf  so I cannot tell
> where it is actually looking for the .otf fonts.
>

True; I'll see if I can slip in a trace option for you. It should be 
looking for an OTFFONTS entry in texmf.cnf (which the installation 
script should have added, if all went well.... but it probably 
didn't!).


>
>>
>> By the way, what happens if you try this with Omega?
>
> Same as  tex, etex, pdftex, etc.

OK. I wondered, because when I tried Omega [ver. 3.141592-1.23.2.2 
(Web2C 7.5.2)] yesterday, I ran into things like this:

	\showthe\mathcode65
	> 28993.
	\showthe\mathcode`\A
	> 2899\CLOBBERED..

Ouch! Different issue, though; it's trying to show the right number.

> These are the problems that I've encountered so far:
>
>   1.  \mathcode  (as above)

Yes. I think I may have this fixed; need to check a bit more, and I'll 
try to post a new version shortly.

>
>   2.  lack of tracing in  xdv2pdf  (mentioned above)

Agreed; makes it hard to diagnose problems.

>
>   3.  cannot create a fresh working  xetex.xfmt  from  plain.tex
>       (so that it preloads .tfm file locations from my installation)

The xetex.xfmt that I provided was created by something like:
	% xetex -ini \*plain \\input xplain \\dump
(producing plain.xfmt, then renamed to xetex.xfmt).

(The extra input file xplain.tex simply sets up \catcode, \lccode and 
\uccode values for a bunch of Unicode letters.)

Are you trying to preload a very different set of tfms? I'm trying to 
think why it wouldn't work for you.

>
>      Here's what happens when I try to use such a locally \dump'd 
> format:
>
>  [glenlivet: XeTeX samples] rossmoor% xetex CM-test.tex
> This is XeTeXk, Version 3.14159-2.1-0.3 (Web2C 7.5.2)
>  %&-line parsing enabled.
> (./CM-test.tex [1*** malloc: vm_allocate(size=2584555520) failed 
> (error code=3)
> *** malloc[28133]: error: Can't allocate region
> fatal: memory exhausted (xmalloc of 2584553356 bytes).
> [glenlivet: XeTeX samples] rossmoor% bad XDV file: DVI_PRE not found, 
> b=-1

Is the malloc failure (which clearly reflects an underlying problem; no 
reason it should need that many bytes!) coming from xetex or from 
xdv2pdf? Try running xetex with the -no-pdf option, so it simply writes 
an .xdv file, and see if you get the same error.

>
>
>   4.  fclose: Bad file descriptor   problem.  (Is this just cosmetic ?)

I don't know what this is, yet; I haven't seen it. But it worries me. I 
suspect perhaps it's failing to find/open the tfms, and not handling 
the failure well; and later "closing" files that were never opened.

>
>        When \dump-ing the format in 3. this happens for
>              cmr5.tfm  cmmi5.tfm  cmbf5.tfm
>        (but not cmsy5.tfm or for any other design-sizes).
>
>        With LaTeX jobs it happens for some .fd files and .tfm files,
>        in particular whem AMS packages are loaded.
>
>
>   5.  lack of driver-support for color
>          (this has been mentioned previously)
>        Is color part of the AAT interface ?
>        If so, then this shouldn't be too hard to do.
>        But there also needs to be color for non-AAT constructs.
>

For AAT fonts, you can specify "color=XXXXXX" (a 6-digit hex RGB value) 
as one of the options to the \font command (this is shown in a few of 
the sample files).

There's also \special{x:textcolor=XXXXXX} and 
\special{x:rulecolor=XXXXXX} that will set the color for following text 
and rules respectively. These will override any font color. You can 
reset them by omitting the XXXXXX altogether, as in 
\special{x:textcolor=}; that's different from specifying 
\special{x:textcolor=000000} in that it will no longer override \font 
color specifications.

>
>   6.  lack of driver-support for active hyperlinks
>        Preview.app supports hyperlinks in Panther, but TeXshop does 
> not.
>        Surely there are some APIs for this now.

I don't recall seeing any APIs to create hyperlinks when generating PDF 
through Quartz, which is what xdv2pdf is doing; but I'll look, perhaps 
Panther added this. If not, I'll talk to some folks at Apple and see if 
there's a possibility for the future. (Creating the hyperlinks is a 
completely separate matter from supporting them once they're in the 
PDF, of course.)

>
>
>   7.  support for  scaling/rotations/clipping etc. of imported 
> graphics.
>        How much of the \includegraphics  from  graphicx.sty
>        can be supported, for a  xetex.def  driver file ?

The \picfile (and \pdffile) commands accept keyworded options for 
scaling, translation, and rotation (not clipping, yet at least); see 
the XeTeX-notes file.

Let me know how far this gets you; I'm happy to consider changes to 
make xetex fit in better with the rest of the TeX world. Nothing about 
this is set in stone; features were simply created to fit what I needed 
to do in what seemed like the easiest way.

Jonathan

_______________________________________________
MacTeX mailing list
http://tug.org/mailman/listinfo/mactex



More information about the XeTeX mailing list