MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

On the Form of information

  • To: mathgroup at
  • Subject: [mg75436] On the Form of information
  • From: Mariano Suárez-Alvarez <mariano.suarezalvarez at>
  • Date: Mon, 30 Apr 2007 03:43:36 -0400 (EDT)

Hi all,

I'm using various MakeBoxes definitions to get things printed in
pretty ways when outputting in StandardForm. This works very
nicely, but I've found that ??, Definition and friends like to return
things in StandardForm, which can be confusing because the
StandardForm of things in the definition may hide its actual form.

A simple example: suppose you say

  NonCommutativeMultiply /:
    MakeBoxes[t : NonCommutativeMultiply[x__], StandardForm] :=
        Rest@ Flatten@ Transpose@
          {Table["=B7", {Length[t]}], MakeBoxes[#, StandardForm] & /@

  f[x__] := {x, NonCommutativeMultiply[x]};

Then asking for the definition of f, with Definition or ??, uses the
MakeBoxes rule to print the right hand side of the definition of f.
In this particular instance, this because misleading. (Of course, the
example is crafted so that is /is/ confusing, but I've fallen for
of this more times than I am proud of...)

Now, one can always say InputForm[Definition[f]], that's slightly

Is there a way to change the default output form for definitions?


-- m

  • Prev by Date: Re: functional programming
  • Next by Date: elimination of a real variable from a complex function
  • Previous by thread: An extension of the traveling salesman problem
  • Next by thread: elimination of a real variable from a complex function