表格行之间的 TikZ 双箭头

表格行之间的 TikZ 双箭头

我需要创建一个连接表格中两个单元格的双曲线箭头。我找到了一些示例,得到了这个

\documentclass{article}
\usepackage{array,multirow,graphicx}


\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing,calc}


\newcommand{\tikzmark}[2][-3pt]{\tikz[remember picture, overlay, baseline=-0.5ex]\node[#1](#2){};}


\newcounter{arrow}
\setcounter{arrow}{0}
\newcommand{\drawcurvedarrow}[3][]{%
\refstepcounter{arrow}
\tikz[remember picture, overlay]\draw[double] (#2.center)edge[#1]node[coordinate,pos=0.5, name=arrow-\thearrow]{}(#3.center);
}

% #1 options, #2 position, #3 text 
\newcommand{\annote}[3][]{%
\tikz[remember picture, overlay]\node[#1] at (#2) {#3};
}

\begin{document}
\begin{table}[H]
\centering
\begin{tabular}{|c|l|r|r|}
\hline
& \multicolumn{1}{c|}{Discrete Time} & \multicolumn{1}{c|}{Continuous Time} \\
\hline
\parbox[t]{2mm}{\multirow{12}{*}{\rotatebox[origin=c]{90}{Stochastic system}}} &  &\\
&$x_{n+1}=f(x_n,u_n)+W_n{,} \hspace{10 mm} \textrm{ initial condition: } x_0$&\\
&&\\
& $W_n = P(\cdot \mid x_n,u_n)$ &\\
& &\\
& Cost function: &\\
& $\min\limits_{u_{0 \to t_f}} E \{ \Phi(t_f)+\sum\limits_{k=0}^{t_f -1} \alpha L(x_k,u_k)  \} \hspace{10mm} \alpha \in [0,1]$ &\\
&&\\
& Bellman equation: &\\
& $V^*(n,x)= \min\limits_{u_n} \{L(x_n,u_n)+ \alpha E[V^*(n+1,x_{n+1})] \}$ &\\
&$V^*(t_f,x_{t_f})=\Phi(t_f)$&\\
&  &\\
& Infinite horizon: \hspace{10 mm}  $\alpha \in [0,1]$&\\
& $\Phi(t_f)=0 \hspace{10mm}$V is NOT function of time.\tikzmark[xshift=2em]{a}&\\
& text &\\
\hline
\parbox[t]{2mm}{\multirow{10}{*}{\rotatebox[origin=c]{90}{Deterministic system}}} &  &\\
&  \tikzmark[xshift=3.5em]{b} $x_{n+1}=f(x_n,u_n){,} \hspace{10 mm} \textrm{ initial condition: } x_0$\tikzmark[xshift=1.5em]{b}&\\
&&\\
& Cost function: &\\
& $\min\limits_{u_{0 \to t_f}} \{ \Phi(t_f)+\sum\limits_{k=0}^{t_f -1} \alpha L(x_k,u_k)  \} \hspace{10mm} \alpha \in [0,1]$ &\\
&  &\\
&  Bellman equation: &\\
& $V^*(n,x)= \min\limits_{u_n} \{L(x_n,u_n)+ \alpha V^*(n+1,x_{n+1}) \}$ &\\
& text &\\
\hline
\end{tabular}
\drawcurvedarrow[bend left=60,-stealth]{a}{b}
\annote[right]{arrow-1}{Duplicate}
\end{table}
\end{document}

我不知道如何将箭头样式更改为双箭头(\Rightarrow)。

答案1

这很简单:尝试将选项添加double到路径中。例如:

\drawcurvedarrow[bend left=60,-stealth,double]{a}{b}. 

可进行以下选项定制double distance=<dim>

\drawcurvedarrow[bend left=60,-stealth,double distance=2pt]{a}{b} 

(选择更适合您需要的尺寸)。

相关内容