|
[Date Index]
[Thread Index]
[Author Index]
Re: What "style"s are available in a notebook?
- To: mathgroup at smc.vnet.net
- Subject: [mg89568] Re: [mg89537] What "style"s are available in a notebook?
- From: John Fultz <jfultz at wolfram.com>
- Date: Fri, 13 Jun 2008 06:09:37 -0400 (EDT)
- Reply-to: jfultz at wolfram.com
On Thu, 12 Jun 2008 02:58:27 -0400 (EDT), David Park wrote:
> We can use the Style[expr, "style"] expression where "style" is a
> specified style in the current notebook. How could we find the complete
> set of such "styles"s that are available? Specifically, I am thinking of
> styles that may come from cascading style sheets and are not directly
> visible in the current style sheet.
>
> For example, in the first example in tutorial/GridsRowsAndColumns the
> style "TableHeader" is used. Is this a style that is in the Documentation
> style sheets, or is it one that is available in Default style notebooks?
> It appears that it is not generally available and Mathematica substitutes
> something like the "Text" style.
>
> Mathematica obviously makes substitutions because if we put in a nonsense
> style we get output with no warning message.
>
> Style["Some text.", "znmjdhr"]
>
> So basically I would like to know how to obtain a list of all valid
> "style"s
> available in a notebook environment.
Actually, in that last case, it's *not* making substitutions. It merely is not
complaining, and resolving the style as empty. In the case of TableHeader,
however, such a style does exist. You must have just overlooked it. It's in
Wolfram/Reference.nb, which is the stylesheet that is used by all documentation.
There is no way to get a complete list of available styles, and if there were,
you'd be overwhelmed with a lot of utility styles which have virtually no
application with direct use. You can programmatically get a list of the styles
which would show in the Styles menu. I know from your question that this isn't
what you're looking for, but I'll mention it because I suspect you may find it
interesting anyway.
FE`Evaluate[FEPrivate`GetPopupList["MenuListStyles"]]
The list is suitable for plugging in directly to a PopupMenu.
Unfortunately, there is no distinction in the stylesheets between utility styles
for which you'd generally have no use, and styles which have been hidden for
other reasons. The Wolfram/Reference.nb hides styles from the style menu
because Wolfram/Reference.nb is intended as a presentation only environment
rather than an authoring environment.
Even in the authoring environment we use in-house (and, I strongly suspect, the
one that's in the beta of Wolfram Workbench, although I've not personally looked
at this), you wouldn't see a style like TableHeaders in the style menu. In that
case it's because the style is never applied via the style menu, but it's
instead applied automatically through a set of table editing controls. Allowing
authors to apply such a style inconsistently could cause some real problems,
whereas having tables go through the table editing controls force a number of
consistency checks which will result in a consistent visual style, fewer
authoring problems, and proper processing for web-based documentation.
Sincerely,
John Fultz
jfultz at wolfram.com
User Interface Group
Wolfram Research, Inc.
Prev by Date:
Re: Re: Re: snippets
Next by Date:
Re: Persistent addition to recently opened? Was Re: Notebooks
Previous by thread:
Re: What "style"s are available in a notebook?
Next by thread:
Re: What "style"s are available in a notebook?
|