From: ebaugh on
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

From: David Park on
In the "Local definition for style "Notebook"" Notebook, section of the
style sheet, which should appear near the top, add a DockedCells option.
Look up ?DockedCells in Help. You can open up the style sheet Notebook cell
to look at the underlying structure (Ctrl Shift E) and then type in the
DockedCells definition. Or try out the Cell part of it first in a notebook
and then copy it into the DockedCells option.

If you don't want it docked (where it is always visible) then I am not so
certain. Suppose you just want a non-deletable cell at the top that scrolls
out of the way when you scroll the notebook? Maybe someone else can explain
that.

David Park
djmpark(a)comcast.net
http://home.comcast.net/~djmpark/




From: ebaugh(a)illinois.edu [mailto:ebaugh(a)illinois.edu]

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



From: Armand Tamzarian on
On Apr 12, 10:01 pm, eba...(a)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

I guess by "header" you don't mean a Title cell so I'm guessing you
either mean a docked cell or a window title.

SetOptions[EvaluationNotebook[], WindowTitle -> "Confidential Report"]

SetOptions[EvaluationNotebook[], DockedCells -> Cell["Confidential
Report", FontSize -> 24, TextAlignment -> Center]]

to remove the docked cell:

SetOptions[EvaluationNotebook[], DockedCells ->{}]


From: Larry Adelston on
Hi Jason,

The "Confidential" heading is set as a DockedCells option in the Style
Environment definitions in the ConfidentialReport stylesheet. As you
are probably aware DockedCells stay fixed at the top of the notebook
window regardless of how far you scroll vertically. In case you
weren't aware, DockedCells do not print.

This is the DockedCells option taken from the definition for the
Working environment:

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]]}

BTW, if you want the identical DockedCells for all style environments
you can simply place the DockedCells option in the "Notebook" style
definition, instead of in the individual environment definitions.

Yours,
Larry



On Apr 12, 2010, at 10:03 PM, ebaugh(a)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



__________________________________
Larry Adelston
Print Production Supervisor
Wolfram Research Inc.
email: larrya(a)wolfram.com
phone: 217-398-0700, ext.: 3204
fax: 217-398-0747
http://www.wolfram.com



From: Adam Griffith on
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(a)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
>