MathGroup Archive 2006

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

Search the Archive

Re: Re: Named Formats? (followup question)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65873] Re: [mg65862] Re: Named Formats? (followup question)
  • From: John Fultz <jfultz at wolfram.com>
  • Date: Thu, 20 Apr 2006 05:14:57 -0400 (EDT)
  • Reply-to: jfultz at wolfram.com
  • Sender: owner-wri-mathgroup at wolfram.com

On Wed, 19 Apr 2006 04:54:17 -0400 (EDT), Maxim wrote:
> On Mon, 17 Apr 2006 07:38:36 +0000 (UTC), Paul Abbott
>
> <paul at physics.uwa.edu.au> wrote:
>
>> In article <e1surj$cjf$1 at smc.vnet.net>, AES <siegman at stanford.edu>
>> wrote:
>>
>>> I like to work in Mathematica with screen magnification 125% or 150%,
>>> cells wrapped to window width, then convert to 100% magnification,
>>> cells
>>> wrapped to page width, and Show Page Breaks turned on for printing to
>>> paper -- or maybe other options for print to PDF.
>>>
>>> Is there any kind of "named format" capability, akin to Style Sheets,
>>> that would enable one to switch between these options in one click
>>> (or
>>> maybe by executing one notebook cell?), instead of having to execute
>>> a
>>> multi-step sequence of menu commands?
>>>
>> Called Environments, they are part of the StyleSheet functionality.
>>
>> For the "Working" style set
>>
>> Magnification->1.5,
>> PageWidth->WindowWidth,
>>
>> and for the "Printout" style set (the default)
>>
>> PageWidth->PaperWidth,
>>
>> Using the "ShowPageBreaks" Front End Token you can Show Page Breaks:
>>
>> FrontEndExecute[{FrontEndToken[
>> FrontEnd`EvaluationNotebook[], "ShowPageBreaks"]}]
>>
>> Note that this is a toggle -- executing it if page breaks are showing
>> turns it off.
>>
>> However, there does not seem to be a Front End Token for switching
>>
>> Format | Screen Style Environment | Working
>>
>> to
>>
>> Format | Screen Style Environment | Printout
>>
>> Cheers,
>> Paul
>>
>
> For some reason the first command works but the second one doesn't:
>
> FrontEndTokenExecute[
> "Format", "ScreenStyleEnvironment", "Presentation"]
>
> FrontEndTokenExecute[SelectedNotebook[],
> "Format", "ScreenStyleEnvironment", "Presentation"]
>
> Maxim Rytin
> m.r at inbox.ru

SelectedNotebook[] doesn't always point to the notebook you might expect on 
non-Windows platforms -- partly due to FE bugs, and partly due to operating 
system limitations.

But, most of the time, when you're thinking SelectedNotebook[], you really 
mean InputNotebook[], which is the notebook that all keystrokes go to 
(SelectedNotebook[] may refer to a palette, which can be selected but can 
never receive input).

Alternatively, you could also have used EvaluationNotebook[], which is the 
notebook that the current evaluation is running in.

Sincerely,

John Fultz
jfultz at wolfram.com
User Interface Group
Wolfram Research, Inc.



  • Prev by Date: Re: Re: Named Formats? (followup question)
  • Next by Date: warning messages with Nintegrate and FindMinmum
  • Previous by thread: Re: Named Formats? (followup question)
  • Next by thread: Re: Re: Named Formats? (followup question)