3

I want to print the following in Latex pdf so what should I do:

alpha IIb beta3

I have used $\alpha$_\rmnum{2}_b$\beta$_3

but the roman number does not come.

Vishal
  • 31

2 Answers2

14

You should make usually only one math environment for all the math code (only one $...$pair), not one for each symbol. On another hand, the use of _ (low line character) for subscripts and ^ for superscripts only work inside this math environment. For subscripts of more that one character you should group them with {} as well as to limit the scope of commands).

Moreover, \rmnum is not a standard command in LaTeX, so you should use some package o some macro definition in the preamble to use it, as \newcommand{\rmnum}[1]{\romannumeral #1}. You should always show us a complete document, so people do not have to guess what the hell your code mean.

I am not sure if you need simply "IIb" or the roman number should be in lowercase, or the "b" should be a nested subscript, and if you really need convert Arabic to uppercase roman numerals, that is tricky that simply write "II", so here there are some variations to start to play:

mwe

\documentclass{article}
\begin{document}
$\alpha_{\romannumeral 2 b}\beta^3$\par
$\alpha_{\textup{\romannumeral 2}_b}\beta^3$\par
$\alpha_{\scriptsize\textup{%
\uppercase\expandafter{\romannumeral 2}}_b}\beta^3$\par
$\alpha_{{\mathrm II}_b}\beta^3$  
\end{document}
Fran
  • 80,769
12

First of all, $ is not like a “shift key” for typing strange characters. An example I saw yesterday on Math.Stackexchange

Dim$V/U$ = dim$V-$dim$U$

should have been input as

$\dim V/U = \dim V - \dim U$

(spaces around = and - are optional).

Second, I looked in the entire tree and found no trace of \rmnum. I guess it is defined as

\makeatletter
\newcommand{\rmnum}[1]{\text{\@Roman{#1}}}
\makeatother

The designation “IIb” seems to point to orbitals, so I believe you can simply do like

\documentclass{article}
\usepackage{amsmath}

\makeatletter
\newcommand{\rmnum}[1]{\mathrm{\@Roman{#1}}}
\makeatother

\begin{document}

$\alpha_{\rmnum{2}b}\beta_3$

\end{document}

enter image description here

egreg
  • 1,121,712