# Using underscore for subscript in text mode using underscore only [duplicate]

I want to use subscripts without actually being in math mode.

Is there any method I can do that?

## marked as duplicate by Zarko, Maarten Dhondt, Torbjørn T., cfr, user31729 Sep 6 '16 at 18:34

• Welcome to TeX.SX! A mathematical constant should be typed in as math. – egreg Sep 5 '16 at 9:08

the solution `N\textsubscript{A}` would produce the desired result.

However, you should note, that text-mode uses upright letters while math-mode writes letters in italics. I furthermore agree with @egreg, that

mathematical constant should be typed in as math @egreg

Code: `N\textsubscript{A}` and `\$N_A\$`

Maybe helpful for you would be setting a new command to avoid having to repeatedly enter math mode for example:


Then you simply have to type:

`\avogadro{} %(the brackets are here to force a spacing after the constant)`

at any point to get the desired outcome. Most Front-End Programmes (like Texmaker) have auto-completion which comes in handy here.

• My original question was to avoid repeatedly typing the same thing over and over again, the dollar signs in this case. I want a method where I only use the underscore (or another symbol) to automatically type a subscript. For example: N_A – AbdelbakiZ Sep 5 '16 at 14:45
• @AbdelbakiZ If I now understood right, you want to redefine the _ (underscore) Symbol. I don't know how to do that unfortunately (and not sure whether it is possible), but hope my answer was of some help anyway. Maybe somebody else an help :) – magicdivadd Sep 6 '16 at 7:48