[XeTeX] Updating XeTeX (plain) for PS Tricks

John Was john.was at ntlworld.com
Mon Sep 10 08:21:50 CEST 2007


Thanks for the patch.  I think there are probably several other things that 
need to be worked out to get PS Tricks to work perfectly with XeTeX and I'm 
sure you're on to these!  I did eventually (thanks to a helpful friend) get 
the driver set up properly (I trust) but I now find that \psframebox and 
\ncline don't always work.  The attached PDFs show an incorrect and a 
correct version of the same chart, with exactly the same input code.  The 
correct version was produced via EmTeX and the incorrect version via XeTeX 
(the surrounding text is different since I pasted the code into an 
experimental file that I am using to familiarize myself with XeTeX).

Here is the PS Tricks input code for the chart, in case of interest:

\midinsert
\extract%THIS CALLS THE FONT AT THE REQUIRED SIZE
\def\apexpoint#1#2{\setbox0=\hbox{#1}%
\pnode(0.5\wd0,-3.5pt){#2}}%
\def\upperpoint#1#2{\setbox0=\hbox{#1}%
\pnode(0.5\wd0,10pt){#2}}%
\psset{linewidth=0.5pt,%
framesep=3pt,%
nodesepA=0pt,%
nodesepB=0pt}%
\tabskip 0pt plus \hsize
\halign to \hsize{%
#\hfil\tabskip 0pt&
#\hfil&
#\hfil&
#\hfil&
#\hfil\tabskip 0pt plus \hsize\cr
&&&\apexpoint{animal}{A}%
\psframebox{animal}\cr
\noalign{\vskip 24pt}
&&\upperpoint{rationale}{B}%
\apexpoint{rationale}{D}%
\psframebox{rationale}&&
\upperpoint{irrationale}{C}%
\psframebox{irrationale}\cr
\noalign{\vskip 24pt}
&\upperpoint{mortale}{E}%
\apexpoint{mortale}{G}%
\psframebox{mortale}&&
\upperpoint{immortale}{F}%
\psframebox{immortale}\cr
\noalign{\vskip 24pt}
\upperpoint{voluntarie}{H}%
\psframebox{\rlap{mobile}%
\lower\baselineskip \hbox{voluntarie}}&&
\upperpoint{apta a natura et}{I}%
\psframebox{%
\setbox0=\hbox{apta a natura et}%
\copy0\hskip -\wd0
\lower\baselineskip \hbox{\rlap{fantasia ad}}%
\lower 2\baselineskip \hbox{\rlap{motum}\phantom{apta a natura et}}}\cr}
\ncline{A}{B}%
\ncline{D}{E}%
\ncline{G}{H}%
\ncline[linestyle=dashed]{A}{C}%
\ncline[linestyle=dashed]{D}{F}%
\ncline[linestyle=dashed]{G}{I}%
\endinsert

Best


John

----- Original Message ----- 
From: "caapv 208" <caapv208 at yahoo.co.jp>
To: "Unicode-based TeX for Mac OS X and other platforms" <xetex at tug.org>
Sent: Monday, September 10, 2007 1:52 AM
Subject: JunkEmail: Re: [XeTeX] Updating XeTeX (plain) for PS Tricks


> --- I wrote:
>
>> > And this \rotateleft{should be rotated left.}\par
>> > TeX allows for it to be but in fact it isn't.\par
>>
>> OK, you have find a bug in the current version of
>> xdvipdfmx, namely it doesn't recognize Rot
>> correctly.
>
> Here is a patch:
>
>
> Index: tex/generic/xetex-pstricks/xetex-pstricks.con
> ===================================================================
> --- tex/generic/xetex-pstricks/xetex-pstricks.con       (
> リビジョン 521)
> +++ tex/generic/xetex-pstricks/xetex-pstricks.con       (
> 作業コピー)
> @@ -63,6 +63,22 @@
> \special{x: escale}%
> \ifdim\pst at dima>\z@\kern\pst at dima\fi}}
> \let\ps@@scalebox\@@scalebox
> +\def\ps at rotateleft#1{%
> +\leavevmode\hbox{\hskip\ht#1\hskip\dp#1\vbox{\vskip\wd#1%
> +\pst at Verb{90 \tx at RotBegin}
> +\vbox to \z@{\vss\hbox to \z@{\box#1\hss}\vskip\z@}%
> +\pst at Verb{\tx at RotEnd}}}}
> +\def\ps at rotateright#1{%
> +  \leavevmode\hbox{%
> +  \hskip\ht#1\hskip\dp#1\vbox{\vskip\wd#1%
> +  \pst at Verb{-90 \tx at RotBegin}
> +  \vbox to \z@{\hbox to \z@{\hss\box#1}\vss}%
> +  \pst at Verb{\tx at RotEnd}}}}
> +\def\ps at rotatedown#1{%
> +\hbox{\hskip\wd#1\vbox{\vskip\ht#1\vskip\dp#1%
> +\pst at Verb{180 \tx at RotBegin}%
> +\vbox to \z@{\hbox to \z@{\box#1\hss}\vss}%
> +\pst at Verb{\tx at RotEnd}}}}
> \def\begin at psclip{\special{x: gsave}}
> \def\end at psclip{\special{x: grestore}}
> \def\@newcolor#1#2#3{%
>
>
>
> Regards,
> SMiyata
>
>
> --------------------------------------
> Easy + Joy + Powerful = Yahoo! Bookmarks x Toolbar
> http://pr.mail.yahoo.co.jp/toolbar/
>
> _______________________________________________
> XeTeX mailing list
> postmaster at tug.org
> http://tug.org/mailman/listinfo/xetex
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: chartright.pdf
Type: application/pdf
Size: 51204 bytes
Desc: not available
Url : http://tug.org/pipermail/xetex/attachments/20070910/dcd2fe1c/attachment-0002.pdf 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: chartwrong.pdf
Type: application/pdf
Size: 39156 bytes
Desc: not available
Url : http://tug.org/pipermail/xetex/attachments/20070910/dcd2fe1c/attachment-0003.pdf 


More information about the XeTeX mailing list