Q: Weird behavior of pstricks

Denis Girou Denis.Girou at idris.fr
Tue Sep 2 22:02:25 CEST 1997


-----------------------------------------------------------------------------
This is the PSTricks mailing list, devoted to discussions about computational
graphics in (La)TeX using the PSTricks package from Timothy van Zandt.
For help using this mailing list, see instructions at the end of message.
-----------------------------------------------------------------------------

The following message is a courtesy copy of an article
that has been posted to comp.text.tex as well.

>>>>> "Wolfgang.May" == Wolfgang May <may at informatik.uni-freiburg.de> writes:

    Wolfgang.May> Hi,
    Wolfgang.May> Some days ago, we installed pstricks new, and now I get 
    Wolfgang.May> additional linebreaks after \ovalnode's (only at the beginning of a
    Wolfgang.May> line):

    Wolfgang.May> %%
    Wolfgang.May> \documentclass{article}
    Wolfgang.May> \usepackage{pstcol,pst-node}

    Wolfgang.May> \begin{document}
    Wolfgang.May>   \ovalnode[fillstyle=solid,fillcolor=lightgray]{AX7}{~$A$~} x
    Wolfgang.May>   \ovalnode[fillstyle=solid,fillcolor=lightgray]
    Wolfgang.May>      {MX7}{$(r_1,\ldots,r_n)( A)$} 

    Wolfgang.May> x  \ovalnode[fillstyle=solid,fillcolor=lightgray]{AX7}{~$A$~} x
    Wolfgang.May>   \ovalnode[fillstyle=solid,fillcolor=lightgray]
    Wolfgang.May>      {MX7}{$(r_1,\ldots,r_n)( A)$} 

    Wolfgang.May>   \circlenode[fillstyle=solid,fillcolor=lightgray]{AX7}{~$A$~} x
    Wolfgang.May>   \ovalnode[fillstyle=solid,fillcolor=lightgray]
    Wolfgang.May>      {MX7}{$(r_1,\ldots,r_n)( A)$} 
    Wolfgang.May> \end{document}
    Wolfgang.May> %%

    Wolfgang.May> produces the following output [(A) denotes a circle- or ovalnode]:

    Wolfgang.May>  (A)
    Wolfgang.May>  x ((r1..rn)(A))

    Wolfgang.May>  x (A) x ((r1...rn)(A))

    Wolfgang.May>   (A) x ((r1...rn)(A))

    Wolfgang.May> ... and I cannot get rid of the linebreak in the first line after
    Wolfgang.May> the ovalnode =:-(

    Wolfgang.May> Has anyone also installed the new pstricks and has also this problem
    Wolfgang.May> - or has it not ?

  You're right. Some \leavevmode commands seems missing for some node
definitions. From my tests, it affect \dianode, \ovalnode and \trinode.

  Make the following changes (just add the \leavemode lines) in pst-node.tex
(it will be reported later on the CTAN file):
  
\def\fileversion{93a/b,94beta-97 patch 3}
\def\filedate{1997/09/02}

...........................................................................

\def\dianode at ii#1{%
\begingroup
\pst at useboxpar
\psdiabox at iii
\setbox\pst at hbox=\hbox{%
\pst at newnode{#1}{14}{}{%
/X \pst at number\pst at dima def
/Y \pst at number\pst at dimb def
/w \pst at number\pst at dimc 2 mul def
/h \pst at number\pst at dimd 2 mul def
/NodePos { \tx at DiaNodePos } def}%
\box\pst at hbox}%
\ifnodealign\psboxseptrue\fi
\ifpsboxsep\psdiabox at sep\fi
% DG/SR modification begin - Sep. 2, 1997
\leavevmode
% DG/SR modification end
\ifnodealign\lower\pst at dimb\fi
\box\pst at hbox
\endgroup}
\def\tx at TriNodePos{TriNodePos }
\def\tx at InitTriNode{InitTriNode }
\def\trinode{\pst at object{trinode}}
\def\trinode at i#1{\pst at makebox{\trinode at ii{#1}}}
\def\trinode at ii#1{%
\begingroup
\pst at useboxpar
\pstribox at iii
\setbox\pst at hbox=\hbox{%
\pst at newnode{#1}{14}{}{%
\pst at number\pst at dimc
\pst at number\pst at dimd
\ifodd\psk at trimode
exch
\pst at number\pst at dima
\else
\pst at number\pst at dimb
\fi
\psk at trimode
\pst at number{\wd\pst at hbox}%
\pst at number{\ht\pst at hbox}%
\pst at number{\dp\pst at hbox}%
\tx at InitTriNode}%
\box\pst at hbox}%
\ifnodealign\psboxseptrue\fi
\ifpsboxsep\pstribox at sep\fi
% DG/SR modification begin - Sep. 2, 1997
\leavevmode
% DG/SR modification end
\ifnodealign\lower\pst at tempa\fi
\box\pst at hbox
\endgroup}
\def\tx at OvalNodePos{OvalNodePos }
\def\ovalnode{\pst at object{ovalnode}}
\def\ovalnode at i#1{\pst at makebox{\ovalnode at ii{#1}}}
\def\ovalnode at ii#1{%
\begingroup
\pst at useboxpar
\psovalbox at iii
\setbox\pst at hbox=\hbox{%
\pst at newnode{#1}{14}{}{%
/X \pst at number\pst at dima def
/Y \pst at number\pst at dimb def
/w \pst at number\pst at dimc def
/h \pst at number\pst at dimd def
/NodePos { \tx at OvalNodePos } def}%
\unhbox\pst at hbox}%
\ifnodealign\psboxseptrue\fi
\ifpsboxsep\psovalbox at sep\fi
% DG/SR modification begin - Sep. 2, 1997
\leavevmode
% DG/SR modification end
\ifnodealign\lower\pst at dimb\fi
\box\pst at hbox
\endgroup}

...........................................................................

  Thanks for report.

Denis Girou
-- 
---------------------------------------------------------------------------
Institut du De'veloppement et des Ressources en Informatique Scientifique |
Centre National de la Recherche Scientifique                              |
Ba^timent 506 - B.P. 167 - 91403 Orsay Cedex - France                     |
Tel. : 01.69.35.85.75 (33.1.69.35.85.75 from foreign countries)           |
Messagerie : Denis.Girou at idris.fr                                         |
---------------------------------------------------------------------------

-----------------------------------------------------------------------------
The list interface (subscription, information, access to the archives) is on:
http://www.tug.org/cgi-bin/lwgate/pstricks
Otherway to unsubscribe, send mail to pstricks-request at mail.tug.org
with a blank subject and in body the line unsubscribe <email-address>
-----------------------------------------------------------------------------



More information about the PSTricks mailing list