Hi,
We used PSMI to implement a similar problem. In our case, some complex
graphics need to be printed in a double width page.
We had a complication because our pages are double sided, the body
region on these pages should be on the inside and the double width
graphics aligned to the inside border. In other words, the body region
is like in regular single width pages but the graphics stick out to the
outside using the extra width available. (This double-width pages are
then folded when the book is put together).
Odd pages are ok, I can just define the body region as usual and let the
graphics overflow to the right. This is actually the right behaviour as
per the spec and as implemented by XEP.
Even pages are more difficult, the graphics should be aligned to the
right margin (inside), since they do not necessarily fit the whole space
available:
-----------------------------------------------------------
| | body text |
| | ........ |
| |------------------------------------------------| |
| | | |
| | The graphics (right aligned) | |
| | | |
| | | |
| | | |
| | | |
| |------------------------------------------------| |
| | |
| | |
-----------------------------------------------------------
I can't define the body region on the right side (with an appropiate
left margin) because my graphics would start on the middle and overflow
to the right, not achieving the desired effect.
I can't use indents because the width of the graphics is variable.
I can't use columns (well, see later) because my body text starts on the
second column then.
My solution was to use two columns but setting the writing mode to "rl"
on the region-body. That way my first column is the one on the right and
the graphics is anchored on the right margin and overflows to the left.
To get the text right, I use block containers and override the writing
mode to "lr". However, that means I need to know which paragraphs fall
in this page. By chance, the only thing required there, is possibly a
title for the graphics and another small object that goes with it. So I
remove them from the normal flow and put them with the graphics in the
PSMI flow. I wonder if there's an easier way to do this layout.
Thanks to Ken for his PSMI idea and code. It's a very elegant solution
without going outside of the spec.
Nevertheless, I still have an issue. When I generate a double-width page
I need to also generate the counterpage. In other words, if it's an odd
page, the next even page should also be of the alternate geometry. If
it's an even page, then the previous odd page. This is required for the
printing process. The problem is, I don't know where this other page
starts or ends and I don't know if my special graphic will fall in a odd
or even page. Any way to accomplish this?
Carlos
G. Ken Holman wrote:
>
> The Page Sequence Master Interleave (PSMI) semantic was created for this
> need to, while inside the flow, trigger a change in page masters.
>
> Go to our home page below, from the right hand margin select "Free
> resources", then "XSL-FO Resources", then "PSMI - interleaving page
> geometries" and you'll find documentation and an XSLT stylesheet
> implementing the semantic. I don't publish the direct URL in my public
> postings in case the location of the file in my file system changes and
> the archives then point to a dead link.
>
> You write your stylesheet such that <para> puts out <block> and
> <para><foldout> puts out <psmi:page-sequence>, thus creating an
> XSL-FO+PSMI result instance. My stylesheet converts that to a pure
> XSL-FO instance, creating as many sibling page-sequence elements as is
> required. You then format the pure XSL-FO instance.
>
> I hope you find this helpful.
>
> . . . . . . . . . . . Ken
>
> --
> World-wide on-site corporate, govt. & user group XML/XSL training.
> G. Ken Holman mailto:gkholman@CraneSoftwrights.com
> Crane Softwrights Ltd. http://www.CraneSoftwrights.com/f/
> Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995)
> Male Cancer Awareness Aug'05 http://www.CraneSoftwrights.com/f/bc
> Legal business disclaimers: http://www.CraneSoftwrights.com/legal
>
> -------------------
> (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
> in the body of the message to majordomo@renderx.com from the address
> you are subscribed from.
> (*) By using the Service, you expressly agree to these Terms of Service
> http://www.renderx.com/terms-of-service.html
>
-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html
Received on Mon Oct 17 19:24:29 2005
This archive was generated by hypermail 2.1.8 : Mon Oct 17 2005 - 19:24:30 PDT