Can text files display sub or sup indices?

AI Thread Summary
Displaying superscripts or subscripts in a standard text file is not possible due to the limitations of ASCII, which does not support these formatting options. To achieve this effect, one must use HTML with super or sub tags, LaTeX with a renderer, or a word processor that allows for annotation of these elements. Markdown files can also be used, but they require rendering to visualize the superscripts and subscripts. The simplicity of text files, which contain only plain ASCII characters without hidden formatting, results in smaller file sizes compared to word processor documents that include additional invisible characters for formatting.
mech-eng
Messages
825
Reaction score
13
Is there any way to show sub or sup indices in a text file such as this Ab? Text files are very easy to use. They are fast, can be opened fast and created easily.

Thank you.
 
Computer science news on Phys.org
You'd have to code it as an html file with super or sub tags or you'd have to code it as latex and run it through a latex renderer or just use a word processor and annotate the super and subscripts.

The closest to a text file would be a markdown file but you'd have to render it to see the super/subscripts as super/subscripts.

https://beegit.com/markdown-cheat-sheet

There's no other way that I know where you can do that.
 
One of the benefit of text files is it is just text, usually ASCII.

There's no paragraph or indentation or carriage returns hidden in the text like there are in word documents which you don't see and will mess-up your inputs if you write them and copy them into shell scripts and the like.

Because of that there's no superscript or subscript because that doesn't exist in the ASCII table.

This is all you will find in a generic text editor:

http://www.asciitable.com

To perform an interesting test you can compare the file sizes bit-by-bit of a text document and a word editor.

Even though you may write the exact same thing there will be size differences because the word editor is using more "invisible" characters to denote things like spacing, indents, or superscripts/subscripts.
 
In my discussions elsewhere, I've noticed a lot of disagreement regarding AI. A question that comes up is, "Is AI hype?" Unfortunately, when this question is asked, the one asking, as far as I can tell, may mean one of three things which can lead to lots of confusion. I'll list them out now for clarity. 1. Can AI do everything a human can do and how close are we to that? 2. Are corporations and governments using the promise of AI to gain more power for themselves? 3. Are AI and transhumans...
Thread 'ChatGPT Examples, Good and Bad'
I've been experimenting with ChatGPT. Some results are good, some very very bad. I think examples can help expose the properties of this AI. Maybe you can post some of your favorite examples and tell us what they reveal about the properties of this AI. (I had problems with copy/paste of text and formatting, so I'm posting my examples as screen shots. That is a promising start. :smile: But then I provided values V=1, R1=1, R2=2, R3=3 and asked for the value of I. At first, it said...
Back
Top