groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Groff] Re: tag tidying up..


From: Gaius Mulley
Subject: [Groff] Re: tag tidying up..
Date: 20 Dec 2004 14:32:52 +0000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Larry Kollar <address@hidden> writes:

> Gaius Mulley wrote:
> 
> > ... It looks like the </p><p> combination is
> > causing larger spacing - on .TP requests 2..n. Maybe grohtml should
> > use <br><br> inside tables to represent a troff .sp?
> > I'll investigate..
> 
> I would like to (again) suggest using CSS instead of tables to specify
> indents. For .TP (or .IP in -ms), the input & HTML output could look
> something like this:
> 
>       .TP 5
>       natter
>       fiddle dee dee
>       .TP
>       gromish
>       signifying nothing
> 
>       <head>
>       <style>
>       P { margin-top: 8px; margin-bottom: 0 }
>       </style>
>       <body>
>       <p>natter</p>
>       <div style="margin-left:5ex; margin-top:0">fiddle dee dee</div>
>       <p>gromish</p>
>       <div style="margin-left:5ex ; margin-top:0">signifying nothing</div>
> 
> The same scheme would work in -ms for .IP "string" styled lists.
> 
> The optimal output would use <dl>:
> 
>       <dl>
>       <dt>natter</dt>
>       <dd>fiddle dee dee</dd>
>       <dt>gromish</dt>
>       <dd>signifying nothing</dd>
>       </dl>

yes this would be nice, but would it work with the short width of
the first operand to `.IP' ?

> But detecting the beginning and ending of the lists would be
> difficult, unless you assume that the first .TP (or .IP) begins a
> definition list and the first non-TP paragraph marks its end. Maybe
> some list-specific tags could be created that could provide the
> intelligence needed.


> It would really be nice if grohtml could recognize common constructs
> like ".IP \[bu]" or ".IP \n+[LC1]" and automatically create
> bulleted/numbered lists, although the .ULS/.LI/.ULE macros provide a
> good workaround for bulleted lists.

it might be possible to make the macro .IP check for the bullet
character/number and take appropriate action.

> General indents using .in or .RS/.RE could be expressed using <div
> style="margin-left:5ex>...</div> sections, specifying an appropriate
> indentation. The "ex" (x-height) unit is the closest CSS unit to
> *roff's "n" unit; likewise, CSS's "px" and *roff's "p" are essentially
> identical.

Thanks for these hints, I think the .DC macro (in www.tmac) could be
better implemented using an `ex' value. Do you know whether images can
take an `ex' value? My searching has drawn a blank..

I'm not sure if it is sensible to use absolute values for
indentation. The problem is that we cannot mix percentages and
absolute values.

If tables can also take an `ex' value for column width then your
method should be adopted. Consider the desired output of:

  x    this is a test
  helloworld
       and this is another test
  
       hi there

given troff -ms code of:

   .IP "x"
   this is a test
   .IP "helloworld"
   and this is another test
   .LP
   .RS
   hi there
   .RE

we must ensure that this output remains as above even when the browser
is stretched along the X axis.

Gaius




reply via email to

[Prev in Thread] Current Thread [Next in Thread]