Tk Library Source Code

View Ticket
Login
Ticket UUID: 535382
Title: definition list problems
Type: Bug Version: None
Submitter: boakley Created on: 2002-03-26 19:52:26
Subsystem: doctools Assigned To: andreas_kupries
Priority: 7 High Severity:
Status: Closed Last Modified: 2002-04-02 02:01:07
Resolution: Fixed Closed By: andreas_kupries
    Closed on: 2002-04-01 19:01:07
Description:
mpexpand needs to support two types of definition 
lists: one with vertical whitspace between elements, 
and one without.

The reason? To support to types of markup common to 
most tk man pages. 

The need for no vertical whitespace: every tk option 
is documented with three individual lines that look 
like this:

   Command-Line option: foo
   Database Name: foo
   Database Class: Foo

This format has proven to work well over the years, 
though its possible we could put all the information 
on a single line. It's also possible to use a 
preformatted section to mark this up, but I don't 
think that would quite look right, since it would 
likely have the same colorization and fonts as code 
samples.

One could also use a bulleted list, but bullets don't 
really make sense here. What we need is a bulleted 
list without the bullets (but also without descriptive 
paragraphs). 

The need for whitespace: methods are typically 
described with the following format:

   bbox
      returns a list blah blah

   cget
      returns blah blah blah

   configure
      query or modify blah blah blah

This type of presentation is tedious to read if there 
is no vertical whitespace between the different 
methods. The present (as of March 26, 2002) nroff 
formatter puts in this whitespace, but the html 
formatter does not.

I don't know what the best solution is, but I believe 
both types of definition lists ought to be supported. 
This could be done with "hints" to the formatter (eg: 
[list_begin definition -compact]), or as separate 
types of lists (eg: [list_begin compact], or with a 
smart algorithm that guesses whether vertical 
whitespace should be used or not.

Ultimately, however, I think doctools needs to provide 
some standard mechanism for creating both types of 
markup, and all of the formatters should attempt to 
generate an equal amount of vertical whtiespace.
User Comments: andreas_kupries added on 2002-04-02 02:01:07:
Logged In: YES 
user_id=75003

Committed a change to doctools which
* fixes the original problem in the HTML formatter by 
tracking a bit more state than before and inserting <br> 
tags at the appropriate places.
* and allowing the writer of the manpage to provide the 
formatting engine with a hint about whitespacing.

The HTML formatter recognizes the hint "compact" which 
reinstates the old behaviour (i.e. minimal whitespace).