# [pstricks] new diagram + psmatrix

Herbert Voss LaTeX at zedat.fu-berlin.de
Tue Jun 13 20:54:07 CEST 2006

Herbert Voss wrote:
> s khan wrote:
>
>> Thanks. If we view the pdf file of the following code, we see that
>> some  arrows are on the boxes, which looks ugly!
>>
>> What I want is: the three-left-arrow heads should be on the ?left
>> sides? of the left boxes and the ?right sides? of the right boxes.
>>
>> If possible, I want all the arrows generated from one point of the
>> bottom side of the top box.
>
>
> -- put the psmatrix first in a box
> -- write it with arrows
> -- write it again without the arrows to get the boxes
>    over the arrows

sorry, a box is nonsense here. It is only needed with arrows
pointing to the top of each left/right box ...

Herbert

\documentclass[a4paper]{article}

\usepackage{pstricks}
\usepackage{pst-node,graphicx}
\definecolor{Pink}{rgb}{1.,0.75,0.8}
\pagestyle{empty}
\setlength\parindent{0pt}
\newsavebox\PBox
\begin{document}
\psset{linearc=0} % it makes a round corner of connection link

\begin{psmatrix}[rowsep=1cm,colsep=.5cm]
{ \begin{tabular}{c}
$f1 = a \, q_1 + b \, q_2$ \\
$f2 = c \, q_1 + d \, q_2$ \\
\end{tabular} }  &   \\% end of 1st row
\begin{tabular}{c}
$L_1 = t (q_1+ q_2)\dot{q}_1 - \dot{q}_2 + \frac{dg}{dt}$ \\
when $a=0, b=1, c=2, d=1$
\end{tabular}
}
& &
\begin{tabular}{c}
$L_1 = t (q_1+ q_2)\dot{q}_1 - \dot{q}_2 + \frac{dg}{dt}$ \\
when $a=0, b=1, c=2, d=1$
\end{tabular}
} \\
\begin{tabular}{c}
$L_1 = t (q_1+ q_2)\dot{q}_1 - \dot{q}_2 + \frac{dg}{dt}$ \\
when $a=0, b=1, c=2, d=1$
\end{tabular}
}
& &
\begin{tabular}{c}
$L_1 = t (q_1+ q_2)\dot{q}_1 - \dot{q}_2 + \frac{dg}{dt}$ \\
when $a=0, b=1, c=2, d=1$
\end{tabular}
} \\
\begin{tabular}{c}
$L_1 = t (q_1+ q_2)\dot{q}_1 - \dot{q}_2 + \frac{dg}{dt}$ \\
when $a=0, b=1, c=2, d=1$
\end{tabular}
}
& &
\begin{tabular}{c}
$L_1 = t (q_1+ q_2)\dot{q}_1 - \dot{q}_2 + \frac{dg}{dt}$ \\
when $a=0, b=1, c=2, d=1$
\end{tabular}
}
\end{psmatrix}%
\psset{linewidth=1.5pt,arrowsize=7pt,angleA=-90,arm=0}%
\ncdiag{->}{1,2}{4,1}%
\ncdiag[angleB=180]{->}{1,2}{4,3}%
%
\ncdiag{->}{1,2}{3,1}%
\ncdiag[angleB=180]{->}{1,2}{3,3}%
%
\ncdiag{->}{1,2}{2,1}%
\ncdiag[angleB=180]{->}{1,2}{2,3}%

\end{document}