[pstricks] pstroicks and xelatex

Patrice MEGRET Patrice.MEGRET at umons.ac.be
Fri Dec 21 16:33:37 CET 2018


Thanks a lot.

PS: I rarely use xelatex but here the editor wants 'Times New Roman' font and xelatex was the quickest way to really get this font in the pdf file.  If there exists real 'Times new roman' font in Latex, it will solve the problem.

Best regards,


-----Message d'origine-----
De : PSTricks <pstricks-bounces+patrice.megret=fpms.ac.be at tug.org> De la part de Herbert Voss
Envoyé : vendredi 21 décembre 2018 16:17
À : pstricks at tug.org
Objet : Re: [pstricks] pstroicks and xelatex

Am 21.12.18 um 13:54 schrieb Patrice MEGRET:

> I have a small problem with pstricks and xelatex.
> If I compile the example below with latex, everything works as expected.
> If I use xelatex, $\Delta y$ of the \ncput inside the \rput(0,1){.} is 
> misplaced. Indeed it is shifted by 1 cm above the \ncput as the \rput 
> was doing twice its job.


the xdvipdfmx program is not complete compatible to dvips.
This is the case for placing objects relativ to nodes.
\pcline defines its coordinates first as internal nodes @@A and @@B. We can use this for a new macro. Maybe that I will write a pstricks-xetex.tex which wioll collect all such stuff.

\def\NCput{\pst at object{NCput}}
\def\NCput at i#1{%
   \use at par
   \pst at getcoor{@@A}\pst at tempA
   \pst at getcoor{@@B}\pst at tempB
   \if at star\def\next{\rput*}\else\def\next{\rput}\fi
   	  \pst at tempA /yA ED /xA ED
   	  \pst at tempB /yB ED /xB ED
   	  xA xB add 2 div
   	  yA yB add 2 div \tx at UserCoor){#1}

   \pcline{<->}(1,1)(7,1)\ncput{$\Delta y$}%
   \rput(0,1){\pcline{<->}(1,1)(7,1)\NCput*{$\Delta y$}} \end{pspicture}



PSTricks mailing list
PSTricks at tug.org
archive: http://www.tug.org/pipermail/pstricks/

More information about the PSTricks mailing list