MathGroup Archive 2011

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

Search the Archive

Re: Re: MakeExpression and color

  • To: mathgroup at smc.vnet.net
  • Subject: [mg121772] Re: [mg121762] Re: MakeExpression and color
  • From: John Fultz <jfultz at wolfram.com>
  • Date: Sat, 1 Oct 2011 03:08:21 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Reply-to: jfultz at wolfram.com

I wouldn't call it a compensation.  In fact, it was deliberately designed this 
way all the way from the time boxes were first introduced.

It's not at all bad practice to treat presentation and semantics differently.  
TagBox is deeply about semantics, and it allows you to link presentation aspects 
to those semantics, which is all well and good...but any attempt to build a
semantic layer which depends upon parsing all of the available presentation
information with, at best, heuristics regarding the semantic utility of that
information is going to quickly end in a very frustrating mess.

Sincerely,

John Fultz
jfultz at wolfram.com
User Interface Group
Wolfram Research, Inc.

On Fri, 30 Sep 2011 04:03:55 -0400 (EDT), Arturas Acus wrote:
>
>
> I found that the desired funcionality can be easily realised using
> TagBox[ ] tags. Seems like TagBox[ ] was deliberately introduced in order
> to "compensate" the mentioned MakeBoxes and MakeExpresion asymmetry.
>
>
> On Thu, 29 Sep 2011, Arturas Acus wrote:
>
>> Dear Group,
>>
>> I am trying to "transfer" some useful information from its
>> representation color without success.
>>
>> For example, if a vector (with MakeBoxes) is shown in red, then I want
>> it have a mark v["2D"], if in blue, then v["3D"].
>>
>> Unfortunatelly MakeExpression immediatelly removes all StyleBoxes (the
>> documented feature) and I do not find any way to prevend this.
>> (Interestingly, that MakeExpresion do not have any holding atributes).
>>
>> Can anybody think how to make style box information usefull?
>>
>> My opinion is that mentioned MakeExpression feature is very restrictive
>> and do not allow user to code usefull information in color or shape.
>>
>>
>>
 MakeExpression[HoldPattern[SubscriptBox[RowBox[{StyleBox["\[LeftAngleBracket
>> ]",cr_],
>>=
 name_,StyleBox["\[RightAngleBracket]",cr_]}],grade_]],StandardForm]:=myobjec
>> t[cr]
>>
>>
>> Sincerely, Arturas Acus





  • Prev by Date: Integrating a Piecewise function four times but different results
  • Next by Date: Re: help with double integration
  • Previous by thread: Re: Integrating a Piecewise function four times but different results
  • Next by thread: Re: MakeExpression and color