chemfig 水平对齐

chemfig 水平对齐

我需要根据这张图片对齐一些分子。 在此处输入图片描述 对齐的第一个点应该是环的开始,对齐的第二个点应该是右侧链上的“N”。与 N 的绑定应该具有灵活的长度,并根据所需的宽度进行调整。

我迄今为止在以下代码中取得的进展:

 \documentclass[10pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{graphicx}
\usepackage{chemfig}
\usepackage{tikz}

\begin{document}

    \begin{tikzpicture}
    \node[align=center] at (1.4,3.2) {Aromatischer Rest\\(lipophiler Anteil)};
    \node[align=center] at (4.825,3.2) {Zwischenkette};
    \node[align=center] at (8.425,3.2) {Aminogruppe\\(hydrophiler Teil)};
    \draw [dashed, red] (2.8,-2) -- (2.8,2.8);
    \draw [dashed, red] (6.85,-2) -- (6.85,2.8);
    \chemfig{[:330]**6(---(-C(=[6,0.7]O)-O-(-[0,0.9](-[5,0.6,,,dash pattern=on 2pt off 2pt]H)*6(--(-[3,0.6]?[a])- N(-CH_3)-(-[5,0.6]?[a])-(-[:200,0.6,,,dash pattern=on 2pt off 2pt]H)(-[3]C(=[2,0.7]O)(-[4,0.7]H_3CO))-)))---)}

    \end{tikzpicture}

\chemfig{H_2N-(**6(---(-C(=[6,0.7]O)-CH_2-CH_2-N(-[1]C_2H_5)(-[7]C_2H_5))---))}
\end{document}

答案1

诀窍是使用隐形键。6 环的长度为 2 个键:

\documentclass{article}
\usepackage{chemfig}
\begin{document}
\setatomsep{1.75em}
\chemfig{C(-[4,2]**6(---(-[,3,,,draw=none])---))(=[6]O)-O?-[,4,,,draw=none]?*6(---N(-CH_3)---)}\vskip5ex
\chemfig{C(-[4,2]**6(---(-[,1.25]NH_2)(-[,3,,,draw=none])---))(=[6]O)-O(-[,6,,,draw=none]N?(-[7,1.25]C_2H_5)-[1,1.25]CH_3)-CH_2-CH_2|\vphantom{N}?}\vskip5ex
\chemfig{C(-[4,2]**6(---(-N(-[3,1.25]H)-[5,1.25]H_9C_4)(-[,3,,,draw=none])---))(=[6]O)-O(-[,6,,,draw=none]N?(-[7,1.25]C_2H_5)-[1,1.25]CH_3)-CH_2-CH_2|\vphantom{N}?}
\end{document}

在此处输入图片描述

相关内容