- From: Jon Bosak <bosak@atlantic-83.Eng.Sun.COM>
- Date: Fri, 7 Feb 1997 16:40:12 -0800
- To: www-style@w3.org
- CC: bosak@atlantic-83.Eng.Sun.COM
[Dave Raggett:] | On Thu, 6 Feb 1997, Jon Bosak wrote: | | > Let's just take one, simple, obvious, everyday example. I have an | > illustration that's the fourth figure in the third chapter of a book. | > It should be labeled "Figure 3-4". I change my mind and move it | > farther down in the chapter; now it should be labeled "Figure 3-7". I | > change my mind again and make the chapter an appendix; now the figure | > should be labeled "Figure C-7". Show me the CSS stylesheet that makes | > this happen. | | Detailed proposals have been made for extending CSS to handle | numbering, which would make your example trivial to handle. Really? Proposals to key the numbering in arbitrary ways to arbitrarily named elements at arbitrary levels in the document structure? Forgive me if I doubt this. | If support for auto numbering in Web pages is important to your | company or customers, then would you be interested in helping | to lobby for this? | | What about the the lack of appropriate markup for captioned figures | in html? Some vendors have stated that a single cell table is the | right thing to use for figures, but perhaps you don't agree? Groan. I'm just not getting through here. "I need to be able to perform calculations in your language." "Fine. What sort of calculations did you have in mind?" "Well, here's a case where I needed the square root of 2." "No problem. We'll add the capability to find the square root of 2." "But then over here I needed the square root of 3." "We can handle that. At our next meeting we'll entertain proposals to extend the language to add the square root of 3." "..." Look, here's the specific algorithm for figure captions that I put into place a few years ago for the stylesheets that go with Novell's online documentation: Print a figure caption by printing the word for "Figure" in the appropriate language (drawn from a resource file that is translated once for all books in the language version of a collection) followed by the figure number followed by a period and a space and then the content of the figure's TITLE element. The figure number is generated as follows: Check to see whether the figure happens to be in an appendix. If it's not, then it's in a chapter, so see whether the chapter has a number (1, 2, 3, etc.) given as a LABEL attribute on the CHAPTER start-tag; if no label is given, don't print a chapter or figure number, just print the word for "Figure" followed by a period and a space and the content of the TITLE element. If there is a LABEL attribute on the chapter, print that number followed by a dash followed by the number of that figure among its sibling figures in the chapter (1-1, 2-5, etc.) unless the value of the LABEL attribute is the reserved value "auto", in which case calculate the chapter among its sibling chapters as well as calculating the number of the figure within the chapter. If the figure does happen to be in an appendix, then check to see whether the appendix has a letter (A, B, C, etc.) given as a LABEL attribute on the APPENDIX start-tag; if no label is given, don't print an appendix letter or figure number, just print the word for "Figure" followed by a period and a space and the content of the TITLE element. If there is a LABEL attribute on the APPENDIX, print that letter followed by a dash followed by the number of that figure among its sibling figures in the appendix (A-2, B-5, etc.) unless the value of the LABEL attribute is the reserved value "auto", in which case calculate the letter of the appendix among its sibling appendices as well as calculating the number of the figure within the appendix. Now, just what kind of autonumbering facility did you have in mind that would enable me to implement this 1992 DynaText behavior in a CSS stylesheet? Do you intend to hardwire the description above into the CSS standard, or do you think that other stylesheet designers might want something a bit more general? (Numbering the figures sequentially across CHAPTER boundaries but not across PART boundaries, for example. Or being able to use names other than CHAPTER and PART for the document divisions.) If you put in something general enough to satisfy all of us, how would its specification or implementation be any simpler than what already exists for this purpose in DSSSL? Jon
Received on Friday, 7 February 1997 19:40:14 UTC