When you created your customized titlepage
spec file, did you then process it to generate a new titlepage XSL module, and
include that module in your customization layer? Those steps
are described in:
and
----- Original Message -----
Sent: Wednesday, June 15, 2005 1:50
PM
Subject: Re: [docbook-apps] Graphics in
print title page (was in docbook lists)
Scott,
your suggestion worked perfectly. I've used
content-width with the uniform scaling and the graphics appeared on the title
page. The corpauthor disappeared in the meantime ;) but it looks like my bug
in the customization layer. But I won't give up playing with mediaobject
within bookinfo. This method seems to the most logical, however, it didn't
work for me. I guess Bob Stayton could add more light on this
issue.
Thanks,
Zbyszek
On 6/15/05, scott
<scott.speights@o3sis.com>
wrote:
Hi, I've
switched this over to docbook apps now that it's a style
sheet issue. I think this is also dependent on which processor is
being used. But, there are two width properties for an external graphic:
width and content width. Width is for the view window, and content-width
is for the actual size of the image. There is another property of the
graphic called scaling which allows for uniform or non-uniform scaling of
the graphic. Generally, what works for me is to simply set the width and
the scaling properties within the external graphic tag.
Some other
things to think about are, what is the original size of the graphic and
how does the hierarchy between the fo:block and the graphic inline tag
work (you may want to ask someone like Dave Pawson about this, he would
know better than I). You may want to scale back the size of the fo:block
and see what happens. And, how many columns does your table row span (if
you haven't already customized this out of your stylesheet).
Also,
I noticed in your last sample you specified the width in your xml file.
If there is any graphic info still in your xml file you may want to
remove it.
The code for my CL (customization layer) looks like
this: <fo:external-graphic src="url(1GenInfPDA.gif)"
width="196mm" scaling="uniform"
text-align="left"></fo:external-graphic>
All I can really
suggest is to tinker with all of elements concerned until it works or ask
some of the other more FO savvy list members who may know exactly what to
do.
Best,
Scott
________________________________________
From: Zbyszek Cybulski [mailto:z.cybulski@gmail.com] Sent: 14
June 2005 09:00 To: docbook@lists.oasis-open.org Cc:
scott 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#TitlepageTableLay out
. 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
|