编辑

编辑

我知道我应该将问题分成多个词干,但我不想发垃圾邮件。我正在尝试重新创建此图表,但有几个部分我不确定:

在此处输入图片描述

下面是部分图表的代码(我决定不包括所有节点和图表,因为这样会使代码变得混乱),但是这里是它和它呈现的图表:

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[left=0.00cm, right=0.00cm]{geometry}
\usepackage{tikz}
\usepackage{chemfig}
\usepackage{mhchem}
\usetikzlibrary{calc,fadings,decorations.markings}
\begin{document}
    \begin{tikzpicture}
        \setchemfig{atom sep=2em}
        % ---------------- LABELS ----------------
        \node[align=center] (alkyne) at (0,0) {Alkyne\\{{\footnotesize \chemfig{-C~C-}}}};
        \node[align=center] (haloalkene) at (2,3) {Haloalkene};
        \node[align=left] at (3.65,3) {{\footnotesize \chemfig{C(-[:-120])(-[:120]R)=C(-[:60]X)-[:-60]}}};
        \node[align=center] (haloalkane) at (0,6) {Haloalkane};
        \node[align=left] at (1.8,6) {{\footnotesize \chemfig{-C(-[:90]R1)(-[:-90]R2)-C(-[:90]X)(-[:-90]R3)-}}};
        \node (alkane) at (-1,3) {Alkane};
        \node at (0.2,2.7) {\footnotesize\chemfig{-C(-[:90]H)(-[:-90]H)-C(-[:90]H)(-[:-90]H)-}};
        \node (tertiaryalcohol) at (0,8) {3$^\circ$ Alcohol};
        \node (alkene) at (-3.2,3) {Alkene};
        \node (ketone) at (-4,0.4) {Ketone};
        \node (alcohol) at (-6,3) {Alcohol};
        \node (glucose) at (-6,6) {Glucose};
        \node (ester) at (-6,-1) {Ester};
        \node (carboxylicacid) at (-9,1) {Carboxylic Acid};
        % BOXES FOR PRIMARY (1 DEGREE) AND SECONDARY (2 DEGREE) ALCOHOL
        \draw[-latex] (alcohol) -- (ketone);
        \draw[fill=white] (-6.5,2.3) rectangle (-6,2.8) (-6,2.3) rectangle (-5.5,2.8);
        \node at (-6.25,2.55) {1$^\circ$};
        \node at (-5.75,2.55) {2$^\circ$};
        % ---------------- ARROWS ----------------
        \draw[-latex] (alkyne) -- node[above,midway] {\ce{HX},\ce{X2}} node[below,midway] {halogenation} (haloalkene); % HOW DO I ROTATE THE LABELS ABOVE AND BELOW THE ARROWS HERE
        \draw[-latex] (haloalkene) -- (haloalkane);
        \draw[-latex] (alkyne) -- (alkane);
        \draw[-latex] (alkane) -- (haloalkane);
        \draw[-latex] (alkene) -- (alkane);
        \draw[-latex] (alkyne) -- (ketone);
        \draw[-latex] (alcohol) -- (haloalkane); % HOW DO I DRAW THE REVERSE ARROW HERE
        \draw[-latex] (haloalkane) -- (tertiaryalcohol);
        \draw[-latex] (alkene) -- (haloalkane);
        \draw[-latex] (alcohol) -- (alkene); % HOW DO I DRAW THE REVERSE ARROW HERE
        \draw[-latex] (glucose) -- (alcohol);
        \draw (alcohol) -- (ester); % HOW DO I ADD THE CURLY BRACKETS AT THE ALCOHOL AND HOW DO I ADD THE EQUILIBRIUM REACTION ARROW AT THE KETONE END 
        \draw (carboxylicacid) .. controls +(0:3) and +(90:2) .. (ester);
        % ---------------- ADDITIONAL DECORATIONS ----------------
        \draw[-latex] (glucose) .. controls +(-90:1) and +(180:1) .. (-5,5) node[right] {\ce{CO2}};
    \end{tikzpicture}
\end{document}

在此处输入图片描述

第一个问题与箭头上的节点有关,我不确定如何旋转它们,使它们与箭头的角度相同。例如,在我的图表和原始图表中,查看炔烃与卤代烯烃之间的箭头上的节点。

第二个问题是,酒精和卤代烷之间的箭头应该是一组两个箭头,一个向前,另一个向后。如果不指定精确的坐标,我不确定如何做到这一点,因为这会很繁琐。

第三个问题是我不知道如何在第一和第二度的框下面的酒精处添加花括号。

第四个也是最后一个问题是酯处的双头端箭头(平衡反应箭头)。

请注意,我已在代码中标记了相关点,以帮助您。谢谢

编辑

另外,如果箭头是贝塞尔曲线(),那么随着箭头上方和下方节点的旋转,..controls +(point 1) and +(point 2) ..节点文本是否可以跟随箭头的曲线?

答案1

