2

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}
\psset{framearc=0.2,shadowcolor=black!70,shadowangle=-90}‎
\begin{psmatrix}[rowsep=1.75,colsep=1.5]% defines the distance between two frames
    \psframe[fillcolor=lightgray,linestyle=none,blur,shadow](-1.00,-1.00)(1.00,1.00)
    \cnode[fillstyle=solid,fillcolor=blue](0,0){0.15}{Current}
    & [name=SA] Solución Actual\\
    \psframe[fillcolor=lightgray,linestyle=none,shadow,blur](-1.00,-1.00)(1.00,1.00)
    \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}
    & [name=SS] Generar Vecindad\\
    \psframe[fillcolor=lightgray,linestyle=none,shadow,blur](-1.00,-1.00)(1.00,1.00)
    \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}
2

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}
\psset{framearc=0.2,shadowcolor=black!70,shadowangle=-90}‎
\begin{psmatrix}[rowsep=1.75,colsep=1.5]% defines the distance between two frames
    \psframe[fillcolor=lightgray,linestyle=none,blur,shadow](-1.00,-1.00)(1.00,1.00)
    \BDisk[fillstyle=solid,fillcolor=blue](0,0){0.15}
    & [name=SA] Solución Actual\\
    \psframe[fillcolor=lightgray,linestyle=none,shadow,blur](-1.00,-1.00)(1.00,1.00)
    \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}
    & [name=SS] Generar Vecindad\\
    \psframe[fillcolor=lightgray,linestyle=none,shadow,blur](-1.00,-1.00)(1.00,1.00)
    \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}

enter image description here

2

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}
    \newpsobject{psframegray}{psframe}{fillcolor=lightgray,linestyle=none,shadow,blur}

\begin{document}
\psset{framearc=0.2, shadowcolor=black!70!, shadowangle = -90}
\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}
    & [name=SS] \parbox{\mylen}{Generar Vecindad} \\
    \psframegray(-1.00,-1.00)(1.00,1.00)
    \cnodepink(1,1){0.20}{Current}
    \cnodeblue(0,0){0.20}{Current}
    \psline[linewidth=0.2]{->}(1,1)(0.5,0.5)
    & Elegir Mejor Vecino\\
    [mnode = dia, linearc = 0.05, shadow = true] \parbox{3cm}{\centering ¿Is in the house\\ of Mary?}
    & [mnode = dia, shadow = true] \parbox{3cm}{\centering ¿Is in the house of King?}& \\
\end{psmatrix}

\end{document} 

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.