I've read about \renewenvironment and \let commands but they are intended
to work with classic commands TeX commands that start with a slash.
And I cannot find any example of overriding $ and $$ any how.
Is it possible?
I've read about \renewenvironment and \let commands but they are intended
to work with classic commands TeX commands that start with a slash.
And I cannot find any example of overriding $ and $$ any how.
Is it possible?
You need to change the category code (catcode) of $ to something other than math shift.
\documentclass{article}
\begin{document}
\catcode`$=12
This costs many $$.
\end{document}
You can have all sorts of fun changing catcodes; here the catcode of u is changed to math shift.
\documentclass{article}
\begin{document}
\catcode`u=3
an equation. another equation
\end{document}
See chapter 2 of the free book TeX by Topic for more details. Be warned, though - changing catcodes is a risky business that is likely to break just about everything.