Re: CSS 2: inserting text and markup into HTML documents

Al Gilman writes:

 > I seem to remember two functions from Jason's discussion of Braille
 > formatting traditions that are not covered in what you just said:
 >
 > Inclusion of print page number in running headers.

Right. My simple example in the last message didn't show all features.
For the complete text, see [1]. Here's how you would do page numbers:

  @page :header {
    content: none, "Page " decimal(pageno), none;
 } 

The example would insert the string "Page 4" centered on the fourth
page. The 'none' keywords indicate that there should be no running
header on the left side of the page, nor the right side.

 > The flip side of this point is that it is not obvious why headers
 > should be limited to the contents of Hn elements.  

That would be too prohibitive. In the current propsal, you can use a
normal CSS selector to "mark" the elements which should serve as
headers:

  H1        { running-head: chapter }
  P.caption { running-head: section }

The marked elements can then be referred to from the header
definition:

  @page :header {
    content: first(chapter), none, first(section);
  }

The "first" function refers to the first occurence of a marked element
on that page. Other fuctions are "last" and "previous". The names
"chapter" and "section" are predefined.

Feedback on the usefulness of this proposal is most welcome. So is
suggestions for changing the syntax.

[1] http://www.w3.org/TR/WD-CSS2/page.html#h-12.3.5

Regards,

-h&kon

H   å   k   o   n      W   i   u   m       L   i   e
howcome@w3.org      http://www.w3.org/people/howcome
World     W      i     d     e       Web  Consortium

Received on Thursday, 6 November 1997 12:41:08 UTC