[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Getting static content into region-start and region-end
Regarding your first question, import precedence does not apply to page master names, so you can't reuse the default master-name values for your customized simple-page-master or page-sequence-master. You will either get an error message, or the processor will pick one but you can't be sure which one. To avoid confusion, create your own complete set. You call your customized versions by writing the logic into the 'select.user.pagemaster' template. That template should return the master-name for your new page-sequence-master. However, if you don't need the original page masters, you can copy the entire 'setup.pagemasters' template from fo/pagesetup.xsl to your customization layer and make your changes to the original masters. In that case, your 'setup.pagemasters' template will have import precedence, so the original template will not be used and the original page masters won't be loaded so there would be no name conflict. Then your customized page masters will be used automatically. Regarding adding the side regions, here is an example of a page master for a right-hand page with right side region (region-end): <fo:simple-page-master master-name="body-first" page-width="{$page.width}" page-height="{$page.height}" margin-top="{$page.margin.top}" margin-bottom="{$page.margin.bottom}" margin-left="{$margin.left.inner}" margin-right="0pt"> <fo:region-body margin-bottom="{$body.margin.bottom}" margin-top="{$body.margin.top}" margin-right="{$page.margin.outer}" column-gap="{$column.gap.body}" column-count="{$column.count.body}"> </fo:region-body> <fo:region-before region-name="xsl-region-before-first" extent="{$region.before.extent}" precedence="true" display-align="before"/> <fo:region-after region-name="xsl-region-after-first" extent="{$region.after.extent}" precedence="true" display-align="after"/> <fo:region-start region-name="xsl-region-start-first" extent="0pt"/> <fo:region-end region-name="xsl-region-end-first" extent="{$region.side.extent}"/> </fo:simple-page-master> The body margin-right is zero because the region-end extent provides the right margin. You would do something mirrored for left-hand pages. To get some content into your start or end regions, you need to add fo:static-content elements with the correct flow-names (such as 'xsl-region-end-first') at the top of the generated fo:page-sequences in your output. This means customizing the templates for the elements that generate page sequences, such as chapter and appendix. I found it easiest to copy the way the running headers are handled with 'running.head.mode' but adapt it for 'running.side.mode'. I can provide more details if needed. Bob Stayton Sagehill Enterprises DocBook Consulting bobs@sagehill.net ----- Original Message ----- From: "Paul A. Hoadley" <paulh@logicsquad.net> To: <docbook-apps@lists.oasis-open.org> Sent: Tuesday, April 20, 2004 7:06 PM Subject: [docbook-apps] Getting static content into region-start and region-end Hello, I want to briefly re-visit an old thread: http://lists.oasis-open.org/archives/docbook/200212/msg00007.html I want to get a graphic as static content into the outer margin of the body pages of a document, so region-start on even pages and region-end on odd pages. I've set up 'user.pagemasters' and 'select.user.pagemasters' in my customisation driver, as described in Chapter 11 of Bob's book. I have two questions: 1. I assume I would only need to supply a new fo:page-sequence-master in my user.pagemasters template if I wanted to alter the page sequences. If I want the standard page sequences, can I just supply customised simple-page-masters? They will be called by select.user.pagemasters, right? (Say I _did_ want to alter the page sequence, though. I would need to provide a different master-name for the fo:page-sequence-master. How would the stylesheets then know to use my customised fo:page-sequence-master?) 2. I cannot see where to add the fo:static-content. It can't be a child of fo:page-sequence-master or fo:simple-page-master. Should I be looking at a different template for this part? Which one? Thanks for any help. -- Paul. mailto:paulh@logicsquad.net
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]