如何对齐一组化学式

如何对齐一组化学式

这是我想要重新创建的图像 - 在此处输入图片描述

这是我重新创建它的尝试 -

\documentclass{12pt}{book}
\usepackage{amsmath, amssymb}
\usepackage{mhchem}
\usepackage{graphicx}
\usepackage{tikz}

\begin{document}

\begin{align*}
    \ce{Cl^{.} + CH4 -> CH3^{.} + HCl} \\
    \ce{CH3^{.} + Cl2 -> CH3Cl + Cl^{.}} \\ \\
    \ce{Cl^{.} + CH4 -> CH3^{.} + HCl} \\
    \ce{CH3^{.} + Cl2 -> CH3Cl + Cl^{.}} \\ \\
    \ce{Cl^{.} + CH4 -> CH3^{.} + HCl} \\
    \ce{CH3^{.} + Cl2 -> CH3Cl + Cl^{.}}
\end{align*}

\end{document}

这得出 -

在此处输入图片描述

关于如何插入红色圆圈和线条,您有什么想法吗?

答案1

我使用“chemfig”做了类似的事情

\documentclass[border={4mm}]{standalone}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{chemfig}
\usepackage{tikz}

\newenvironment{f}{$\displaystyle\aligned}{\endaligned$}

\begin{document}

\begin{f}
&\schemestart
\chemfig{@{a}\charge{0=\.}{C\ell}} \+ \chemfig{CH_4}  \arrow{->} \chemfig{\charge{0=\.}{CH_3}} \+ \chemfig{HC\ell}
\schemestop
\\
%
& \schemestart
%
\chemfig{\charge{180=\.}{CH_3}} \+ \chemfig{C\ell_2} \arrow{->} \chemfig{CH_3C\ell} \+ \chemfig{@{b}\charge{0=\.}{C\ell}}
\schemestop
\\ \\
&\schemestart
\chemfig{@{c}\charge{0=\.}{C\ell}} \+ \chemfig{CH_4}  \arrow{->} \chemfig{\charge{0=\.}{CH_3}} \+ \chemfig{HC\ell}
\schemestop
\\
%
& \schemestart
%
\chemfig{\charge{180=\.}{CH_3}} \+ \chemfig{C\ell_2} \arrow{->} \chemfig{CH_3C\ell} \+ \chemfig{@{d}\charge{0=\.}{C\ell}}
\schemestop
\\ \\
&\schemestart
\chemfig{@{e}\charge{0=\.}{C\ell}} \+ \chemfig{CH_4}  \arrow{->} \chemfig{\charge{0=\.}{CH_3}} \+ \chemfig{HC\ell}
\schemestop
\\
%
& \schemestart
%
\chemfig{\charge{180=\.}{CH_3}} \+ \chemfig{C\ell_2} \arrow{->} \chemfig{CH_3C\ell} \+ \chemfig{@{f}\charge{0=\.}{C\ell}}
\schemestop
\\ \\
    % myedge={right}   para meia seta  
%\begin{tikzpicture}
    \chemmove{
    \draw[red,dotted](a) circle (.35);
    \draw[red,dotted](b) circle (.35);
    \draw[red,dotted](c) circle (.35);
    \draw[red,dotted](d) circle (.35);
    \draw[red,dotted](e) circle (.35);
    \draw[red,dotted](f) circle (.35);
    \draw[red,shorten <=6pt,shorten >=6pt](b).. controls +(240:16mm) and +(60:16mm)..(c);
    \draw[red,shorten <=6pt,shorten >=6pt](d).. controls +(240:16mm) and +(60:16mm)..(e);
}
\end{f}
\end{document}

在此处输入图片描述

此代码将对齐箭头

\documentclass[border={4mm}]{standalone}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{chemfig}
\usepackage{tikz}

\newenvironment{f}{$\displaystyle\aligned}{\endaligned$}

\begin{document}

\begin{f}
\schemestart
\chemfig{@{a}\charge{0=\.}{C\ell}} \+ \chemfig{CH_4} \schemestop  & \schemestart \arrow{->} \chemfig{\charge{0=\.}{CH_3}} \+ \chemfig{HC\ell}
\schemestop
\\
%
\schemestart
%
\chemfig{\charge{180=\.}{CH_3}} \+ \chemfig{C\ell_2} \schemestop & \schemestart \arrow{->} \chemfig{CH_3C\ell} \+ \chemfig{@{b}\charge{0=\.}{C\ell}}
\schemestop
\\ \\
\schemestart
\chemfig{@{c}\charge{0=\.}{C\ell}} \+ \chemfig{CH_4}\schemestop   & \schemestart \arrow{->} \chemfig{\charge{0=\.}{CH_3}} \+ \chemfig{HC\ell}
\schemestop
\\
%
 \schemestart
%
\chemfig{\charge{180=\.}{CH_3}} \+ \chemfig{C\ell_2}\schemestop &  \schemestart \arrow{->} \chemfig{CH_3C\ell} \+ \chemfig{@{d}\charge{0=\.}{C\ell}}
\schemestop
\\ \\
\schemestart
\chemfig{@{e}\charge{0=\.}{C\ell}} \+ \chemfig{CH_4} \schemestop &\schemestart \arrow{->} \chemfig{\charge{0=\.}{CH_3}} \+ \chemfig{HC\ell}
\schemestop
\\
%
\schemestart
%
\chemfig{\charge{180=\.}{CH_3}} \+ \chemfig{C\ell_2} \schemestop & \schemestart \arrow{->} \chemfig{CH_3C\ell} \+ \chemfig{@{f}\charge{0=\.}{C\ell}}
\schemestop
%------------------------------------------------------
    \chemmove{
    \draw[red,dotted](a) circle (.35);
    \draw[red,dotted](b) circle (.35);
    \draw[red,dotted](c) circle (.35);
    \draw[red,dotted](d) circle (.35);
    \draw[red,dotted](e) circle (.35);
    \draw[red,dotted](f) circle (.35);
    \draw[red,shorten <=6pt,shorten >=6pt](b).. controls +(240:16mm) and +(60:16mm)..(c);
    \draw[red,shorten <=6pt,shorten >=6pt](d).. controls +(240:16mm) and +(60:16mm)..(e);
}
\end{f}
\end{document}

在此处输入图片描述

答案2

所以我检查了包裹化学工程。似乎在符号旁边添加*.会生成一个相对于符号垂直对齐的点。它似乎可以实现您想要的功能。

对于对齐,使用&分隔符,LaTeX 将围绕该分隔符对齐左右部分(请参阅我之前对类似问题的评论:这里这里或维基百科对齐或者对齐)。

在此处输入图片描述

\documentclass[12pt]{book}
\usepackage{amsmath, amssymb}
\usepackage{mhchem}
\usepackage{graphicx}
\usepackage{tikz}

\numberwithin{figure}{chapter}


\begin{document}
\chapter{Sample chapter}

\begin{figure}[htb]
  \begin{alignat*}{3}
    \ce{  & Cl* + CH4  &->&* && CH3 + HCl} \\
    \ce{* & CH3 + Cl2  &->&  && CH3Cl + Cl*} \\[12pt]
    \ce{  & Cl* + CH4  &->&* && CH3 + HCl} \\
    \ce{* & CH3 + Cl2  &->&  && CH3Cl + Cl*} \\[12pt]
    \ce{  & Cl* + CH4  &->&* && CH3 + HCl} \\
    \ce{* & CH3 + Cl2  &->&  && CH3Cl + Cl*}
  \end{alignat*}
  \caption{The propagation step is repeated over again and again.}\label{fig:propagation}
\end{figure}
\end{document}

相关内容