[plt-scheme] Scribble formatting dilemma

From: Neil Van Dyke (neil at neilvandyke.org)
Date: Wed Mar 4 00:22:51 EST 2009

My short answer to your question is that I think you will have to dig 
into the CSS to get the font sizes cooperating, but that you will also 
run into some hard constraints of the HTML layout currently used by 

For my long answer, here are some of my opinions on Web page layout.  
They are somewhat strong, but I know Scheme people are accustomed to 
everyone having strong opinions... :)

Almost no one gets HTML layout right, since the first versions Netscape 
Navigator and IE.

The best way is to start by assuming that the user's default font is set 
to the user's preference for body text on the device in use.

Most important is the user's font *size* preference, although one is 
forgiven for forcing sans-serif, since historically many browsers 
default to serifed, which few people like on current screen technology.

Once you assume the user knows what size font they like, then font sizes 
of headings and such can be defined by percentages relative to the 
user's body font size.  For example, a first-level heading might be 
200%.  You might to 90%-95% for fixed-width text.  Small print could be 80%.

In tables, generally just use the default body text size.

Embedded pixmaps are not a completely solved problem, but in practice 
they work out OK if you just target them at a roughly appropriate pixel 
size for desktops and laptops.  The portable devices tend to shrink them 

Fixed body text column widths should not be used unless you are really 
sophisticated with the JavaScript enough to make it adapt to changing 
font size and browser window width.  The only reason to do this is to 
enforce a *maximum* column width, since HTML is especially stupid about 
this.  (HTML evolution got sidetracked by table-based layout for a decade.)

Minimum body column widths should almost never be specified.  It is not 
your place to say that the user should be required read 10 words (much 
less 800 pixels per line!), even if that means horizontal scrolling 
because the user's device is too small, or they need to use large fonts, 
or they don't wish to have the page consume all their screen real 
estate.  Necessarily fixed-width layout chunks, such as for code 
examples, can be put in a "div" with automatic scrollbar on horizontal 

On my TODO list is to develop and publicize an example for that adaptive 
maximum column width problem.  Conceptually, it is trivial.  There is 
just some headache with cross-browser testing of JavaScript.  By 
default, then, until you can't do max widths in a smart way, it is 
better not to do them at all.

Also, I might be doing a little experimental tweaking to Scribble CSS 
and HTML output myself, once I have finished converting all my Scheme 
code documentation over to Scribble.



Posted on the users mailing list.