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
As you can see, the left [ (
chemleft[
) braces are placed at some distance from the actual molecule. How do I fix this?
pdflatex
orlualatex
. If I compile withxelatex
, I do not get the gaps either, however the output is screwed up in many other ways,pdflatex
andluatex
. 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?xelatex
and the result is completely off. This is not your fault, but there are several occasions in whichxelatex
"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.