[pstricks] using braces from pstricks-add

Alexander 'Leo' Bergolth leo at strike.wu-wien.ac.at
Sun Nov 11 16:17:48 CET 2007


Hi!

I'd like to use psbrace to mark stages in a flowchart.
However, there are two problems that I couldn't solve in a clean way...

1) I didn't find a good way to set the start- and end-points of the
brace, except using pnodes in a separate psmatrix column and guessing
the correct offsets. (See my example below.)

2) The brace and it's text-label doesn't eat up space so its width isn't
included in the width of the psmatrix. Thus centering the whole figure
won't work.

Are there any good workarounds for those problems?

-------------------- 8< --------------------
\begin{figure}[htbp!]
  \centering
  \small
  \begin{psmatrix}[rowsep=0.8,colsep=0.8]
    \pnode(0,0.5){X1} & \dianode{S}{Condition1?}\\
    \pnode(0,-0.5){X2} & \rnode{SA}{\psframebox{do something}}\\
    \pnode(0,0.5){Y1} \pnode(0,-0.5){Y2} & \dianode{R}{Condition2?}\\
    {
      \psset{arrows=->,nodesep=0pt}
      \ncline{S}{SA}\nbput{Yes}
      \ncline{SA}{R}
    }
    \psbrace[ref=r,rot=180,nodesepA=-8pt](X1)(X2){Stage 1}
    \psbrace[ref=r,rot=180,nodesepA=-8pt](Y1)(Y2){Stage 2 very
      looooooong text}
  \end{psmatrix}%
\end{figure}
-------------------- 8< --------------------

Cheers,
--leo
-- 
e-mail   ::: Alexander.Bergolth (at) wu-wien.ac.at
fax      ::: +43-1-31336-906050
location ::: Computer Center | Vienna University of Economics | Austria




More information about the PSTricks mailing list