I have a Macro in TexStudio that does the following:
%SCRIPT
txt = cursor.selectedText()
editor.write("\\underbrace{"+txt+"}_{}")
cursor.clearSelection()
That is I select a text, it will be filled in between the first two brackets of underbrace. I would like to add that my cursor should be in the between the second pair of brackets, however the solutions I found so far in the internet have not helped. Does anybody have an idea?
Great thanks!