You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by "Jacques, Olivier (OCBU-Test Infra)" <ol...@hp.com> on 2004/12/03 14:39:09 UTC

[skins] Remark on skins documentation - page breaks

Hello,
 
first, thanks this great piece of software!
I have a small comment on the current documentation:
http://forrest.apache.org/docs/dev/your-project.html#skins
To create a new skin, it is recommended to start from an existing skin
and copy it to src/documentation/skins
This is what I did (from tigris skin) but it didn't work at first. 
-> I had to copy the "common" skin too in the same place.
 
Don't know if you want to change the documentation or something in the
skins themselves.
 
As per suggested in the documentation, here is why I wanted to create a
new skin: insert page breaks at certain points in the document.
This is done using CSS with the attribute: "page-break-before: always"
So I did, in "mytigris.css":
h3, h4 {
 margin-bottom: 0;
 page-break-before: always;
}
 
It would be great to have this hability from within the document XML
source.
 
Best regards,
Olivier.

Re: [skins] Remark on skins documentation - page breaks

Posted by Ross Gardler <rg...@apache.org>.
Jacques, Olivier (OCBU-Test Infra) wrote:
> first, thanks this great piece of software!

:-))

> I have a small comment on the current documentation: 
> http://forrest.apache.org/docs/dev/your-project.html#skins
> To create a new skin, it is recommended to start from an existing skin 
> and copy it to src/documentation/skins
> This is what I did (from tigris skin) but it didn't work at first.
> -> I had to copy the "common" skin too in the same place.

The documentatoin does say "In order to use this feature in your custom 
skins you must copy the common skin from the forrest distribution into 
your custom skins directory (from orrest/src/core/context/skins/common). 
This will protect your skin from changes in the Forrest common skin, but 
you must remember to update this skin in order to take advantage of new 
features added over time by the Forrest team."

However, I can see that this is different from stating that you *must* 
do this if you follow the advice given and start your new skin from an 
exsiting one.

 > Don't know if you want to change the documentation or something in the
 > skins themselves.

Thanks for the pointer, I'll make a change in the docs now.


>  
> As per suggested in the documentation, here is why I wanted to create a 
> new skin: insert page breaks at certain points in the document.
> This is done using CSS with the attribute: "page-break-before: always"
> So I did, in "mytigris.css":
> h3, h4 {
>  margin-bottom: 0;
>  page-break-before: always;
> }
>  
> It would be great to have this hability from within the document XML source.

Yes, I have often thought this (although in my case it is for PDF output 
I want control).

You can do this in HTML without the need to create a new skin by using 
classes:

For example:

<h1 class="pageBreakBefore">

Then in skinconf.xml <extra-css> you put:

.pageBreakBefore {
  margin-bottom: 0;
  page-break-before: always;
}

To respect those classes in PDF will require changes in the Formatting 
Object stylesheets. I think this an excellent enhancement so I will add 
it to the issue tracker.

Ross