要旋转标签,请使用倾斜。可以使用括号装饰来绘制括号。为了有两个平行箭头,我添加了一个同名的样式。(我还添加了一个shapes.multipart节点以方便您使用。)至于指向 Ester 的箭头,我建议使用inout语法而不是控件,但为平行箭头定义样式可能没有太大意义。至于那里的特殊箭头,它们是所谓的鱼叉,可以在 pgfmanual 的第 193 页找到。我选择了变Latex体,但您可能更喜欢其他变体。

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[left=0.00cm, right=0.00cm]{geometry}
\usepackage{tikz}
\usepackage{chemfig}
\usepackage{mhchem}
\usetikzlibrary{calc,fadings,decorations.markings}
\usetikzlibrary{decorations.pathreplacing,calc,positioning,shapes.multipart,arrows.meta}
\tikzset{two parallel arrows/.style={decorate,decoration={show path construction,
      lineto code={
       \draw [-latex] ($(\tikzinputsegmentfirst)!#1!90:(\tikzinputsegmentlast)$) 
        -- ($(\tikzinputsegmentlast)!#1!-90:(\tikzinputsegmentfirst)$); 
       \draw [latex-] ($(\tikzinputsegmentfirst)!#1!-90:(\tikzinputsegmentlast)$) 
        -- ($(\tikzinputsegmentlast)!#1!90:(\tikzinputsegmentfirst)$); 
      }}},two parallel arrows/.default=2pt}
\begin{document}
    \begin{tikzpicture}
        \setchemfig{atom sep=2em}
        % ---------------- LABELS ----------------
        \node[align=center] (alkyne) at (0,0) {Alkyne\\{{\footnotesize \chemfig{-C~C-}}}};
        \node[align=center] (haloalkene) at (2,3) {Haloalkene};
        \node[align=left] at (3.65,3) {{\footnotesize \chemfig{C(-[:-120])(-[:120]R)=C(-[:60]X)-[:-60]}}};
        \node[align=center] (haloalkane) at (0,6) {Haloalkane};
        \node[align=left] at (1.8,6) {{\footnotesize \chemfig{-C(-[:90]R1)(-[:-90]R2)-C(-[:90]X)(-[:-90]R3)-}}};
        \node (alkane) at (-1,3) {Alkane};
        \node at (0.2,2.7) {\footnotesize\chemfig{-C(-[:90]H)(-[:-90]H)-C(-[:90]H)(-[:-90]H)-}};
        \node (tertiaryalcohol) at (0,8) {3$^\circ$ Alcohol};
        \node (alkene) at (-3.2,3) {Alkene};
        \node (ketone) at (-4,0.4) {Ketone};
        \node (alcohol) at (-6,3) {Alcohol};
        \node (glucose) at (-6,6) {Glucose};
        \node (ester) at (-6,-1) {Ester};
        \node (carboxylicacid) at (-9,1) {Carboxylic Acid};
        % BOXES FOR PRIMARY (1 DEGREE) AND SECONDARY (2 DEGREE) ALCOHOL
        \draw[-latex] (alcohol.south east) -- (ketone);
        \node[rectangle split,rectangle split horizontal, rectangle split parts=2, draw, anchor=center,
        below=0pt of alcohol] (degrees) {1$^\circ$ \nodepart{two} 2$^\circ$};
        \draw[decorate,decoration=brace] (degrees.south east) -- 
        (degrees.south west) coordinate[midway,below=2pt] (brace);
        % ---------------- ARROWS ----------------
        \draw[-latex] (alkyne) -- node[above,midway,sloped] {\ce{HX},\ce{X2}}
        node[below,midway,sloped] {halogenation} (haloalkene); % HOW DO I ROTATE THE LABELS ABOVE AND BELOW THE ARROWS HERE
        \draw[-latex] (haloalkene) -- (haloalkane);
        \draw[-latex] (alkyne) -- (alkane);
        \draw[-latex] (alkane) -- (haloalkane);
        \draw[-latex] (alkene) -- (alkane);
        \draw[-latex] (alkyne) -- (ketone);
        \draw[two parallel arrows] (alcohol) -- (haloalkane.south west); % HOW DO I DRAW THE REVERSE ARROW HERE
        \draw[-latex] (haloalkane) -- (tertiaryalcohol);
        \draw[-latex] (alkene) -- (haloalkane);
        \draw[two parallel arrows] (alcohol) -- (alkene); % HOW DO I DRAW THE REVERSE ARROW HERE
        \draw[-latex] (glucose) -- (alcohol);
        \draw (brace) -- (ester); % HOW DO I ADD THE CURLY BRACKETS AT THE ALCOHOL AND HOW DO I ADD THE EQUILIBRIUM REACTION ARROW AT THE KETONE END 
        \draw[-{Latex[harpoon]}] (carboxylicacid) to[out=0,in=90,looseness=1.6] (ester);
        \draw[-{Latex[harpoon]}] ([xshift=-4pt]ester.north) -- ++ (0,1);
        % ---------------- ADDITIONAL DECORATIONS ----------------
        \draw[-latex] (glucose) to[out=-90,in=180,looseness=1.6] (-5,5) node[right] {\ce{CO2}};
    \end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容