• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Cleaning up Empty cross-reference markers

New Here ,
Nov 26, 2024 Nov 26, 2024

Copy link to clipboard

Copied

I have an InDesign document that I am working with in CC 2014. It was originally converted from either Frame Maker (2007) or InDesign CS5 and seems to have some old cross-reference markers that are now estentially empty junk. The problem is that these don't show up in the cross-references or hyperlinks panel and so far I have now found a way to search for them - either through InDesign or with a script so I can delete them. They do read enough though to be able to mess up other scripts that I run that use the character count of the paragraph. Any ideas on how I can find and delete these without having to go one by one?

TOPICS
Bug , Import and export , Scripting

Views

103

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 26, 2024 Nov 26, 2024

Copy link to clipboard

Copied

Hi @KB_book dsn, can you please share an .indd document that has some of these empty cross reference markers?

 

Also, it might be good to know if there are also some valid cross-reference markers in the document (ie. that do appear in the cross-references panel).

- Mark

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 26, 2024 Nov 26, 2024

Copy link to clipboard

Copied

Hi Mark,  Thank you very much for your fast reply. I can upload a sample file in the morning but meanwhile I wanted to answer you with more data. I user several scripts that utilizes InDesign's hyperlink desinition feature to embed a page number link - It basically creates the same thing as a cross-reference but without the massive lags that sometimes follow and allows other information to be generated from the link such as bibligraphies, glossaries, etc. So I have valid hyperlink destinations in my file that show up in the hyperlink desintations options part of the cross-references panel but not in the cross-references panel itself. The empty hyperlinks desintations don't show up in any panels and so far I have not been able to find them with a script either. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 27, 2024 Nov 27, 2024

Copy link to clipboard

Copied

No worries, it will be good to see the sample document. Are you a scripter? Have a look at any of the "hyperlink" properties of Document, eg. Document.HyperlinkPageDestinations.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 27, 2024 Nov 27, 2024

Copy link to clipboard

Copied

@KB_book dsn

 

If you work on a PC you could use free version of my ID-Tasker tool to see all Hyperlinks, Cross-References, sources and destinations. 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 29, 2024 Nov 29, 2024

Copy link to clipboard

Copied

LATEST

To show the number of HyperLinks and HyperLinkSources:

 

var curDoc = app.activeDocument;

var countHyperlinkTextDestinations = curDoc.hyperlinkTextDestinations.length;
var countHyperlinkTextSources = curDoc.hyperlinkTextSources.length;


alert(„Report Hyperlinks“ + „\r“ + „\r“ +
            „TextHyperlinkDestinations: „ + countHyperlinkTextDestinations + „\r“ +
            „TextHyperlinkSources: „ + countHyperlinkTextSources  );

 

If that is what you want to remove then use this script to remove:

 

var curDoc = app.activeDocument;

var countHyperlinkTextDestinations = curDoc.hyperlinkTextDestinations.length;
var countHyperlinkTextSources = curDoc.hyperlinkTextSources.length;

curDoc.hyperlinkTextDestinations.everyItem().remove();
curDoc.hyperlinkTextSources.everyItem().remove();

alert(„RemoveHyperlinks“ + „\r“ + 
            „Removed „ + countHyperlinkTextDestinations + „ TextHyperlinkDestinations\r“ +
            „Removed „ + countHyperlinkTextSources + „ TextHyperlinkSources\r“  );
​

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines