On 23 December 2010 06:33, 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 >
IIUC unbreakable just makes the image unbreakable, it doesn't join the image to anything else. You would have to group the image and what you wanted on the same page in a block and then use passthrough to apply a dbfo keep-together instruction, but I've never tried it. Cheers Lex > -- > 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. > > -- 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.
