1

I have the following LaTeX code:

\documentclass{article}
\usepackage{chemfig}
\setarrowdefault{15,3,thick}
\begin{document}
\schemestart
 $A_{1}$
\arrow($A_{2}$--){<=>[$k_{1}$][$k_{2}$]}[35] $A_{2}$
\arrow($A_{2}$--){<=>[$k_{3}$][$k_{4}$]}[-35] $A_{3}$
\schemestop
\end{document}

Could you please help me how to change distance within the reversible edges ("<=>") and set (a) the font size of the nodes and the text on the arrows and (b) distances of $k_{i}$s from the arrows?

  • “how to change distance within the reversible edges” you mean the arrow length? \arrow has an optional argument for this and there is \setcompoundsep... for the font size see the section about compound style in the chemfig manual – cgnieder Sep 6 '17 at 12:30
  • No, I would like to vary the distance between -> and <- (within a pair of harpoons). – TobiR Sep 6 '17 at 12:32
  • I think that is hard-coded in chemfig. But it should be possible to adapt the definition of section 10 (Arrows customization) in part IV of the manual and the original definition in chemfig.tex – cgnieder Sep 6 '17 at 12:38
  • Is there any easier way to perform it with other packages? – TobiR Sep 6 '17 at 12:42
1

Looking at the example on page 29 chapter III.6, this is indeed customizable. Here is possible solution:

\documentclass{article}
\usepackage{chemfig}
\usepackage{tikz}
\usetikzlibrary{decorations.markings,arrows}

\setarrowdefault{15,3,thick}
\begin{document}
\makeatletter
\tikzset{ 
    ddbond/.style n args={4}{ 
        draw=none, 
        decoration={% 
            markings,
            mark=at position 0 with { 
                \coordinate (CF@startdeloc) at (0,\dimexpr#1\CF@double@sep) 
                coordinate (CF@startaxis) at (0,\dimexpr-#1\CF@double@sep); 
            },
            mark=at position 1 with { 
                \coordinate (CF@enddeloc) at (0,\dimexpr#1\CF@double@sep)
                coordinate (CF@endaxis) at (0,\dimexpr-#1\CF@double@sep); 
                \draw[-{Stealth[left]}, line width=0.4mm] (CF@startdeloc)--node[rotate=#2, above = 0.1cm]{#3}(CF@enddeloc); 
                \draw[{Stealth[left]-}, line width=0.4mm] (CF@startaxis)--node[rotate=#2, below = 0.1cm]{#4}(CF@endaxis); 
        }
     },
  postaction={decorate}
 }
}
\makeatother 
\chemfig{A_1-[-135,5,,,ddbond={+1.5}{45}{$k_1$}{$k_2$}]A_2-[135,5,,,ddbond={+2.5}{-45}{$k_3$}{$k_4$}]A_3}

\end{document}

You would need to tune the parameters, but that should be easy to do. The space between arrows are set by the first parameter (+1.5, +2.5), the other parameters influence the label on the arrow. You would also have to tweak the angles, but in principle you should be able to make what you want.

|improve this answer|||||

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.