我一直在尝试,但没有解决办法。
我编写了许多 nclines,但只出现 2
为什么不显示从 166 行开始的 nclines?只显示 2 行。
\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}
答案1
原因是您设置了mnode=none
;您无法连接不存在的节点!对于脚注问题,通常的方法\footnotemark … \footnotetext
实际上不起作用:脚注共享相同的(最后一个)数字。解决方案是将 psmatrix 放在表格中并使用包threeparttable
;这会使脚注出现在 psmatrix 的底部,而不是页面的底部——在我看来,无论如何这样更好。最后,我简化了代码,并注释掉了对流程图没用的包加载。
顺便说一句,是一个过时的包,应该用、或 subfigure
之一替换。此外,如果您使用,则不应加载、或 xcolor pstricks without` 选项。解决方案包括不加载 xcolor 并将 xcolor 选项作为 documentclass 的选项传递。它会将选项传递给 pstricks,后者会将其传递给 xcolor。subfig
subcaption
floatrow
mathpazo
amssymb
amsfonts
latexsymb: you'll have conflicts. Same problem loading
with options and
, as pstricks already loads 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}