It’s not really important here. I simply want to do this at an early enough point in the rendering process.
Thank you. There are many useful options here. In fact, I have considered a number of them, but I’m hoping to make this work in the manner I asked. This is of course for the recipe edition discussed elsewhere. I think it would be useful to allow people to type such fractions naturally but display them more attractively, But that attractive display is not important enough to ask the users to learn anything to achieve the formatting.
It’s quite easy to write a macro for this:
title: $:/community/recipes/proc/frac
tags: $:/tags/Global
\procedure frac(n:"1", d:"2") <sup><<n>></sup>⁄<sub><<d>></sub>
or, as you point out, even simpler would be
\procedure frac(n:"1", d:"2") ^^<<n>>^^⁄,,<<d>>,,
In either case,
<<frac 1 8>> tsp cream of tartar
would then render as
1⁄8 tsp cream of tartar
But the users I’m imagining would prefer to type “1/8 tsp…” and not “<<frac 1 8>> tsp”. In fact, I would rather do so myself.
I’m examining @btheado’s suggestion. It’s a new part of TW for me, so it will take some time. But it looks promising.