[texhax] Is redefining primitives a good idea?
khaledhosny at eglug.org
Mon Apr 23 19:38:55 CEST 2012
On Mon, Apr 23, 2012 at 12:48:16PM +1000, Vafa Khalighi wrote:
> As an example amsmath.sty redefines \eqno and \leqno. Would not it be better to
> define new macros rather than redefining existing primitives? and how one can
> (if a package already redefines some primitives), restore the original
> definition of the primitive? so that a primitive is really a primitive?
PdfTeX has \pdfprimitive that can be used to access the original
definition of any primitive, e.g. \pdfprimitive\eqno. LuaTeX and XeTeX
have it under \primitive name.
More information about the texhax