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

RE: [XSL-FO] TOC alignment

Expand Messages
  • Carolyn Oliver
    Thank you to both Bob and Ken -- that worked perfectly! Carolyn ... From: G. Ken Holman [mailto:gkholman@cranesoftwrights.com] Sent: Tuesday, January 18, 2005
    Message 1 of 4 , Jan 19, 2005
      Thank you to both Bob and Ken -- that worked perfectly!


      -----Original Message-----
      From: G. Ken Holman [mailto:gkholman@...]
      Sent: Tuesday, January 18, 2005 7:46 AM
      To: XSL-FO@yahoogroups.com
      Subject: Re: [XSL-FO] TOC alignment

      At 2005-01-14 14:41 -0500, Carolyn Oliver wrote:
      >I'm trying to create a TOC showing the titles and page numbers with
      >leader dots between. My problem is if I have a long title that should
      >go to the next line (but fits if forced) is going over into my page
      >number column. I need to have the title column at a set width.
      >Title 1............ 1
      >Title 2 that is long..
      > 2
      >Title 3............ 3

      As Bob mentioned, use an end-indent to wrap lines other than the last
      and a last-line-end-indent of an equivalent negative value for the last
      line to reach the edge of the page.

      I usually also have an outdent on the first line as well as the last
      so I do a start-indent to wrap lines other than the first line and a
      text-indent of an equivalent negative value for the first line to start
      the edge of the page.

      >Also, is there any way to have the TOC adjust the leader dots for the
      >amount of number contained in the page number column. Right now, if I
      >have a single-digit above a 2-digit page number, the leader dots do not
      >end in the same spot.
      >Title 1............. 1
      >Title 2............ 10

      Use a fixed-width inline-container at the end of the line and then
      of that an end-aligned page number. You'll have to ensure no vertical
      shifting of the page number by tightening up the line height.

      An example is below that works in Antenna House.

      I hope this helps.

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

      <?xml version="1.0" encoding="iso-8859-1"?><!--carolyn.fo-->
      <root xmlns="http://www.w3.org/1999/XSL/Format"
      font-family="Times" font-size="20pt">

      <simple-page-master master-name="frame"
      page-height="297mm" page-width="210mm"
      margin-top="15mm" margin-bottom="15mm"
      margin-left="40mm" margin-right="40mm">
      <region-body region-name="frame-body"/>

      <page-sequence master-reference="frame">
      <flow flow-name="frame-body"
      <block start-indent="3cm" text-indent="-3cm"
      end-indent="3cm" last-line-end-indent="-3cm"
      This is a test of a toc entry that is very long and does not
      use any alignment for the body of the entry
      <leader leader-pattern="dots"/>
      <inline-container line-height="1" width="1.5cm">
      <block text-align-last="end">1</block>
      <block start-indent="3cm" text-indent="-3cm"
      end-indent="3cm" last-line-end-indent="-3cm"
      text-align-last="justify" text-align="justify">
      This is a second toc entry that is very long but also aligned
      in the body of the entry to get a smooth right edge
      <leader leader-pattern="dots"/>
      <inline-container line-height="1" width="1.5cm">
      <block text-align-last="end">111</block>

      World-wide on-site corporate, govt. & user group XML/XSL training.
      G. Ken Holman mailto:gkholman@...
      Crane Softwrights Ltd. http://www.CraneSoftwrights.com/f/
      Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995)
      Male Breast Cancer Awareness http://www.CraneSoftwrights.com/f/bc
      Legal business disclaimers: http://www.CraneSoftwrights.com/legal

      Yahoo! Groups Links

      Confidentiality Notice
      The information contained in this e-mail is confidential and intended for use only by the person(s) or organization listed in the address. If you have received this communication in error, please contact the sender at O'Neil & Associates, Inc., immediately. Any copying, dissemination, or distribution of this communication, other than by the intended recipient, is strictly prohibited.
    Your message has been successfully submitted and would be delivered to recipients shortly.