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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

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


Subject: Re: Including external documents


Bob Stayton <bobs <at> sagehill.net> writes:

> 
> Well, not quite what I had in mind.  There could be one appendix element 
> with title and mediaobject, and it has the role attribute to select the 
> custom page-master.
> 

I created a customisation layer as you described and it almost works.
My test input file looks like this:
<book xmlns="http://docbook.org/ns/docbook"; version="5.0">
<title></title>
<appendix role="external-doc">
<title></title>
<!-- I want "Appendix A" on a page by itself, followed by the
     external document, so I force page break -->
<?dbfo-need height="0.00in" ?>
<mediaobject>
  <imageobject>
      <imagedata fileref="doc1-page1.pdf" align="center" valign="middle" 
width="8.5in" depth="11in" contentwidth="8.5in" contentdepth="11in" 
scale="100%"/>
  </imageobject>
</mediaobject>
</appendix>
</book>


The relevant FO looks like this:
<fo:flow flow-name="xsl-region-body" start-indent="4pc" end-indent="0pt">
      <fo:block id="id2489062">
        <fo:block>
          <fo:block>
            <fo:block margin-left="0pt" font-size="24.8832pt" 
font-weight="bold" font-family="sans-serif,Symbol,ZapfDingbats">
              <fo:block keep-with-next.within-column="always" 
space-before.optimum="10pt" space-before.minimum="10pt * 0.8" 
space-before.maximum="10pt * 1.2" hyphenate="false" text-align="left" 
start-indent="0pt" hyphenation-character="-" 
hyphenation-push-character-count="2" 
hyphenation-remain-character-count="2">Appendix&#xA0;A.&#xA0;</fo:block>
            </fo:block>
          </fo:block>
        </fo:block>
      </fo:block>
      <fo:block space-after="0pt" space-before="0em">
        <fo:block-container width="100%" height="0.00in">
          <fo:block>
            <-- ****************** 1 ********************* -->
            <!-- ***** need to eliminate this leader ***** -->
            <fo:leader leader-length="0pt"/>
            <-- ****************************************** -->
          </fo:block>
        </fo:block-container>
      </fo:block>
      <fo:block space-before.precedence="force" space-before="-0.00in" 
space-after="0pt" space-after.precedence="force"/>
            <-- ****************** 2 ********************* -->
            <!-- ***** need some more attributes     ***** -->
      <fo:block id="id2489196" text-align="center">
            <-- ****************************************** -->
        <fo:external-graphic src="url(doc1-page1.pdf)" width="8.5in" 
height="11in" content-width="8.5in" content-height="11in" text-align="center" 
display-align="center"/>
      </fo:block>
    </fo:flow>

To fix my problems (cropping of image), I need the following changes in the
FO:

1) I need to delete the fo:leader element marked above
2) On the fo:block containing the fo:external-graphic, I need to add the
   following attributes:
   font-size="0" line-height="0" break-before="page" break-after="page"
   start-indent="0" end-indent="0"

Actually, (1) is probably not essential. That is, it generates a warning,
but the PDF looks OK. Without (2), the external-graphic is cropped.

Is it possible to modify the customisation layer that you provided so that
it  will produce the required FO?



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