MathGroup Archive 2008

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

Search the Archive

RE: StyleSheets How-to

  • To: mathgroup at smc.vnet.net
  • Subject: [mg85679] RE: [mg85651] StyleSheets How-to
  • From: "David Annetts" <davidannetts at aapt.net.au>
  • Date: Tue, 19 Feb 2008 01:55:30 -0500 (EST)
  • References: <200802171222.HAA01185@smc.vnet.net>

Hi Jakub,

> Does anybody know about some good tutorial about the creation 
> and edition of StyleSheets (M6.0.1)? I have found some  
> information in the help and on WRI documentation pages, but 
> all the information is only partial and I need to glue it in 
> my head little bit.

For my money, David Park's tutorial of v6 stylesheets is as lucid as it
gets.  It's in the Mathematica section on his website which is
http://home.comcast.net/~djmpark/

> What I cannot find anywhere is, how to work with background 
> images in StyleSheet (for axample the brown hexagons on the 
> top of Creative/NaturalColor StyleSheet). I have searched in 
> Option Inspector nearly line by line and haven't found it. If 
> I open this StyleSheet notebook in some text editor, it seems 
> to me, that the image is may be UUencoded inside the 
> notebook. There is something like in it:

<snippage>

> But how to create StyleSheet with my own images?

You are talking about docked cells.

For simple bitmaps, this can be done using the following algorithm

1.	Import["bitmap"]
		Import["my_Image.jpg"]
2.	
	Convert cell containing bitmap to a bitmap using Cell->"Convert
to"->Bitmap.  AFAIK, this is a mouse-only step.  I'd be interested to hear
otherwise.
		
3.	Select this cell and copy it into an expression.  This will result
is a very long cell, but, provided it starts with
GraphicsData["CompressedBitmap", "..."], you should be 	fine.
		mainHeader = GraphicsData["CompressedBitmap", "..."];

4.	Create docked cells is a new notebook using

		CreateWindow[DockedCells -> Cell[mainHeader, "DockedCell",
ImageSize -> {720, 102}]]

	At this point, you can specfiy other options in CreateWindow & Cell
such as Background.

Caveats.
A.  As far as I can tell, the docked cells are eye-candy.  They don't appear
on any printout.  This makes sense if the docked cells contain buttons, but
it they contain "your company graphic", there seems to me to be little
point.

B. The docked cells width is fixed.  Fine for fixed-size windows.  Not fine
when windows can be resized and when (6.0.0) Cell background has no effect.

C.  The steps above are very clunky.

Dave.



  • Prev by Date: Re: [functional approach should give] an even faster way to normalize
  • Next by Date: Re: Re: rendering problem
  • Previous by thread: StyleSheets How-to
  • Next by thread: Mathematica 6 over ssh tunnel