使用 Pstricks/psmatrix 在流程图中放置脚注标记的最佳方法是什么?

使用 Pstricks/psmatrix 在流程图中放置脚注标记的最佳方法是什么?

脚印可能会引起混淆,那么......在流程图中记录标记的最佳做法是什么?

图像

答案1

我定义了一个宏\Remark[<width>]{<text>},可以将其设置\rput[<pos>](<node>){...}为最后一个节点(附加列)psmatrix

\documentclass[12pt, a4paper, x11names]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[spanish]{babel}
\usepackage{mathtools}%,amsfonts,amssymb,latexsym
\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{mathpazo}       % Fuente MathPazo
\spanishdecimal{.}
\usepackage{pst-3dplot,pst-tree,pst-grad,pst-coil,pst-text,pst-eps,pst-fill}
\usepackage{pst-blur}
\usepackage{pstricks-add}
\newpsobject{psframegray}{psframe}{fillcolor=lightgray,linestyle=none,shadow,blur} %del diagrama tabu

\newcommand{\sep}{\vspace{0.34cm}}
\newcommand{\redu}{\vspace{-0.56cm}}
\newcommand{\ul}{\underline}

\DeclareMathOperator*{\minimizar}{Minimizar}
\DeclareMathOperator*{\maximizar}{Maximizar}
\DeclareMathOperator*{\optimizar}{Optimizar}
\definecolor{miorange}{RGB}{234, 112, 2}

\newcommand\Remark[2][4cm]{\psframebox[linecolor=red,linewidth=2pt,
  framearc=0]{\parbox{#1}{\color{red}#2}}}


\begin{document}

\psset{linearc=0.05,framearc=0.25,shadow,framesep=0.3,shadowcolor=black!70,shadowangle=-90}
%\def\pscolhookii{\hskip1.564cm}
%\def\pscolhookiii{\hskip1.564cm}
%\def\pscolhookiii{\psset[pst-node]{mcol = l}}
\resizebox{!}{0.9\textheight}{%
\begin{psmatrix}[rowsep=1, colsep=0.8,mnode = r]% defines the distance between two frames
    &[name = sa]
    \psframebox{$S_a=S_\text{inicial}$} & & [name=f0]\\
%%
    &[name = icero]
    \psframebox{$i=0$}                  & & [name=f1]\\
%%
    & [name = Tini]
    \psframebox{$T_0=r_0 \cdot f(S_a)~{}^1$}\\
[name = Tnueva]
    \psframebox{$T_i = r_i \cdot T_{i-1}$}
       & [name = Tmax]
           \psdiabox[framesep=0pt]{\raisebox{0pt}[0.5cm][0.3cm]{$T_i > T_\text{final}~{}^2$}}
       &   [name = EMSV]
           \psframebox[framearc = 0.15]{\begin{tabular}{c@{\hskip\itemsep}l}
                \textbullet & Eligir Mejor\\ &Solución Visitada \end{tabular}}\\
%%
[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 \in N(S_a)$} \\
%%
& [name =Deltaf]
    \psframebox{$\Delta f = f(S_n)-f(S_a)$} \\
%%
& [name =DeltaMayorCero]%
    \psdiabox[framesep = 0pt]{\raisebox{0pt}[0.6cm][0.8cm]{\makebox[2.8cm]{%
      $\begin{array}{c}\Delta f \geq 0\\[-4pt] \text{ ó} \\[-4pt] 
     \xi_{[0,1]} < \smash[t]{e^{-\frac{\vert \Delta 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}%
 \rput[lb](f0){\Remark{Esta elección podría tomarse como una Temperatura Fijada, y no dependiente de $ S_\text{inicial}$}}%
 \ncline[linestyle=dashed,offsetA=-2cm]{->}{f0}{sa} 
 \rput[lt](f1){\Remark[4.5cm]{Esta elección podría tomarse como una Temperatura Fijada, y no dependiente de $ S_\text{inicial}$}} 
 \ncline[linestyle=dashed,offsetA=1cm,offsetB=0.5cm]{->}{f1}{Tini} 
}

\footnotesize\bigskip\noindent
${}^1$ Esta elección podría tomarse como una Temperatura Fijada, y no dependiente de $ S_\text{inicial}$

\noindent
${}^2$ Alternativamente podría verificarse si $i>i_\text{max}$

\normalsize
\end{document} 

offsetA|B可以上下移动线条。我在复制粘贴和希腊符号方面遇到了一些问题。我希望我用的是正确的。

在此处输入图片描述

相关内容