2

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?

1 Answers1

3

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 05 '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 06 '16 at 07:48