Resizing in a manner similar to mathclap

Is there something similar to \mathclap in TeXmacs?
In particular the following code:


gets rendered with a huge space around the overbrace because of the string “j^th position” string on top. Is there a way to tell TeXmacs to avoid using the box of the superscript in space computations? The only solution I found for now is using the “resize” macro and manually specifying the bounding box dimensions. This is unstable if I change the actual inside the superscript and below, under the brace.

This might work


By trial and error :slight_smile:
Inside the move tag I have used the w parameter (valid within the move tag) after I saw that with the resize tag only I would move the superscript to the right

Edit: perhaps this is simpler and therefore better:


I use the box widths as parameters of the resize tag.

P.S. the box widths are available within some of the resizing and positioning tags, see e.g. the help for the move tag.


Alternatively one can do

<rsup|<resize|j<rsup|th> position|<plus|0.5w|-0.5em>||<plus|0.5w|0.5em>|>>,

So that the script occupy the size of 1em. This is similar to the solution of @pireddag but looks like that one does not need to use 1l and 1r.

Unfortunately the editing of the content is not anymore possible in this way… I’m not sure there is a better solution.