答案1
如果你想将反应视为一个方程式而不是一个图表,你也可以使用 tikz 标记来做到这一点:
\documentclass{article}
\usepackage{amsmath, tikz}
\usetikzlibrary{decorations.pathreplacing, calc}
\newcommand{\tikzmathnode}[2]{\tikz[remember picture, baseline]{\node[inner sep=1pt, outer sep=0pt, anchor=base, minimum height=1em] (#1) {$\displaystyle #2$};}}
\newcommand{\redoxdraw}{
\begin{tikzpicture}[overlay, remember picture]
\draw[decoration = {brace, amplitude=.3em, raise=.1em}, decorate] (redox1.north east) -- (redox2.south east);
\draw[-to, out=0, in=180] ([xshift=.8em] redox1.east) to ([xshift=2.5em] redox2.east);
\draw[-to, out=0, in=180] ([xshift=.8em] redox2.east) to ([xshift=2.5em] redox1.east);
\end{tikzpicture}
}
\newcommand{\redoxfirst}[1]{\tikzmathnode{redox1}{#1}\qquad}
\newcommand{\redoxsecond}[1]{\tikzmathnode{redox2}{#1}\qquad\redoxdraw}
\begin{document}
\begin{equation*}
\begin{array}{rrrr}
Cr: & \redoxfirst{3\downarrow} & 2Cr: & 6\downarrow\\[.3em]
C: & \redoxsecond{2\uparrow} & 3C: & 6\uparrow
\end{array}
\end{equation*}
\end{document}
当然,您可以尝试调整间距或减少格式的硬编码。您还可以创建\redoxfirst
并\redoxsecond
接受一个可选参数来命名反应,以便在同一行中允许多个反应。
答案2
尝试\tikzmark
:
\documentclass[a4paper]{article}
\usepackage{tikz}
\usepackage{tikz-cd}
\usetikzlibrary{decorations.pathreplacing}
\usetikzlibrary{calc,tikzmark}
\begin{document}
\begin{tikzcd}
Cr: & 3\downarrow \tikzmark{bracebegin} \hspace{4pt} \arrow[rd] & \hspace{4pt} 2Cr: & 6\downarrow \\
C: & 2\uparrow \tikzmark{braceend} \hspace{4pt} \arrow[ru] & \hspace{4pt} 3C: & 6\uparrow
\end{tikzcd}
\begin{tikzpicture}[overlay,remember picture]
\draw[decorate,decoration={brace}] ( $ (pic cs:bracebegin) +(0, 9pt) $ ) -- ( $ (pic cs:braceend) -(0, 4pt) $ );
\end{tikzpicture}%
\end{document}
答案3
\documentclass[a4paper]{article}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}
\begin{document}
\begin{tikzpicture}[node distance = 3cm]
\node at (-1,1){Cr: 3};
\draw[->](-0.5,1.1)--(-0.5,0.8);
\node at (-1,-1){C: 2};
\draw[->](-0.5,-1.1)--(-0.5,-0.8);
\draw [->] (0,1) --(1,-1);
\draw [->] (0,-1) -- (1,1);
\draw[decorate,decoration={brace}] (-0.3,1.2) -- (-0.3,-1.2);
\node at (1.7, 1.0){2 Cr: 6};
\node at (1.7, -1.0){3Cr: 6};
\draw[->](2.4,-1.1)--(2.4,-0.9);
\draw[->](2.4,1.1)--(2.4,0.9);
\end{tikzpicture}
\end{document}