@@ -360,6 +360,25 @@ def script_toggleReportFontAttributes(self,gesture):
360360 script_toggleReportFontAttributes .__doc__ = _ ("Toggles on and off the reporting of font attributes" )
361361 script_toggleReportFontAttributes .category = SCRCAT_DOCUMENTFORMATTING
362362
363+ @script (
364+ # Translators: Input help mode message for toggle superscripts and subscripts command.
365+ description = _ ("Toggles on and off the reporting of superscripts and subscripts" ),
366+ category = SCRCAT_DOCUMENTFORMATTING ,
367+ )
368+ def script_toggleReportSuperscriptsAndSubscripts (self , gesture ):
369+ shouldReport : bool = not config .conf ["documentFormatting" ]["reportSuperscriptsAndSubscripts" ]
370+ config .conf ["documentFormatting" ]["reportSuperscriptsAndSubscripts" ] = shouldReport
371+ if shouldReport :
372+ # Translators: The message announced when toggling the report superscripts and subscripts
373+ # document formatting setting.
374+ state = _ ("report superscripts and subscripts on" )
375+ else :
376+ # Translators: The message announced when toggling the report superscripts and subscripts
377+ # document formatting setting.
378+ state = _ ("report superscripts and subscripts off" )
379+ ui .message (state )
380+
381+
363382 def script_toggleReportRevisions (self ,gesture ):
364383 if config .conf ["documentFormatting" ]["reportRevisions" ]:
365384 # Translators: The message announced when toggling the report revisions document formatting setting.
@@ -2875,4 +2894,3 @@ def updateScriptForRenamedProfile(cls, oldName, newName):
28752894#: The single instance for the configuration profile activation commands.
28762895#: @type: L{ConfigProfileActivationCommands}
28772896configProfileActivationCommands = ConfigProfileActivationCommands ()
2878-
0 commit comments