如何确保结构式适应文本的宽度,并且化合物名称不重叠?
我唯一能想到的就是将结构公式分成两行,但最好的方法是什么?
\documentclass{scrartcl}
\usepackage{blindtext}
\usepackage{chemfig}
\setchemfig{atom sep=2.25em}
\begin{document}
\section{Structural formula}
\begin{center}
\chemnameinit{\chemfig{H-C(-[2]H)(-[6]H)-OH}}
\schemestart
\chemname{
\chemfig{*6(=(-OH)-=-(-(=[-4.5]O)-[1]OMe)=-)}
}{Methyl 4-hydroxybenzoate}
\chemname{
\chemfig{*6(=(-OH)-=-(-(=[-4.5]O)-[1]OEt)=-)}
}{Ethyl 4-hydroxybenzoate}
\chemname{
\chemfig{*6(=(-OH)-=-(-(=[-4.5]O)-[1]OPr)=-)}
}{Propyl 4-hydroxybenzoate}
\chemname{
\chemfig{*6((=O)-N(-Me)-*5(-N=-N(-Me)-=)--(=O)-N(-Me)-)}
}{Caffeine}
\chemname{
\chemfig{H_2N-[:52.24](=[:90]S)-[::-104]NH_2}
}{Thiourea}
\chemname{
\chemfig{H-C(-[2]H)(-[6]H)-OH}
}{Methanol}
\schemestop
\end{center}
\section{Experimental procedure}
\blindtext
\end{document}
答案1
以下两个建议之一怎么样?
\documentclass{scrartcl}
\usepackage{blindtext}
\usepackage{chemfig}
\setchemfig{atom sep=2.25em}
\begin{document}
\section{Structural formula}
\begin{center}
\schemestart
\chemname{
\chemfig{*6(=(-OH)-=-(-(=[-4.5]O)-[:30]OMe)=-)}
}{Methyl 4-hydroxybenzoate}
\hspace{2cm}
\chemname{
\chemfig{*6(=(-OH)-=-(-(=[-4.5]O)-[:30]OEt)=-)}
}{Ethyl 4-hydroxybenzoate}
\hspace{2cm}
\chemname{
\chemfig{*6(=(-OH)-=-(-(=[-4.5]O)-[:30]OPr)=-)}
}{Propyl 4-hydroxybenzoate}
\schemestop
\bigskip
\schemestart
\chemname{
\chemfig{*6((=O)-N(-Me)-*5(-N=-N(-Me)-=)--(=O)-N(-Me)-)}
}{Caffeine}
\chemname{
\chemfig{H_2N-[:30](=[:90]S)-[::-60]NH_2}
}{Thiourea}
\chemname{
\chemfig{H-C(-[2]H)(-[6]H)-OH}
}{Methanol}
\schemestop
\end{center}
\section{Structural formula}
\begin{center}
\schemestart
\hspace{1.25cm}
\chemname{
\chemfig{*6(=(-OH)-=-(-(=[-4.5]O)-[:30]O-[:0]R)=-)}
}{{\begin{tabular}[t]{l@{\;}l}
R = Me: & Methyl 4-hydroxybenzoate\\
R = Et: & Ethyl 4-hydroxybenzoate\\
R = Pr: & Propyl 4-hydroxybenzoate
\end{tabular}}}
\hspace{0.75cm}
\chemname{
\chemfig{*6((=O)-N(-Me)-*5(-N=-N(-Me)-=)--(=O)-N(-Me)-)}
}{Caffeine}
\chemname{
\chemfig{H_2N-[:30](=[:90]S)-[::-60]NH_2}
}{Thiourea}
\chemname{
\chemfig{Me-OH}
}{Methanol}
\schemestop
\end{center}
\section{Experimental procedure}
\blindtext
\end{document}
答案2
通过使用tabular
环境托盘并将长名称分成两行(写入\parbox
):
\documentclass{scrartcl}
\usepackage{blindtext}
\usepackage{chemfig}
\setchemfig{atom sep=2em}
\usepackage{booktabs}
\begin{document}
\section{Structural formula}
\begin{center}
\schemestart
\begin{tabular}{ccc}
\chemname{
\chemfig{*6(=(-OH)-=-(-(=[-4.5]O)-[1]OMe)=-)}
}{\parbox{8em}{\centering Methyl 4-hydro\-xybenzoate}}
&
\chemname{
\chemfig{*6(=(-OH)-=-(-(=[-4.5]O)-[1]OEt)=-)}
}{\parbox{7em}{\centering Ethyl 4-hydro\-xybenzoate}}
&
\chemname{
\chemfig{*6(=(-OH)-=-(-(=[-4.5]O)-[1]OPr)=-)}
}{\parbox{7em}{\centering Propyl 4-hydro\-xybenzoate}}
\\
\addlinespace[2ex]
\chemname{
\chemfig{*6((=O)-N(-Me)-*5(-N=-N(-Me)-=)--(=O)-N(-Me)-)}
}{Caffeine}
&
\chemname{
\chemfig{H_2N-[:52.24](=[:90]S)-[::-104]NH_2}
}{Thiourea}
&
\chemname{
\chemfig{H-C(-[2]H)(-[6]H)-OH}
}{Methanol}
\end{tabular}
\schemestop
\end{center}
\section{Experimental procedure}
\blindtext
\end{document}
编辑:
从您的评论可以看出,使用tabular
不会产生良好的结果。由于不清楚,这里对您来说“良好的结果”是没有 ose of 的选项,tabular
并且公式名称只在一行中:
\usepackage{blindtext}
\usepackage{chemfig}
\setchemfig{atom sep=2em}
\begin{document}
\section{Structural formula}
\begin{center}
\schemestart
\chemname{
\chemfig{*6(=(-OH)-=-(-(=[-4.5]O)-[1]OMe)=-)}
}{Methyl 4-hydroxybenzoate}
\hspace{6em}
\chemname{
\chemfig{*6(=(-OH)-=-(-(=[-4.5]O)-[1]OEt)=-)}
}{Ethyl 4-hydroxybenzoate}
\hspace{6em}
\chemname{
\chemfig{*6(=(-OH)-=-(-(=[-4.5]O)-[1]OPr)=-)}
}{Propyl 4-hydroxybenzoate}
\schemestop
\medskip
\schemestart
\chemname{
\chemfig{*6((=O)-N(-Me)-*5(-N=-N(-Me)-=)--(=O)-N(-Me)-)}
}{Caffeine}
\chemname{
\chemfig{H_2N-[:52.24](=[:90]S)-[::-104]NH_2}
}{Thiourea}
\chemname{
\chemfig{H-C(-[2]H)(-[6]H)-OH}
}{Methanol}
\schemestop
\end{center}
\section{Experimental procedure}
\blindtext
\end{document}
现在好些了吗?