Subject: Re: (dsssl) Reacting to page breaks inside a paragraph From: "John R. Sheets" <dusk@xxxxxxxxxxxxx> Date: Tue, 1 May 2001 10:48:32 -0500 |
On Apr 09, 2001, jany.quintard@xxxxxxxxxx wrote: > > On Sun, 8 Apr 2001, John R. Sheets wrote: > > > Hi, > > > > I'm putting together a simple DTD and stylesheets for screenwriting, > > .../... > > However, if a page break splits the dialogue, I need to be able to > > insert the name again as a header on the following page: > > > > JOE > > As I was saying, the best way > > to strip the bark off without > > breaking it into uneven pieces > > -----PAGE BREAK----- > > JOE (cont'd) > > is to first separate it from the > > wood by smacking it with a > > A (quite simple and not very smart) method would be to build a table for > each <dialogue> and use the <name> as header. Something like: Aside from how "smart" it is, I don't see any other way to do it, except to decompose the node into flat text and process it manually. That's what I did for my ASCII output stylesheet, except I could never get it to do any processing on child nodes. > (element dialogue > (make table table-border: #f > (make table-part content-map: '((name header) > (speech #f)) > table-part-omit-middle-header?: #f))) ;; to repeat header on each page I _finally_ got around to fiddling with this over the weekend, and sort of got it working. At least in principle. The problem is that the content that I want to break across page boundaries is always contained in a single <speech> element, which means that it always ends up in a single table-cell. Is it possible to decompose a paragraph flow object into line-field flow objects, and then stick each line into a separate row/cell? If I could do that, all my problems would be solved. Or is line wrapping handled by the backend, and thus out of reach of DSSSL? Or alternatively, can I force a single multi-line table-cell to break at the page boundaries? Currently, it forces the cell to the next page if it doesn't all fit on the current page. I tried setting the n-rows-spanned property of the table-cell, but that didn't quite work. For example, when I set it to 3, the tex backend allocated space for 1/3 of the content (as I expected); unfortunately, the other 2/3 of the content overlapped the text immediately following the table. Maybe I didn't set it all up correctly...I did a lot of half-blind fiddling. (c; Thanks, John -- dusk@xxxxxxxxxxxxx http://www.gnome.org jsheets@xxxxxxxxxxxxxxx http://www.worldforge.org jsheets@xxxxxxxxxxxxxxxxxxxxx http://openbooks.sourceforge.net http://advogato.org/person/jsheets Writing GNOME Applications http://www.aw.com/cseng/titles/0-201-65791-0/ DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Thread | (dsssl) Quick Question on superscri, Russell O'Connor | |
Date | (dsssl) Quick Question on superscri, Russell O'Connor | |
Month |