OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Graphics in print title page


Thanks Scott,

I have followed your advice and used the custom layout through the customization layer. The image appeared on the title page. However, I can't resize it, it always appears scaled up to the width of the paragraph, that is, the fo:block. I have specified the WIDTH parameter of the image but this didn't work.
How did you cope with it?

Rgds,

-Z

On 6/13/05, scott <scott.speights@o3sis.com> wrote:

Hello,

 

I was having some problems with this not too long ago.

 

The best way to add the Logo is to take control of the title page and load a graphic by putting this into your customization layer style sheet.

 

Otherwise you only have really limited formatting capability.

 

 

Take a look at Bob Stayton's book on this page: http://www.sagehill.net/docbookxsl/TitlePagePrint.html#TitlepageTableLayout . if you copy the markup into your customization layer and then slowly customize it for your own documentation (path names…), it should work.

 

Here you have to use FO markup to add a graphic. The tag for this is <fo:external-graphic src="url(yourcompanylogo)"/>. You put this in between the <fo:block></fo:block> tags in your custom title page.

 

Let me know if you would like a code sample.

 

Regards,

Scott

 

Scott Speights

O3SIS IT AG

scott.speights@o3sis.com

 


From: Zbyszek Cybulski [mailto:z.cybulski@gmail.com]
Sent: 13 June 2005 15:15
To: docbook@lists.oasis-open.org
Cc: docbook-apps@lists.oasis-open.org
Subject: [docbook-apps] Graphics in print title page

 

Hi,

I can't get the company logo on the title page of a book.
I have followed the guidelines from the Bob's book as well as the list archive but failed. There is no graphics on the title page in PDF.
My attempt is as follows:

source
book.xml
-------
<book>
    <bookinfo>
        <title><trademark>Product</trademark> Name</title>
        <subtitle>More</subtitle>
        <mediaobject> <!-- LOGO goes here -->
            <imageobject>
                <imagedata fileref="img/logo.png" format="PNG" width="5cm"/>
            </imageobject>
        </mediaobject>
        <authorgroup>
            <corpauthor>The company</corpauthor>
        </authorgroup>
        <legalnotice>...</legalnotice>
        <copyright>...</copyright>
    </bookinfo>
  <chapter>...</chapter>
</book>


customization layer:
book.xsl
------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:fo="http://www.w3.org/1999/XSL/Format">
  <xsl:import href=""file:///d:/docbook/xsl/fo/docbook.xsl"/>
  <xsl:import href=""file:///d:/public/docs/custom-titlepage.xml"/>
[other customizations]
</xsl:stylesheet>


titlepage spec file
custom-titlepage.xml (top portion)
------
[entity definitions]

  <t:titlepage t:element="book" t:wrapper="fo:block">
    <t:titlepage-content t:side="recto">
      <title
         t:named-template="division.title"
         param:node="ancestor-or-self::book[1]"
         text-align="center"
         font-size="&hsize5;"
         space-before="&hsize5space;"
         font-weight="bold"
         font-family="{$title.fontset}"/>
      <subtitle
        text-align="center"
        font-size="&hsize4;"
        space-before="&hsize4space;"
               font-family="{$title.fontset}"/>
      <mediaobject/>
      <corpauthor font-size="&hsize3;"
          keep-with-next.within-column="always"
          space-before="2in"/>
      <authorgroup space-before="2in"/>
      <author font-size="&hsize3;"
          space-before="&hsize2space;"
          keep-with-next.within-column="always"/>
    </t:titlepage-content>

[other templates]
</t:templates>

What is wrong with them? I have no idea what to fix. I have checked the FO output, there is no reference to the logo.png file. Should I customize anything else to get the image in the title page?

In addition, I have a problem with the font on the title and subtitle on recto and verso sides of the title page. I can't force the transformation to use, for example the font "Impact" in blue. I have examined the XSL-FO output and the font family for title and subtitle is "sans-serif" while trademark is "serif". Maybe it isn't a big issue but I would like them printed with the same font family and the same color.

Bob's book demonstrates many methods to customize the title page but none of them worked for me. Likely I'm still too new to XSL-FO and Docbook customization.

I use DocBook 4.4 DTD, XSL 1.68, XEP 4.3 on Windows 2000.

Any help appreciated.

Zbyszek




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]