Is there a way to write #rightleftharpoons# with something above and below, while still keeping #rightleftharpoons# on the same line as the rest of the text? This would be useful for equilibrium reactions and kinetics.
2 Answers
For example:
Where
Maybe a notation like this, with colon-separated above/below stacking:
stk([text above] : [text below])(rightleftharpoons)
EDIT:
Testing!
#"Alkyl Halide" stackrel(" ""t-buOK")(" "->) " Elimination Product"#
#color(white)"aaaaaaaaaaaaaa" ""^("t-buOH", Delta)#
Here's what I could come up with.
Explanation:
A far as I know, there are no predefined functions that allow you to stack three characters on top of each other.
However, like with most interesting things in life, you can bypass that problem.
I have two hacks that could be used in such situations. It's worth mentioning that neither one is perfect, but I think that they both get the job done.
Here's how the first one looks
This basically consists of two stackrel()() funsctions used one on top of the other, i.e. on consecutive code lines. Here's what the framework looks like
- without the hashtags
"A " + "B " stackrel(k_1)(rightleftharpoons) " C" + " D"#
color(white)("aaaaaaaa")stackrel(""^(k_(-1)))(color(white)(x))
- with the hashtags
#"A " + "B " stackrel(k_1)(rightleftharpoons) " C" + " D"#
#color(white)("aaaaaaaa")stackrel(""^(k_(-1)))(color(white)(x))#
You could tweak it and maybe make use
#"A " + " B " stackrel(""^(k_1))(rightleftharpoons) " C" + " D"#
#color(white)("aaaaaaaaa")stackrel(""^(k_(-1)))(color(white)(x))#
In this version, the rate constants are alligned better with the "rightleftharpoons" symbol.
The second one is based on a matrix. My starting template was
#( (0, 0, 0, 0, 0, 0, 0), (1, 1, 1, 1, 1, 1, 1), (0, 0, 0, 0, 0, 0, 0) )#
Then I replaced every value that shouldn't be visible with color(white)(0)
#( (color(white)(0), color(white)(0), color(white)(0), 0, color(white)(0), color(white)(0), color(white)(0)), (1, 1, 1, 1, 1, 1, 1), (color(white)(0), color(white)(0), color(white)(0), 0, color(white)(0), color(white)(0), color(white)(0)) )#
Finally, I replaced what's left with the characters I need for the reaction - and boom!
#{:(color(white)(0), color(white)(0), color(white)(0), color(white)(0)k_"1", color(white)(0), color(white)(0), color(white)(0)), (A, +, B, rightleftharpoons, C, +, D), (color(white)(0), color(white)(0), color(white)(0), k_(-1), color(white)(0), color(white)(0), color(white)(0)) :}#