From: javierarias on
Hi, how are you?
I'd like to put x of y pages wheter in the header or footer of my
Mathematica Notebook.
I've been trying to find info on CounterBox and CellTags, but I
couldn't make it work.
Any help would be appreciated.
Regards,
Javier Arias

From: Larry Adelston on
Here is one example:

Notebook[{Cell[
CellGroupData[{Cell[TextData[{"Text for page ",
CounterBox["Page"]}],
"Section", CellChangeTimes -> {{3.48094*10^9, 3.48094*10^9}}],
Cell["", "PageBreak", PageBreakBelow -> True]}, Open]],
Cell[CellGroupData[{Cell[TextData[{"Text for page ",
CounterBox["Page"]}],
"Section", CellChangeTimes -> {{3.48094*10^9, 3.48094*10^9}}],
Cell["", "PageBreak", PageBreakBelow -> True]}, Open]],
Cell[CellGroupData[{Cell[TextData[{"Text for page ",
CounterBox["Page"]}],
"Section", CellChangeTimes -> {{3.48094*10^9, 3.48094*10^9}}],
Cell["", "PageBreak", PageBreakBelow -> True]}, Open]],
Cell[CellGroupData[{Cell[TextData[{"Text for page ",
CounterBox["Page"]}],
"Section", CellChangeTimes -> {{3.48094*10^9, 3.48094*10^9}}],
Cell["", "PageBreak", PageBreakBelow -> True]}, Open]],
Cell[TextData[{"Text for page ", CounterBox["Page"]}], "Section",
CellChangeTimes -> {{3.48094*10^9, 3.48094*10^9}}, CellTags ->
"LastPg"]},
WindowSize -> {640, 750},
WindowMargins -> {{22, Automatic}, {Automatic, 49}}, PrintingCopies -
> 1,
PrintingPageRange -> {1, Automatic},
PageHeaders -> {{Cell[
TextData[{CounterBox["Page"], " of ", CounterBox["Page",
"LastPg"]}],
"PageNumber"], None, None}, {None, None,
Cell[TextData[{CounterBox["Page"], " of ", CounterBox["Page",
"LastPg"]}],
"PageNumber"]}}, PrintingOptions -> {"FirstPageHeader" -> True},
FrontEndVersion -> "7.0 for Mac OS X PowerPC (32-bit) (February 18,
2009)",
StyleDefinitions -> "Default.nb"]

Yours,
Larry
On Apr 22, 2010, at 2:29 AM, javierarias wrote:

> Hi, how are you?
> I'd like to put x of y pages wheter in the header or footer of my
> Mathematica Notebook.
> I've been trying to find info on CounterBox and CellTags, but I
> couldn't make it work.
> Any help would be appreciated.
> Regards,
> Javier Arias