This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Howto eliminate margins on FO coverpage?


I use the following technique to get full page covers when I couldn't
figure out how to make the titlepage templates do it. If there's a
cleaner way, I'd like to hear about it. In any case, you really need a
new pagemaster and a background image. If you use a fo:block, then the
image can never be 100% of the page.

In  <xsl:template name="user.pagemasters"> add something like (not a
good idea to hard code 8.5x11 as the page size like this btw):

	<fo:simple-page-master
	  margin-right="0in" 
	  margin-left="0in" 
	  margin-bottom="0in" 
	  margin-top="0in"
	  page-height="11in" 
	  page-width="8.5in" 
	  master-name="cover">
	  <fo:region-body
		margin-left="0pt"
		margin-right="0pt" 
		margin-top="0pt" 
		margin-bottom="0pt">
      <xsl:if test="normalize-space($cover.path) != ''">
	<xsl:attribute name="background-image"><xsl:value-of
	select="$cover.path"/></xsl:attribute>
      </xsl:if>
      </fo:region-body>
	  <fo:region-before 
		extent="0pt"
		region-name="xsl-region-before-first"/>
	  <fo:region-after 
		extent="0pt"
		region-name="xsl-region-after-first"/>
	</fo:simple-page-master>

Then within an override of <xsl:template match="/"> I added a
fo:page-sequence in a couple of places (after the it writes the markup
for the bookmarks within an xsl:choose). I define the paramcover.path
somewhere (We put a <mediaobject role="cover"> or something like that in
the bookinfo and get it from there). I may have made other ajustments to
get the pagination to come out right. It's all kind of messy (I'll send
it to you if you really want to see it, but it's too embarassing to post
here :). Like I say, if there's a right way to do this I'd like to know
how. If the stylesheets don't support full page covers, then I'd request
it as a feature
<http://sourceforge.net/tracker/?group_id=21935&atid=373750>.

David

> -----Original Message-----
> From: Jeff Beal [mailto:jeff.beal@ansys.com]
> Sent: Wednesday, August 07, 2002 2:50 PM
> To: docbook-apps@lists.oasis-open.org
> Subject: RE: DOCBOOK-APPS: Howto eliminate margins on FO coverpage?
> 
> 
> I would think you would have more luck looking at 
> pagesetup.xsl and changing
> the margins on the physical page.
> 
> Jeff
> 
> -----Original Message-----
> From: Bob Stayton [mailto:bobs@caldera.com]
> Sent: Wednesday, August 07, 2002 1:42 PM
> To: Devin Bayer; docbook-apps@lists.oasis-open.org
> Subject: Re: DOCBOOK-APPS: Howto eliminate margins on FO coverpage?
> 
> 
> On Wed, Aug 07, 2002 at 12:41:18AM -0400, Devin Bayer wrote:
> > I'm trying to make the coverpage of my book one big image, 
> but cannot 
> > get it to work correctly.
> > I'm using:
> > xsltproc     1.0.18
> > libfop-java  0.20.3
> > docbook-xsl  1.50.0
> > 
> > Here is the template I can up with that doesn't work:
> > <!-- CoverPage -->
> > <xsl:template name="book.titlepage.recto">
> >          <fo:block margin-left="-1in" margin-top="-2in"
> > 		margin-right="-1in" margin-bottom="-2in"
> >                  padding-top="-1in" padding-bottom="-2in"
> > 		background-color="red">
> >                  <fo:external-graphic height="11in"
> > 			width="8.5in"
> > 			src="i_am_a_big.jpeg"/>
> >          </fo:block>
> > </xsl:template>
> > 
> > What happens is the red background streches from side to side, but 
> > only in the middle of the page (offset up a little).  The 
> image is in 
> > the upper-left corner, but doesn't fill the page.  I've tried many 
> > variations on this template with no luck.  I'm not getting any 
> > relevant diagnostics messages from the software.
> 
> I'd try two things:
> 
> 1.  padding values don't take negative numbers.
> I'd remove those entirely as they may be confusing
> the processor.
> 
> 2.  Try negative space-before and space-start instead of margins.
> 
> I can't say I fully understand how blocks are rendered as
> areas on the page, as the XSL spec is rather complex.
> This is complicated by the processors not supporting all
> properties, so you never quite know why something doesn't
> work.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]