Thanks Henrik,

It appears that neither dbfo-need nor dbfo keep-together works with
dblatex.

However, I did find that <?dbfo keep-together="always"?> works when
using FOP for output if I insert it manually in the XML where needed
(I dislike the default FOP formatting, however, which will require a
bit more work to make look as good as the default dblatex output).

The main issue I have now is that the keep-together tag must be
inserted after the <listitem> tag but before the <simpara> tag in the
xml output, which I have not found possible with asciidoc and the a2x
converter.  Whenever I try to passthrough the tag, it either breaks
the list or puts the pass through into the <simpara> of the bullet
point text.  I suppose there may be a way to customize a2x to handle
this and insert the keep-together tag in each listitem, or in
listitems containing images, although I'm not sure exactly how to
accomplish this.

For example, this XML keeps the bullet point with the following image
in the FOP PDF output:
============================
<listitem>
<?dbfo keep-together="always"?>
<simpara>
Some Text
</simpara>
<informalfigure>
. . .
============================

Getting closer!

Thanks,
-Tim

On Jan 4, 6:00 am, Henrik <[email protected]> wrote:
> The unbreakable applies only to the object itself.
>
> Are you using FOP or DBLatex?
>
> If you are using FOP, you would need the dbfo-need processing
> instruction applied to the paragraph preceding the image. This
> processing instruction would inform FOP that more space is needed
> after the paragraph but on the same page. FOP does not support this
> processing instruction yet, so you are out of luck here.
>
> I cannot comment on DBLatex.
>
> On Dec 23 2010, 5:33 am, Tim Mertens <[email protected]> wrote:
>
> > Hello,
>
> > I am fairly new to asciidoc and was wondering if someone can help me
> > understand how to apply the 'unbreakable' attribute to an image and/or
> > text block so that the image stays with the line above it across page
> > breaks.
>
> > In almost all cases, I want the line above the image to stay with the
> > image if the image forces a page break.  Based on the asciidoc manual,
> > it seems that the 'unbreakable' attribute should accomplish this, but
> > I must be applying it incorrectly or it does not work as I imagined.
> > After trying to apply the 'unbreakable' attribute, the PDF output
> > still has the line before the image on one page and the image itself
> > on the next page.
>
> > I use a2x to export the asciidoc text file directly to PDF.  I am
> > using asciidoc 8.6.3 on Mac OS X 10.6.5.  (I have also used it on
> > Ubuntu 10.04).
>
> > For example, below is a simple list with an image and other elements
> > in it. (The '=' lines are not in the actual document)
>
> > ===================================
>
> > . List item one
> > +
> > image::myimageone.jpg[]
>
> > . List item two
>
> > . List item three
> > +
> > anchor:Item-three-diagram001[]
> > +
> > image::anotherimage.jpg[]
> > +
> > NOTE: This is a note which will appear underneath the image.
>
> > ===================================
>
> > And here is the same list with some of my attempts to add the
> > unbreakable attrib, which are probably completely incorrect:
>
> > ===================================
>
> > [options="unbreakable"]
> > . List item one
> > +
> > image::imageone.jpg[]
>
> > . List item two
> > +
> > image::imagetwo.jpg[options="unbreakable"]
>
> > . List item three
> > +
> > anchor:Item-three-diagram001[]
> > +
> > image::anotherimage.jpg[unbreakable]
> > +
> > NOTE: This is a note which will appear underneath the image.
>
> > ===================================
>
> > Any help would be greatly appreciated!  I have already spent quite a
> > bit of time searching and have been unable to find any useful (to
> > someone new to asciidoc) explanation of the unbreakable attribute
> > apart from the asciidoc documentation.
>
> > Thanks,
> > -Tim
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/asciidoc?hl=en.

Reply via email to