[pmwiki-users] Some specific questions

John Rankin john.rankin at affinity.co.nz
Wed Mar 9 17:08:48 CST 2005


On Thursday, 10 March 2005 11:35 AM, DirkBlaas <d.blaas at hccnet.nl> wrote:
>Hi there, fellow PmWiki adepts (some addicts even?),
>
>1. I am planning to use the Publish cookbook recipe to create one HTML out
>of several pages on the wiki, representing a kind of (printed) week bulletin
>that contains lets say the program for next weekend. For that purpose i do
>not want to have a page break after each of the Wiki-pages that are in the
>publish, but to have a page-break after lets say 2 pages. Is there a way to
>put a page-break directive in some of the wiki-pages, so that i can control
>where the published page has the breaks? (Thus filling up printed pages
>while keeping some tables from going over the page-break)

<shortAnswer>
Currently, the publish recipe has a page-break-before: always; on
div.pagehead1 in the publish.css. If your trail page looks like this:
* PageA
* PageB
* PageC
this will produce a break before each page.

If your trail page looks like this:
* PageA
** PageA1
** PageA2
* PageB
** PageB1
it will produce a break before PageA and PageB.

So first you'll want to remove the page breaking from the css.

Then you'll need to find the tables you want to break before
and add the following attribute:

||class='break'

Then add the following to your style sheet:

table.break { page-break-before:always; }

With luck and a following wind, that should work.
</shortAnswer>

<longerAnswer>
In an ideal world, an author shouldn't have to worry about page 
breaks, they should automatically fall in sensible places.
In particular, if one transforms a page collection into a 
printable pdf, tables should correctly 'float' in some way,
without the author having to do anything special. The same
is true for images. Otherwise, if we insert manual breaks
and the upstream content changes, the downstream breaks will 
fall in the wrong place.

There is a project under way to extend the Publish button
with a Typeset button, which will publish the collection as
pdf, automatically taking care of all such formatting issues.
This works with PmWiki 1, but can be done much better with
PmWiki 2. So a re-write is under way.

The print-oriented capabilities of css are really quite
limited compared to what is available through typesetting
engines such as LaTeX, or even M$ Word. I believe Ciaran
has created a recipe for tidily converting wiki pages to
.rtf, which may offer you another option. To quote:
"
I've got a system that publishes to pdf/word/rtf etc, it works very
nicely but its quite specific to our wiki so isn't suitable for
general use, but it is quite possible to do (Basically I just run the
pmwiki generated html through w3ctidy then process it as a DOM, nice
and simple, works a treat )

-Ciaran
"
</longerAnswer>

Hope this helps.

-- 
JR
--
John Rankin






More information about the pmwiki-users mailing list