我觉得我的要求有点难,但我还是在努力。我有这个align
环境
\begin{align} \nonumber
\f = \begin{pmatrix}
f(x_1, y_1) \\ f(x_2, y_1) \\ \vdots \\ f(x_{N - 1}, y_1) \\ f(x_N, y_1)
\end{pmatrix}
&&
\begin{pmatrix}
f(x_1, y_2) \\ f(x_2, y_2) \\ \vdots \\ f(x_{N - 1}, y_2) \\ f(x_N, y_2)
\end{pmatrix}
&&
\begin{pmatrix}
f(x_1, y_N) \\ f(x_2, y_N) \\ \vdots \\ f(x_{N - 1}, y_N) \\ f(x_N, y_N)
\end{pmatrix}
\end{align}
我想以pmatrix
这种方式在 '之间制作箭头
有什么方法吗?
先感谢您。
答案1
您可以将它们放入tikzpicture
并绘制箭头。
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,bending,matrix}
\begin{document}
\begin{align*}
f = \begin{tikzpicture}[baseline=(P.base),>={Latex[bend]}]
\node[inner sep=0pt,outer sep=0pt](P){\vphantom{1}};
\path (P) node[inner sep=0pt,outer sep=0pt,matrix of math nodes,
ampersand replacement=\&,column sep=1ex
] (M){
{\begin{pmatrix}
f(x_1, y_1) \\ f(x_2, y_1) \\ \vdots \\ f(x_{N - 1}, y_1) \\ f(x_N, y_1)
\end{pmatrix}}
\& \phantom{\vdots}\&
{\begin{pmatrix}
f(x_1, y_2) \\ f(x_2, y_2) \\ \vdots \\ f(x_{N - 1}, y_2) \\ f(x_N, y_2)
\end{pmatrix}}
\& \textcolor{blue}{\boldsymbol{\vdots}}\&
{\begin{pmatrix}
f(x_1, y_N) \\ f(x_2, y_N) \\ \vdots \\ f(x_{N - 1}, y_N) \\ f(x_N, y_N)
\end{pmatrix}}
\\
};
\draw[blue,thick,->] (M-1-1.south) to[out=-90,in=-90] (M-1-1.south-|M-1-2)
-- (M-1-3.north-|M-1-2) to[out=90,in=90] (M-1-3.north);
\draw[blue,thick,->] (M-1-3.south) to[out=-90,in=-90] (M-1-3.south-|M-1-4)
-- ([yshift=-1ex]M-1-4.south) (M-1-4.north) -- (M-1-5.north-|M-1-4) to[out=90,in=90] (M-1-5.north);
\end{tikzpicture}
\end{align*}
\end{document}
答案2
一个解决方案是pstricks
:每个矩阵定义为一个 BoxNodes,它们通过中间节点与\ncangles
命令链接。
\documentclass[svgnames]{article}
\usepackage{amsmath, bm}
\usepackage{pst-node}
\begin{document}
\[ \bm{f} =
\psDefBoxNodes{M1}{\begin{pmatrix}
f(x_1, y_1) \\ f(x_2, y_1) \\ \vdots \\ f(x_{N - 1}, y_1) \\ f(x_N, y_1)
\end{pmatrix}}
\enspace \pnode{I}\enspace
\psDefBoxNodes{M2}{\begin{pmatrix}
f(x_1, y_2) \\ f(x_2, y_2) \\ \vdots \\ f(x_{N - 1}, y_2) \\ f(x_N, y_2)
\end{pmatrix}}
\enspace \Rnode{D}{\textcolor{blue}{\boldsymbol{\vdots}}}\enspace
\psDefBoxNodes{M3}{\begin{pmatrix}
f(x_1, y_N) \\ f(x_2, y_N) \\ \vdots \\ f(x_{N - 1}, y_N) \\ f(x_N, y_N)
\end{pmatrix}}
%%arrows
\psset{linewidth=1pt, linecolor=RoyalBlue, arrowinset=0.12, linearc=0.3}
\ncangles[angleA=-90, armA=0.5cm, angleB=-90]{M1:bC}{I}\ncangles[angleA=90, armA=0.5cm, angleB=90, arrows=<-]{M2:tC}{I}
\ncangles[angleA=-90, armA=0.5cm, angleB=-90, nodesepB=3pt]{M2:bC}{D}\ncangles[angleA=90, armA=0.5cm, angleB=90, arrows=<-, nodesepB=-2pt]{M3:tC}{D}
\]
\end{document}