dotted hfill (was: [cl-typesetting-devel] HTML rendering)

Marc Battyani marc.battyani at fractalconcept.com
Wed Apr 21 20:27:45 UTC 2004


"Klaus Weidner" <kw at w-m-p.com> wrote:
> On Wed, Apr 21, 2004 at 10:59:44AM +0200, Marc Battyani wrote:
> >
> > You should use a hbox with hfills IMO. I will also have a look at this.
>
> I tried that, and it did not work at all the way I expected it to.
> Hboxes intermixed with text were placed on their own lines, not inline.
> Stacking them inside vboxes kept them in-line, but with completely
> screwed-up baselines, and the :align flag just changed which way it
> was screwed up.

Sorry I was wrong, in fact the hbox is used in the math mode and is a
v-mode-mixin box.

> > The best solution would be to add tab stops ;-)
>
> I think that way lies madness... Making a specialized box that expands to
> a fixed x position wouldn't be hard, but my gut feeling is that this will
> get the layout model too close to the Word ruler-based one, which is
> broken.

Hum, in Word all is broken anyway. ;-)
The typesetting is just ugly.

> > Computing table column widths is not an easy problem. An intermediate
> > improvement over fixed column sizes would be to use the box model for
this.
>
> I'd just need to find some type of ad-hoc solution, since HTML files
> don't always supply widths, or not for all columns.  In fact one of the
> reasons I want this is because there's currently no reasonable way to
> print complex HTML tables in browsers.
>
> The only tool I know that does a good job is html2ps, but unfortunately
> that's an unholy combination of obfuscated Perl with obfuscated
> PostScript.  I'll try to figure out how its table model works (the layout
> calculations are done in PostScript), maybe that will provide some
> pointers.
>
> Or is anyone willing to concede defeat and admit that PostScript can do
> something Lisp can't? ;-)

Heh! Are you really sure it works well ? There are several papers on tables
layout but none has a magic recipe...

> > Very good. When do you think it will be publishable ?
>
> It's getting close. It's already starting to be useful, and the highest
> priority changes are a proper table of contents (currently it just
> contains the <h1> level), clickable hyperlinks, and a few more missing
> markup items.
>
> What I personally need most urgently is change marking including change
> bars, and I already have a plan for that - just insert (changebar-start)
> and (changebar-end) special boxes, and add a special-fn to the output
> routine to draw lines in the margin at the corresponding y coordinates.

Yes, this one is easy. Just do it after the layout pass. You can look at the
example where I draw circles (and join them) under each #\a and #\Space of
the text.

> Is there an easy way to handle strikethrough and underline? Also, being
> able to set the background color for character boxes would be a nice way
> to mark the changes. Should be doable with a special type of box, but it
> needs to be a style inherited automatically by whatever layout commands
> it affects - just a put-bg-colored-string isn't useful for automation.

Strikethrough and underline? Well this should be added to text-style.
Drawing them is probably not difficult I will add this to my "to do soon"
list ;-)

I have variables and styles for background color but it's not used yet. If I
find the time to do the underline stuff I will do that as well as it's
probably almost the same code.

Marc





More information about the cl-typesetting-devel mailing list