Hi all,
I'm a docbook 5 beginner for a couple of weeks. Although I'm a longtime
developer with some XML experience, wrapping my head around it all is a bit
daunting at times. But with Mr Walsh's DB5 guide, Tidwell's XSLT book and most
importantly, Mr Staytons book on the stylesheets, I think I've gotten past a
number of hurdles. Thank you all. However, I've no doubt that I'll be
requesting further help of this forum soon :-)
Anyway, for Lars question, I've set up my toolchain the same way at this point,
and while I'm sure there are many ways on tackling this problem depending on
your needs, I elected a simple way for now after some googling. I'm all ears
for better ways, and/or suggestions on when this approach would be
inappropriate from anyone with more experience...!
My understanding is that the stylesheets by default does request the
Symbol/ZapfDingbats fonts, to help find characters not existing in the normal
fonts. The problem occurs because of the simple fact that those fonts does not
have font weights (i.e. bold etc) other than 'normal'. It's just warnings, but
it looks ugly of course. I guess that for more control, the customization layer
could override the default stylesheets but that was too difficult for me.
Reading about FOP, there's a way however to feed it a config file (fop -c), and
so I wrote this:
<!--
By default, docbook xsl selects Symbol,ZapfDingbats as extra font
families, but they lack
bold variants causing (harmless) warnings about downgrading. Avoid that
by downgrading here.
-->
<fop version="1.0">
<fonts>
<substitutions>
<substitution>
<from font-family="Symbol"
font-weight="700..900"/>
<to font-family="Symbol" font-weight="400"/>
</substitution>
<substitution>
<from font-family="ZapfDingbats"
font-weight="700..900"/>
<to font-family="ZapfDingbats"
font-weight="400"/>
</substitution>
</substitutions>
</fonts>
</fop>
I.e. instead of letting FOP decide to downgrade after a warning, I tell FOP to
downgrade right away. So the warnings goes away but the end effect should be
the same.
The problems of a para overflowing the place it has is more difficult. I've
been having a number of those for two possible reasons: first, I used
screenshots in <screen> elements, but the lines were too long so they went
beyond the right margin. Also, I've been massaging my titlepage and footer, and
using some guessing as to sizes of boxes and font sizes to make things fit. I'm
guessing you can apply these hints to perhaps find the source of this problem.
I haven't yet grasped how to debug this more efficiently; haven't looked close
but I'm not certain how to make the proper connection with 'position 143:142'
to my source XML...?
HTH,
ken1
> -----Original Message-----
> From: Lars Bjørndal [mailto:[email protected]]
> Sent: den 22 september 2011 21:52
> To: [email protected]
> Subject: [docbook] Converting an xml file with xsltproc/fop (was:
> Re: [docbook] DocBook SGML article and titlepage, + remove header)
>
> I've now upgraded fop to version 1.0. I have the following source:
>
> <http://lamasti.net/files/pub/progoppsett/manual/progoppsett-
> 1.0.xml>
>
> I use the following command to create the fo file:
>
> 'xsltproc --output t.fo --stringparam double.side 1\
> --stringparam fop1.extensions 1 --stringparam paper.type A4\
> /usr/share/sgml/docbook/xsl-stylesheets/fo/docbook.xsl
> progoppsett-1.0.xml'
>
> Then, I use fop to convert to pdf:
>
> 'fop t.fo t.pdf', and I get the following warning messages:
>
> 22.sep.2011 21:49:26 org.apache.fop.events.LoggingEventListener
> processEvent
> WARNING: Font "Symbol,normal,700" not found. Substituting with
> "Symbol,normal,40
> 0".
> 22.sep.2011 21:49:26 org.apache.fop.events.LoggingEventListener
> processEvent
> WARNING: Font "ZapfDingbats,normal,700" not found. Substituting with
> "ZapfDingba
> ts,normal,400".
> 22.sep.2011 21:49:27 org.apache.fop.events.LoggingEventListener
> processEvent
> WARNING: Line 1 of a paragraph overflows the available area by 2500
> millipoints.
> (See position 143:242)
>
> How can I solve this problems?
>
> Thanks,
> Lars
>
> --------------------------------------------------------------------
> -
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]