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: [docbook-apps] Limitting float span


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bob Stayton a écrit :
> Hi,
> If you put a clear="both" on the fo:block generated for the para that
> follows the para with the graphic, then it will be pushed below the
> graphic.  Now the trick is to write a template pattern that matches on
> the following para.

Of course! :-) Thanks Bob, works great, as usual. These are the final
templates I use, is someone is interested. It could be easily duplicated
for right floats as well.

Camille.


  <!-- Allow for inlinegraphic floats -->

  <xsl:template match="para/inlinegraphic[not(preceding-sibling::text())] |
		       para/inlinemediaobject[not(preceding-sibling::text())]">
    <fo:float float="left" clear="both">
      <fo:block margin-right="1em">
	<xsl:apply-imports/>
      </fo:block>
    </fo:float>
  </xsl:template>

<!-- And do not wrap over following sibling -->

<xsl:template
match="*[preceding-sibling::para[inlinegraphic[not(preceding-sibling::text())]]
|
		
preceding-sibling::para[inlinemediaobject[not(preceding-sibling::text())]]]">
  <fo:block clear="both">
    <xsl:apply-imports/>
  </fo:block>
</xsl:template>



> Bob Stayton
> Sagehill Enterprises
> DocBook Consulting
> bobs@sagehill.net
> 
> 
> ----- Original Message ----- From: "Camille Bégnis" <camille@neodoc.biz>
> To: "apps docbook" <docbook-apps@lists.oasis-open.org>
> Sent: Monday, August 07, 2006 5:09 AM
> Subject: [docbook-apps] Limitting float span
> 
> 
> Hello,
> 
> given following template:
> 
> <xsl:template match="para/inlinegraphic[not(preceding-sibling::text())]">
> <fo:float float="left" clear="both">
>    <fo:block margin-right="1em">
> <xsl:apply-imports/>
>    </fo:block>
>  </fo:float>
> </xsl:template>
> 
> 
> How can I avoid the float to limit itself to the parent para, and not to
> following ones?
> 
> e.g.:
> -------------------------------------------------------
> ________
> |  o   |  The para with the inlinegraphic in it
> | /|\  |
> |  /\  |
> --------
> Another paragraph
> -------------------------------------------------------
> Instead of:
> -------------------------------------------------------
> ________
> |  o   |  The para with the inlinegraphic in it
> | /|\  |  Another paragraph
> |  /\  |
> --------
> -------------------------------------------------------
> 
> Using <fo:list-block> doesn't really suits me because if first para text
> is longer than graphics, I want it to wrap the graphics below it...
> 
> Cheers,
> 
> Camille.
>>

> --------------------------------------------------------------------------------



- ---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE2FCHjv9P65BfOUMRAtL5AKCBewG9R8wIRMlyI0iNUqbc4Apy1QCeLYE0
LMBFJ7GDclNVZqh0Q1PCQkQ=
=PKSV
-----END PGP SIGNATURE-----
begin:vcard
fn;quoted-printable:Camille B=C3=A9gnis
n;quoted-printable:B=C3=A9gnis;Camille
org:NeoDoc
adr:Domaine du petit Arbois BP 88;;CEEI;Aix en Provence Cedex 4;;13545;France
email;internet:camille@neodoc.biz
tel;work:+33.4.42.22.62.35 
tel;cell:+33.6.33.15.10.23
note;quoted-printable:Rejoignez mon r=C3=A9seau sur viaduc:=0D=0A=
	=0D=0A=
	http://www.viaduc.com/invitationpersonnelle/002lm14bc0jlkfk
x-mozilla-html:FALSE
url:http://neodoc.biz
version:2.1
end:vcard



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