正斜杠编译为等于符号

正斜杠编译为等于符号
\documentclass[24pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\DeclareSymbolFont{letters}{OT1}{cmr}{m}{n}     %The Culprit line
\title{sadfasdf}
\author{asdfsdf }

\begin{document}

\maketitle

\section{Introduction}

\begin{equation}
E_{A_{B}\mathbin{/}B_X} \\
E_{A_{B}/B_X} \\
\end{equation}


\end{document}

当我编译上述内容时,由于 Declaresymbolfont 设置,“/” 变为“=”({B}/B 编译为 {B}=B)。有人能帮忙吗?

谢谢。

答案1

在数学模式下以斜体形式排版字母是有充分理由的。但是,有一个包可以将它们直立排版:

\documentclass{article}
\usepackage{mathastext}

\begin{document}

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

\end{document}

在此处输入图片描述

无包装:

\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
\begin{equation}
E_{A_{B}/B_X}
\end{equation}

\end{document}

相关内容