I decided to hack together an answer by using an existing answer: https://tex.stackexchange.com/a/127507/49339
So, my MnotWE looks like this, after much simplification:
\documentclass[12pt,letterpaper]{article}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\makeatletter
% LaTeX's \@ifnextchar gobbles spaces, therefore
% \msh@ifnextchar is defined that keeps spaces
\newcommand*{\msh@ifnextchar}[3]{%
\def\msh@temp{\msh@@ifnextchar{#1}{#2}{#3}}%
\futurelet\msh@token\msh@temp
}
\newcommand*{\msh@@ifnextchar}[1]{%
\ifx\msh@token#1%
\expandafter\@firstoftwo
\else
\expandafter\@secondoftwo
\fi
}
% Commands that take the original meanings of the special characters
\mathchardef\msh@code@minus=\mathcode`\-\relax
\mathchardef\msh@code@plus=\mathcode`\+\relax
% Macro \setmathshorthands activates and defines the special
% characters
\begingroup
\@ifdefinable{\setmathshorthands}{%
\xdef\setmathshorthands{%
\let\noexpand-\noexpand\msh@minus
\let\noexpand+\noexpand\msh@plus
}%
}%
\endgroup
\newcommand*{\msh@minus}{\&}
\newcommand*{\msh@plus}{\$}
\makeatother
% Activate math shorthands in the math modes
\everymath{\setmathshorthands}
\everydisplay{\setmathshorthands}
\begin{document}
\begin{equation*}
a + b - c = 0
\end{equation*}
\end{document}
The macros I am using at the moment are toy examples, I have some more complicated macros I will eventually replace these with. However, for the moment, let's just work with these toys.
Anyway, compiling this example, I get the error:
line 50: Missing control sequence inserted. \begin{equation*}
What do?
+
and-
active, and what's done after that involves some reasonably hairy munging about with primitive tex code. might be "safe" for the+
, but my instincts say that for latex (or even probably plain tex) it's a bad idea for the minus if you have any text that might contain hyphens.$p$-adic
. i'd use that to test in addition to a\hyphenation{...}
example.