# How to determine the position of cursor in a fraction

From https://www.douban.com/group/topic/150659046/?start=0

English Translation of the above:

In math mode, I hit \frac, Texmacs will give me the denominator and numerator to fill. Is there a way to tell whether the cursor is at the denominator or numerator using Scheme code?

If one can, then it is possible to write in Scheme code a shortcut to to jump from numerator, then to denominator, then out of the whole fraction. It would be nice to have such a shortcut.

Dig into the source code of:

(cursor-inside? (focus-tree))
(tree-label (focus-tree))


And then you may find the answer.

Acitvate the Developer menu, and you will find the most helpful Definition of xxx menu entry.

What I want to do is to determine the four positions in the fraction

(frac "<partial>" "<partial>")


and do the filling-in.

Thank you for the clues. If I’d found the solution, I will post here.