我想用 Tikz 绘制类似这样的内容:
\tikzstyle{every picture}+=[remember picture]
\everymath{\displaystyle}\begin{equation*}
{\huge
\tikz[baseline]{
\node[fill=blue!10] (n171)
{$0,000$};
}
\tikz[baseline]{
\node[fill=blue!20] (n172)
{$7$};
}
\tikz[baseline]{
\node[fill=blue!30] (n173)
{$82$};
}
\tikz[baseline]{
\node[fill=blue!40] (n174)
{$0 $};
} \quad \Longrightarrow \quad
\tikz[baseline]{
\node[fill=blue!10,anchor=base] (t172)
{$7$};
},
\tikz[baseline]{
\node[fill=blue!20,anchor=base] (t173)
{$82$};
} \cdot
\tikz[baseline]{
\node[fill=blue!30,anchor=base] (t174)
{$\num{e-4}$};
}
}
\end{equation*}\begin{tikzpicture}[overlay]
\path[->] (n172) edge [out=90, in=90] (t172);
\path[->] (n173) edge [out=-90, in=-90] (t173);
\end{tikzpicture}
有没有更好的办法?谢谢
答案1
我已尝试了@Symbol 1 给出的指示,这就是我所取得的成果。再次感谢。
\tikzstyle{every picture}+=[remember picture]
\everymath{\displaystyle}
\begin{minipage}[b]{0.8\textwidth}
\hfill\begin{tikzpicture}
\draw[decorate,decoration=brace,very thick] (3,0) -- (10,0)node [midway, above=2pt] {\Large {Idazkera zientifikoa}};
\end{tikzpicture}
\begin{equation*}
{\huge
\tikz[baseline,outer sep=-2pt]{
% \draw[rounded corners] (0,0) rectangle (1.6,0.8);
\draw (0,0.4) node(n171)
{$0,000$};
}
\hspace{-.3cm}\tikz[baseline,outer sep=-2pt]{
\draw[dashed, red, rounded corners] (0,0) rectangle (0.6,0.8);
\draw (0.3,0.4) node(n172)
{$7$};
}
\hspace{-.2cm}\tikz[baseline,outer sep=-2pt]{
\draw[dashed, blue, rounded corners] (0,0) rectangle (0.8,0.8);
\draw (0.4,0.4) node(n173)
{$82$};
}
\hspace{-.3cm}\tikz[baseline,outer sep=-2pt]{
\draw (0,0.4) node(n174)
{$0 $};
}
\tikz[baseline]{
\draw (0.2,0.4) node(n176)
{$\Longrightarrow$};
}% \quad \Longrightarrow \quad
\tikz[baseline,outer sep=-2pt]{
\draw[red, rounded corners] (0,0) rectangle (0.6,0.8);
\draw (0.3,0.4) node(t172)
{$7$};
\node [red,above](osoa) at (t172.north) {\Large osoa};
\node [red,above] at (osoa.north){\Large Zati};
}
\hspace{-.8cm}\tikz[baseline]{
\draw (0,0) node(n176)
{$,$};
}
\hspace{-1.4cm}\tikz[baseline,outer sep=-2pt]{
\draw[blue,rounded corners] (0,0) rectangle (0.8,0.8);
\draw (0.4,0.4) node(t173)
{$82$};
\node [blue,below](zati) at (t173.south) {\Large Zati};
\node [blue,below] at (zati.south){\Large hamartarra};
}
\hspace{-1.4cm}\tikz[baseline]{
\draw (0,0.4) node(n176)
{$\times$};
}
\hspace{-.4cm}\tikz[baseline,outer sep=-2pt]{
\draw[green, rounded corners] (0,0) rectangle (1.4,0.8);
\draw (0.7,0.4) node(t174)
{$\num{e-4}$};
\node [green,above right] at (100:0.9) {\Large 10en berretura};
}
}
\end{equation*}
\begin{tikzpicture}[overlay]
\path[-latex,red,very thick] (n172) edge [out=45, in=135] (t172);
\path[-latex,blue,very thick] (n173) edge [out=-45, in=-135] (t173);
\end{tikzpicture}
\end{minipage}