MathGroup Archive 2009

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

Search the Archive

Re: Remove quotes from Cell Expression

  • To: mathgroup at
  • Subject: [mg99508] Re: Remove quotes from Cell Expression
  • From: Albert Retey <awnl at>
  • Date: Thu, 7 May 2009 06:32:22 -0400 (EDT)
  • References: <gtrl2u$1ol$>

robert prince-wright wrote:
> Can someone show me how to write the list m1 to a notebook without the quotes showing?
> m1 = {{"a",b},{c,d}};
> nb = CreateDocument[];
> NotebookWrite[nb, Cell[ToBoxes@Grid[m1],"Text"]]
> The expression below gives the right result so there is something missing in my limited understanding of Cell expressions. 
> Grid@m1

That has nothing to do with the convertion to boxes but is controlled by
Cell properties. There are two ways to achieve what you want:

1) use cells of style "Output", which will by default not show the
string characters (which is why you don't see them with Grid@m1):

NotebookWrite[nb, Cell[BoxData[ToBoxes@Grid[m1]], "Output"]]

2) stay with the "Text" style cells, but change the settings for

 Cell[BoxData[ToBoxes@Grid[m1]], "Text",
  ShowStringCharacters -> False]]

Note that I have wrapped the box expression with BoxData, which was
necessary in my version to avoid an error indication for the created cell...



  • Prev by Date: Re: Bug with Hypergeometric2F1?
  • Next by Date: Re: Picking Off Lists That Have No Numbers
  • Previous by thread: Re: Remove quotes from Cell Expression
  • Next by thread: Re: Remove quotes from Cell Expression