Skip navigation
Currently Being Moderated

Converting x-refs to text screws up numbers

Apr 18, 2012 1:40 PM

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.

 
Replies
  • Currently Being Moderated
    Apr 18, 2012 2:36 PM   in reply to Sandee Cohen

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 18, 2012 4:28 PM   in reply to Sandee Cohen

    Hi, Sandee!

     

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

     

    Steve

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 19, 2012 7:40 AM   in reply to Sandee Cohen

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 20, 2012 6:19 AM   in reply to Sandee Cohen

    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?

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 20, 2012 8:32 AM   in reply to Sandee Cohen

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 21, 2012 2:31 PM   in reply to Sandee Cohen

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 22, 2012 12:55 PM   in reply to Sandee Cohen

    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

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points