Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

Re: Fixing options to Cell expressions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg25283] Re: Fixing options to Cell expressions
  • From: "P.J. Hinton" <paulh at wolfram.com>
  • Date: Tue, 19 Sep 2000 03:45:09 -0400 (EDT)
  • Organization: Wolfram Research, Inc.
  • References: <8q22f0$hr4@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

On 17 Sep 2000, Murray Eisenberg wrote:

> I changed cell margins in a notebook (which has a private style sheet). 
> This inserted options in the Cell expressions.
> 
> Is there some easy way to manipulate the notebook expression to get rid
> of all such options, e.g., so that
> 
>   Cell[BoxData[
>     RowBox[{"1", " ", "+", " ", "1"}]], "Input",
>   CellMargins->{{17.625, Inherited}, {Inherited, Inherited}}]
> 
> is changed to:
> 
>   Cell[BoxData[
>     RowBox[{"1", " ", "+", " ", "1"}]], "Input"]
> 
> I have in mind some sort of replacement rule(s), of course.  I know that
> I must start with something like:
> 
> nb = SelectedNotebook[]
> 
> nbexp = NotebookGet[]

nbexp = DeleteCases[nbexp, CellMargins -> _, Infinity]
NotebookPut[nbexp, nb]

Another approach would be to do the job in the front end.

SelectionMove[EvaluationNotebook[], All, Notebook]
SetOptions[NotebookSelection[EvaluationNotebook[]], CellMargins -> 
  Inherited]

-- 
P.J. Hinton
User Interface Programmer                         paulh at wolfram.com
Wolfram Research, Inc.
Disclaimer: Opinions expressed herein are those of the author alone.


  • Prev by Date: RE: Point inside a plygon?
  • Next by Date: Re: Newbie question
  • Previous by thread: Fixing options to Cell expressions
  • Next by thread: Another strange bug in Mathematica 4.0's Integrate