I often use \def to define macros in my answers, but it concerns me that these definitions leak out of my answer and can affect the entire page.

The potential problems with this practice began to concern me one day when I was trying to write an answer and MathJax insisted on formatting all my fractions upside-down. Just before I went completely insane, I realized this was because the question I was answering had redefined \frac.

Is there a way to confine my macro definitions to my own post, or to undo my definitions at the end of my post?

  • $\begingroup$ @900 Thanks! I have voted to close. $\endgroup$
    – MJD
    Aug 10 '14 at 21:18
  • $\begingroup$ Also related: old \def definitions linger $\endgroup$
    – MJD
    Aug 10 '14 at 21:21

Browse other questions tagged .