7 Replies Latest reply: Oct 13, 2010 11:27 AM by peter at knowhowpro RSS

    applying lots of hyperlinks--need advice

    E Diane King Community Member

      I'm reformatting a book into an ebook that has lots of articles with indexes and contents pages that refer to the articles by number (formatted by chapter #:article #. I can very easily assign hyperlink destinations to all the article numbers by name (1:1, 1:3, 2:13, 4:16, etc.), but so far I can't seem to find an easy way to apply the cross reference source to every instance that the number is repeated throughout the book. I'm sure there is a better way to do this, possibly using GREP (which I've never been able to figure out), but right now the copy/paste for the number with the copy contents containing the cross reference is almost no better than creating a crossref for each instance manually. I keep running into the issue that a find for "1:1" also finds all instances of 1:11-1:19.  Some of the chapters have as few as 3 articles, but some have 30 or 40 articles and this will very quickly become time-prohibitive to properly link everything.

       

      I could really use some advice if anyone knows and easier way to do this.

        • 1. Re: applying lots of hyperlinks--need advice
          Harbs. CommunityMVP

          I'm not 100% sure what you are trying to do.

           

          Does this help?

          http://in-tools.com/wordpress/indesign/scripts/quick-reference-script

           

          Harbs

          • 2. Re: applying lots of hyperlinks--need advice
            E Diane King Community Member

            I think that is the opposite of what I need.  I have single destination with lots of sources. Let's see if I can explain this better.

             

            Chapter 1 has thee articles, each starting with a title line that contains a number, respectively: 1:1, 1:2, and 1:3.  At the beginning of each chapter and in several lengthy indexes at the back of the book, there are tables that contain various concepts that then reference the articles by number (Concept: blah blah blah, article references: 1:1, 2:3, 3:15, 3:25).  There are hundreds of these article number references in this table setting.  I can easily apply hyperlink destinations to all the actual articles but going through all those tables and turning each of those numbers into a cross reference referring to the respective hyperlink destination is going to be a huge task.  I'm looking for an easier way than selecting each number and making it a cross reference, like a find and change that finds each instance of 1:1 and replaces it with a cross reference sourcing the article 1:1 (and not selecting 1:10, 1:11, 1:12, etc.).

             

            I'm in CS5, so I have the built in cross reference ability, and I have formatted the Text Anchor Name set up so that the article number can be directly replaced with the Text Anchor Name for that article (I'm making the text anchor name the article number when I create the destinations).

            • 3. Re: applying lots of hyperlinks--need advice
              peter at knowhowpro Community Member

              E Diane King wrote:

               

              I think that is the opposite of what I need.  I have single destination with lots of sources. Let's see if I can explain this better.

               

              Chapter 1 has thee articles, each starting with a title line that contains a number, respectively: 1:1, 1:2, and 1:3.  At the beginning of each chapter and in several lengthy indexes at the back of the book, there are tables that contain various concepts that then reference the articles by number (Concept: blah blah blah, article references: 1:1, 2:3, 3:15, 3:25).  There are hundreds of these article number references in this table setting.  I can easily apply hyperlink destinations to all the actual articles but going through all those tables and turning each of those numbers into a cross reference referring to the respective hyperlink destination is going to be a huge task.  I'm looking for an easier way than selecting each number and making it a cross reference, like a find and change that finds each instance of 1:1 and replaces it with a cross reference sourcing the article 1:1 (and not selecting 1:10, 1:11, 1:12, etc.).

               

              I'm in CS5, so I have the built in cross reference ability, and I have formatted the Text Anchor Name set up so that the article number can be directly replaced with the Text Anchor Name for that article (I'm making the text anchor name the article number when I create the destinations).

               

              Hi, Diane:

               

              You can mark each article with a unique text anchor.

               

              If the article titles are auto-numbered, you can cross-reference to the article text anchors with a format that captures the auto-number only, or number and page.

               

              You can copy a cross-reference and paste it repeatedly. For example, copy a cross-reference that points to article 1:1 and paste it wherever needed. To make sure you select the complete reference, you can use the Go To Destination arrow when the cross-reference is selected in the panel. You can use Find to locate the 1:1 instances and Change to (click the @ button) > Other > Clipboard Contents, Formatted. Do a few tests, then Change All when you're confident.

               

              Repeat for each article.

               

              It's a good idea to make a safety copy before doing mass replacement operations like this.


              HTH

               

              Regards,

               

              Peter

              _______________________

              Peter Gold

              KnowHow ProServices

              • 4. Re: applying lots of hyperlinks--need advice
                E Diane King Community Member

                You can copy a cross-reference and paste it repeatedly. For example, copy a cross-reference that points to article 1:1 and paste it wherever needed. To make sure you select the complete reference, you can use the Go To Destination arrow when the cross-reference is selected in the panel. You can use Find to locate the 1:1 instances and Change to (click the @ button) > Other > Clipboard Contents, Formatted. Do a few tests, then Change All when you're confident.

                 

                Repeat for each article.

                 

                 

                 

                That's what I was doing, but it's creating headaches because the 1:1 find/change also finds all the 1:1s that are part of 1:11, 1:12, 1:13, etc. and this is repeatedly a problem in almost every chapter.  I think there might be a GREP solution to that, but I've never been able to figure out GREP, which is why I posted. If you look at my original post, I was complaining that the find/change was so bulky that it is actually taking as much time as doing it manually, so it really isn't helping.

                 

                Diane

                • 5. Re: applying lots of hyperlinks--need advice
                  peter at knowhowpro Community Member

                  E Diane King wrote:

                   

                  You can copy a cross-reference and paste it repeatedly. For example, copy a cross-reference that points to article 1:1 and paste it wherever needed. To make sure you select the complete reference, you can use the Go To Destination arrow when the cross-reference is selected in the panel. You can use Find to locate the 1:1 instances and Change to (click the @ button) > Other > Clipboard Contents, Formatted. Do a few tests, then Change All when you're confident.

                   

                  Repeat for each article.

                   

                   

                   

                  That's what I was doing, but it's creating headaches because the 1:1 find/change also finds all the 1:1s that are part of 1:11, 1:12, 1:13, etc. and this is repeatedly a problem in almost every chapter.  I think there might be a GREP solution to that, but I've never been able to figure out GREP, which is why I posted. If you look at my original post, I was complaining that the find/change was so bulky that it is actually taking as much time as doing it manually, so it really isn't helping.

                   

                  Diane

                  I'm not much of a GREPper, but perhaps if you start a new thread on what you need to do with your GREP query, you'll get better responses.

                   

                  There's a sample FindChangeByList script delivered with InDesign that could probably cover possibilities like search for the number followed by a comma, or a dash, or as whole word, in one operation.

                   

                   

                  HTH

                   

                  Regards,

                   

                  Peter

                  _______________________

                  Peter Gold

                  KnowHow ProServices

                  • 6. Re: applying lots of hyperlinks--need advice
                    E Diane King Community Member

                    I figured it out. It's still time-consuming, but will be faster than doing each one manually.

                     

                    The search is  1:1(?!(\d))

                     

                    I have to replace the first expression with each article number to do the search respective to the contents of the clipboard. I've opened all the documents and am doing an "all documents" search so I will only have to do one search for each article.

                    • 7. Re: applying lots of hyperlinks--need advice
                      peter at knowhowpro Community Member

                      E Diane King wrote:

                       

                      I figured it out. It's still time-consuming, but will be faster than doing each one manually.

                       

                      The search is  1:1(?!(\d))

                       

                      I have to replace the first expression with each article number to do the search respective to the contents of the clipboard. I've opened all the documents and am doing an "all documents" search so I will only have to do one search for each article.

                      Great! Now we both know more GREP than a short while ago.

                       

                      Regards,

                       

                      Peter

                      _______________________

                      Peter Gold

                      KnowHow ProServices