MathHubInfo / Legacy-planetary

Legacy: Planetary System is a math-enabled Web 3.0 information portal.
http://trac.mathweb.org/planetary/
79 stars 25 forks source link

Problems and preambles #430

Closed rspuzio closed 10 years ago

rspuzio commented 10 years ago

I just added the following problem to PM:

http://planetmath.org/node/87531

It requires a tiny preamble to make it work:

\newcommand{\eqv}[2]{\ensuremath{#1 \simeq #2}\xspace}

However, once I save it, it gives a big red \eqv and, when I go to edit it again, the preamble disappears and is replaced with the inane message

%SITEWIDE DEFAULT SHOULD GO HERE

A long time ago, we had this problem with articles as the now-closed issue #157 "address disappearing preamble problems". While it was fixed for entries back then, it looks like it was overlooked or has reappeared for problems; presumably, it is a matter of applying the same fix again.

holtzermann17 commented 10 years ago

@rspuzio There was some old code in the problem module that mas mangling things. I removed that code, revised the problem you added, and it works fine now.

BTW you also needed \usepackage{xspace} in that preamble to give the \xspace command (added).