Subscripts and superscripts with text editor

  • Thread starter Thread starter Frabjous
  • Start date Start date
AI Thread Summary
Subscripts and superscripts in the text editor are causing unwanted line breaks when using the icon feature, particularly on Safari and Firefox browsers. Users have found that manually entering tags avoids these issues, as the icons insert tags in all caps with additional line breaks. Some users suggest utilizing text replacement features on iOS or autohotkey scripts on Windows to streamline the process of adding these tags without formatting errors. There is a discussion about the effectiveness of alternative symbols like $$ and ## for inline and standalone formulas, which require less typing. Overall, the current behavior of the text editor is frustrating for users, prompting them to seek workarounds.
Frabjous
Gold Member
Messages
1,952
Reaction score
2,382
When I use subscripts and superscripts with the text editor, it sticks a return in before the sub/superscript. This is a change in behavior.

I am using safari on an Ipad.
 
Physics news on Phys.org
Pulling out my iPad... Testing... x

2


Looks like you're right. I selected the 'x2' by double-tapping on it, dragged one of the selection handles to include only the '2', and tapped the superscript icon.

Looks like to fix it, for now, you have to delete the returns by hand to get everything on one line. Or you can enter the tags by hand when you're writing the post, instead of using the icons.
 
Last edited:
Can reproduce on Firefox on laptop.
 
It's even worse than described above. Not only does it insert a return before and after a SUP tag, and before a /SUP tag, it inserts two returns after a /SUP tag.

(Firefox 108.0.2 under Windows 10)
 
[tirade]
The two following 'Works fine...' are each on their own single line.
105 Works fine on Mypal browser 28.13.0, dated 2006, on Windows XP.
X2 Works fine on Mypal browser 28.13.0, dated 2006 on Windows XP.

And I get static when I point out that site version 'upgrades' stop working on XP. Go figure!

(advance-to-the-rear?)
[end tirade]
 
@Tom.G: You typed these tags manually, right? That always works. The discussion is about tags inserted via the icons in the editor. They are inserted in all caps and with extra line breaks, while your tags are lowercase.
 
  • Like
Likes Wrichik Basu and Tom.G
Tom.G said:
105 Works fine on Mypal browser 28.13.0, dated 2006, on Windows XP.
X2 Works fine on Mypal browser 28.13.0, dated 2006 on Windows XP.
Why are you still on Win XP? Support for it ended almost 9 years ago. I hope that computer is not connected to the internet...
 
Mark44 said:
Why are you still on Win XP? Support for it ended almost 9 years ago. I hope that computer is not connected to the internet...
I use Windows 7 Home Edition for my old Samsung laptop. Became too attached to it to change it. And yeah, a Samsung laptop going into its 12th year is not too bad.
 
  • #10
jtbell said:
Looks like to fix it, for now, you have to delete the returns by hand to get everything on one line. Or you can enter the tags by hand when you're writing the post, instead of using the icons.
On an ios device, you can set up a "Text Replacement" (via Settings -> General -> Keyboard -> Text Replacement). For example, I use $$ for itex in square-brackets and either $& or && for \itex in square brackets. (I use inline most often.) You can do a similar thing for SUP and SUB .

On Windows, I use an autohotkey script ( https://www.autohotkey.com/ )
that encloses text that i had selceted
with opening and closing tags,
when invoked by a custom hotkey combination.
 
  • #11
No need to replace anything, you can use ##[/color] instead of [ite[/color]x] and [/ite[/color]x] tags:

##[/color]a^2 + b^2 = c^2#[/color]# becomes ##a^2 + b^2 = c^2##

$$ can be used instead of tex and /tex.
 
  • #12
mfb said:
No need to replace anything, you can use ## instead of and tags:

##a^2 + b^2 = c^2## becomes ##a^2 + b^2 = c^2##

$$ can be used instead of tex and /tex.
It is certainly easier to use the ## (inline formulas) and $$ (standalone formulas) symbols-- less typing. The only reason I can see that people still use the bracketed tex and itex tags is because they don't know about the # and $ ones.
 
  • #13
For me, on my phone,
$ is on the first non-alphabetic keyboard view,
# is on the second…
so i use the $$ to be replaced by
the itex tags…. but I could use ## instead (and since it’s how I would use TeX elsewhere).
 
Back
Top