13 Replies Latest reply on Jul 21, 2011 8:56 AM by sta-cy

    Issue with right aligning of Character Styles in my TOC

    sta-cy Level 1

      Hello all!

      I'm working on my very first book project and I have been reading soooo many threads on here for the past hour, but i either just don't get it, or i didn't find what i needed still, so i already apologize in case this very question has been answered before ...

       

      ok, so ... i am building my TOC and have set up the corresponding TOC styles to the paragraph styles used throughout the book.

       

      what i want is for the page number to appear before the entry. so for the page number i have set up it's own TOC page number character style.

       

      NOW

       

      the page number appears left aligned. I have checked the character styles palette and there i can't set a tab for the page number to appear right aligned ...

      how do i get this page number to be right aligned? and THEN, how do i specify the distance between the page number and the entry? there is "tab character"mentioned on the TOC dialogue box to specify the distance between page number and entry, but then do i have to go in manually every time something changes? that can't be it? i have seen in the paragraphy styles palette there is a tab section ... tried to input the tabs so the number would appear right aligned and the distance to the entry, but nothing happened, then the number is stuck right on the entry once the TOC is generated ...

       

      does this make any sense?

       

      will attach a screenshot to try to clarify the issue ...

       

      hope you can help me out.

       

       

      thanks a lot in advance!

      cheers

      sta-cy

       

      Screen shot 2011-07-18 at 11.38.24 PM.png

        • 1. Re: Issue with right aligning of Character Styles in my TOC
          Peter Spier Most Valuable Participant (Moderator)

          I've been playing with this for almost an hour, and as far as I can tell there's no way to adjust alignment of page numbers in the TOC, which leaves thinking outside the box.

           

          After testing a whole bunch of stuff that didn't work, I came up with the somewhat awkward, but not impossible solution of simply editing the TOC manually to insert the required number of figure spaces in each entry. This requires that the font you use for the numbers has Lining Figures, and that you specify that in the style, but short of a scripting solution (and I don't know if one is possible) that's the best I can offer. To set the distance from the number to the text, use a tab, and set the position as part of the style.

          • 2. Re: Issue with right aligning of Character Styles in my TOC
            Peter Spier Most Valuable Participant (Moderator)

            OK, even better, you can manually insert a single tab rather than figure spaces, which means you can use proportional figures, if you like, and you can use Find/Change to add it to the TOC story in one go. Set a right aligned tab at the beginning of the style applied to the entries, and then a second left aligned for the spacing between the number nad the text.

            1 person found this helpful
            • 3. Re: Issue with right aligning of Character Styles in my TOC
              sta-cy Level 1

              wow Peter! Thank you SO MUCH for helping me out with this ... I was also attempting to do this manually somehow, but i kept reading don't go into the TOC outside of the dialogue box, so i thought there MUST be a way to do this within all these style options etc.

               

              Anyhow, will see how to sort this now with the advice you gave!

              THANK YOU SO MUCH FOR YOUR TIME

              • 4. Re: Issue with right aligning of Character Styles in my TOC
                Peter Spier Most Valuable Participant (Moderator)

                My pleasure. This one was a lot of fun. You could also use a center aligned tab instead of the right-aligned for a slightly different appearance. Might look good with proportional figures.

                1 person found this helpful
                • 5. Re: Issue with right aligning of Character Styles in my TOC
                  sta-cy Level 1

                  haha! you're great! I'm happy YOU had fun! It was robbing my sleep! Probably none of the clients would have noticed, but I would have and it would have bugged the hell out of me ...

                   

                  so wow, i have learned so much more than expected while trying to figure out this aligning business ...

                   

                  even thought he first tab is still not doing anything to the page number at all .. SO ... i did decide to cheat and i inserted a figure space ... will have to insert it if the pages change much every time and i have to update my TOC, I guess, but at least the numbers and spaces in between page number and entry look neat.

                   

                  Shame we still have to use such tricks in CS5 ... well but at least i can sleep calmly tonight.

                   

                  Next BIG nightmare will be the index of over 850 items for the very same book .. so you might read from me again soon.

                   

                  Thanks so much, Peter! You're the best!

                   

                  Screen shot 2011-07-20 at 12.51.59 AM.png

                  • 6. Re: Issue with right aligning of Character Styles in my TOC
                    Peter Spier Most Valuable Participant (Moderator)

                    The first tab doesn't do anything until you add it to the TOC listings.

                     

                    Once the TOC has been generated, run the folowing GREP Find/Change:

                     

                    Find ^\d

                     

                    Change to \t$0

                     

                    limit the scope to the TOC story.

                     

                    Here's what that does: the ^\d says find any digit at the beginning of a paragraph, so lines without numbers will be ignored, but any line that starts with any number will be affected. \t$0 means replace what was found with a tab and the found text, in essence adding a tab in front of the number.

                     

                    If you update the TOC, you have to run this again.

                    • 7. Re: Issue with right aligning of Character Styles in my TOC
                      Joel Cherney Adobe Community Professional & MVP

                      If you update the TOC, you have to run this again.

                       

                       

                      I've been saving this comment for just this moment...

                       

                      I work in a translation  firm, and when a client makes an impossible TOC that can only be updated  manually, I shed a tear - because that means I'll be updating 20 TOCs  by hand, one for each language. When I get a document with a well-designed TOC that can be  automatically updated, I smile - because I know that the designer is  talented, not some pretty-pictures "designer" with no comprehension of  how TOCs work.

                       

                      However, sometimes you need a fancy TOC  that can't be purely automated. Once, I recieved a long doc for  translation into 13 languages, and it had a fancy TOC that could be  mostly auto-generated, but needed some post-generation tab  insertions to make everything line up nicely, just like what Peter has advised you to do. Often, I can  figure this stuff out, but this one designer caused me to do a literal  dance of joy in my office - because the designer had made a fancy TOC  that required post-TOC-generation tab insertion, and the designer had  left instructions in the pasteboard documenting exactly how it worked  and exactly how to update it correctly.

                      • 8. Re: Issue with right aligning of Character Styles in my TOC
                        sta-cy Level 1

                        haha ... nice joel.

                        well .. i'm sure one day ... very long ago ... you also did your very first TOC without any experience on the subject and had initial difficulties ... like me today.

                         

                        so here i am doing my very first TOC - or even book project for that matter -  and obviously it's not easy - so i really appreciate that i can find help here by people like Peter who will take the time to help out the 'pretty-pictures "designer" with no comprehension of how TOCs work.'

                         

                        i guess one will only know how to work around problems - once one has gotten stuck ...

                         

                        sorry to have bugged you.

                         

                         

                        • 9. Re: Issue with right aligning of Character Styles in my TOC
                          Migintosh Level 4

                          Joel Cherney wrote:

                           

                          and the designer had  left instructions in the pasteboard documenting exactly how it worked  and exactly how to update it correctly.

                          It's always nice to tell the next person who will work on the book what unusual things you had to do in case they need to recreate it. It's especially nice when that person is you—a year and a half later when the book comes up for reprint and requires tweaking—and you don't remember the back-flips you did to make the book work in the first place. I sometimes even put non-printing visual cues on the page (in addition to the instructions on the pasteboard) if I need to be reminded of something specific.

                          • 10. Re: Issue with right aligning of Character Styles in my TOC
                            Peter Spier Most Valuable Participant (Moderator)

                            sta-cy wrote:

                             

                            sorry to have bugged you.

                             

                             

                            Seriously, if we didn't enjoy this stuff we wouln't be here. It's not like we even get T-shirts. :-P

                             

                            An awful lot of what I know and am able to pass on comes from having spent waaaaay to much time here reading about odd problems and trying to figure out ways to solve them. I'd never seen a requst like yours until the other day, but then up pops Joel with a similar story, and what do you know, this may not be such a strange thing to want at all. Hopefully your question, and the work we put into trying to find an answer, has not only helped you, but some other users who come along next week or next year.

                             

                            Everybody starts someplace and at some point in time. There's no shame in being a beginner, and less in asking for help when you need it, especially after you put in the effort you did on your own to try to find a solution. It's also true that some folks are more design oriented and others more process oriented, and that's just the way it is. This forum has many, many, followers who are expert in different areas of InDesign (even the engineers who write the program are not experts in all the various parts) and are here to share what they know as volunteers. You are always welcome here, especially when the question is as intersting as this one.

                            • 11. Re: Issue with right aligning of Character Styles in my TOC
                              Joel Cherney Adobe Community Professional & MVP
                              so here i am doing my very first TOC - or even book project for that matter

                               

                              My apologies if I gave offense - you didn't come off as a TOC first-timer at all, and now I really regret the "pretty-pictures" comment. You had me completely fooled. You even mentioned that this was your first book project in your first post, and I didn't notice it. I feel like a heel, now.

                              • 12. Re: Issue with right aligning of Character Styles in my TOC
                                sta-cy Level 1

                                Haha, Joel - don't worry at all - seriously ... no need to feel like a heel

                                 

                                But yeah, real newbie to all of these amazing features in InDesign, i read a lot on TOCs to be prepared for the scary 'first time', watched tutorials and all ... but still there are loads of things which i didnt get prepared for ... like the aligning of page numbers which are to appear BEFORE the entry - won't do that again too soon, but the layout had been approved, so .. have to make it work ... hehe ...

                                 

                                so no hard feelings, all cool! and yeah, your comment is noted about leaving notes as to how i did the tweaking on the pasteboard! Good one! Cheers!... might just forget until we reprint this monster  ...

                                 

                                take care

                                • 13. Re: Issue with right aligning of Character Styles in my TOC
                                  sta-cy Level 1

                                  Thanks, Peter! You're great!