Re: four argument form of infix
- To: mathgroup at smc.vnet.net
- Subject: [mg70055] Re: four argument form of infix
- From: "Chris Chiasson" <chris at chiasson.name>
- Date: Sun, 1 Oct 2006 04:10:14 -0400 (EDT)
- References: <acbec1a40609100648s3411ea7cq535325fdf24db732@mail.gmail.com>
Tom Zeller from WRI Technical support says they have no examples of using the (documented) four argument form of Infix. Since he took twenty days, I assume he looked thoroughly. In that case, I turn this matter over to the knowledgeable MathGroup community. I know at least a few of you are very good with formatting Box structures. I'm sure you could appreciate the desire to change the precedence of an operator to affect printing of parenthesis, which the four argument form of Infix should allow. Here are my test cases which do not work "properly" unless they are used with OutputForm. The purpose of these cases is to make "sun" have a higher precedence than Times, so that the output expression is written without parenthesis. Out[5] is especially peculiar - it's supposed to be StandardForm, but it looks like FullForm. In[1]:= Format[sun[planets__]]=Infix[{planets},sun]; In[2]:= 2 sun[earth,mars,venus] Out[2]= 2 (earthsunmarssunvenus) In[3]:= %//OutputForm Out[3]//OutputForm= 2 earthsunmarssunvenus In[4]:= Format[sun2[planets__]]=Infix[{planets},sun,401,None]; In[5]:= 2 sun2[earth,mars,venus] Out[5]= 2 Infix[{earth,mars,venus},sun,401,None] In[6]:= %//OutputForm Out[6]//OutputForm= 2 earthsunmarssunvenus On 9/10/06, Chris Chiasson <chris at chiasson.name> wrote: > Could someone provide an example of the four argument form of Infix? I > can't seem to make it work. > > -- > http://chris.chiasson.name/ > -- http://chris.chiasson.name/