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

Re: [XSL-FO] Leaders, line breaks and long words

Expand Messages
  • Kendall Shaw
    Okay, I ve received a solution and an explanation from Antenna House. The solution is:
    Message 1 of 4 , Sep 2, 2005
      Okay, I've received a solution and an explanation from Antenna House.

      The solution is:

      <block start-indent="5pc" text-align="justify" text-align-last="justify">
      <inline keep-together.within-line="always">A very very very very very
      very very very long label</inline>
      <leader keep-with-previous="always" leader-pattern="dots"/>
      <leader keep-with-next="always" leader-pattern="dots"/>
      <inline keep-together.within-line="always">
      <xsl:text>ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789</xsl:text>
      </inline>
      </block>

      The explanation is that a leader creates a single inline-area, so in
      my FO, it doesn't create additional areas on the next line, because
      it's not supposed to. There is no room left on the line, so it breaks
      the line (after the colon).

      In their solution, the keep-together.within-line property prevents
      breaks, the first leader is required to follow the preceding text, to
      the end of it's line, and the second leader is required to precede the
      following text.

      Kendall

      "J.Pietschmann" <j3322ptm@...> writes:

      > Kendall Shaw wrote:
      > ...
      >>><block start-indent="5pc" text-align-last="justify">
      >>> <wrapper>A very very very very very very very very long label</wrapper>
      >>> <leader leader-pattern="dots"/>
      >>> <wrapper>ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789</wrapper>
      >>></block>
      >> What I want to achieve, is to have the long word pushed onto the next
      >> line, in the case where it won't fit on the first line, e.g.:
      >>
      >> A very very very very very very very..............................
      >> .............................ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789
      >>
      >> Why is it breaking the word, rather than stretching the leader?
      >
      > I guess the line break algorithm accepts breaks after a colon.
      > You can try the following:
      > <wrapper>A very very very very very very very very long label</wrapper>
      > <leader leader-pattern="dots"/>
      > <inline
      > keep-toghether="always">ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789</inline>
      >
      > This wont get you dots on the second line however. Text alignment
      > might be broken too.
      >
      > J.Pietschmann
      >
      >
      >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.