4

I am trying to create a reaction scheme using chemfig. I can not understand though how to have text written vertically.

Say my set of reaction A+B -> AB, A+C ->AC

If I start writing

\startscheme
A+B \arrow{->}AB
\stopscheme

how can I write the + and the C vertically and aligned with A?

I am sorry if it is a naive question, I just discovered this package today!

Edit: I mean something looking approximately like:

A + B <=> AB
+
C
^
|
AC

Edit 2: (why EI is not aligned to E)?

\schemedebug{true}
\schemestart
\subscheme{E\phantom{I}} + S \arrow{<=>[$k_1$][$k_{-1}$]} ES \arrow{->[$k_\text{cat}$]} P
% insert arrow typ 0 (invisible) starting from compound `c2'
% scaled to 0.1 of the standard arrow length and pointing down
\arrow(@c2--){0}[-90,.1] +
% insert arrow typ 0 (invisible) scaled to 0.1 of the standard
% arrow length and pointing down
\arrow{0}[-90,.1] I
\arrow{<=>[$k_4$][$k_{-4}$]}[-90] \subscheme{EI} + S
\arrow(@c7--@c11){<=>[$k_3$][$k_{-3}$]}  
\arrow(@c3--){0}[-90,.1] + \arrow{0}[-90,.1] I  \arrow{<=>[$k_2$][$k_{-2}$]}[-90] EIS
\schemestop

I don't find very intuitive how this works :(

5
  • regarding your 2nd edit: because of \phantom{I} in your \subscheme. Intuition will come with practice. I played for two or three weeks with the possibilities before I used these commands in a real usecase...
    – cgnieder
    Commented Oct 30, 2012 at 22:19
  • Another advice: instead of building the scheme at once start simple (e.g. without arrow labels and the like) and add stuff gradually to the scheme instead of just copying my example. Do you know why I put the \phantom there in the first place? If the answer is “no” then leave it out.
    – cgnieder
    Commented Oct 30, 2012 at 22:21
  • intuitively you wanted the I to the left of the arrows and an imaginary I to be aligned...? Sorry usually I read manuals, this time I am really in a rush (and it is not a problem if it is not aligned for the moment)
    – lucacerone
    Commented Oct 30, 2012 at 22:32
  • It had to do with the vertical arrows. If you connect two compounds with \arrow(@a--@b) or something the arrow connects from center to center unless specified differently. Without the phantom the second vertical arrow wouldn't have been exactly vertical. The easy way out was making the E the same width as the EI...
    – cgnieder
    Commented Oct 30, 2012 at 22:36
  • thanks it is a bit more clear :) I'll try to play with it as soon as the deadline is passed!
    – lucacerone
    Commented Oct 30, 2012 at 22:41

1 Answer 1

4

Simply use the optional argument of \arrow:

\documentclass{article}
\usepackage{chemfig}

\begin{document}

\schemestart
 A + B \arrow[-90] AB
\schemestop

\end{document}

Update responding to edit of the question: You can combine the use of \subscheme with the invisible arrow type 0:

\documentclass{article}
\usepackage{chemfig}

\begin{document}

% uncomment to see internal compound names:
% \schemedebug{true}
\schemestart
 \subscheme{A} + B \arrow AB
 % insert arrow typ 0 (invisible) starting from compound `c2'
 % scaled to 0.1 of the standard arrow length and pointing down
 \arrow(@c2--){0}[-90,.1] +
 % insert arrow typ 0 (invisible) scaled to 0.1 of the standard
 % arrow length and pointing down
 \arrow{0}[-90,.1] C
 \arrow[-90] AC
\schemestop

\end{document}

enter image description here

The \arrow command is a bit complex and you have to play a bit with it to get to know it. Here are a few examples of the syntax:

\arrow% simple arrow to the right

\arrow{<=>}% equilibrium arrow

\arrow{<=>[a][b]}% equilibrium arrow with labels

\arrow[-90]% arrow pointing down

\arrow{<=>[*{0}a][*{30}b]}[45]% equilibrium arrow pointing 45 degrees up with rotated labels

I repeat my advice from my answer to your previous question: study part V Reaction Schemes in the chemfig manual. Play with its lots of examples, copy them, change the parameters and see what happens...

3
  • I did read the manual, but there is no mention to what I would like to achieve. I made a few experiments using subscheme, but with no success....
    – lucacerone
    Commented Oct 30, 2012 at 21:27
  • @LucaCerone see my edited answer. BTW: maybe next time you could add an example to your question showing what you've tried...
    – cgnieder
    Commented Oct 30, 2012 at 21:37
  • Thanks, this really helps a lot! I wasn't sure that subscheme was the answer, so I didn't want to bias the solutions! Thank you very much I missed how to make invisible arrows! (actually I searched for it in the manual, but couldn't find it.. I am a bit in a rush for a deadline and thought that at most I would have drawn the figures with some software!) Thanks a lot again!
    – lucacerone
    Commented Oct 30, 2012 at 21:42

You must log in to answer this question.

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