Hi Bob, Thanks very much. I'll download the latest snapshot and give it a try.
Dick ------- XML Press XML for Technical Communicators http://xmlpress.net hamil...@xmlpress.net On Apr 2, 2015, at 11:44, Bob Stayton <b...@sagehill.net> wrote: > Hi Dick, > This was actually an oversight when the dbfo-need template was written. That > feature is a bit of a kludge to begin with, because there is no property in > XSL-FO that performs that function. The PI does it by creating a > block-container of the specified height, then backspacing up to the top of > that container with a negative space-before value to output the content that > follows. If the container does not fit, it forces a page break, otherwise > the content should just overwrite the container. > > But getting the spacing right is tricky, and the template has to resort to > testing to see what the following element is and then tries to recreate that > space. It did not have a case for admonitions, hence the lack of space for > the warning element. > > I just updated the pi.xsl stylesheet module, checked it into SVN, and tested > the latest snapshot. So that admonition problem should be fixed. > > I also got dbfo-need working properly with FOP 1.1. A previous message > mentioned that your example worked with FOP 1.1, but that was just a lucky > happenstance that only worked with the fop1.extensions param was not set. > Now that feature works with FOP 1.1 with that param set to 1 as it should be. > > The updated template is in the snapshot in fo/pi.xsl. > > Bob Stayton > Sagehill Enterprises > b...@sagehill.net > > On 4/1/2015 12:47 PM, Richard Hamilton wrote: >> I just ran into an interesting edge case when building with dbfo-need when >> the following conditions are true: >> >> 1) You have a dbfo-need processing instruction above an admonition (warning, >> tip, etc.) >> 2) The admonition is the last element in a section (technically, the last >> block element; an indexterm doesn't change anything). >> 3) The dbfo-need is not activated (that is, the admonition is small enough >> to fit on the current page). >> >> When these three things are true, the vertical space between the preceding >> paragraph and the admonition will be smaller if there is a dbfo-need than if >> the processing instruction is not present. >> >> I was running the 1.78.1 stylesheets (as well as a more recent snapshot) >> with no customization, Saxon, and XEP. I don't have a version of FOP active, >> so I don't know if this is a problem with XEP, the stylesheets, or something >> else. >> >> I've included a short example that illustrates the problem. >> >> Does anyone have any idea what might be going on here? >> >> Best regards, >> Dick Hamilton >> ------- >> XML Press >> XML for Technical Communicators >> http://xmlpress.net >> hamil...@xmlpress.net >> >> ================ Sample docbook ================= >> >> <?xml version="1.0" encoding="utf-8"?> >> <article xmlns="http://docbook.org/ns/docbook" version="5.0"> >> <title>dbfo-need and admonition example</title> >> <section xml:id="s.shorthistory"> >> <title>First section</title> >> <para>This first admonition has a dbfo-need processing instruction in >> front of it.</para> >> <?dbfo-need height="1in"?> >> <warning> >> <para>This one has a dbfo-need in front of it.</para> >> </warning> >> </section> >> <section> >> <title>Second section</title> >> <para>This admonition does not have a dbfo-need processing instruction >> in front of it.</para> >> <warning> >> <para>This one has no dbfo-need in front of it.</para> >> </warning> >> </section> >> </article> >> >> >> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org >> For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org >> >> >> --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org