Loading ...
Sorry, an error occurred while loading the content.

List-item "orphans/widows"?

Expand Messages
  • anderszvensson
    Hi, I need to be able to control lists so that I don t get a single first list-item at the end of a page or a last list-item at the beginning of a page. I know
    Message 1 of 2 , Jan 30, 2009
    • 0 Attachment
      Hi,

      I need to be able to control lists so that I don't get a single first
      list-item at the end of a page or a last list-item at the beginning of
      a page. I know you can control lines in an element that way with
      orphans and widows, but it only seems to work within a specific
      element with several lines of text. It just seems strange that it
      wouldn't be possible to do this for list-items too, since that causes
      the same problem as a single line of regular paragraph text does (it's
      just as ugly with a single list-item as a single line of text). I just
      can't find any way to do it though, am I missing something?

      A list in the xml I use looks like this (but usually longer, so a
      keep-together.within-column is not a good idea, since that would often
      create too much whitespace):

      <ol>
      <li>Text</li>
      <li>Text</li>
      <li>Text</li>
      <li>Text</li>
      </ol>

      Any help would be greatly appreciated!

      Regards,

      Anders
    • G. Ken Holman
      ... Use keep-with-next= on the first list item, and keep-with-previous= on the last list item. ... Precisely. ... Yes, that wouldn t be appropriate in your
      Message 2 of 2 , Jan 30, 2009
      • 0 Attachment
        At 2009-01-30 08:54 +0000, anderszvensson wrote:
        >I need to be able to control lists so that I don't get a single first
        >list-item at the end of a page or a last list-item at the beginning of
        >a page.

        Use keep-with-next= on the first list item, and keep-with-previous=
        on the last list item.

        >I know you can control lines in an element that way with
        >orphans and widows, but it only seems to work within a specific
        >element with several lines of text.

        Precisely.

        >A list in the xml I use looks like this (but usually longer, so a
        >keep-together.within-column is not a good idea,

        Yes, that wouldn't be appropriate in your situation.

        I hope this helps.

        . . . . . . . . . . . . Ken

        --
        Upcoming hands-on XSLT, UBL & code list hands-on training classes:
        Brussels, BE 2009-03; Prague, CZ 2009-03, http://www.xmlprague.cz
        Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
        Video lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18
        Video overview: http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18
        G. Ken Holman mailto:gkholman@...
        Crane Softwrights Ltd. http://www.CraneSoftwrights.com/f/
        Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/f/bc
        Legal business disclaimers: http://www.CraneSoftwrights.com/legal
      Your message has been successfully submitted and would be delivered to recipients shortly.