Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #16438

Re: Unnecessary parentheses around TagBox for MakeBoxes?

From Arturas Acus <arturas.acus@tfai.vu.lt>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Unnecessary parentheses around TagBox for MakeBoxes?
Date 2014-01-19 07:51 +0000
Message-ID <lbg068$alo$1@smc.vnet.net> (permalink)
References <20140118100106.64B6C6A15@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


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.
> 


Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Unnecessary parentheses around TagBox for MakeBoxes? Arturas Acus <arturas.acus@tfai.vu.lt> - 2014-01-19 07:51 +0000

csiph-web