答案1
到目前为止,您还没有提供任何代码,所以我们只能猜测并最终重新输入您的方程式。通常这里不提供此类服务,因此以下建议并不能直接解决您的所有问题。
如果您想拥有tcolorbox
es,以下内容可能是一个解决方案:
\usepackage[most]{tcolorbox}
\tcbset{on line,
boxsep=0pt,
colframe=gray,colback=white,
highlight math style={enhanced} % <---
}
\begin{document}
\[
\tcbhighmath{\begin{aligned} a=b\\ c=d\end{aligned}}
\longrightarrow
\tcbhighmath{K=\begin{bmatrix} a\\ b \end{bmatrix}}
\]
\end{document}
tcolorbox
注意:您可以使用 amsmath 中定义的所有数学环境来组织 es的内容。
另一种方法是使用 TikZ 图片:
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
positioning}
\begin{document}
Some text
\begin{tikzpicture}[
every node/.style = {draw=gray, rounded corners, very thick}
]
\node (left) {$\begin{aligned} a=b\\ c=d\end{aligned}$};
\node (right) [right=of left]
{$\begin{gathered} X = [\text{some equation}] \\
K_1=\begin{bmatrix} a\\ b \end{bmatrix}
\quad
K_2=\begin{bmatrix} c\\ d \end{bmatrix}
\end{gathered}$};
\draw[-Straight Barb] (left) -- (right);
\end{tikzpicture}
\end{document}
附录:您还可以结合以上两种解决方案:
\documentclass{article}
\usepackage{amsmath}
\usepackage[most]{tcolorbox}
\usetikzlibrary{arrows.meta,
positioning}
\tcbset{on line, % borrowed from https://tex.stackexchange.com/questions/568880/
boxsep=0pt, % left=1pt,right=1pt,top=1pt,bottom=1pt,
colframe=gray,colback=white, % or some other color of box background
highlight math style={enhanced} % <---
}
\begin{document}
\begin{tikzpicture}[
every node/.style = {inner sep=0pt}
]
\node (left) {\tcbhighmath{\begin{aligned} a=b\\ c=d\end{aligned}}};
\node (right) [right=of left]
{\tcbhighmath{\begin{gathered} X = [\text{some equation}] \\
K_1=\begin{bmatrix} a\\ b \end{bmatrix}
\quad
K_2=\begin{bmatrix} c\\ d \end{bmatrix}
\end{gathered}}};
\draw[-Straight Barb] (left) -- (right);
\end{tikzpicture}
\end{document}
结果与第二种解决方案类似:
答案2
这是扎尔科的附录和我的答案到在两个 tcolorboxes 之间添加箭头
该示例内置于beamer
文档中。由于使用了overlay
和remember picture
,因此在第二次编译后会出现框之间的箭头。
\documentclass{beamer}
\usepackage{amsmath}
\usepackage[most]{tcolorbox}
\usetikzlibrary{arrows.meta,
positioning}
\tcbset{on line, % borrowed from https://tex.stackexchange.com/questions/568880/
boxsep=0pt, % left=1pt,right=1pt,top=1pt,bottom=1pt,
colframe=gray,colback=white, % or some other color of box background
highlight math style={enhanced} % <---
}
\begin{document}
\begin{frame}{With tcolorbox}
\tcbhighmath[remember as=left]{\begin{aligned} a=b\\ c=d\end{aligned}}\hspace{1cm}
\tcbhighmath[remember as=right]{\begin{gathered} X = [\text{some equation}] \\
K_1=\begin{bmatrix} a\\ b \end{bmatrix}
\quad
K_2=\begin{bmatrix} c\\ d \end{bmatrix}
\end{gathered}}
\tikz[overlay, remember picture] \draw[-Straight Barb] (left) -- (right);
\end{frame}
\end{document}