# Forward slash compiles as equal to symbol

\documentclass[24pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\DeclareSymbolFont{letters}{OT1}{cmr}{m}{n}     %The Culprit line
\author{asdfsdf }

\begin{document}

\maketitle

\section{Introduction}

$$E_{A_{B}\mathbin{/}B_X} \\ E_{A_{B}/B_X} \\$$

\end{document}


When I compile the above, "/" becomes "=" ({B}/B compiles as {B}=B) due to the Declaresymbolfont setting. Can someone help?

Thanks.

• If your aim is to have upright letters for math variables, it's better to use mathastext. May 23, 2017 at 15:37
• You have not said what you want to do, the DeclareSymbol Font declaration is wrong for a number of reasons, so just deleting it is one option but presumably there was an intended effect. May 23, 2017 at 15:40
• Since I have many math expressions in my document, I didn't want to use "mathrm" everytime I use $"math_experssions"$. So, I used declaresymbol font to keep all math expressions upright. So, I guess, I'll try mathastext package. But is there a way to do this without any new package?
– gogo
May 23, 2017 at 15:46

There are good reasons for typesetting letters in math mode in italic shape. However, there's a package for typesetting them upright:

\documentclass{article}
\usepackage{mathastext}

\begin{document}

The variable $a$ is indistinguishable from a normal letter
$$E_{A_{B}/B_X}$$

\end{document}


Without a package:

\documentclass{article}

\DeclareMathSymbol{a}{\mathalpha}{operators}{a}
\DeclareMathSymbol{b}{\mathalpha}{operators}{b}
\DeclareMathSymbol{c}{\mathalpha}{operators}{c}
\DeclareMathSymbol{d}{\mathalpha}{operators}{d}
\DeclareMathSymbol{e}{\mathalpha}{operators}{e}
\DeclareMathSymbol{f}{\mathalpha}{operators}{f}
\DeclareMathSymbol{g}{\mathalpha}{operators}{g}
\DeclareMathSymbol{h}{\mathalpha}{operators}{h}
\DeclareMathSymbol{i}{\mathalpha}{operators}{i}
\DeclareMathSymbol{j}{\mathalpha}{operators}{j}
\DeclareMathSymbol{k}{\mathalpha}{operators}{k}
\DeclareMathSymbol{l}{\mathalpha}{operators}{l}
\DeclareMathSymbol{m}{\mathalpha}{operators}{m}
\DeclareMathSymbol{n}{\mathalpha}{operators}{n}
\DeclareMathSymbol{o}{\mathalpha}{operators}{o}
\DeclareMathSymbol{p}{\mathalpha}{operators}{p}
\DeclareMathSymbol{q}{\mathalpha}{operators}{q}
\DeclareMathSymbol{r}{\mathalpha}{operators}{r}
\DeclareMathSymbol{s}{\mathalpha}{operators}{s}
\DeclareMathSymbol{t}{\mathalpha}{operators}{t}
\DeclareMathSymbol{u}{\mathalpha}{operators}{u}
\DeclareMathSymbol{v}{\mathalpha}{operators}{v}
\DeclareMathSymbol{w}{\mathalpha}{operators}{w}
\DeclareMathSymbol{x}{\mathalpha}{operators}{x}
\DeclareMathSymbol{y}{\mathalpha}{operators}{y}
\DeclareMathSymbol{z}{\mathalpha}{operators}{z}
\DeclareMathSymbol{A}{\mathalpha}{operators}{A}
\DeclareMathSymbol{B}{\mathalpha}{operators}{B}
\DeclareMathSymbol{C}{\mathalpha}{operators}{C}
\DeclareMathSymbol{D}{\mathalpha}{operators}{D}
\DeclareMathSymbol{E}{\mathalpha}{operators}{E}
\DeclareMathSymbol{F}{\mathalpha}{operators}{F}
\DeclareMathSymbol{G}{\mathalpha}{operators}{G}
\DeclareMathSymbol{H}{\mathalpha}{operators}{H}
\DeclareMathSymbol{I}{\mathalpha}{operators}{I}
\DeclareMathSymbol{J}{\mathalpha}{operators}{J}
\DeclareMathSymbol{K}{\mathalpha}{operators}{K}
\DeclareMathSymbol{L}{\mathalpha}{operators}{L}
\DeclareMathSymbol{M}{\mathalpha}{operators}{M}
\DeclareMathSymbol{N}{\mathalpha}{operators}{N}
\DeclareMathSymbol{O}{\mathalpha}{operators}{O}
\DeclareMathSymbol{P}{\mathalpha}{operators}{P}
\DeclareMathSymbol{Q}{\mathalpha}{operators}{Q}
\DeclareMathSymbol{R}{\mathalpha}{operators}{R}
\DeclareMathSymbol{S}{\mathalpha}{operators}{S}
\DeclareMathSymbol{T}{\mathalpha}{operators}{T}
\DeclareMathSymbol{U}{\mathalpha}{operators}{U}
\DeclareMathSymbol{V}{\mathalpha}{operators}{V}
\DeclareMathSymbol{W}{\mathalpha}{operators}{W}
\DeclareMathSymbol{X}{\mathalpha}{operators}{X}
\DeclareMathSymbol{Y}{\mathalpha}{operators}{Y}
\DeclareMathSymbol{Z}{\mathalpha}{operators}{Z}

\begin{document}

The variable $a$ is indistinguishable from a normal letter
$$E_{A_{B}/B_X}$$

\end{document}