[XeTeX] XeTeX 0.4 available

Ross Moore ross at ics.mq.edu.au
Thu Apr 22 07:16:09 CEST 2004


On 22/04/2004, at 2:32 AM, Jonathan Kew wrote:
>
>> Tomorrow I'll post my  xetex.def  which implements LaTeX color,
>> and \includegraphics .
>> I'm pretty sure it's as correct as it can be, for what you
>> say you have implemented. It'll give others a chance to try
>> it out, and detect any mistakes that I'm not able to find myself.
>
> That's great.

OK, attached is my current efforts at creating a graphics
driver for  XeTeX:  i.e.  xetex.def  v0.4 .


-------------- next part --------------
A non-text attachment was scrubbed...
Name: xetex.def
Type: application/octet-stream
Size: 10605 bytes
Desc: not available
Url : http://tug.org/pipermail/xetex/attachments/20040422/74fc5337/xetex-0001.obj
-------------- next part --------------


Here's an outline of what is needed to use it:

  1.  prepare  color.sty  and  graphics.sty  as follows:

     copy those files to the texmf.local tree,
     or your  ~/Library/texmf tree by
     -- making sure the right directory exists
     e.g.
        /usr/local/teTeX/share/texmf.local/tex/latex/graphics/
        or   ~/Library/texmf/tex/latex/graphics/

     then
       cp `kpsewhich color.sty` ~/Library/texmf/tex/latex/graphics/
       cp `kpsewhich graphics.sty` ~/Library/texmf/tex/latex/graphics/


  2.  add 1 line to *both* these copies:  color.sty  and  graphics.sty

           \DeclareOption{xetex}{\def\Gin at driver{xetex.def}}

      e.g.  put this on a new line following
            \DeclareOption{vtex}{\def\Gin at driver{vtex.def}}


  3.  copy  xetex.def  into that same directory with the modified
       color/graphics  packages.


  4.  run   sudo texhash  .




Here's a file that I've been using to test the LaTeX commands
for color and graphics-inclusion.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PicFileLSample.ltx
Type: application/text
Size: 4237 bytes
Desc: not available
Url : http://tug.org/pipermail/xetex/attachments/20040422/74fc5337/PicFileLSample-0001.bin
-------------- next part --------------



Transformations of graphics are not fully supported correctly yet.
This is because the several factors:

   1.  XeTeX 0.4 doesn't do rotations properly
          (this should be fixed in 0.5).

   2.  there is no support yet for \rotatebox, \scalebox

   3.  the order of attributes matters; e.g.

  \includegraphics[scale=.5,height=2cm,width=5cm,angle=30]{xetex.jpg}
  \includegraphics[scale=.5,height=2cm,angle=30,width=5cm]{xetex.jpg}
  \includegraphics[scale=.5,angle=30,height=2cm,width=5cm]{xetex.jpg}
  \includegraphics[scale=.5,width=5cm,angle=30,height=2cm]{xetex.jpg}

are all meant to give different results.

   Without \rotatebox and \scalebox, this is very hard to do.

   However, simple cases of using just 0 or 1 or 2 of the options
    scale, height, width, angle  should work OK.


   So there is more work to be done on both the driver,
   and XeTeX itself, before all combinations of options
   are properly implemented.


>
> A couple of questions (for you to think about in the morning; others 
> are of course welcome to offer opinions as well!):
>
> * Should there also be cropping options on \picfile? I've always done 
> stuff like that outside of TeX, but I remember someone mentioning it; 
> does \includegraphics have cropping facilities? If so, what would be a 
> logical approach to extending \picfile: four new keywords - cropleft, 
> cropright, croptop, cropbottom? How should this interact with scaling 
> and rotation?

If these can be implemented for arbitrary boxes of stuff,
then specialising to imported graphics will not be needed.
This was Hans' point.


> * How badly do people want \special{x:pagecolor=XXXXXX} or similar? To 
> implement this, I really need to know the page color at the very 
> beginning of the page, so I can paint it first--which will mean 
> scanning the page for occurrences of this \special before starting to 
> image anything. That will have a small but perhaps noticeable cost.

Painting the page is surely the wrong approach.
This feature should follow as a special case of being able to add
more general PDF constructions.


>
> Jonathan


All the best,

	Ross


------------------------------------------------------------------------
Ross Moore                                         ross at maths.mq.edu.au
Mathematics Department                             office: E7A-419
Macquarie University                               tel: +61 +2 9850 8955
Sydney, Australia                                  fax: +61 +2 9850 8114
------------------------------------------------------------------------



More information about the XeTeX mailing list