Oh yeah, thank you Jim and Hans,
I forgot that \frac is only in math-mode possible.
Greeting
Tomás
Am 14.08.25 um 17:58 schrieb Jim:
Hi Thomas,
On Thu, Aug 14, 2025 at 14:43 (+0200), Thomas Meyer wrote:
Hi folks,
I try to write
\chemical{Na + H_2O → NaOH + 1/2 H_2}
and it works. But I do not like 1/2 that way.
But if I want to use
\chemical{Na + H_2O → NaOH + \frac{1}{2} H_2} %\frac or variants of it
it doesn't work.
\chemical{Na + H_2O → NaOh +}\frac{1}{2}\chemical{H_2}
doesn't work too.
\startformula
\chemical{Na + H_2O → NaOH +}\xxfrac{1}{2}\chemical{H_2} % and some
other variants of \frac
\stopformula
does work, but the distance between + and the \frac-expression is to large.
Any hints?
At the risk of using the frowned-upon $ syntax, have you tried
\chemical{Na + H_2O → NaOH + $\frac{1}{2}$ H_2}
This works for me, without the extra space of your last try.
Jim
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist :ntg-context@ntg.nl
/https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage :https://www.pragma-ade.nl /https://context.aanhet.net (mirror)
archive :https://github.com/contextgarden/context
wiki :https://wiki.contextgarden.net
___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________