Sign In/My Account | View Cart  
advertisement

Article:
 Printing XML: Why CSS Is Better than XSL
Subject: But can CSS support the finer points of typography?
Date: 2005-08-24 18:16:02
From: Hedley Finger

The examples of CSS's simplicity v. XSL-FO's complexity only partly swing me to the CSS side. Sure, you can specify leader lines, etc. in a TOC entry. But those dots hard up against both the heading and the page number look pretty crappy. Can CSS do this:


* Chapter headings in the font/size/colour/etc. of one's choice
* Subsidiary headings in other stylings
* An em quad inserted after the heading text to space the beginning leader dots
* Leader dots at alternating 12pt and 3 pt spacings to get an .. .. .. effect
* All leader dots vertically align
* Leader dots end an en quad short of the longest possible page number, i.e. like a right tab
* All leader dots have their own font/size/colour/etc. different from that of the heading text
* All page numbers have their own font/size/colour/etc. different from that of the heading text OR leader dots


This is a piece of cake in, say, FrameMaker but I suspect might be just a little beyond CSS as shown in those simple examples. In fact, you would have to build a TOC schema with quite a complex structure, enclose each of the items mentioned above in its own element (possibly a small subtree just for the leader dots), and apply CSS rules to each tiny fragment that makes up a complete TOC entry.


Previous Message Previous Message   Next Message Next Message


Sponsored By: