2

I am trying to draw a reaction scheme in chemfig, but the chemleft bracket is too far away from the actual molecule and I do not know why. My code looks like this:

\documentclass{article}
\usepackage{tikz}
\usepackage{chemfig}

\begin{document}
\setchemfig{cram width=3pt}
\schemestart
\subscheme{
\chemleft[
    \chemfig{@{F}\Lewis{0:2:4:6:,F}}
\chemright]}
\+
\chemfig{F-@{B}{\phantom{B}}(-[2,0,,,draw=none]{})(<[:-20]F)<:[:20]F}
\arrow{->}
\chemleft[
    \chemfig{\chembelow[0.5pt]{F}{\scriptstyle\hspace{4.5mm}\oplus}-[@{cb}:-90,0.8]\chemabove[0.5pt]{B}{\scriptstyle\hspace{4.5mm}\ominus}(<:[:-40,0.8]F)(<[:-70,0.8]F)-[:-140]F}
\chemright]
\schemestop
\tikz[overlay,remember picture]{
\begin{scope}[overlay,shift={(B)}]
\draw[-] (-0.1,0.2) ..controls +(120:1) and +(60:1) .. (0.1,0.2);
\draw[-,fill=black!10] (-0.1,-0.2) ..controls +(-120:1) and +(-60:1) .. 
+(0.2,0);
\end{scope}
\node[fill=white,inner sep=0.1pt] at (B){{\fontfamily{cmr}\selectfont
B
}};
\draw[-latex,shorten <=2pt] (F) ..controls +(90:1.7cm)and+(90:1cm)..
([yshift=9pt]B.north);
\draw[-latex,densely dashed] (cb) arc (270:180:0.7 and 1) node[above=0.15cm,align=center] {\scriptsize coordinate \scriptsize covalent\\ \scriptsize bond};
}
\chemmove{\node[xshift=5pt] at (c2.north east) {$-$};}
\chemmove{\node[xshift=5pt] at (c3.north east) {$-$};}
\end{document}

Here is the output which illustrates my problem enter image description here As you can see, the left [ (chemleft[) braces are placed at some distance from the actual molecule. How do I fix this?

10
  • On my updated TeXLive2018 distribution, I do not get the gaps when I compile with either pdflatex or lualatex. If I compile with xelatex, I do not get the gaps either, however the output is screwed up in many other ways,
    – user121799
    Oct 12, 2018 at 14:15
  • I'm using miktex 2.9 and texworks and the issue comes with both pdflatex and luatex. What do you mean by the output is screwed up in many other ways? Often you have to compile it two or three times for it to work properly?
    – sab hoque
    Oct 12, 2018 at 14:17
  • I did compile 3 times with xelatex and the result is completely off. This is not your fault, but there are several occasions in which xelatex "misbehaves". However, I cannot reproduce the gaps. I also have no idea what miktex does, but I think there should be a way to update the packages.
    – user121799
    Oct 12, 2018 at 14:20
  • 1
    Hard to tell, probably yes, but as soon as you do an update or fix the fundamental problem this will screw up the result. That is, if you compile the file later, you may have real problems.
    – user121799
    Oct 12, 2018 at 14:26
  • 2
    I think this question is duplicate/related to tex.stackexchange.com/questions/424040/…
    – pisoir
    Dec 16, 2018 at 16:12

0

You must log in to answer this question.

Browse other questions tagged .