Why does tab completion only work for some letters?

I’ve noticed only some letters are supported for latex subscripts in variable names.

e.g. \sigma <tab> \_h <tab> renders as σₕ, but \sigma <tab> \_f <tab> just flashes.

Is there a reason for this and/or a workaround? Just modeling code from a paper that subscripts with F, so curious.

Julia uses unicode to represent characters in text. Unicode does not support subscripts for all letters, for instance there is no y subscript. Likely there is also no f subscript as well.


As stated this is for Unicode, not specifically subscripts, and Unicode only chose to have subscripts for some letters, e.g. not f…:

Maybe LaTeX allows more, as it’s for typesetting, Julia isn’t really, nor most programming languages. The argument for Unicode is you could use such a system with, and they don’t want to support subscripting just any letter (e.g. Chinese). Why they chose that subset is another story.

1 Like

(definitely offtopic)
I feel like there should be a subscript and superscript modifier, like it’s done for emoji skin color.
That way, any character could be raised or lowered without taking space in the Unicode space

I think it is cleaner to separate plain text and markup languages.

Also, keep in mind that super- and subscripts may not be very legible at all screen sizes and resolutions. Personally, after some very enthusiastic initial experimentation with stuff like xₐ₁, I decided not to use them in my own code.

1 Like

there was a discussion in slack a few months back about making a proposal to the unicode consortium to add more subscripts superscripts characters.

The draft of the proposal seems to be here:


I had no idea! Since I was writing latex shorthands I’d assumed I could do anything I could do in Latex. Thanks for the explanation!