Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*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 2006

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

Search the Archive

Re: Adding a key binding for a Style

  • To: mathgroup at smc.vnet.net
  • Subject: [mg71096] Re: Adding a key binding for a Style
  • From: Paul Abbott <paul at physics.uwa.edu.au>
  • Date: Wed, 8 Nov 2006 06:15:12 -0500 (EST)
  • Organization: The University of Western Australia
  • References: <eicmgi$fk2$1@smc.vnet.net>

In article <eicmgi$fk2$1 at smc.vnet.net>,
 "David Park" <djmp at earthlink.net> wrote:

> The style sheet assigns keys implicitly in the order that the cell styles
> appear in the style notebook. Alt-1 to Alt-9. After that it does not assign
> a key. You don't actually need a key for Input as that is the default style.

Indeed. Of course, you can make _any_ cell style the default style for a 
Notebook using the DefaultNewCellStyle option using the OptionInspector 
(or by editing the StyleSheet).

> To insert a key for a new cell style you will have to put the cell style in
> the style notebook in a correct place so that it will catch a key number.
> You could put it just before the standard Input cell and usurp Alt-9.
> 
> But be careful about putting it early in the notebook and bumping all of the
> standard cell style keys. I consider that very bad form! I always expect
> Alt-7 to generate a Text cell. Users will not want to learn a whole new key
> structure for your notebooks, and then another one for someone else's
> notebook.

Actually, one should question this: I too am used to expecting style 7 
(CommandKey-7 as a Macintosh user) to generate a Text cell. However, I 
very rarely need to use default styles 1, 2, 3, or 8 -- and style 9 is 
input which is usually automatic. I regularly use styles 4 and 7, and 
less often have need for styles 5 and 6.

Instead, it seems to me that the numbering should automatically reflect 
the frequency of individual usage -- so that style 1 would be text and 
style 2 would be Section, etc.
 
> If you wanted to usurp the Title key, say, you could put your new style
> first, but then move the Title definition to a later part of the style sheet
> notebook, keeping all the other keys the same.

That is a bad idea. The Title style should be left where it is. Instead 
simply add the option

  StyleMenuListing->None,

to its style so that it drops off the StyleMenuListing.

Cheers,
Paul

_______________________________________________________________________
Paul Abbott                                      Phone:  61 8 6488 2734
School of Physics, M013                            Fax: +61 8 6488 1014
The University of Western Australia         (CRICOS Provider No 00126G)    
AUSTRALIA                               http://physics.uwa.edu.au/~paul


  • Prev by Date: Re: General--Another Trigonometric Problem....NEED HELP
  • Next by Date: Re: Factor.....
  • Previous by thread: RE: Adding a key binding for a Style
  • Next by thread: Re: Adding a key binding for a Style