MathGroup Archive 2006

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

Search the Archive

RE: conversion to InputForm without spaces

  • To: mathgroup at smc.vnet.net
  • Subject: [mg69986] RE: [mg69893] conversion to InputForm without spaces
  • From: "Ingolf Dahl" <ingolf.dahl at telia.com>
  • Date: Thu, 28 Sep 2006 06:18:19 -0400 (EDT)

Hi Chris, 
The SetFaceAndFont palette is "hand-coded" as an ordinary Mathematica
notebook, with a NotebookWrite[InputNotebook[], Cell[BoxData[GridBox[...]],
celloptions]] construction to write the palette to a cell. Then the ordinary
"Generate palette from selection" was used to create the palette. Some of
the code has become a bit too unstructured and somewhat spaghetti-like, but
such things happen sometimes when programs evolve. Feedback is appreciated,
and I have a list of bugs to be corrected, but presently I am working more
with the TaggedCells package. And I have a work and a family and a garden
and not so very much time for these things...

Concerning WRI, I think that every precaution should be taken to protect the
innocent user from unintentional exposure to the \!\ notation. Even
experienced users sigh and seem to take a long way round if they can.
Sometimes the use of embedded cells is a better alternative.

Best regards

Ingolf Dahl

> -----Original Message-----
> From: chris.chiasson at gmail.com 
To: mathgroup at smc.vnet.net
> Subject: [mg69986] Re: [mg69893] conversion to InputForm without spaces
> 
> Wow Ingolf. That's one large amount of front end code (with a 
> lot of branches, it seems)  for such a compact palette. If I 
> may ask, did you code all that by hand in an editor, or do 
> you have a build process that writes the code to the 
> SetFaceAndFont2.nb file?
> 
> I think the search functions you put in there make very good 
> use of Google's operators. :Applause:
> 
> WRI: If you would implement something similar to the 
> CopyAsInputFormK button on this palette, we would probably 
> have less people pasting the string representation of box 
> forms into MathGroup emails.
> 
> For example:
> Copy as plain text from Mathematica's right click menu:
> 
> In[1]:=
> \!\(\@\(a\/0\)\)
> From In[1]:=
> \!\(\*
>   RowBox[{\(Power::"infy"\), \(\(:\)\(\ \)\), "\<\"Infinite 
> expression \
> \\!\\(1\\/0\\) encountered. 
> \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", \
> ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, \
> ButtonData:>\\\"Power::infy\\\"]\\)\"\>"}]\)
> Out[1]=
> ComplexInfinity
> 
> CopyAsInputFormK (It would be nice to keep the cell tags though):
> 
> Sqrt[a/0]
>   Power::"infy" : "Infinite expression (1/0) encountered.
> (ButtonBox[\"More\[Ellipsis]\", Rule[ButtonStyle, 
> \"RefGuideLinkText\"], Rule[ButtonFrame, None], 
> RuleDelayed[ButtonData, \"Power::infy\"]])"
> ComplexInfinity
> 
> On 9/27/06, Ingolf Dahl <ingolf.dahl at telia.com> wrote:
> > Oh, then you should of course use my SetFaceAndFont 
> palette, available 
> > from http://web.telia.com/~u31815170/Mathematica/. Select the cell 
> > bracket and press StyleRemove. Magic!
> >
> > Best regards
> >
> > Ingolf Dahl
> >
> > -----Original Message-----
> > From: chris.chiasson at gmail.com [mailto:chris.chiasson at gmail.com] On 
To: mathgroup at smc.vnet.net
> > Subject: [mg69986] Re: [mg69893] conversion to InputForm without spaces
> >
> > For instance, if one enters 1+a into an Input cell in 
> StandardForm and 
> > subsequently converts the cell to InputForm via
> > Cell->ConvertTo->InputForm, the output is: "1 + a". I would prefer
> > "1+a".
> >
> > On 9/27/06, Ingolf Dahl <ingolf.dahl at telia.com> wrote:
> > > Could you please explain a little bit better? Do you mean without 
> > > having every blank converted to "*" ?
> > >
> > > Best regards
> > >
> > > Ingolf Dahl
> > >
> > > -----Original Message-----
> > > From: Chris Chiasson [mailto:chris at chiasson.name]
To: mathgroup at smc.vnet.net
> > > Subject: [mg69986] [mg69893] conversion to InputForm without spaces
> > >
> > > Is there an option to convert a Cell to InputForm without 
> the spaces?
> > > Thanks,
> > >


  • Prev by Date: Re: Indefinite integration problem on ArcTanh(f(Cos))
  • Next by Date: Re: Performance comparison Mac OSX vs. Windows XP
  • Previous by thread: Re: conversion to InputForm without spaces
  • Next by thread: C-formatted strings back to Expressions