This question already has an answer here:

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

N_A is Avogadro constant instead of $N_A$ is Avogadro constant

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

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 4
    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$

enter image description here

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

\newcommand{\avogadro}{N\textsubscript{A}}or \newcommand{\avogadro}{$N_A$} would help.

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.