Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Unnecessary parentheses around TagBox for MakeBoxes?
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Yi Wang

Posts: 33
Registered: 3/30/12
Unnecessary parentheses around TagBox for MakeBoxes?
Posted: Jan 18, 2014 5:02 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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.




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.