Re: Copying and Pasting Output that has StyleForm
- To: mathgroup at smc.vnet.net
- Subject: [mg40773] Re: Copying and Pasting Output that has StyleForm
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Thu, 17 Apr 2003 03:33:08 -0400 (EDT)
- Organization: Universitaet Leipzig
- References: <b7iri2$jv6$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
- Sender: owner-wri-mathgroup at wolfram.com
Hi,
and
Needs["Graphics`Colors`"]
red[symbol_] := StyleForm[symbol, FontColor -> Red]
MakeBoxes[f[i_], fmt_] :=
RowBox[{"f", "[", StyleBox[ToBoxes[i, fmt], FontColor -> Red], "]"}]
does not help ?
Regards
Jens
David Park wrote:
>
> If I define the following function
>
> Needs["Graphics`Colors`"]
> red[symbol_] := StyleForm[symbol, FontColor -> Red]
>
> and then write
>
> f[red@i]
>
> I obtain output that has a red i as an argument. Its FullForm is
>
> f[StyleForm[i, Rule[FontColor, RGBColor[1.`, 0.`, 0.`]]]]
>
> But if I copy and paste the output with the red i, the pasted copy has a red
> i, but as soon as I evaluate it the StyleForm is lost.
>
> pasted copy with a red i
> %//FullForm
> f[i]
> f[i]
>
> Why is the StyleForm lost? Is this an unavoidable feature or a bug? It
> certainly would be nice if copying and evaluating didn't lose the color
> information. Is there a way around it?
>
> David Park
> djmp at earthlink.net
> http://home.earthlink.net/~djmp/