Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #4442 > unrolled thread

setting header options in another nb with code

Started byPhil Hammond <phil@hammondo.org>
First post2011-08-17 09:57 +0000
Last post2011-08-18 07:25 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  setting header options in another nb with code Phil Hammond <phil@hammondo.org> - 2011-08-17 09:57 +0000
    Re: setting header options in another nb with code Armand Tamzarian <mike.honeychurch@gmail.com> - 2011-08-18 07:25 +0000

#4442 — setting header options in another nb with code

FromPhil Hammond <phil@hammondo.org>
Date2011-08-17 09:57 +0000
Subjectsetting header options in another nb with code
Message-ID<j2g39s$1fe$1@smc.vnet.net>
In a Notebook I have:

nb = CreateDocument[]

and then:

SetOptions[nb, FirstPageHeader -> True, FirstPageFooter -> True,
 PageHeaders -> {{Cell[quizDate, 14], Cell[teacher, 14],
    Cell[hdrName, 14]}, {Cell[hdrName, 14], Cell[teacher, 14],
    Cell[quizDate, 14]}}]

where quizDate, teacher, and hdrName are Strings to be placed left,
center, right in the header.

The target nb gets the Strings in the right places in the header, but
their font size is not 14. Also, the first page header is unset.

Help please?? Thanks-

[toc] | [next] | [standalone]


#4451

FromArmand Tamzarian <mike.honeychurch@gmail.com>
Date2011-08-18 07:25 +0000
Message-ID<j2ieor$bl5$1@smc.vnet.net>
In reply to#4442
On Aug 17, 7:57 pm, Phil Hammond <p...@hammondo.org> wrote:
> In a Notebook I have:
>
> nb = CreateDocument[]
>
> and then:
>
> SetOptions[nb, FirstPageHeader -> True, FirstPageFooter -> True,
>  PageHeaders -> {{Cell[quizDate, 14], Cell[teacher, 14],
>     Cell[hdrName, 14]}, {Cell[hdrName, 14], Cell[teacher, 14],
>     Cell[quizDate, 14]}}]
>
> where quizDate, teacher, and hdrName are Strings to be placed left,
> center, right in the header.
>
> The target nb gets the Strings in the right places in the header, but
> their font size is not 14. Also, the first page header is unset.
>
> Help please?? Thanks-

Try this:

SetOptions[nb,
  PrintingStartingPageNumber -> 1,

  PageHeaders -> {{Cell[quizDate, FontSize -> 14],
     Cell[teacher, FontSize -> 14],
     Cell[hdrName, FontSize -> 14]}, {Cell[hdrName, FontSize -> 14],
     Cell[teacher, FontSize -> 14], Cell[quizDate, FontSize -> 14]}},

  PageFooters -> {{None, None, None}, {None, None, None}},
  PrintingOptions -> {
    FirstPageHeader -> True,
    FirstPageFooter -> True}];


Mike

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web