[dev-context] XeTeX and \externalfigure problem

Hans Hagen pragma at wxs.nl
Tue May 8 11:38:33 CEST 2007


Mojca Miklavec wrote:
> On 5/7/07, Hans Hagen wrote:
>> Mojca Miklavec wrote:
>> > Hello Hans,
>> >
>> > what has happend to \externalfigure[a] in XeTeX?
>> >
>> > With \externalfigure[a] I now get
>> >
>> >     ! Unable to load picture or PDF file './a.png}'.
>> >
>> >
>> looks like an xetex message to me (see spec-xet)
>>
>> doesn't xetex support png?
>
> It does, but ConTeXt seems to ask for './a.png}' with an additional }
> at the end.
>
> If I actually create a figure with that name (cp a.png "a.png}"),
> ConTeXt runs "normally", but I get
>
> (\end occurred inside a group at level 1)
>
> ### simple group (level 1) entered at line 3 ({)
> ### bottom level
> No pages of output.
>
> It must be some kind of a little typo somewhere.

you can try to add some messages to

\def\xtxhandleotherimage
  {\XeTeXpicfile "\@@DriverImageFile"
     \ifdim\@@DriverImageWidth >\zeropoint \!!width  \@@DriverImageWidth \space\fi
     \ifdim\@@DriverImageHeight>\zeropoint \!!height \@@DriverImageHeight      \fi
   \relax}

\def\dogetXTXfiguresize
  {\setbox\foundexternalfigure\vbox{\XeTeXpicfile "\@@DriverImageFile"}%
   \xdef\analyzedfigurewidth {\the\wd\foundexternalfigure}%
   \xdef\analyzedfigureheight{\the\ht\foundexternalfigure}}


and see what 

\@@DriverImageFile

is in your case 

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------



More information about the dev-context mailing list