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

Uneven right edge on PDF TOC

Expand Messages
  • dave_gibbons
    Using the newest DITA OT, my PDF TOCs don t look right. The alignment on the page numbers appears pretty much random, neither left aligned nor right aligned.
    Message 1 of 15 , Jan 15, 2010
    View Source
    • 0 Attachment

      Using the newest DITA OT, my PDF TOCs don't look right. The alignment on the page numbers appears pretty much random, neither left aligned nor right aligned.

      Here's an example:

      Hosted by imgur.com

      Am I missing a setting somewhere?

      -Dave

    • Dan Tran
      it is the limitation of FOP ( pdf generator engine ) under dita-ot. The commercial ones dont have that issue -D
      Message 2 of 15 , Jan 15, 2010
      View Source
      • 0 Attachment
        it is the limitation of  FOP ( pdf generator engine ) under dita-ot.  The commercial ones dont have that issue

        -D

        On Fri, Jan 15, 2010 at 4:01 PM, dave_gibbons <david.gibbons@...> wrote:
         

        Using the newest DITA OT, my PDF TOCs don't look right. The alignment on the page numbers appears pretty much random, neither left aligned nor right aligned.

        Here's an example:

        Hosted by imgur.com

        Am I missing a setting somewhere?

        -Dave


      • dave_gibbons
        By limitation, I assume you mean bug. If commercial toolkits are making it work, I have to believe it can work in the FOP as well. Or is there some extra
        Message 3 of 15 , Jan 18, 2010
        View Source
        • 0 Attachment
          By "limitation," I assume you mean "bug." If commercial toolkits are making it work, I have to believe it can work in the FOP as well.

          Or is there some extra magic that the commercial PDF generators use that requires platform- or program-specific code?

          -Dave

          --- In dita-users@yahoogroups.com, Dan Tran <dantran@...> wrote:
          >
          > it is the limitation of FOP ( pdf generator engine ) under dita-ot. The
          > commercial ones dont have that issue
          >
          > -D
          >
          > On Fri, Jan 15, 2010 at 4:01 PM, dave_gibbons <david.gibbons@...>wrote:
          >
          > >
          > >
          > > Using the newest DITA OT, my PDF TOCs don't look right. The alignment on
          > > the page numbers appears pretty much random, neither left aligned nor right
          > > aligned.
          > >
          > > Here's an example:
          > >
          > > [image: Hosted by imgur.com]
          > >
          > > Am I missing a setting somewhere?
          > >
          > > -Dave
          > >
          > >
          >
        • Dan Tran
          You could say it a bug, with no time line for the fix. You may want to join FOP mailing list and bug them about it. -Dan
          Message 4 of 15 , Jan 18, 2010
          View Source
          • 0 Attachment
            You could say it  a bug, with no time line for the fix.

            You may want to join FOP mailing list and bug them about it.

            -Dan


            On Mon, Jan 18, 2010 at 11:32 AM, dave_gibbons <david.gibbons@...> wrote:
             

            By "limitation," I assume you mean "bug." If commercial toolkits are making it work, I have to believe it can work in the FOP as well.

            Or is there some extra magic that the commercial PDF generators use that requires platform- or program-specific code?

            -Dave



            --- In dita-users@yahoogroups.com, Dan Tran <dantran@...> wrote:
            >
            > it is the limitation of FOP ( pdf generator engine ) under dita-ot. The
            > commercial ones dont have that issue
            >
            > -D
            >
            > On Fri, Jan 15, 2010 at 4:01 PM, dave_gibbons <david.gibbons@...>wrote:

            >
            > >
            > >
            > > Using the newest DITA OT, my PDF TOCs don't look right. The alignment on
            > > the page numbers appears pretty much random, neither left aligned nor right
            > > aligned.
            > >
            > > Here's an example:
            > >
            > > [image: Hosted by imgur.com]
            > >
            > > Am I missing a setting somewhere?
            > >
            > > -Dave
            > >
            > >
            >


          • nigelfrance
            Dave, here are a few other limitations of FOP we ve uncovered that you might want to take into consideration: 1.FOP does not support indexes. Index tags in
            Message 5 of 15 , Jan 19, 2010
            View Source
            • 0 Attachment
              Dave,
              here are a few other "limitations" of FOP we've uncovered that you might want to take into consideration:

              1.FOP does not support indexes. Index tags in topic files (indexterm element) are ignored, and no index page is generated.
              2.Text in table cells frequently overspills the right edge of the table.
              3.FOP's support for widows and orphans is poor.
              4.FOP does not respect "keep with next" and "keep with previous" formatting properties for block-level elements.
              5.The FO property "relative-align" is not supported. This means that in bulleted list items that contain inline images, the bullet is top-aligned with the top of the image. Also affects tables that use different font sizes
              6.Poor support of FO attributes "space-before" and "space-after", meaning that paragraph spacing is often incorrect.
              7.No way of automatically filling PDF document properties (Name, Author, Title etc.)
              8.Compared with the output from XEP, graphics that are screenshots are displayed larger when neither the width nor height attributes are set.
              9.Font support is limited (no support for TrueType fonts). We have a hard time getting FOP to use ZapfDingbats.
              10.Graphics formats are limited (no support for PDF graphics).


              >
              > You could say it a bug, with no time line for the fix.
              >
              > You may want to join FOP mailing list and bug them about it.
              >
              > -Dan
              >
              >
              > On Mon, Jan 18, 2010 at 11:32 AM, dave_gibbons <david.gibbons@...>wrote:
              >
              > >
              > >
              > > By "limitation," I assume you mean "bug." If commercial toolkits are making
              > > it work, I have to believe it can work in the FOP as well.
              > >
              > > Or is there some extra magic that the commercial PDF generators use that
              > > requires platform- or program-specific code?
              > >
              > > -Dave
              > >
              > >
              > > --- In dita-users@yahoogroups.com <dita-users%40yahoogroups.com>, Dan Tran
              > > <dantran@> wrote:
              > > >
              > > > it is the limitation of FOP ( pdf generator engine ) under dita-ot. The
              > > > commercial ones dont have that issue
              > > >
              > > > -D
              > > >
              > > > On Fri, Jan 15, 2010 at 4:01 PM, dave_gibbons <david.gibbons@>wrote:
              > >
              > > >
              > > > >
              > > > >
              > > > > Using the newest DITA OT, my PDF TOCs don't look right. The alignment
              > > on
              > > > > the page numbers appears pretty much random, neither left aligned nor
              > > right
              > > > > aligned.
              > > > >
              > > > > Here's an example:
              > > > >
              > > > > [image: Hosted by imgur.com]
              > > > >
              > > > > Am I missing a setting somewhere?
              > > > >
              > > > > -Dave
              > > > >
              > > > >
              > > >
              > >
              > >
              > >
              >
            • torusjkl
              Hi Dave I can t see the attached picture but I think I had the same problem. I solved it by hacking toc-attr.xsl. Find
              Message 6 of 15 , Mar 9, 2011
              View Source
              • 0 Attachment
                Hi Dave

                I can't see the attached picture but I think I had the same problem.
                I solved it by hacking toc-attr.xsl.

                Find
                <xsl:attribute-set name="__toc__topic__content">
                and look for the line
                <xsl:attribute name="text-align">left</xsl:attribute>

                change it to
                <xsl:attribute name="text-align">justify</xsl:attribute>

                And the page numbers will be aligned.

                Best,
                Gal

                --- In dita-users@yahoogroups.com, "dave_gibbons" <david.gibbons@...> wrote:
                >
                >
                > Using the newest DITA OT, my PDF TOCs don't look right. The alignment on
                > the page numbers appears pretty much random, neither left aligned nor
                > right aligned.
                >
                > Here's an example:
                >
                > [Hosted by imgur.com]
                >
                > Am I missing a setting somewhere?
                >
                > -Dave
                >
              • Marj Eldard
                Thank you! I have been looking for this fix for weeks! -- Marj Eldard SecurityMetrics Technical Writer marje@securitymetrics.com 801.995.6504
                Message 7 of 15 , Mar 9, 2011
                View Source
                • 0 Attachment
                  Thank you! I have been looking for this fix for weeks!
                  --
                  Marj Eldard
                  SecurityMetrics
                  Technical Writer
                  marje@...

                  On Mar 9, 2011, at 4:51 AM, torusjkl wrote:

                   

                  Hi Dave

                  I can't see the attached picture but I think I had the same problem.
                  I solved it by hacking toc-attr.xsl.

                  Find
                  <xsl:attribute-set name="__toc__topic__content">
                  and look for the line
                  <xsl:attribute name="text-align">left</xsl:attribute>

                  change it to
                  <xsl:attribute name="text-align">justify</xsl:attribute>

                  And the page numbers will be aligned.

                  Best,
                  Gal

                  --- In dita-users@yahoogroups.com, "dave_gibbons" <david.gibbons@...> wrote:
                  >
                  >
                  > Using the newest DITA OT, my PDF TOCs don't look right. The alignment on
                  > the page numbers appears pretty much random, neither left aligned nor
                  > right aligned.
                  >
                  > Here's an example:
                  >
                  > [Hosted by imgur.com]
                  >
                  > Am I missing a setting somewhere?
                  >
                  > -Dave
                  >


                • Dan Tran
                  me too :-) Thanks -D
                  Message 8 of 15 , Mar 9, 2011
                  View Source
                  • 0 Attachment
                    me too :-)

                    Thanks

                    -D

                    On Wed, Mar 9, 2011 at 11:15 AM, Marj Eldard <marje@...> wrote:
                     

                    Thank you! I have been looking for this fix for weeks!

                    --
                    Marj Eldard
                    SecurityMetrics
                    Technical Writer
                    marje@...

                    On Mar 9, 2011, at 4:51 AM, torusjkl wrote:

                     

                    Hi Dave

                    I can't see the attached picture but I think I had the same problem.
                    I solved it by hacking toc-attr.xsl.

                    Find
                    <xsl:attribute-set name="__toc__topic__content">
                    and look for the line
                    <xsl:attribute name="text-align">left</xsl:attribute>

                    change it to
                    <xsl:attribute name="text-align">justify</xsl:attribute>

                    And the page numbers will be aligned.

                    Best,
                    Gal

                    --- In dita-users@yahoogroups.com, "dave_gibbons" <david.gibbons@...> wrote:
                    >
                    >
                    > Using the newest DITA OT, my PDF TOCs don't look right. The alignment on
                    > the page numbers appears pretty much random, neither left aligned nor
                    > right aligned.
                    >
                    > Here's an example:
                    >
                    > [Hosted by imgur.com]
                    >
                    > Am I missing a setting somewhere?
                    >
                    > -Dave
                    >



                  • Dan Tran
                    File a bug against DITA-OT https://sourceforge.net/tracker/?func=detail&aid=3204628&group_id=132728&atid=725074 -Dan
                    Message 9 of 15 , Mar 9, 2011
                    View Source
                    • 0 Attachment
                      File a bug against DITA-OT https://sourceforge.net/tracker/?func=detail&aid=3204628&group_id=132728&atid=725074

                      -Dan

                      On Wed, Mar 9, 2011 at 11:35 AM, Dan Tran <dantran@...> wrote:
                      me too :-)

                      Thanks

                      -D


                      On Wed, Mar 9, 2011 at 11:15 AM, Marj Eldard <marje@...> wrote:
                       

                      Thank you! I have been looking for this fix for weeks!

                      --
                      Marj Eldard
                      SecurityMetrics
                      Technical Writer
                      marje@...

                      On Mar 9, 2011, at 4:51 AM, torusjkl wrote:

                       

                      Hi Dave

                      I can't see the attached picture but I think I had the same problem.
                      I solved it by hacking toc-attr.xsl.

                      Find
                      <xsl:attribute-set name="__toc__topic__content">
                      and look for the line
                      <xsl:attribute name="text-align">left</xsl:attribute>

                      change it to
                      <xsl:attribute name="text-align">justify</xsl:attribute>

                      And the page numbers will be aligned.

                      Best,
                      Gal

                      --- In dita-users@yahoogroups.com, "dave_gibbons" <david.gibbons@...> wrote:
                      >
                      >
                      > Using the newest DITA OT, my PDF TOCs don't look right. The alignment on
                      > the page numbers appears pretty much random, neither left aligned nor
                      > right aligned.
                      >
                      > Here's an example:
                      >
                      > [Hosted by imgur.com]
                      >
                      > Am I missing a setting somewhere?
                      >
                      > -Dave
                      >




                    • Chung Ley
                      Thanks for the tip... It helped me out too. However, I have a couple of titles that extend very close to the edge where the page number is... When that
                      Message 10 of 15 , Mar 9, 2011
                      View Source
                      • 0 Attachment
                        Thanks for the tip...  It helped me out too.

                        However, I have a couple of titles that extend very close to the edge where the page number is...  When that happens, the right edge will be misaligned again.  Do you happen to know what I can do to fix this?

                        Ex:
                        3.15 Title1...............................................................................15
                        3.16 Title2...............................................................................16
                        3.17 So very very very very very very very very very very long title.19

                        Thanks...

                        --Chung



                        From: Dan Tran <dantran@...>
                        To: dita-users@yahoogroups.com
                        Sent: Wed, March 9, 2011 11:35:03 AM
                        Subject: Re: [dita-users] Re: Uneven right edge on PDF TOC



                        me too :-)

                        Thanks

                        -D

                        On Wed, Mar 9, 2011 at 11:15 AM, Marj Eldard <marje@...> wrote:
                         

                        Thank you! I have been looking for this fix for weeks!

                        --
                        Marj Eldard
                        SecurityMetrics
                        Technical Writer
                        marje@...

                        On Mar 9, 2011, at 4:51 AM, torusjkl wrote:

                         

                        Hi Dave

                        I can't see the attached picture but I think I had the same problem.
                        I solved it by hacking toc-attr.xsl.

                        Find
                        <xsl:attribute-set name="__toc__topic__content">
                        and look for the line
                        <xsl:attribute name="text-align">left</xsl:attribute>

                        change it to
                        <xsl:attribute name="text-align">justify</xsl:attribute>

                        And the page numbers will be aligned.

                        Best,
                        Gal

                        --- In dita-users@yahoogroups.com, "dave_gibbons" <david.gibbons@...> wrote:
                        >
                        >
                        > Using the newest DITA OT, my PDF TOCs don't look right. The alignment on
                        > the page numbers appears pretty much random, neither left aligned nor
                        > right aligned.
                        >
                        > Here's an example:
                        >
                        > [Hosted by imgur.com]
                        >
                        > Am I missing a setting somewhere?
                        >
                        > -Dave
                        >





                      • torusjkl
                        Hi Chung I was able to reproduce this here as well. Looks like a bug but I had not much time to look into this. I found some workarounds that might work for
                        Message 11 of 15 , Mar 10, 2011
                        View Source
                        • 0 Attachment
                          Hi Chung

                          I was able to reproduce this here as well.
                          Looks like a bug but I had not much time to look into this.

                          I found some workarounds that might work for you.

                          a) You could make the title shorter ;-)

                          b) You could use a new line for the page number.
                          Find
                          <xsl:attribute-set name="__toc__topic__content">
                          and look for
                          <xsl:attribute name="last-line-end-indent">-22pt</xsl:attribute>

                          and change it to something like
                          <xsl:attribute name="last-line-end-indent">-18pt</xsl:attribute>

                          c) You could make the TOC area wider.
                          Find
                          <xsl:attribute-set name="__toc__topic__content">
                          and look for
                          <xsl:attribute name="end-indent">22pt</xsl:attribute>
                          <xsl:attribute name="text-indent">-.2in</xsl:attribute>

                          and change it to something like
                          <xsl:attribute name="end-indent">0pt</xsl:attribute>
                          <xsl:attribute name="text-indent">-.8in</xsl:attribute>


                          Hope this helps.

                          Best,
                          Gal

                          --- In dita-users@yahoogroups.com, Chung Ley <chungley2000@...> wrote:
                          >
                          > Thanks for the tip... It helped me out too.
                          >
                          > However, I have a couple of titles that extend very close to the edge where the
                          > page number is... When that happens, the right edge will be misaligned again.
                          > Do you happen to know what I can do to fix this?
                          >
                          > Ex:
                          > 3.15
                          > Title1...............................................................................15
                          >
                          > 3.16
                          > Title2...............................................................................16
                          >
                          > 3.17 So very very very very very very very very very very long title.19
                          >
                          > Thanks...
                          >
                          > --Chung
                          >
                          >
                          >
                          >
                          >
                          > ________________________________
                          > From: Dan Tran <dantran@...>
                          > To: dita-users@yahoogroups.com
                          > Sent: Wed, March 9, 2011 11:35:03 AM
                          > Subject: Re: [dita-users] Re: Uneven right edge on PDF TOC
                          >
                          >
                          >
                          > me too :-)
                          >
                          > Thanks
                          >
                          > -D
                          >
                          >
                          > On Wed, Mar 9, 2011 at 11:15 AM, Marj Eldard <marje@...> wrote:
                          >
                          >
                          > >Thank you! I have been looking for this fix for weeks!
                          > >
                          > >--
                          > >Marj Eldard
                          > >SecurityMetrics
                          > >Technical Writer
                          > >marje@...
                          > >801.995.6504
                          > >www.securitymetrics.com
                          > >
                          > >
                          > >
                          > >
                          > >
                          > >
                          > >On Mar 9, 2011, at 4:51 AM, torusjkl wrote:
                          > >
                          > >
                          > >>Hi Dave
                          > >>
                          > >>I can't see the attached picture but I think I had the same problem.
                          > >>I solved it by hacking toc-attr.xsl.
                          > >>
                          > >>Find
                          > >><xsl:attribute-set name="__toc__topic__content">
                          > >>and look for the line
                          > >><xsl:attribute name="text-align">left</xsl:attribute>
                          > >>
                          > >>change it to
                          > >><xsl:attribute name="text-align">justify</xsl:attribute>
                          > >>
                          > >>And the page numbers will be aligned.
                          > >>
                          > >>Best,
                          > >>Gal
                          > >>
                          > >>--- In dita-users@yahoogroups.com, "dave_gibbons" <david.gibbons@> wrote:
                          > >>>
                          > >>>
                          > >>> Using the newest DITA OT, my PDF TOCs don't look right. The alignment on
                          > >>> the page numbers appears pretty much random, neither left aligned nor
                          > >>> right aligned.
                          > >>>
                          > >>> Here's an example:
                          > >>>
                          > >>> [Hosted by imgur.com]
                          > >>>
                          > >>> Am I missing a setting somewhere?
                          > >>>
                          > >>> -Dave
                          > >>>
                          > >>
                          > >>
                          > >
                          >
                        • ian balanza-davis
                          It is not necessarily a bug, there are alternative attributes that can be used to control the block layout. Whether they are supported in all FO tools, I do
                          Message 12 of 15 , Mar 10, 2011
                          View Source
                          • 0 Attachment
                            It is not necessarily a bug, there are alternative attributes that can be used to control the block layout. Whether they are supported in all FO tools, I do not know, so something like this might work:

                            Set text-align-last="justify" rather than text-align="justify". That forces the justification on the last line only rather than every line in the block, and is the same as text-align for single line blocks.
                            Set an end-indent for the text in the block (say 100pt for exaggeration)
                            Set the same negative right margin for the last line (-100) using last-line-end-indent.

                            you should then get something like:
                            3.15 Title1...............................................................................15
                            3.16 Title2...............................................................................16
                            3.17 So very very very very very very very very very very
                                   long title ..........................................................................19

                            You may also want to have a look at widow/orphan and keep settings for the entries to ensure that you do not split multiple-line entries over a page break.


                            From: torusjkl <buki@...>
                            To: dita-users@yahoogroups.com
                            Sent: Thu, 10 March, 2011 9:49:01
                            Subject: [dita-users] Re: Uneven right edge on PDF TOC

                             



                            Hi Chung

                            I was able to reproduce this here as well.
                            Looks like a bug but I had not much time to look into this.

                            I found some workarounds that might work for you.

                            a) You could make the title shorter ;-)

                            b) You could use a new line for the page number.
                            Find
                            <xsl:attribute-set name="__toc__topic__content">
                            and look for
                            <xsl:attribute name="last-line-end-indent">-22pt</xsl:attribute>

                            and change it to something like
                            <xsl:attribute name="last-line-end-indent">-18pt</xsl:attribute>

                            c) You could make the TOC area wider.
                            Find
                            <xsl:attribute-set name="__toc__topic__content">
                            and look for
                            <xsl:attribute name="end-indent">22pt</xsl:attribute>
                            <xsl:attribute name="text-indent">-.2in</xsl:attribute>

                            and change it to something like
                            <xsl:attribute name="end-indent">0pt</xsl:attribute>
                            <xsl:attribute name="text-indent">-.8in</xsl:attribute>

                            Hope this helps.

                            Best,
                            Gal

                            --- In dita-users@yahoogroups.com, Chung Ley <chungley2000@...> wrote:
                            >
                            > Thanks for the tip... It helped me out too.
                            >
                            > However, I have a couple of titles that extend very close to the edge where the
                            > page number is... When that happens, the right edge will be misaligned again.
                            > Do you happen to know what I can do to fix this?
                            >
                            > Ex:
                            > 3.15
                            > Title1...............................................................................15
                            >
                            > 3.16
                            > Title2...............................................................................16
                            >
                            > 3.17 So very very very very very very very very very very long title.19
                            >
                            > Thanks...
                            >
                            > --Chung
                            >
                            >
                            >
                            >
                            >
                            > ________________________________
                            > From: Dan Tran <dantran@...>
                            > To: dita-users@yahoogroups.com
                            > Sent: Wed, March 9, 2011 11:35:03 AM
                            > Subject: Re: [dita-users] Re: Uneven right edge on PDF TOC
                            >
                            >
                            >
                            > me too :-)
                            >
                            > Thanks
                            >
                            > -D
                            >
                            >
                            > On Wed, Mar 9, 2011 at 11:15 AM, Marj Eldard <marje@...> wrote:
                            >
                            >
                            > >Thank you! I have been looking for this fix for weeks!
                            > >
                            > >--
                            > >Marj Eldard
                            > >SecurityMetrics
                            > >Technical Writer
                            > >marje@...
                            > >801.995.6504
                            > >www.securitymetrics.com
                            > >
                            > >
                            > >
                            > >
                            > >
                            > >
                            > >On Mar 9, 2011, at 4:51 AM, torusjkl wrote:
                            > >
                            > >
                            > >>Hi Dave
                            > >>
                            > >>I can't see the attached picture but I think I had the same problem.
                            > >>I solved it by hacking toc-attr.xsl.
                            > >>
                            > >>Find
                            > >><xsl:attribute-set name="__toc__topic__content">
                            > >>and look for the line
                            > >><xsl:attribute name="text-align">left</xsl:attribute>
                            > >>
                            > >>change it to
                            > >><xsl:attribute name="text-align">justify</xsl:attribute>
                            > >>
                            > >>And the page numbers will be aligned.
                            > >>
                            > >>Best,
                            > >>Gal
                            > >>
                            > >>--- In dita-users@yahoogroups.com, "dave_gibbons" <david.gibbons@> wrote:
                            > >>>
                            > >>>
                            > >>> Using the newest DITA OT, my PDF TOCs don't look right. The alignment on
                            > >>> the page numbers appears pretty much random, neither left aligned nor
                            > >>> right aligned.
                            > >>>
                            > >>> Here's an example:
                            > >>>
                            > >>> [Hosted by imgur.com]
                            > >>>
                            > >>> Am I missing a setting somewhere?
                            > >>>
                            > >>> -Dave
                            > >>>
                            > >>
                            > >>
                            > >
                            >


                          • Chung Ley
                            Thank you both so much. I will try your suggestions. ________________________________ From: ian balanza-davis To:
                            Message 13 of 15 , Mar 10, 2011
                            View Source
                            • 0 Attachment
                              Thank you both so much.  I will try your suggestions.



                              From: ian balanza-davis <ibalanza_davis@...>
                              To: dita-users@yahoogroups.com
                              Sent: Thu, March 10, 2011 3:39:03 AM
                              Subject: Re: [dita-users] Re: Uneven right edge on PDF TOC



                              It is not necessarily a bug, there are alternative attributes that can be used to control the block layout. Whether they are supported in all FO tools, I do not know, so something like this might work:

                              Set text-align-last="justify" rather than text-align="justify". That forces the justification on the last line only rather than every line in the block, and is the same as text-align for single line blocks.
                              Set an end-indent for the text in the block (say 100pt for exaggeration)
                              Set the same negative right margin for the last line (-100) using last-line-end-indent.

                              you should then get something like:
                              3.15 Title1...............................................................................15
                              3.16 Title2...............................................................................16
                              3.17 So very very very very very very very very very very
                                     long title ..........................................................................19

                              You may also want to have a look at widow/orphan and keep settings for the entries to ensure that you do not split multiple-line entries over a page break.


                              From: torusjkl <buki@...>
                              To: dita-users@yahoogroups.com
                              Sent: Thu, 10 March, 2011 9:49:01
                              Subject: [dita-users] Re: Uneven right edge on PDF TOC

                               



                              Hi Chung

                              I was able to reproduce this here as well.
                              Looks like a bug but I had not much time to look into this.

                              I found some workarounds that might work for you.

                              a) You could make the title shorter ;-)

                              b) You could use a new line for the page number.
                              Find
                              <xsl:attribute-set name="__toc__topic__content">
                              and look for
                              <xsl:attribute name="last-line-end-indent">-22pt</xsl:attribute>

                              and change it to something like
                              <xsl:attribute name="last-line-end-indent">-18pt</xsl:attribute>

                              c) You could make the TOC area wider.
                              Find
                              <xsl:attribute-set name="__toc__topic__content">
                              and look for
                              <xsl:attribute name="end-indent">22pt</xsl:attribute>
                              <xsl:attribute name="text-indent">-.2in</xsl:attribute>

                              and change it to something like
                              <xsl:attribute name="end-indent">0pt</xsl:attribute>
                              <xsl:attribute name="text-indent">-.8in</xsl:attribute>

                              Hope this helps.

                              Best,
                              Gal

                              --- In dita-users@yahoogroups.com, Chung Ley <chungley2000@...> wrote:
                              >
                              > Thanks for the tip... It helped me out too.
                              >
                              > However, I have a couple of titles that extend very close to the edge where the
                              > page number is... When that happens, the right edge will be misaligned again.
                              > Do you happen to know what I can do to fix this?
                              >
                              > Ex:
                              > 3.15
                              > Title1...............................................................................15
                              >
                              > 3.16
                              > Title2...............................................................................16
                              >
                              > 3.17 So very very very very very very very very very very long title.19
                              >
                              > Thanks...
                              >
                              > --Chung
                              >
                              >
                              >
                              >
                              >
                              > ________________________________
                              > From: Dan Tran <dantran@...>
                              > To: dita-users@yahoogroups.com
                              > Sent: Wed, March 9, 2011 11:35:03 AM
                              > Subject: Re: [dita-users] Re: Uneven right edge on PDF TOC
                              >
                              >
                              >
                              > me too :-)
                              >
                              > Thanks
                              >
                              > -D
                              >
                              >
                              > On Wed, Mar 9, 2011 at 11:15 AM, Marj Eldard <marje@...> wrote:
                              >
                              >
                              > >Thank you! I have been looking for this fix for weeks!
                              > >
                              > >--
                              > >Marj Eldard
                              > >SecurityMetrics
                              > >Technical Writer
                              > >marje@...
                              > >801.995.6504
                              > >www.securitymetrics.com
                              > >
                              > >
                              > >
                              > >
                              > >
                              > >
                              > >On Mar 9, 2011, at 4:51 AM, torusjkl wrote:
                              > >
                              > >
                              > >>Hi Dave
                              > >>
                              > >>I can't see the attached picture but I think I had the same problem.
                              > >>I solved it by hacking toc-attr.xsl.
                              > >>
                              > >>Find
                              > >><xsl:attribute-set name="__toc__topic__content">
                              > >>and look for the line
                              > >><xsl:attribute name="text-align">left</xsl:attribute>
                              > >>
                              > >>change it to
                              > >><xsl:attribute name="text-align">justify</xsl:attribute>
                              > >>
                              > >>And the page numbers will be aligned.
                              > >>
                              > >>Best,
                              > >>Gal
                              > >>
                              > >>--- In dita-users@yahoogroups.com, "dave_gibbons" <david.gibbons@> wrote:
                              > >>>
                              > >>>
                              > >>> Using the newest DITA OT, my PDF TOCs don't look right. The alignment on
                              > >>> the page numbers appears pretty much random, neither left aligned nor
                              > >>> right aligned.
                              > >>>
                              > >>> Here's an example:
                              > >>>
                              > >>> [Hosted by imgur.com]
                              > >>>
                              > >>> Am I missing a setting somewhere?
                              > >>>
                              > >>> -Dave
                              > >>>
                              > >>
                              > >>
                              > >
                              >




                            • Chung Ley
                              Hi, I am sorry, after I made the following changes: -80pt
                              Message 14 of 15 , Mar 10, 2011
                              View Source
                              • 0 Attachment
                                Hi,

                                I am sorry, after I made the following changes:
                                        <xsl:attribute name="last-line-end-indent">-80pt</xsl:attribute>
                                        <xsl:attribute name="end-indent">80pt</xsl:attribute>

                                The published document shows 2 different behaviors...  With one of the title, it didn't seem to effect the outcome; I may have to really exaggerate that one.

                                With the other, it became something like this:

                                Chapter 6:  Some Title.........................................1
                                   6.1  Section 1..............................................2
                                         6.1.1  sub-section1...................................3
                                         6.1.2LongTitleOverlappingWithEachOther
                                             ..................................................4
                                         6.1.3  sub-section3...................................5

                                The page numbers are all lined up....  However, the title text actually are missing all the space and overlapping each other....

                                I am sorry to continue asking these questions...

                                --Chung






                                From: ian balanza-davis <ibalanza_davis@...>
                                To: dita-users@yahoogroups.com
                                Sent: Thu, March 10, 2011 3:39:03 AM
                                Subject: Re: [dita-users] Re: Uneven right edge on PDF TOC



                                It is not necessarily a bug, there are alternative attributes that can be used to control the block layout. Whether they are supported in all FO tools, I do not know, so something like this might work:

                                Set text-align-last="justify" rather than text-align="justify". That forces the justification on the last line only rather than every line in the block, and is the same as text-align for single line blocks.
                                Set an end-indent for the text in the block (say 100pt for exaggeration)
                                Set the same negative right margin for the last line (-100) using last-line-end-indent.

                                you should then get something like:
                                3.15 Title1...............................................................................15
                                3.16 Title2...............................................................................16
                                3.17 So very very very very very very very very very very
                                       long title ..........................................................................19

                                You may also want to have a look at widow/orphan and keep settings for the entries to ensure that you do not split multiple-line entries over a page break.


                                From: torusjkl <buki@...>
                                To: dita-users@yahoogroups.com
                                Sent: Thu, 10 March, 2011 9:49:01
                                Subject: [dita-users] Re: Uneven right edge on PDF TOC

                                 



                                Hi Chung

                                I was able to reproduce this here as well.
                                Looks like a bug but I had not much time to look into this.

                                I found some workarounds that might work for you.

                                a) You could make the title shorter ;-)

                                b) You could use a new line for the page number.
                                Find
                                <xsl:attribute-set name="__toc__topic__content">
                                and look for
                                <xsl:attribute name="last-line-end-indent">-22pt</xsl:attribute>

                                and change it to something like
                                <xsl:attribute name="last-line-end-indent">-18pt</xsl:attribute>

                                c) You could make the TOC area wider.
                                Find
                                <xsl:attribute-set name="__toc__topic__content">
                                and look for
                                <xsl:attribute name="end-indent">22pt</xsl:attribute>
                                <xsl:attribute name="text-indent">-.2in</xsl:attribute>

                                and change it to something like
                                <xsl:attribute name="end-indent">0pt</xsl:attribute>
                                <xsl:attribute name="text-indent">-.8in</xsl:attribute>

                                Hope this helps.

                                Best,
                                Gal

                                --- In dita-users@yahoogroups.com, Chung Ley <chungley2000@...> wrote:
                                >
                                > Thanks for the tip... It helped me out too.
                                >
                                > However, I have a couple of titles that extend very close to the edge where the
                                > page number is... When that happens, the right edge will be misaligned again.
                                > Do you happen to know what I can do to fix this?
                                >
                                > Ex:
                                > 3.15
                                > Title1...............................................................................15
                                >
                                > 3.16
                                > Title2...............................................................................16
                                >
                                > 3.17 So very very very very very very very very very very long title.19
                                >
                                > Thanks...
                                >
                                > --Chung
                                >
                                >
                                >
                                >
                                >
                                > ________________________________
                                > From: Dan Tran <dantran@...>
                                > To: dita-users@yahoogroups.com
                                > Sent: Wed, March 9, 2011 11:35:03 AM
                                > Subject: Re: [dita-users] Re: Uneven right edge on PDF TOC
                                >
                                >
                                >
                                > me too :-)
                                >
                                > Thanks
                                >
                                > -D
                                >
                                >
                                > On Wed, Mar 9, 2011 at 11:15 AM, Marj Eldard <marje@...> wrote:
                                >
                                >
                                > >Thank you! I have been looking for this fix for weeks!
                                > >
                                > >--
                                > >Marj Eldard
                                > >SecurityMetrics
                                > >Technical Writer
                                > >marje@...
                                > >801.995.6504
                                > >www.securitymetrics.com
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >
                                > >On Mar 9, 2011, at 4:51 AM, torusjkl wrote:
                                > >
                                > >
                                > >>Hi Dave
                                > >>
                                > >>I can't see the attached picture but I think I had the same problem.
                                > >>I solved it by hacking toc-attr.xsl.
                                > >>
                                > >>Find
                                > >><xsl:attribute-set name="__toc__topic__content">
                                > >>and look for the line
                                > >><xsl:attribute name="text-align">left</xsl:attribute>
                                > >>
                                > >>change it to
                                > >><xsl:attribute name="text-align">justify</xsl:attribute>
                                > >>
                                > >>And the page numbers will be aligned.
                                > >>
                                > >>Best,
                                > >>Gal
                                > >>
                                > >>--- In dita-users@yahoogroups.com, "dave_gibbons" <david.gibbons@> wrote:
                                > >>>
                                > >>>
                                > >>> Using the newest DITA OT, my PDF TOCs don't look right. The alignment on
                                > >>> the page numbers appears pretty much random, neither left aligned nor
                                > >>> right aligned.
                                > >>>
                                > >>> Here's an example:
                                > >>>
                                > >>> [Hosted by imgur.com]
                                > >>>
                                > >>> Am I missing a setting somewhere?
                                > >>>
                                > >>> -Dave
                                > >>>
                                > >>
                                > >>
                                > >
                                >




                              • vladimir.poluch
                                ou yeah :) thx for solve this problem :D I search it 2 hours :D Regard, Vladis
                                Message 15 of 15 , Jul 13, 2011
                                View Source
                                • 0 Attachment
                                  ou yeah :) thx for solve this problem :D I search it 2 hours :D

                                  Regard,
                                  Vladis

                                  --- In dita-users@yahoogroups.com, "torusjkl" <buki@...> wrote:
                                  >
                                  > Hi Dave
                                  >
                                  > I can't see the attached picture but I think I had the same problem.
                                  > I solved it by hacking toc-attr.xsl.
                                  >
                                  > Find
                                  > <xsl:attribute-set name="__toc__topic__content">
                                  > and look for the line
                                  > <xsl:attribute name="text-align">left</xsl:attribute>
                                  >
                                  > change it to
                                  > <xsl:attribute name="text-align">justify</xsl:attribute>
                                  >
                                  > And the page numbers will be aligned.
                                  >
                                  > Best,
                                  > Gal
                                  >
                                  > --- In dita-users@yahoogroups.com, "dave_gibbons" <david.gibbons@> wrote:
                                  > >
                                  > >
                                  > > Using the newest DITA OT, my PDF TOCs don't look right. The alignment on
                                  > > the page numbers appears pretty much random, neither left aligned nor
                                  > > right aligned.
                                  > >
                                  > > Here's an example:
                                  > >
                                  > > [Hosted by imgur.com]
                                  > >
                                  > > Am I missing a setting somewhere?
                                  > >
                                  > > -Dave
                                  > >
                                  >
                                Your message has been successfully submitted and would be delivered to recipients shortly.