Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2007

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

Search the Archive

Re: Adding current style name to window title or status

  • To: mathgroup at smc.vnet.net
  • Subject: [mg82460] Re: Adding current style name to window title or status
  • From: Norbert Marxer <marxer at mec.li>
  • Date: Sat, 20 Oct 2007 22:13:58 -0400 (EDT)
  • References: <fclbec$fi7$1@smc.vnet.net><200709180446.AAA28915@smc.vnet.net>

On 20 Okt., 12:11, Murray Eisenberg <mur... at math.umass.edu> wrote:
> I don't understand the syntax of that SetOptions expression,
> specifically the hyphen (or minus sign) after "WindowStatusArea".
>
>
>
>
>
> Norbert Marxer wrote:
> > On 17 Sep., 09:47, chuck009 <dmili... at comcast.com> wrote:
> >> I'd like to know the current style my notebook is using.  Would be nice I think if the style name would appear in the window title or maybe in the status area.  Here's what I have so far which only extracts a string containing the style name but I can't figure out how to get it in the window any way.  I realize there's a WindowStatusArea command but I don't know how to use it yet.  
>
> >> nb = Options[EvaluationNotebook[], StyleDefinitions];
> >> myStyle = StyleDefinitions /. nb
> >> my2 = myStyle[[1, 1]]
>
> > Hello
>
> > The following command (evaluated in the appropriate notebook) writes
> > the file name of the style sheet in the status area of the window:
>
> > SetOptions[EvaluationNotebook[],WindowStatusArea-
> >> ToString[StyleDefinitions/.Options[EvaluationNotebook[],StyleDefinitions]]]
>
> > Best Regards
> > Norbert Marxer
>
> --
> Murray Eisenberg                     mur... at math.umass.edu
> Mathematics & Statistics Dept.
> Lederle Graduate Research Tower      phone 413 549-1020 (H)
> University of Massachusetts                413 545-2859 (W)
> 710 North Pleasant Street            fax   413 545-1801
> Amherst, MA 01003-9305- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

Hello

I copied the Mathematica code from a notebook into the editor of this
forum. When the code was displayed in this forum, it contained
additional space and line breaking characters.

When you just paste this code back into a Mathematica notebook, it
will not work.

All you have to do (to make this code work) is to remove the space and
line breaking characters until you have a standard option with a Rule
expression:

     WindowStatusArea->ToString[...]

I hope this helps.

Best Regards
Norbert Marxer



  • Prev by Date: Re: Re: why no result & no error from this recursion
  • Next by Date: Re: Integrate question
  • Previous by thread: Re: Re: Adding current style name to window title or status
  • Next by thread: Re: A riddle: Functions that return unevaluated when they cannot