如何使用 tikz 和 chemfig 添加两行不同的文本?

如何使用 tikz 和 chemfig 添加两行不同的文本?

所以我遇到了一个问题,我想重新创建这个图表: 在此处输入图片描述

Here's the current code:
    \begin{center}
    \fcolorbox{black}{gray!20}{
    \schemestart
    \begin{tikzpicture}
        \draw[fill=white] (0, 0) circle (1) node{Keo đất};
        \draw node[right] at (30:1.25) {\ce{H^{+}}};
        \draw node[right] at (-30:1.25) {\ce{Al^{3+} + 2Ca(OH\textsubscript{2})}};
    \end{tikzpicture}
        \arrow{<=>}
    \begin{tikzpicture}
        \draw[fill=white] (0, 0) circle (1) node{Keo đất};
        \draw node[right] at (30:1.25) {\ce{2Ca^{2+}}};
        \draw node[right] at (-30:1.25) {\ce{ +H\textsubscript{2}O + Al(OH)\textsubscript{3}$\downarrow$    }};
    \end{tikzpicture}
    \schemestop}
    \end{center}

我曾尝试做这样的事情:

\draw node[top right] at (45:1.25) 
{\ce{CaO + H\textsubscript{2}O $\rightarrow$ Ca(OH)\textsubscript{2}}}

但显然它不起作用,那么我该怎么办呢?

答案1

\documentclass{article}
\usepackage{xcolor}
\definecolor{chemrec}{rgb}{0.99, 0.93, 0.82}
\definecolor{chemcirc}{rgb}{1, 0.87, 0.95}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\usepackage{mhchem}
\mhchemoptions{arrows=pgf{latex}{0.15ex}}
\begin{document}
\begin{center}
\begin{tikzpicture}
\draw[fill=chemrec] (-2,-1.2) rectangle (11.8,1.8);
\draw[fill=chemcirc] (0,0) circle[radius=1] node {Keo đất};
\draw[fill=chemcirc] (7,0) circle[radius=1] node {Keo đất};
\node at (3.8,1.2) {\ce{CaO + H2O -> Ca(OH)2}};
\node[right] at (30:1.25) {\ce{H+}};
\node[right] at (-30:1.25) {\ce{Al^3+{} + 2 Ca(OH)2}};
\node at (4.8,0) {\ce{<-->[\hspace{4em}]}};
\path (7,0) ++(30:1.25) node[right] {\ce{2 Ca^2+}};
\path (7,0) ++(-30:1.25) node[right] {\ce{+ H2O + Al(OH)3 v}};
\end{tikzpicture}
\end{center}
\end{document}

在此处输入图片描述

相关内容