MathGroup Archive 2014

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

Search the Archive

Re: Unnecessary parentheses around TagBox for

  • To: mathgroup at smc.vnet.net
  • Subject: [mg132240] Re: Unnecessary parentheses around TagBox for
  • From: Itai Seggev <itais at wolfram.com>
  • Date: Tue, 21 Jan 2014 03:48:55 -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
  • References: <20140118100106.64B6C6A15@smc.vnet.net>

I would avoid this solution.  It is creating an unstable cell structure, which
the FE will automatically reparse and remove the outer (uneeded) RowBox.  It is
better to use SytanxForm as explained in my other email. 

On Sun, Jan 19, 2014 at 02:56:01AM -0500, Arturas Acus wrote:
> Dear Yi, 
> 
> just add additional RawBox[ ]
> 
> MakeBoxes[test, form_] := 
>  TagBox[RowBox[{RowBox[{"test", "END"}]}], "myBox"]
> 
> Å t, 2014 01 18 05:01 -0500, Yi Wang raÅ¡Ä?:
> > 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.
> > 
> 
> 
> 
--
Itai Seggev
Mathematica Algorithms R&D
217-398-0700 



  • Prev by Date: Re: BSplineSurface & BSplineFunction_Extracting Data
  • Next by Date: Re: How to show 1+2+3+ ... = -1/12 using
  • Previous by thread: Re: Unnecessary parentheses around TagBox for MakeBoxes?
  • Next by thread: Re: Category Theory with Mathematica