desertman has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

I've looked at format and autoformater, don't seem to do this, I'm sure it would not be that hard to write, but I thought i would ask here first, is there code that goes a little further to say create a book with new chapters beginning at the top of the page? Table of Contents, page numbering, and indexing would be nice too.

thanks, desertman

Replies are listed 'Best First'.
Re: book-style pagination
by GrandFather (Saint) on Dec 30, 2009 at 00:29 UTC

    Actually such things are harder to write than you might imagine. Consider a table of contents for example. The table takes some number of pages and that influences how following pages are numbered. Even in easy cases it may take a couple of passes over the text, possibly reformatting the text each time, to get the table of contents and page numbering consistent.

    In any case you will need some extra mark up to indicate text to be used for table entries, index entries, lists of figures, lists of tables, etc. By the time you have done that you have pretty much reinvented Latex or rtf. CPAN already contains a rich collection of modules that support both latex and rtf. Maybe that is a better place to look?


    True laziness is hard work
      Yes, I will look into that. Thank you!