MathGroup Archive 2010

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

Search the Archive

Re: How to make style sheet with header

  • To: mathgroup at smc.vnet.net
  • Subject: [mg109139] Re: How to make style sheet with header
  • From: Adam Griffith <adamg at wolfram.com>
  • Date: Mon, 19 Apr 2010 04:10:10 -0400 (EDT)

Hi Jason,

The header you see is created using a docked cell 
(http://reference.wolfram.com/mathematica/ref/DockedCells.html). So for 
example, the style sheet ConfidentialReport.nb defines a docked cell for 
several different environments:

Cell[StyleData[All, "Working"],
 DockedCells->{
   Cell["C   O   N   F   I   D   E   N   T   I   A   L", "SBO", 
CellMargins -> {{0, 0}, {0, 0}},
     CellFrame -> {{0, 0}, {0, 3}}, FontSize -> 12, FontSlant -> 
"Plain", FontColor ->
    GrayLevel[1], TextAlignment -> Center, CellFrameColor -> RGBColor[1, 
0, 0], Background ->
    RGBColor[0.65, 0.5, 0.45]]}]

Cell[StyleData[All, "Presentation"],
 DockedCells->{
   Cell["C   O   N   F   I   D   E   N   T   I   A   L", "SBO", 
CellMargins -> {{0, 0}, {0, 0}},
     CellFrame -> {{0, 0}, {0, 3}}, FontSize -> 12, FontSlant -> 
"Plain", FontColor ->
    GrayLevel[1], TextAlignment -> Center, CellFrameColor -> RGBColor[1, 
0, 0], Background ->
    RGBColor[0.65, 0.5, 0.45]]},
 ShowGroupOpener->True]

Cell[StyleData[All, "SlideShow", StyleDefinitions -> StyleData[All, 
"Presentation"]],
 PageWidth->WindowWidth,
 DockedCells->{
   FEPrivate`FrontEndResource["FEExpressions", "SlideshowToolbar"],
   Cell["C   O   N   F   I   D   E   N   T   I   A   L", "SBO", 
CellMargins -> {{0, 0}, {0, 0}},
     CellFrame -> {{0, 0}, {0, 3}}, FontSize -> 12, FontSlant -> 
"Plain", FontColor ->
    GrayLevel[1], TextAlignment -> Center, CellFrameColor -> RGBColor[1, 
0, 0], Background ->
    RGBColor[0.65, 0.5, 0.45]]},
 ScrollingOptions->{"PagewiseDisplay"->True,
 "VerticalScrollRange"->Fit},
 MenuPosition->1300]

Cell[StyleData[All, "Condensed"],
 DockedCells->{
   Cell["C   O   N   F   I   D   E   N   T   I   A   L", "SBO", 
CellMargins -> {{0, 0}, {0, 0}},
     CellFrame -> {{0, 0}, {0, 3}}, FontSize -> 12, FontSlant -> 
"Plain", FontColor ->
    GrayLevel[1], TextAlignment -> Center, CellFrameColor -> RGBColor[1, 
0, 0], Background ->
    RGBColor[0.65, 0.5, 0.45]]}]

Cell[StyleData[All, "Printout"],
 DockedCells->{
   Cell["C   O   N   F   I   D   E   N   T   I   A   L", "SBO", 
CellMargins -> {{0, 0}, {0, 0}},
     CellFrame -> {{0, 0}, {0, 3}}, FontSize -> 12, FontSlant -> 
"Plain", FontColor ->
    GrayLevel[1], TextAlignment -> Center, CellFrameColor -> RGBColor[1, 
0, 0], Background ->
    RGBColor[0.65, 0.5, 0.45]]}]

To create a style sheet with your new 'header', define the new values 
for these environments and inherit the rest of the styles from 
ConfidentialReport.nb. (This inheritance behavior can be seen by opening 
a new notebook, choosing Format > Edit Stylesheet..., and looking at the 
cell expression for the base definitions cell in the notebook that appears).

Hope this helps,
-Adam

ebaugh at illinois.edu wrote:
> I have been trying unsuccessfully to make a style sheet with a 
> header. I am not talking about a header that appears when you 
> print the notebook. I am talking about a header that is on the 
> notebook itself. 
> An example of what I am talking about is the "Confidential Report" 
> style sheet that is available with Mathematica. It says 
> "Confidential" at the top, and you can't just delete or close it. 
>
> I would like a header for use in my company, where all company 
> notebook files would have the company logo as a header on top. 
>
>
> Thanks all, 
> Jason Ebaugh
>   


  • Prev by Date: Re: Root again
  • Next by Date: Re: Selecting subscripted variables from an expression
  • Previous by thread: Re: How to make style sheet with header
  • Next by thread: Can you communicate about Mathematica?