Re: Lists of Tables, Figures, etc in xsl-fo

Bob Stayton <[email protected]> Sun, 27 Jun 2021 12:45:07 -0700
Newsgroups gmane.text.docbook.apps
Message-ID <[email protected]>
Hi Kevin,

The docbook components in fo output are divided into separate 
page-sequences. The default styling is to start each page-sequence on an 
odd-numbered (recto) page.  To avoid skipped page numbers, the 
stylesheet generates a blank page if the last even-numbered page is 
empty in a page-sequence.  In this case, each LOT generates its own 
page-sequence and gets that treatment.


Changing the pagination locally can get tricky, because several 
properties must be accounted for to avoid skipping page numbers.  In 
this case, though, there is a straight-forward solution: put the TOC and 
LOTs in a single page-sequence.  You can copy the template named 
'make.book.tocs' to your customization layer and change it.


In that template, you'll see that each TOC or LOT calls the template 
named "page.sequence" with its "content" param filled with that TOC.  
You can rearrange that template to call "page-sequence" just once and 
put all the TOC content into its single "content" param.  You'll still 
want to test each one to see if it should be included.


If you want to force page breaks between LOTs, you can add:


<fo:block break-before='page'/>


before each one.


Bob Stayton
[email protected]

On 6/27/2021 11:17 AM, Kevin Dunn wrote:
> I've be studying Bob's XSL book, but I can't seem to find out how to 
> change the pagination on book TOCs and LOTs. I've figured out how to 
> specify which LOTs get built (tables, figures, etc), but each of them 
> appears on PDF as a separate recto-verso pair, with the verso being 
> empty in each case. My LOTs are less than a full page, and I'd rather 
> run them together with no page breaks separating them. The main TOC 
> fits on one page, but generates an empty verso page. Is there a way to 
> suppress the page breaks?