3

I'm having an issue with chemfig: in order to have better looking bonds joints I enabled the cap=round option, following a post published on this website. Everything is great until I start using hashed Cram bonds. At that point the hashes become rounded and 'expand' in an odd way.

enter image description hereHere below you can find a picture of what I get with cap rounding disabled and enabled, respectively. How do I get around this?

A secondary issue is that the large base of those bonds doesn't really look nice when it terminates on rings. The only possible workaround I found implies lengthen the bonds but it doesn't work for me (even using the tikz option shorten <=-10pt doesn't produce any effect) and it wouldn't anyway be a neat solution.

That's my MWE:

\documentclass{minimal}
\usepackage{chemfig}
\setbondstyle{cap=round}

\begin{document}

\centering
\chemfig{P(<:[:-110,]*6(-=-=-=))(-[:-30]*6(-=-=-=))<[:-150]*6(-=-=-=)}

\end{document}

1 Answer 1

2
  1. You can manually set the cram bond cap style to be back to butt. You can read about customization of individual bonds from the chemfig documentation. In short, you can pass optional arguments when typesetting bonds, and the fifth argument (after 4 commas) is a <tikz code> which will be passed to TikZ when the bond is drawn.

    [<angle>,<interatomic distance multiplier>,<departure atom>,<arrival atom>,<tikz code>]
    

    (Taken from the documentation here.)

    So you can pass an option like cap=butt to offset the round cap ends that was set as a global option.

  2. For your secondary question, you can use the \setcrambond{<base width>}{}{} to adjust the base width as you like. I found that a width of about 4pt seems to look fine.

  3. I also took the liberty to adjust the middle bond length and angle using the optional arguments for the bonds - in particular, the <interatomic distance multiplier> and <angle> (see above). I'm not particularly sold on how it looks, but I'm no chemist, so I'm not sure how this molecule is arranged IRL. You can adjust as you see fit.

Result:

comparison

\documentclass{article}
\usepackage{chemfig}
\setbondstyle{cap=round}


\begin{document}
\texttt{Before}: \par
\chemfig{P(<:[:-110,,,,cap=butt]*6(-=-=-=))(-[:-30]*6(-=-=-=))<[:-150]*6(-=-=-=)}

\bigskip

\texttt{After}: \par
\setcrambond{4pt}{}{}%
\chemfig{P(<:[:-100,1.5,,,cap=butt]*6(-=-=-=))(-[:-30]*6(-=-=-=))<[:-150]*6(-=-=-=)}

\end{document}
1
  • Thank you Troy! 1 - I knew it was possible to set the cap=butt option for the single bond, but I consider this a workaround not a solution. I was looking for some redefinition of the cram hashed bond so that it can bear the cap=round option. 2 - I was playing with this parameter as well and I agree we can reach a decent result. However in my opinion this is a poor outcome compared to what you usually see in books. 3 - The structure was drawn like this on purpose, it's a way to accentuate the 3D look. Consider that this was a MWE, in my document is much more refined. Thanks anyway!
    – markellos
    Apr 27, 2017 at 9:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .