如何在 chemfig 上断线?

如何在 chemfig 上断线?
noindent \textbf{Dehydrogenation} 
\begin{figure}[h]
\label{dicosimo_mechanism}

\centering

\scalebox{.8}{
\begin{center}

\setchemfig{scheme debug=false}
\schemestart

%%%%%%%%%%%% ETEP 1 part1 %%%%%%%%%%%%%%%%%%%%%% 
\chemfig{M(
-[@{l2}2,,,,dotted]H
-[@{l1}]@{carb1}\charge{135:10pt=$\delta^+$}{}([2]-{})
-@{ox1}\charge{45:5pt=$\delta^-$}{O}?[Lacid2] 
-[@{l3}]H-[@{l4}6,,,,dotted]O
-[4]M?[Lacid2,{1,,,,dotted}]?[Lbase1])
-O?[Lbase1]
} 
\arrow(aa--bb)
%%%%%%%%%%%% ETEP1 part2 %%%%%%%%%%%%%%%%%%%%%%

\chemfig{M(
-[2]H
-[,,,,dotted]{}([2]-{})
={O}?[Lacid2] 
-[,,,,dotted]H-[6]O
-[4]M?[Lacid2,{1,,,,dotted}]?[Lbase1])
-O?[Lbase1]
}

\arrow{-U>[][H$_{2}$]}[]
%%%%%%%%%%%% ETEP1 part3 %%%%%%%%%%%%%%%%%%%%%%
\chemfig{H?[h1]-[2]
-[4]=[6]O
-[6,,,,dotted]M-O?[h1,,,,dotted]-M-O
}

\schemestop

\newline
\noindent \textbf{Aldolization} 
%\setchemfig{scheme debug=true}
\schemestart

%%%%%%%%%%%% ETEP2 part1 %%%%%%%%%%%%%%%%%%%%%%
\chemfig{H?[h1]-[2]
-[4]=[6]O
-[6,,,,dotted]M-O?[h1,,,,dotted]-M-O
}

\schemestop


\chemmove[black, shorten <=2pt]{
%%%%%%%%%%%% ETEP 1 part1 %%%%%%%%%%%%%%%%%%%%%% 
\draw(ox1)..controls +(90:1cm)and+(north east:2cm)..(carb1);
\draw(l1)..controls +(270:.25cm)and+(east:2cm)..(l2);
\draw(l3)..controls +(270:.25cm)and+(west:1cm)..(l4)}






\end{center}
}>

\caption{}}
\end{figure}`

在此处输入图片描述

此外,我想在第 3 部分上仅绘制乙醛。

答案1

创建是\newenvironment为了对齐方程式\chemfig

此命令可以在“独立”文档格式中使用。您可以以“独立”格式制作 chemfig 反应,并将其作为 PDF 图形插入文档中。

\documentclass[margin={2mm 2mm}]{standalone}
\usepackage{chemfig}
\usepackage{amsmath}

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

\begin{document}

            \begin{aasa}
            \setchemfig{scheme debug=false}
            &\textbf{Dehydrogenation} \\
            &\schemestart
            %
            %%%%%%%%%%%% ETEP 1 part1 %%%%%%%%%%%%%%%%%%%%%% 
            \chemfig{M(
                -[@{l2}2,,,,dotted]H
                -[@{l1}]@{carb1}\charge{135:10pt=$\delta^+$}{}([2]-{})
                -@{ox1}\charge{45:5pt=$\delta^-$}{O}?[Lacid2] 
                -[@{l3}]H-[@{l4}6,,,,dotted]O
                -[4]M?[Lacid2,{1,,,,dotted}]?[Lbase1])
                -O?[Lbase1]
            } 
            \arrow(aa--bb)
            %%%%%%%%%%%% ETEP1 part2 %%%%%%%%%%%%%%%%%%%%%%
            %
            \chemfig{M(
                -[2]H
                -[,,,,dotted]{}([2]-{})
                ={O}?[Lacid2] 
                -[,,,,dotted]H-[6]O
                -[4]M?[Lacid2,{1,,,,dotted}]?[Lbase1])
                -O?[Lbase1]
            }
            %
            \arrow{-U>[][H$_{2}$]}[]
            %%%%%%%%%%%% ETEP1 part3 %%%%%%%%%%%%%%%%%%%%%%
            \chemfig{H?[h1]-[2]
                -[4]=[6]O
                -[6,,,,dotted]M-O?[h1,,,,dotted]-M-O
            }
            %
            \schemestop
            \\
            \\
            \\ 
            &\textbf{Aldolization} \\
            %\setchemfig{scheme debug=true}
            &\schemestart
            %
            %%%%%%%%%%%% ETEP2 part1 %%%%%%%%%%%%%%%%%%%%%%
            \chemfig{H?[h1]-[2]
                -[4]=[6]O
                -[6,,,,dotted]M-O?[h1,,,,dotted]-M-O
            }
            %
            \schemestop
            \\
            \chemmove[black, shorten <=2pt]{
                %%%%%%%%%%%% ETEP 1 part1 %%%%%%%%%%%%%%%%%%%%%% 
                \draw(ox1)..controls +(90:1cm)and+(north east:2cm)..(carb1);
                \draw(l1)..controls +(270:.25cm)and+(east:2cm)..(l2);
                \draw(l3)..controls +(270:.25cm)and+(west:1cm)..(l4);
            }
        \\
    \end{aasa}
        
\end{document}

在此处输入图片描述

To color part of the third molecule, the best thing to do is to color the atoms and bonds individually, as the molecule is not very large.


\chemfig{{\color{red}H}?-[2,,,,red]-[4,,,,red]=[6,,,,red]{\color{red}O}-[6,,,,dotted,red]M-O?[,,,,dotted,red]-M-O}

在此处输入图片描述

有命令

\setchemfig{chemfig style=red}\chemfig{<molecule>}

但它会使整个分子着色。

相关内容