[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] insert a pagebreak / a picture in header / pagenumbers /Table of Contents
----- Original Message ----- From: "Kerstin Buchholz" <Leeloo5E@web.de> To: <docbook-apps@lists.oasis-open.org> Sent: Monday, March 06, 2006 4:06 AM Subject: Re: [docbook-apps] insert a pagebreak / a picture in header / pagenumbers /Table of Contents > Hello, > > i still need some help :-/ > > Some days ago I ask some questions in this list: > > >> 1. How can I insert a pagebreak after or before a section in my > >> Simplify DocBook so that converting it to PDF or RTF the pagebreaks are > >> made? > > http://www.sagehill.net/docbookxsl/PageBreaking.html > > Using "hard-pagebreak" was very easy to implement. > But I also need a "hard-pagebreak" before "Table of Content". > > Some XML-Code: > <article lang='de'> > <title>Manual</title> > <articleinfo> > <abstract>...</abstract> > <author>...</author> > </articleinfo> > > <pagebreak/> > > <blockquote> ... </blockquote> > </article> > > After <articleinfo> I set a pagebreak. It works very well. But between > <articleinfo> and <pagebreaks> are generated the "Table of Content". It > is still on the first page. It would be very nice, if the "Table of > Content" would be alone on the second page. How should I put it on the > second page? You can add these two templates to your customization layer to accomplish this effect: <xsl:template name="component.toc.separator"> <!-- Customize to output something between component.toc and first output --> <fo:block break-after="page"/> </xsl:template> <xsl:template name="article.titlepage.separator"> <fo:block break-after="page"/> </xsl:template> The template named component.toc.separator is an empty placeholder template defined in the stylesheet to allow you to put something between the toc and the first content. In DocBook terms, a 'component' is an article, chapter, appendix, etc. The article.titlepage.separator template is normally generated from the titlepage spec file as described here: http://www.sagehill.net/docbookxsl/HTMLTitlePage.html But you can also directly define one of the generated templates in your customization layer, which is what I did here. > >> 2. How can I insert a picture to the page-header? > > http://www.sagehill.net/docbookxsl/PrintHeaders.html#GraphicInHeader > > This is still very dificult to understand. > I put the described part > <xsl:when test="$position = 'center'"> > <fo:external-graphic content-height="1.2cm"> > <xsl:attribute name="src"> > <xsl:call-template name="fo-external-image"> > <xsl:with-param name="filename" select="$header.image.filename"/> > </xsl:call-template> > </xsl:attribute> > </fo:external-graphic> > </xsl:when> > in the pagesetup.xsl of the Docbook-Stylesheets, set > $header.image.filename in param.xsl to the right path to the picture > which has to be in the page-headers, but there is still no External > Graphic shown on the page-header ... Can you peek inside the FO output to see if you get the fo-external-image with the right filename in the header table? If so, then the stylesheet is working, and the problem is likely the header space is not big enough. Did you see this section: http://www.sagehill.net/docbookxsl/PrintHeaders.html#HeaderHeight You mention that you edited pagesetup.xsl. When you edit the stylesheets directly, it is more difficult to update to a new release of the DocBook stylesheets because you have to repeat the edits. If that is the case, I would suggest using a customization layer instead. http://www.sagehill.net/docbookxsl/CustomMethods.html#CustomizationLayer Bob Stayton Sagehill Enterprises DocBook Consulting bobs@sagehill.net
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]