6

I would like to get to this result:

Molecule Drawing.

This is the code till now:

\documentclass[10pt, a4paper]{article}
\usepackage{lipsum}
\usepackage[utf8]{inputenc}
\usepackage{chemfig,stackengine,graphicx}
\usepackage{xcolor,tikz}
\usepackage[version=3]{mhchem}

\begin{document}
\lipsum[10]
\begin{align}
\ce{HCN + H_2O \rightleftharpoons H_3O^+ + CN^-}\\
\schemestart[-45]
 \chemfig{**6(--(-CH_3)---(-)-)}
\schemestop
\end{align}
\lipsum[20]

\end{document}

Where I need your help

  • making the inner circle of the benzene ring a little smaller
  • turn the molecule a little, so it looks like on the image
  • draw the wall (left in the picture), connected to the molecule

In the meantime, thank you so much for your attention and participation.

7

Here is a “chemfig only” idea:

\documentclass{article}
\usepackage{chemfig}

\definesubmol{wallpart}{-[:-90,.5](-[:110,.5])}
\definesubmol{wall}{!{wallpart}!{wallpart}!{wallpart}}

\begin{document}

\chemfig{
  !{wall}
  (-[:0]**6(---(-CH_3)---))
  !{wall}
}

\end{document}

enter image description here

As far as I know the size of the circle (relative to the size of the ring) is controlled by the parameter \CF@cycle@inraduiscoeff. Its initial value is 0.75. Defining it to some smaller value scales the circle down. Here is how the above looks with

\makeatletter
\def\CF@cycle@inraduiscoeff{0.6}
\makeatother

enter image description here

However, there is no official interface for this parameter so it might or might not be available in future versions…

  • You are right: an "official" interface should be provided. Let's say \setcircleradiuscoeff will be available with the next version. – unbonpetit Nov 2 '15 at 21:14
1

I don't know how to do the chemistry part of the problem (changing the -45 seemed to have no effect, so I just rotated what was provided), but the wall can be emulated with a stack of slashes / and a \rule.

\documentclass[10pt, a4paper]{article}
\usepackage{lipsum}
\usepackage[utf8]{inputenc}
\usepackage{chemfig,stackengine,graphicx}
\usepackage{xcolor,tikz}
\usepackage[version=3]{mhchem}

\begin{document}
\lipsum[10]

{\centering\Longstack{/ / / / / /}\kern-1pt\rule[-2pt]{1pt}{6\baselineskip}\rotatebox{30}{%
\schemestart[-45]
 \chemfig{**6(--(-CH_3)---(-)-)}
\schemestop
}\par}

\lipsum[20]

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.