[pstricks] using braces from pstricks-add
Herbert Voss
Herbert.Voss at fu-berlin.de
Sun Nov 11 17:51:06 CET 2007
Alexander 'Leo' Bergolth schrieb:
> 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?
choose "empty lines" inside the psmatrix for the nodes.
\documentclass{article}
\usepackage{pstricks-add}
\begin{document}
\begin{psmatrix}[rowsep=0.8,colsep=0.4]
[name=X1] & \\[-25pt]
& \dianode{S}{Condition1?}\\[0pt]
& \rnode{SA}{\psframebox{do something}}\\[-25pt]
[name=X2] & \\[0pt]
& \dianode{R}{Condition2?}\\[-10pt]
[name=Y2] &
\end{psmatrix}%
\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](X2)(Y2){\parbox{2cm}{Stage 2 very
looooooong text}}
\end{document}
Herbert
More information about the PSTricks
mailing list