3

I´m starting with diagrams, and I have any errors with this code: (edited after Herbert´s comment)

\documentclass[12pt,a4paper]{standalone}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[spanish]{babel}
\usepackage{amsmath,amsfonts,amssymb,latexsym}
\usepackage{graphicx}

\usepackage{xcolor}
\usepackage{mathpazo}       % Fuente MathPazo
% ----------------------  PSTRICKS ---------------
\usepackage{pstricks}
\usepackage{pst-plot,pst-3dplot,pst-node,pst-tree,pst-grad,pst-coil,pst-text,pst-3d,pst-eps,pst-fill,pstricks-add,multido}
%\input{pssettings.tex}
\begin{document}
\psset{framearc=0.2,shadowcolor=black!70,shadowangle=-90,blur=true,fillstyle=solid}‎
\begin{psmatrix}[rowsep=0.5,colsep=0.5]% defines the distance between two frames
    \psset{xunit=1cm,yunit=1cm}
    &\makebox[2.00]{%
    \psframe[fillcolor=lightgray,fillstyle=solid,linestyle=none](-1.00,-1.00)(1.00,1.00)
    \cnode[fillstyle=solid,fillcolor=blue](0,0){0.15}{Current}
    }
    & \makebox[6cm]{Solución Actual}\\

    &\makebox[2.00]{%
    \psframe[fillcolor=lightgray,fillstyle=solid,linestyle=none](-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}
    }& \makebox{Generar Vecindad}\\
    &\makebox[2.00]{%
    \psframe[fillcolor=lightgray,fillstyle=solid,linestyle=none](-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}
    }& \makebox{Elegir Mejor Vecino}\\

    \psdiabox[shadoÇ=true]{¿Cumple el\\Criterio de Aspiración?}
    &\psdiabox[shadoÇ=true]{¿Está en la \\Lista Tabú?}& \\

    & & \makebox{Aceptar como nueva solución}\\

    }

\end{psmatrix}


\end{document}

How Can I do to obtain no errors?

enter image description here

enter image description here

enter image description here

How can I do to not overput the contente os makboxes? , obatining a separation between each 2. I_ thought that It was automatic with rowsep

How Can I put the text on the right of the image without being over the frameboxes??

lenght of makebox... Can be set with pt/cm/or without messure?

  • what is the contents of pssettings.tex? However, provide minimal examples and do not use external files. – user2478 Apr 18 '14 at 7:44
2

\makebox expects a length with a unit. It is a LaTeX command, not a PSTricks one. However, I do not know what you really want to draw. MAybe this helps:

\documentclass[12pt,a4paper]{article}
\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}
    & Elegir Mejor Vecino
\end{psmatrix}
\end{document}

enter image description here

  • Yes, it´s that!! It´s the sucesion in the Tabu Search. When I finish, I´m posting the final grpahs that I had have reached with your help. – Mika Ike Apr 18 '14 at 8:22
  • What I can´t understand is why gives me problems in the psset{....} – Mika Ike Apr 18 '14 at 8:22
  • TeX reports the line of the input stream which is often not the line of the source code. – user2478 Apr 18 '14 at 8:25
  • Yes, but your code runs well, and in the mine I have problmes in \psset and \psframe . That is a surprise for me. Never I have problems with this before using psmatrix. Im trying to understand, because I like shadows and other features. sensa.square7.ch/fdsfsf0.jpg – Mika Ike Apr 18 '14 at 8:31
  • your \makebox makes no sense in your example. It can have only horizontal material, no linebreak and no & characters. Delete the \makebox{...} in your example and try again. Edit your question with the new code, then I'll see what happens. – user2478 Apr 18 '14 at 8:35

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.