Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I was tryin and trying , and I have no solution.

I program many nclines but only appears 2 enter image description here

Why don´t show nclines from line 166? Only shows 2 lines.

\documentclass[12pt,a4paper]{article}
\usepackage{setspace} % para que no afecte el interlineado a las notas de pié de página
%\usepackage{blindtext}  % para usar un texto-tipo de ejmplo Lore.... sin teclear a boleo, con \blindtext
\setstretch{1.5}
\usepackage{lipsum,mwe}
\usepackage{booktabs}
\usepackage{tabularx}


\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[spanish]{babel}
\usepackage{mathtools,amsmath,amsfonts,amssymb,latexsym}
\usepackage{eurosym}
\usepackage{graphicx}
\newcommand*{\upstrut}[1]{\rule{0pt}{#1}}% creates an invisible rule of height #1
\newcommand*{\negstrut}[1]{\rule[-#1]{0pt}{#1}}% creates an invisible rule of deptht #1
\usepackage{verbatim}
\usepackage{wrapfig}
\usepackage{subfigure}   % para gráficos y ubicar cosas
\usepackage{hyperref}
\hypersetup{colorlinks=true, urlcolor=blue}

\usepackage[x11names]{xcolor}  % otra opcion sería \usepackage{xcolor}
%\usepackage{xcolor}
\usepackage{mathpazo}       % Fuente MathPazo
\usepackage{datetime}       % paquete para configurar formato de fecha y hora
\settimeformat{ampmtime}
\renewcommand*{\noon}{\pmname}
%\usepackage[ruled,vlined,lined,linesnumbered,algochapter,portugues]{algorithm2e} %Para presentar algoritmos
%\usepackage[cm]{fullpage}

%\usepackage{wrapfig} % para poner imagenes rodeadas de texto
%\usepackage[rflt]{floatflt}

\spanishdecimal{.}
    \usepackage[absolute]{textpos}


% ----------------------  PSTRICKS ---------------
\usepackage{pstricks}
\usepackage{epstopdf}
\usepackage{pst-plot,pst-3dplot,pst-node,pst-tree,pst-grad,pst-coil,pst-text,pst-3d,pst-eps,pst-fill,pstricks-add,multido}
\usepackage{pstricks-add}
\usepackage{pst-blur}

\newpsobject{cnodeblue}{cnode}{fillstyle=solid,fillcolor=blue} %del diagrama tabu
\newpsobject{cnodepink}{cnode}{fillstyle=solid,fillcolor=pink} %del diagrama tabu
\newpsobject{cnodegreen}{cnode}{fillstyle=solid,fillcolor=green} %del diagrama tabu
\newpsobject{psframegray}{psframe}{fillcolor=lightgray,linestyle=none,shadow,blur} %del diagrama tabu
% ---- Fin Paquetes de pst-all


% ------------- CABECERAS y PIES DE PÁGINA ---------------------------
\usepackage{fancyhdr} % activamos el paquete para usar cabeceras y piés de página.
\cfoot{}
\newcommand{\sep}{\vspace{0.34cm}}
\newcommand{\redu}{\vspace{-0.56cm}}
\newcommand{\ul}{\underline}
% INSERTAR ESTAS DOS LINEAS SI NO FUNCIONA EL DIAGRAMA
%\newcommand*{\upstrut}[1]{\rule{0pt}{#1}}% creates an invisible rule of height #1   del diagrama tabu
%\newcommand*{\negstrut}[1]{\rule[-#1]{0pt}{#1}}% creates an invisible rule of deptht #1 del diagrama tabu
\newpsobject{cnodeblue}{cnode}{fillstyle=solid,fillcolor=blue} %del diagrama tabu
\newpsobject{cnodepink}{cnode}{fillstyle=solid,fillcolor=pink} %del diagrama tabu
\newpsobject{cnodegreen}{cnode}{fillstyle=solid,fillcolor=green} %del diagrama tabu
\newpsobject{psframegray}{psframe}{fillcolor=lightgray,linestyle=none,shadow,blur} %del diagrama tabu

\DeclareMathOperator*{\minimizar}{Minimizar}
\DeclareMathOperator*{\maximizar}{Maximizar}
\DeclareMathOperator*{\optimizar}{Optimizar}


\definecolor{miorange}{RGB}{234, 112, 2}

\input{pssettings.tex}

\begin{document}

\resizebox{12cm}{!}{    % if you want to resize
\psset{framearc=0.2, shadowcolor=black!70, shadowangle=-90, unit=1.0cm}
\def\pscolhookii{\hskip 2cm}
\def\pscolhookiii{\hskip 2cm}
%\def\pscolhookiii{\psset[pst-node]{mcol = l}}

\begin{psmatrix}[rowsep=0.8, colsep=0.8]% defines the distance between two frames
    &[mnode = r, name = sa]
    \psframebox[shadow=true, framearc = 0.25,framesep=0.3]{$S_a=S_{inicial}$}
    \\[0.25cm]
%
    &[mnode = r, name = icero]
    \psframebox[shadow=true, framearc = 0.25,framesep=0.3]{$i=0$}
    \\[0.25cm]
%
    &[mnode = r, name = Tini]
    \psframebox[shadow=true, framearc = 0.25,framesep=0.3]{$T_0=r_0 \cdot f(S_a)$}\footnote{Esta elección podría tomarse como una Temperatura Fijada, y no dependiente de $S_{inicial}$}
    \\[0.25cm]
%
%  & [name = SA]
%  \psframegray(-1.00,-1.00)(1.00,1.00)
%    \cnodeblue(0,0){0.15}{Current}
%    \rput[t](0,-1.25){Solución Actual}&
%    \\[0.58cm] %era 1.25
%
[mnode = none, shadow=true, linearc = 0.05,framesep=0.3,name = Tnueva]
    \psframebox[shadow=true, framearc = 0.25,framesep=0.3]{$T_i = r_i \cdot T_{i-1}$}
&
 [mnode = none, shadow=true, linearc = 0.05,framesep=0.3,name = Tmax]
    \psdiabox[shadow=true, framearc = 0.25,framesep=0.15]{$T_i > T_{final}$\footnote{Alternativamente podría verificarse si $i>i_{max}$}}
     &
     [mnode = r, name = EMSV]
    \psframebox[shadow=true, framearc = 0.15]{\begin{tabular}{c@{\hskip\itemsep}l}
    \textbullet & Eligir Mejor\\ &Solución Visitada \end{tabular}}
    %%%%%%%%%%\\\textbullet & \textbf{Finalizar}
    \\[0.24cm]
%
[mnode = none, shadow=true, linearc = 0.05,framesep=-0.25,name =imasuno]
    \psframebox[shadow=true, framearc = 0.25,framesep=0.3]{$i = i + 1$}
&
 [mnode = none, shadow=true, linearc = 0.05,framesep=-0.25,name =jcero]
    \psframebox[shadow=true, framearc = 0.25,framesep=0.3]{$j = 0$}
    &
    [mnode = none, shadow=true, linearc = 0.05,framesep=-0.25,name =FIN]
    \psovalbox[shadow=true, framearc = 0.25,framesep=0.3]{FINALIZAR}
    \\[0.24cm]
%
&[mnode = none, shadow=true, linearc = 0.05,framesep=-0.25,name =jmax]
    \psdiabox[shadow=true, framearc = 0.25,framesep=0.3]{$j \leq m 0$}
    &
    \\[0.24cm]
%
&[mnode = none, shadow=true, linearc = 0.05,framesep=-0.25,name =GeneraN]
    \psframebox[shadow=true, framearc = 0.25,framesep=0.3]{Generar $N(S_a)$}
    &
    \\[0.24cm]
%
&[mnode = none, shadow=true, linearc = 0.05,framesep=-0.25,name =EV]
    \psframebox[shadow=true, framearc = 0.25,framesep=0.3]{Elegir $S_n \in N(S_a)$}
    &
    \\[0.24cm]
%
&[mnode = none, shadow=true, linearc = 0.05,framesep=-0.25,name =Deltaf]
    \psframebox[shadow=true, framearc = 0.25,framesep=0.3]{$\Delta f = f(S_n)-f(S_a)$}
    &
    \\[0.24cm]
%
&[mnode = none, shadow=true, linearc = 0.05,framesep=-0.48,name =DeltaMayorCero]
    \psdiabox[shadow=true, framearc = 0.25,framesep=-0.62]{\begin{tabular}{c}$\Delta f \geq 0$ \\ ó\\$\displaystyle \chi_{[0,1]} < e^{\frac{-\vert \Delta f \vert}{T_i}}$\\~ \end{tabular}}
    &
    [mnode = none, shadow=true, linearc = 0.05,framesep=-0.25,name =jmasuno]
    \psframebox[shadow=true, framearc = 0.25,framesep=0.3]{$j=j+1$}
    \\[0.24cm]
%
&[mnode = none, shadow=true, linearc = 0.05,framesep=-0.25,name =snsa]
    \psframebox[shadow=true, framearc = 0.25,framesep=0.3]{$S_n = S_a$}
    &
%
%%
\end{psmatrix}
%%% Links
\psset{linewidth=3pt, linecolor=red, arrows=->, nodesep=4pt,  linearc=0.25, angleB=180, shortput=nab, npos = 0.4}
%\ncline{LT}{CA}_{Si}
{\psset{nodesepB = 0.16, nodesepA=0.18}%
 \ncline[nodesepA = 0.18cm,nodesepB=0.1cm]{sa}{icero}%
 \ncline[nodesepA = 0.18cm,nodesepB=0.1cm]{icero}{Tini}%
 \ncline[nodesepA = 0.18cm,nodesepB=0.1cm]{Tini}{Tmax}%
 \ncline[nodesepA = 0.18cm,nodesepB=0.1cm]{Tmax}{EMSV}_{No}%   % HEREEEEE IS THE PROBLEMMMMMMMMMMM
 %%\ncline[nodesepA = 0.18cm,nodesepB=0.1cm]{icero}{sa}%
 \ncline[nodesepA = 0.18cm,nodesepB=0.1cm]{Tmax}{jcero}_{Si}%
 \ncline[nodesepA = 0.18cm,nodesepB=0.1cm]{jcero}{jmax}%
 \ncline[nodesepA = 0.18cm,nodesepB=0.1cm]{jmax}{GeneraN}%
 \ncline[nodesepA = 0.18cm,nodesepB=0.1cm]{GeneraN}{EV}%
 \ncline[nodesepA = 0.18cm,nodesepB=0.1cm]{EV}{Deltaf}%
 \ncline[nodesepA = 0.18cm,nodesepB=0.1cm]{Deltaf}{DeltaMayorCero}%
 }%
}
%\footnotetext{Alternativamente puede usarse otra}
\footnotetext{Esta elección podría tomarse como una Temperatura Fijada, y no dependiente de $S_{inicial}$}
\footnotetext{Alternativamente podría verificarse si $i>i_{max}$}

\end{document}
share|improve this question
    
is your code snippet minimal? :) –  cmhughes May 3 at 21:29

1 Answer 1

up vote 4 down vote accepted

The reason was that you had set mnode=none; you can't connect nodes that don't exist! For the footnotes problem, the usual \footnotemark … \footnotetext doesn't really work: the footnotes share the same (last) number. A solution consists in putting the psmatrix in a tabular and using the threeparttable package; this makes the footnotes appear at the bottom of the psmatrix, not at the bottom of the page — in my opinion, it's better so anyway. Finally I simplified the code, and commented out package loading that was not useful for the flowchart.

Btw, subfigure is an obsolete package, that should be replaced with one of subfig, subcaption or floatrow. Also, if you use mathpazo, you shouldn't load amssymb, amsfonts or latexsymb: you'll have conflicts. Same problem loadingxcolorwith options andpstricks, as pstricks already loads xcolorwithout` options. The solution consists in not loading xcolor and passing the xcolor option as an option for the documentclass. It will pass the option to pstricks, which will pass it to xcolor.

\documentclass[12pt, a4paper, x11names]{article}
\usepackage{setspace} % para que no afecte el interlineado a las notas de pié de página
%\usepackage{blindtext}  % para usar un texto-tipo de ejmplo Lore. ... sin teclear a boleo, con \blindtext
\setstretch{1.5}
%\usepackage{lipsum,mwe}
%\usepackage{booktabs}
%\usepackage{tabularx}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[spanish]{babel}
\usepackage{mathtools}%,amsfonts,amssymb,latexsym
\usepackage{eurosym}
\usepackage{graphicx}
\newcommand*{\upstrut}[1]{\rule{0pt}{#1}}% creates an invisible rule of height #1
\newcommand*{\negstrut}[1]{\rule[-#1]{0pt}{#1}}% creates an invisible rule of deptht #1
%\usepackage{subfigure}   % para gráficos y ubicar cosas
%\usepackage{hyperref}
%\hypersetup{colorlinks=true, urlcolor=blue}

\usepackage{mathpazo}       % Fuente MathPazo
%\usepackage{datetime}       % paquete para configurar formato de fecha y hora
%\settimeformat{ampmtime}
%\renewcommand*{\noon}{\pmname}
%\usepackage[ruled,vlined,lined,linesnumbered,algochapter,portugues]{algorithm2e} %Para presentar algoritmos
%\usepackage[cm]{fullpage}

%\usepackage{wrapfig} % para poner imagenes rodeadas de texto
%\usepackage[rflt]{floatflt}

\spanishdecimal{.}
%    \usepackage[absolute]{textpos}

% ----------------------  PSTRICKS ---------------
\usepackage{pstricks}%[pdf]
\usepackage{epstopdf}
\usepackage{pst-3dplot,pst-tree,pst-grad,pst-coil,pst-text,pst-eps,pst-fill}
\usepackage{pstricks-add}
\usepackage{pst-blur}

\newpsobject{cnodeblue}{cnode}{fillstyle=solid,fillcolor=blue} %del diagrama tabu
\newpsobject{cnodepink}{cnode}{fillstyle=solid,fillcolor=pink} %del diagrama tabu
\newpsobject{cnodegreen}{cnode}{fillstyle=solid,fillcolor=green} %del diagrama tabu
\newpsobject{psframegray}{psframe}{fillcolor=lightgray,linestyle=none,shadow,blur} %del diagrama tabu
% ---- Fin Paquetes de pst-all

% ------------- CABECERAS y PIES DE PÁGINA ---------------------------
%\usepackage{fancyhdr} % activamos el paquete para usar cabeceras y piés de página.
%\cfoot{}
\newcommand{\sep}{\vspace{0.34cm}}
\newcommand{\redu}{\vspace{-0.56cm}}
\newcommand{\ul}{\underline}
% INSERTAR ESTAS DOS LINEAS SI NO FUNCIONA EL DIAGRAMA
%\newcommand*{\upstrut}[1]{\rule{0pt}{#1}}% creates an invisible rule of height #1   del diagrama tabu
%\newcommand*{\negstrut}[1]{\rule[-#1]{0pt}{#1}}% creates an invisible rule of deptht #1 del diagrama tabu
\newpsobject{cnodeblue}{cnode}{fillstyle=solid,fillcolor=blue} %del diagrama tabu
\newpsobject{cnodepink}{cnode}{fillstyle=solid,fillcolor=pink} %del diagrama tabu
\newpsobject{cnodegreen}{cnode}{fillstyle=solid,fillcolor=green} %del diagrama tabu
\newpsobject{psframegray}{psframe}{fillcolor=lightgray,linestyle=none,shadow,blur} %del diagrama tabu

\DeclareMathOperator*{\minimizar}{Minimizar}
\DeclareMathOperator*{\maximizar}{Maximizar}
\DeclareMathOperator*{\optimizar}{Optimizar}


\definecolor{miorange}{RGB}{234, 112, 2}

%\input{pssettings.tex}
\usepackage{threeparttablex}

\begin{document}
\begin{threeparttable}
\begin{tabular}{p{\linewidth}}
\resizebox{12cm}{!}{    % if you want to resize
\psset{linearc = 0.05, framearc=0.25, shadow = true, framesep = 0.3, shadowcolor=black!70, shadowangle=-90, unit=1.0cm}
\def\pscolhookii{\hskip1.564cm}
\def\pscolhookiii{\hskip1.564cm}
%\def\pscolhookiii{\psset[pst-node]{mcol = l}}

\begin{psmatrix}[rowsep=1.4, colsep=0.8,mnode = r]% defines the distance between two frames
    &[name = sa]
    \psframebox{$S_a=S_\text{inicial}$}
    \\
%%
    &[name = icero]
    \psframebox{$i=0$}
    \\
%%
    & [name = Tini]
    \psframebox{$T_0=r_0  · f(S_a)$\,\tnote{1}
    }%
    \\
%%
%  & [name = SA]
%  \psframegray(-1.00,-1.00)(1.00,1.00)
%    \cnodeblue(0,0){0.15}{Current}
%    \rput[t](0,-1.25){Solución Actual}&
%    \\[0.58cm] %era 1.25
%
[name = Tnueva]
    \psframebox{$T_i = r_i  · T_{i-1}$}
& [name = Tmax]
    \psdiabox[framesep=0pt]{\raisebox{0pt}[0.5cm][0.3cm]{$T_i > T_\text{final}$\,\tnote{2}}
    }
     &   [name = EMSV]
    \psframebox[framearc = 0.15]{\begin{tabular}{c@{\hskip\itemsep}l}
    \textbullet & Eligir Mejor\\ &Solución Visitada \end{tabular}}
    %%%%%%%%%%\\\textbullet & \textbf{Finalizar}
    \\
%%
[name =imasuno]
    \psframebox{$i = i + 1$}
&  [name =jcero]
    \psframebox{$j = 0$}
&  [name =FIN]
    \psovalbox{FINALIZAR}
    \\
%%
& [name =jmax]
    \psdiabox{$j \leq m_0$}
    &
    \\
%%
& [name =GeneraN]
    \psframebox{Generar $N(S_a)$}
    &
    \\
%%
& [name =EV]
    \psframebox{Elegir $S_n  ∈ N(S_a)$}
    &
    \\
%%
& [name =Deltaf]
    \psframebox{$Δ f = f(S_n)-f(S_a)$}
    &
    \\
%%
& [name =DeltaMayorCero]%
    \psdiabox[framesep = 0pt]{\raisebox{0pt}[0.6cm][0.8cm]{\makebox[2.8cm]{$ \begin{array}{c}Δ f \geq 0\\[-4pt] \text{ ó} \\[-4pt] 
     χ_{[0,1]} < \smash[t]{e^{-\frac{\vert Δ f \vert}{T_i}}}\end{array} $}}}
    & [framesep=-0.25,name =jmasuno]
    \psframebox{$j=j+1$}
    \\
%%
& [framesep=-0.25,name =snsa]
    \psframebox{$S_n = S_a$}
    &
%%
\end{psmatrix}
%% Links
\psset{linewidth=3pt, linecolor=red, shadow = false, arrows=->, nodesep=4pt,  linearc=0.25, angleB=180, shortput=nab}%
%\ncline{LT}{CA}_{Si}
{\psset{nodesepB = 0.16, nodesepA=0.18}%
 \ncline{sa}{icero}%
 \ncline{icero}{Tini}%
 \ncline{Tini}{Tmax}%[nodesepA = 0.18cm,nodesepB=0.1cm]
 \ncline{Tmax}{jcero}_{Si}%
 \ncline{jcero}{jmax}%
 \ncline{jmax}{GeneraN}_{Si}%
 \ncline{GeneraN}{EV}%
 \ncline{EV}{Deltaf}%
 \ncline{Deltaf}{DeltaMayorCero}%
 \ncline{DeltaMayorCero}{snsa}_{Si}
 \ncline{DeltaMayorCero}{jmasuno}^{No}
 \ncangle[angleB = -90]{snsa}{jmasuno}
 \ncangle[angleA = 90, angleB= 0]{jmasuno}{jmax}
 \ncangle[angleA = 180,angleB = -90]{jmax}{imasuno}\nbput[npos = 0.5]{No}%
 \ncline{imasuno}{Tnueva}
 \ncline{Tnueva}{Tmax}
 \ncline{Tmax}{EMSV}^{No}%
 }%
}
\bigskip
\end{tabular}
%%%%%%%%%%
\begin{tablenotes}\scriptsize
%\footnotetext{Alternativamente puede usarse otra}
\item[1]{Esta elección podría tomarse como una Temperatura Fijada, y no dependiente de $ S_\text{inicial} $}
\item[2]{Alternativamente podría verificarse si $i>i_\text{max}$}
\end{tablenotes}
\end{threeparttable}

\end{document} 

enter image description here

share|improve this answer
    
THANK YOU,... VERY MUCH!! for the solution and for the multiple comments that I´m taking in account to modify and correct in the future. I´m very gratefull to you, Bernard. –  Mika Ike May 4 at 6:04
    
Yesterday I starting use subcaption (for other post) and I´m very happy with subcaption. Thank you for mathpazo notes, I don´t known all what you wrote, I only put packages, packages, and packages,... a big truck full of packages :-) that is not good because of the conflicts –  Mika Ike May 4 at 6:05
1  
@Mika Ike: That's many questions;) — I'll try to answer gradually. About the xcolor options: it's a general rule that, if you load any package with different options, LaTeX delivers this message: ! LaTeX Error: Option clash for package …. Concerning obsolete packages, the reference is l2tabu, v. 2.3, originally in german and translated into English (v. 1.8), French, Italian and Spanish (older version). –  Bernard May 4 at 10:59
1  
@Mika Ike: decreasing \hskip in \pscolhookii & iii makes the flowchart go to a second page? That' quite strange. Added: I've just tested and found the limit was 1.564 cm! Really don't understand. I suppose it must be a problem with overlapping boxes. –  Bernard May 4 at 11:14
1  
@Mika Ike: As to your 3 colourful questions in the linked document, I don't know. I have no such behaviour. What you must understand is the notion of "under" and "above" is relative to the direction of the arrows: ncline{A}{B}^{something} is the same as ncline{B}{A}_{something}. I'll update at once my answer. –  Bernard May 4 at 13:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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