    13 Replies Latest reply: Apr 23, 2012 3:26 PM by sandeecohen RSS

    Converting x-refs to text screws up numbers

    sandeecohen ACP/MVPs

      Has anyone seen this?

       

      I have many x-refs in my documents that are part of a book. I want to delete the x-refs and "flatten" them to the plain text and numbers they refer to.

       

      When I delete the x-ref in the panel, I get the warning that the x-refs will be converted to text. But the number part of the x-ref is not converted correctly. An x-ref of "page 13" is converted to "page 11" or "Chapter 18" is converted to "Chapter 65." (And there is no chapter 65 and there never has been.

       

      I'm manually going in, typing in the correct number and then "flattening" the x-ref.

       

      But I wonder if this is a bug or something wrong with my documents.

        • 1. Re: Converting x-refs to text screws up numbers
          Peter Spier ACP/MVPs

          Hi Sandee. :>

           

          Any possibility the numbers correlate to the sequence in which the x-refs were created? I hardly use them myself, and don't think this should happen, but I'm curious if there is a rhyme to the madness.

          • 2. Re: Converting x-refs to text screws up numbers
            Steve Werner ACP/MVPs

            Hi, Sandee!

             

            You might try to export the InDesign file to IDML and reopen it to eliminate any possible corruption.

             

            Steve

            • 3. Re: Converting x-refs to text screws up numbers
              sandeecohen ACP/MVPs

              I don't think it's the sequence as I never got to a 65 as in "Chapter 65"

               

              At first I thought the page numbers were referring to the original number that was in the x-ref, but that's not the case either.

              • 4. Re: Converting x-refs to text screws up numbers
                sandeecohen ACP/MVPs

                Thanks for the suggestion. Didn't help.

                 

                Tis a puzzlement. But it's got me so spooked that I have to take out all the dynamic cross-refs in the book!

                • 5. Re: Converting x-refs to text screws up numbers
                  peter at knowhowpro Community Member

                  Sandee Cohen wrote:

                   

                  Thanks for the suggestion. Didn't help.

                   

                  Tis a puzzlement. But it's got me so spooked that I have to take out all the dynamic cross-refs in the book!

                  Stop asking things I don't know but am incurably curious about.

                   

                  I just had to try it myself.

                   

                  I created a short document with one x-ref source on each page, and x-ref-ed to each one, from the same page, so that all the refs would be in one spot to observe, on page 7, in my example. Then I deleted x-refs from the panel and converted them to text. The page number changed to page 7, no matter the source's page.

                   

                  * Converting x-refs across pages to text displays the page number of the x-ref.

                   

                  * Converting an x-ref to a source on the same page seems to preserve the correct page number, but it's coincidence.

                   

                  BUG??? If you think so, it's yours to report.

                   

                  You might look into DTP Tools' Cross-References Pro. It can batch convert InDesign x-refs to its own and IIRC, it's reversible. I've not got it handy at the moment, but I believe that it can also convert x-refs to text correctly. Worth a try with the free trial at dtptools.com

                   

                  HTH

                   

                   

                  Regards,

                   

                   

                  Peter

                  _______________________

                  Peter Gold

                  KnowHow ProServices

                  • 6. Re: Converting x-refs to text screws up numbers
                    sandeecohen ACP/MVPs

                    Peter,

                    Thanks so very much for testing this out. I didn't know if there was something wrong with my version of the software or a corrupt document.

                     

                    I'm loathe to rely on third-party plug-ins because I pass my files off to my publisher for additional tweaking.

                     

                    As for now I'm halfway through converting the x-refs to static text.

                     

                    But I do consider it a bug and have already reported it.

                     

                    Thanks,

                     

                    Sandee

                    • 7. Re: Converting x-refs to text screws up numbers
                      [Jongware] MVP

                      Sandee,

                       

                      According to the Object Model, the 'contents' of a reference that looks like this

                       

                      crossref.PNG

                       

                      is a simple string "page X", where "X" is the code for the current page number. Quite possibly, this is just a placeholder for another function that looks up the destination type (page number or something else), and it gets filled in when required. But other than, say, a Text Variable, when you convert it to text, it does not do the look up thing prior to being converted, and so you get a Current Page Number code.

                       

                      And just to be a nuisance, this page number code is only then translated into plain text -- the wrong one!

                       

                      If you are not done yet: it's at least theoretically possible to use a script to go over all of your xrefs, look up the destination page number (which is where Adobe got it wrong), and then replace it with the correct number.

                       

                      The only thing that keeps me from doing that rite now is your

                       

                      .. An x-ref of "page 13" is converted to "page 11" or "Chapter 18" is converted to "Chapter 65."

                       

                      -- how does this Chapter reference work? Are you using both references to plain pages and to numbered paragraphs?

                      • 8. Re: Converting x-refs to text screws up numbers
                        peter at knowhowpro Community Member

                        Sandee Cohen wrote:

                         

                        Peter,

                        Thanks so very much for testing this out. I didn't know if there was something wrong with my version of the software or a corrupt document.

                         

                        I'm loathe to rely on third-party plug-ins because I pass my files off to my publisher for additional tweaking.

                         

                        As for now I'm halfway through converting the x-refs to static text.

                         

                        But I do consider it a bug and have already reported it.

                         

                        Thanks,

                         

                        Sandee

                        You're welcome, Sandee.

                         

                        I don't think it would matter what tool you use after the page refs are converted to text.

                         

                        Yes, you're correct that your publisher would need the third-party tool to update live cross-references. You could remove the plug-in from your installation after converting the x-refs to text, so the publisher would not see a missing plug-in message. DTP Tools has free x-ref "reader" plug-in for users without the x-ref tool itself. It permits using the files without error messages, but cannot create new x-refs. I can't remember if it permits existing x-refs to update when content reflows.

                         

                        I can't remember if the plug-in allows round-tripping conversion of ID x-refs to DTP Tools' x-refs and back to ID's, [EDIT] if you want the publisher to have live ID x-refs.[/EDIT]

                         

                         

                        HTH

                         

                         

                        Regards,

                         

                         

                        Peter

                        _______________________

                        Peter Gold

                        KnowHow ProServices

                        • 9. Re: Converting x-refs to text screws up numbers
                          sandeecohen ACP/MVPs

                          I've created my own x-ref format. I've used that little callout menu to pick up the "Chapter Number" for the document. Then Chapter Number comes from the Numbering and Section Options.

                           

                          Chapter Number and other refs.jpg

                          • 10. Re: Converting x-refs to text screws up numbers
                            [Jongware] MVP

                            Scratch the 'theoretically' -- I wrote a script for Sandee that goes over the x-refs and attempts to recreate proper strings from them.

                             

                            "Attempts", because each of the items in the list you can see in Sandee's screenshot needs a piece of code on its own. On top of that, for things like "Chapter Number" I need to retrieve the chapter number (which is easy) and then check whether it should be written out in Arabic numerals, or Roman (uppercase or lowercase), or possibly as something else ... So I did not exhaustively examine and then handle each possibly configuration.

                             

                            I'll await Sandee's comments on how it is doing before declaring it "safe" for the General Public.

                            • 11. Re: Converting x-refs to text screws up numbers
                              Harbs. MVP

                              My opinion has been for quite some time that Books and Cross Refs don't mix.

                               

                              If you need cross refs make the whole Book a single document.

                               

                              I've seen way too much trouble with cross doc cross refs...

                               

                              Harbs

                              • 12. Re: Converting x-refs to text screws up numbers
                                sandeecohen ACP/MVPs

                                Harbs,

                                 

                                It was for EXACTLY this reason that I decided to "flatten" the x-refs. I realized that there were too many cooks in the broth to safely use electronic x-refs. I had already dealt with a chapter full of missing x-refs and realized that I couldn't control what would happen to the chapters down the road.

                                 

                                But the workflow for tossing the x-refs and then letting ID convert them to hard text seemed such an elegant, useful solution. Until I discovered this ooops from the engineers. (I can't believe they wanted the feature to work this way.)

                                 

                                I will examine Jongware's script. It may be what I need.

                                • 13. Re: Converting x-refs to text screws up numbers
                                  sandeecohen ACP/MVPs

                                  Had a setback on another project, so I won't be able to test the script out for a couple of days.

                                   

                                  But I really appreciate your help Jongware.
https://forums.adobe.com/message/4353050?tstart=0
forums.adobe.com
crawl=CC-MAIN-2015-32
140664
application/http; msgtype=response
sha1:WQSMEPAGEDLI22JMNZLTPAFNCX6ZVZZP
<urn:uuid:17614446-ebb2-4919-8994-ca02c02221e5>
2015-08-01T07:53:39Z
204.93.72.144
sha1:ZYS732UVGJFPBHLW6CXGFIQ4767TQ522
<urn:uuid:86c70ade-042e-4d2a-9a93-d99e8e22f638>
https://forums.adobe.com/message/4353050?tstart=0
length
response
<urn:uuid:0cfdefaf-dcc2-4167-b1a5-3d1743ab5059>
robots: classic
hostname: ip-10-236-191-2.ec2.internal
software: Nutch 1.6 (CC)/CC WarcExport 1.0
isPartOf: CC-MAIN-2015-32
operator: CommonCrawl Admin
description: Wide crawl of the web for August 2015
publisher: CommonCrawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf