# How to control the size of diagbox(with long text) in psmatrix diagrams?

The problem for me is the 4th and 5th line from the bottom

(code from an example of Herbert and the problem is where I try to add things ;-) )

\usepackage{amsmath,amsfonts,amssymb,latexsym}

\usepackage{pst-node}
\usepackage{pst-blur}

%\input{pssettings.tex}
\begin{document}
\begin{psmatrix}[rowsep=1.75,colsep=1.5]% defines the distance between two frames
\cnode[fillstyle=solid,fillcolor=blue](0,0){0.15}{Current}
& [name=SA] Solución Actual\\
\cnode[fillstyle=solid,fillcolor=blue](0,0){0.15}{Current}
\cnode[fillstyle=solid,fillcolor=pink](-0.75,0.75){0.15}{Current}
\cnode[fillstyle=solid,fillcolor=pink](0,0.65){0.15}{Current}
\cnode[fillstyle=solid,fillcolor=pink](0.75,0.75){0.15}{Current}
\cnode[fillstyle=solid,fillcolor=pink](-0.75,0.15){0.15}{Current}
\cnode[fillstyle=solid,fillcolor=pink](0.65,0.15){0.15}{Current}
\cnode[fillstyle=solid,fillcolor=pink](-0.75,0.75){0.15}{Current}
\cnode[fillstyle=solid,fillcolor=pink](1,1){0.20}{Current}
\cnode[fillstyle=solid,fillcolor=blue](0,0){0.20}{Current}
\psline[linewidth=0.2]{->}(1,1)(0.5,0.5)
& Elegir Mejor Vecino\\
\psdiabox[shadow=true]{¿Is in the house of Mary?}
&\psdiabox[shadow=true]{¿Is in the house of King?}& \\
}}&
\end{psmatrix}
\end{document}


Use shortstack{...\\...}. I also changed your circle nodes into default circles:

\documentclass{article}
\usepackage{pst-node}
\usepackage{pst-blur}

\newpsobject{BDisk}{pscircle}{fillstyle=solid,fillcolor=blue}
\newpsobject{PDisk}{pscircle}{fillstyle=solid,fillcolor=pink}

%\input{pssettings.tex}
\begin{document}
\begin{psmatrix}[rowsep=1.75,colsep=1.5]% defines the distance between two frames
\BDisk[fillstyle=solid,fillcolor=blue](0,0){0.15}
& [name=SA] Solución Actual\\
\BDisk(0,0){0.15}
\PDisk(-0.75,0.75){0.15}
\PDisk(0,0.65){0.15}
\PDisk(0.75,0.75){0.15}
\PDisk(-0.75,0.15){0.15}
\PDisk(0.65,0.15){0.15}
\PDisk(-0.75,0.75){0.15}
\PDisk(1,1){0.20}
\BDisk(0,0){0.20}
\psline[linewidth=0.2]{->}(1,1)(0.5,0.5)
& Elegir Mejor Vecino\\
\psdiabox[shadow=true]{\shortstack{¿Is in the house\\ of Mary?}}
&\psdiabox[shadow=true]{\shortstack{¿Is in the house\\ of King?}}& \\
\end{psmatrix}
\end{document}


Does this code give what you want? I put the contents of the dianodes in a \parbox. In addition the text in the last column is left aligned, while centred with respect to the King's \dianode.

     \documentclass[12pt,a4paper]{article}

\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{amsmath,amsfonts,amssymb,latexsym}
\usepackage[pdf, x11names]{pstricks}%
\usepackage{pst-node}
\usepackage{pst-blur}
\usepackage[margin = 1.5cm, nomarginpar]{geometry}
\usepackage{graphicx}
\newlength{\mylen}
\settowidth{\mylen}{Elegir Mejor Vecino}

\newpsobject{cnodeblue}{cnode}{fillstyle=solid,fillcolor=blue}
\newpsobject{cnodepink}{cnode}{fillstyle=solid,fillcolor=pink}
\newpsobject{cnodegreen}{cnode}{fillstyle=solid,fillcolor=green}

\begin{document}
\begin{psmatrix}[rowsep=1.75,colsep=1.5]% defines the distance between two frames
\psframegray(-1.00,-1.00)(1.00,1.00)
\cnodeblue(0,0){0.15}{Current}
& [name=SA] \parbox{\mylen}{Solución Actual} \\
\psframegray(-1.00,-1.00)(1.00,1.00)
\cnodeblue(0,0){0.15}{Current}
\cnodepink(-0.75,0.75){0.15}{Current}
\cnodepink(0,0.65){0.15}{Current}
\cnodepink(0.75,0.75){0.15}{Current}
\cnodepink(-0.75,0.15){0.15}{Current}
\cnodepink(0.65,0.15){0.15}{Current}
\cnodepink(-0.75,0.75){0.15}{Current}