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: [docbook-apps] Re: [docbook] Using an image on the titlepage


Hi Ben,

On Sun, Apr 24, 2005 at 10:42:22AM +0200, Ben Branders wrote:
> Paul A. Hoadley (24-04-05 01:18)
> > Or, you could create a completely customised title page layout
> > which uses 'fo:external-image' to point to your graphic:
> > 
> > http://sagehill.net/docbookxsl/TitlePagePrint.html#TitlepageTableLayout
> 
> Suppose I want to use the example in the above mentioned
> chapter. How can I adapt it so I can make my own frontpage (in a
> vector drawing program, like CorelDraw or something like that)?

If you're using a vector drawing program, save the result as EPS or
even SVG if your XSL FO formatter will handle it.  Use PNG as a last
resort---see the recent thread on graphics formats.

> Look at this piece of "pseudo code". Would it be possible to do
> something like this?
> 
> <xsl:template name="book.titlepage.recto">
>   <fo:block>
>     <media-object src="images/frontpage.png" />
>   </fo:block>
> </xsl:template>

Definitely.  The element you want is 'fo:external-graphic'.

<xsl:template name="book.titlepage.recto">
  <fo:block>
    <fo:external-graphic src="url(images/frontpage.png)"/>
  </fo:block>
</xsl:template>

XEP will handle EPS (with the PostScript backend) and SVG there as
well as PNG.

This will place the image in a block within the body region already
set up by the page master for the title page---that is, there will be
top, bottom, left and right margins.  The image will also be only as
large or small as you've created it.  If you were expecting to fill
the entire page, you will need to set up a custom page master, and if
the image isn't already large enough, you will need to scale it up.

> Indeed, it's quite difficult for me to understand this all. But
> that's why there is a mailinglist. ;-)

I can't recommend Bob Stayton's "DocBook XSL: The Complete Guide"
highly enough.

http://sagehill.net/book-description.html


-- 
Paul.

w  http://logicsquad.net/
h  http://paul.hoadley.name/

Attachment: pgp00000.pgp
Description: PGP signature


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