tikZ 软件包的问题

tikZ 软件包的问题

我已经切换到 Ubuntu,但以下代码无法运行,尽管它可以在 Mac OS 上运行。我已附上带有日志的屏幕截图。

这是代码:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{tikzmark}



\begin{document}
\begin{tabular}{ l | c | r }
    \sffamily
    &      A    &   B  \\ \hline
     1 & $\tikzmarknode{a11}{r_{1A}}$~ &   ~$\tikzmarknode{a12}{r_{1B}}$ \\ \hline
    2 & $\tikzmarknode{a21}{r_{2A}}$~  & ~$\tikzmarknode{a22}{r_{BA}}$ \\ \hline  
\end{tabular}   
\begin{tikzpicture}[overlay,remember picture]
\draw[stealth-stealth,blue] (a11.north east) -- (a12.north west)
node[midway,above,scale=0.4,black] (dAB) {$d_{AB}$};
\draw[-stealth,blue] (a21.south east) -- (a22.south west);
\draw[-stealth,blue] (dAB.south) to[out=0,in=80] (dAB.south|-a22);
\draw[stealth-stealth] (a11.east) -- (a21.east)
node[pos=0.5,above right,scale=0.4,black] (d12) {$d_{12}$};
\draw[-stealth] (d12.north) to[out=0,in=180] ([yshift=-1ex]a12.west);
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容