MathGroup Archive 2014

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

Search the Archive

Unnecessary parentheses around TagBox for MakeBoxes?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg132213] Unnecessary parentheses around TagBox for MakeBoxes?
  • From: Yi Wang <tririverwangyi at gmail.com>
  • Date: Sat, 18 Jan 2014 05:01:06 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net

Hello,

I was trying to generate pretty output for some expressions. To assist interpretation, a TagBox is used.

A problem is that, Mathematica always insert unnecessary parentheses outside TagBox. For example,

MakeBoxes[test, form_] := TagBox[RowBox[{"test", "END"}], "myBox"]

In[] := 2 test
Out[] = 2 (test END)

Here the TagBox already has clear boundary thus the parentheses shouldn't be necessary. Would it be possible to remove it?

Note that the "END" in this simple example will be replaced by a complicated structure (GridBox) in actually usage. Thus I cannot simply write "testEND" together as a single string. Also, the parentheses appears in TraditioinalForm, which further appear in all forms as TeXForm, etc.



  • Prev by Date: Re: Simple question
  • Next by Date: Re: Category Theory with Mathematica
  • Previous by thread: compensated summation in norm
  • Next by thread: Re: Unnecessary parentheses around TagBox for MakeBoxes?