Dafault superscript relative size

Hi, I am writing mathematical documents on writer, and I use a lot superscript. I use the standard short-cut: ctrl-shift-p. I recently discovered that I can change the relative size of the superscript, which is great because the default size is too small for me. If I select a charcater that is already as superscript, I go to “Character Format” → Position, uncheck “Automatic”, set “Raise/lower by” to 25%, and “Relative font size” to 25%. It works perfectly.
However, when I am typing and enter a new superscript, it goes again with the default value: “Automatic” checked, Raise/lower by" at 33% (grayed), and “Relative font size” at 58%. This is annoying since I have to re-edit each superscript. As soon as I uncheck “Automatic”, Libreoffice remembers the 25% and 75% values, but anyway I have to go into each superscript and edit it.
Is there a way I can set the default superscript (the one that appears when I press ctrl-shift-p) to my own values?

When using the shortcut ctrl-shift-p, what is applied is actually manual formatting instead of a character style. If you wish to repeatedly use the same superscript formatting, the best solution is the following:

  1. create a new character style with the desired superscript properties;

  2. assign this character style to a custom keyboard shortcut via the “Tools > Customize” menu (the shortcuts are defined under the “customize keyboard” tab);

  3. apply this character style using the defined keyboard shortcut.

If you want to automatically apply your custom character style to existing, manually-formatted superscripts, the easiest way right now is to use the “Alternative Search and Replace Dialog” extension, which can be found on the LibreOffice extensions website. With this extension, you can search for and apply a style to all instances of a given manual formatting.

Dear CyanCG,
Thanks a lot for the prompt response! I already did that and it worked almost perfectly. There is a small point though… with the standard “ctrl-shift-p” shortcut, I was able both to turn on and off superscript. If I assign this shortcut to my newly defined style, I can only use the shortcut to turn on superscript… I press it again and it does not turn it off.
I imagine I can define a new shortcut (different from “ctrl-shift-p”) that sets the character style to “Default” and thus turns off superscript… But I would need two different shortcuts. Is there a way I can have the shortcut to the new style turn superscript both on and off ?
Thanks a lot again!!

Assigning a shortcut to the default style is what I do myself, but as for having the same shortcut conditionally turn the style on or off… I don’t know. Maybe scripting would be necessary. Or perhaps an advanced option in the keyboards shortcuts dialog would allow that?

By the way, if my answer suits you, could you mark it as accepted so that others who come across the question find the answer easily?

Of course, thanks a lot for the tip, I am already using it…

You’re very welcome, and I’ll continue researching the issue of conditionally applying or removing a style with the same command. I am a novice when it comes to scripting and macros, but I’m sure there must be a way to do it programmatically.