0

I am making a large poster, and when I use \chemfig{} to make arrows, \arrow{} the reversible reaction arrow is having very small distance between the two lines. Can anyone suggest how to manually increase the distance between the reversible reaction arrow ?

MWE:

\documentclass{article}
\usepackage{chemfig}
\begin{document}
    \schemestart
        \chemfig{2H_2O} \arrow{<=>} \chemfig{4H} \+ \chemfig{O_2} 
    \schemestop
\end{document}

Here the <=> creates reversible reaction arrow, but the spacing between the two lines is very small for a huge poster. How to increase this space?

Stefan Pinnow
  • 29,535

2 Answers2

3

Use the key double arrow sep.

enter image description here

\documentclass{article}
\usepackage{chemfig}
\begin{document}
% Default arrow double sep = 2pt
\schemestart
    \chemfig{2H_2O} \arrow{<=>} \chemfig{4H} \+ \chemfig{O_2}
\schemestop

\bigskip

% Increase arrow spacing
\setchemfig{arrow double sep=6pt}
\schemestart
    \chemfig{2H_2O} \arrow{<=>} \chemfig{4H} \+ \chemfig{O_2}
\schemestop
\end{document}
Troy
  • 13,741
  • Not really sufficient: with a huge font the thickness doesn't vary and the arrows get longer. – egreg May 20 '18 at 16:33
  • 1
    @egreg That can be tweaked with the other chemfig options. If the OP gives more information about how this is being used I can advise further. Otherwise, imho the central question has been answered. – Troy May 20 '18 at 16:36
1

As @MichaelPalmer wrote in the comment, you have to create a new type of arrow, e.g.,

\documentclass{article}
\usepackage{chemfig}

\makeatletter
\definearrow{4}{<S>}{%
    \CF@arrow@shift@nodes{#3}%
    \path[allow upside down](\CF@arrow@start@node)--(\CF@arrow@end@node)%
    node[pos=0,sloped,yshift=#4](\CF@arrow@start@node @u0){}%
    node[pos=0,sloped,yshift=-#4](\CF@arrow@start@node @d0){}%
    node[pos=1,sloped,yshift=#4](\CF@arrow@start@node @u1){}%
    node[pos=1,sloped,yshift=-#4](\CF@arrow@start@node @d1){};%
    \begingroup
    \pgfarrowharpoontrue
    \expandafter\draw\expandafter[\CF@arrow@current@style](\CF@arrow@start@node @u0)--(\CF@arrow@start@node @u1);%
    \expandafter\draw\expandafter[\CF@arrow@current@style](\CF@arrow@start@node @d1)--(\CF@arrow@start@node @d0);%
    \endgroup
    \CF@arrow@display@label{#1}{0.5}+\CF@arrow@start@node{#2}{0.5}-\CF@arrow@end@node%
}
\makeatother

\begin{document}
    \schemestart[0,1,line width=1mm]
        \chemfig{2H_2O} \arrow{<S>[][][][4pt]} \chemfig{4H} \+ \chemfig{O_2} 
    \schemestop
\end{document}

where I set the distance to 4pt and the thickness of the lines to 1mm.

Another approach, if you want to tweak the arrows even more, then look here:

How to change distance within a reversible edge and increase the font size in chemfig?

How do we mirror a reversible reaction arrow in chemfig

How to get different colors for reversible arrows in chemfig

pisoir
  • 882