DTP


 
Lively discussions on the graphic arts and publishing — in print or on the web


Go Back   Desktop Publishing Forum > General Discussions > Print Production & Automation

Reply
 
Thread Tools Display Modes
Old 02-18-2005, 07:54 AM   #1
Dave Saunders
Member
 
Dave Saunders's Avatar
 
Join Date: Jan 2005
Posts: 103
Default Cross References for InDesign CS

I'm working on a script to do cross-references within any InDesign CS document. The script is a JavaScript and will work on either platform. I have it working sufficient to my own needs for the project I'm working on, but I'm thinking that this script has potentially broad appeal and applicability, so I'm seeking guidance on some functionality issues that might enhance the script for others to use. Here's a brief statement of what it does:

Cross references have two forms: Raw and Processed.

A Raw cross reference is text only within any story in the active document in a character style named Xref. The text should be the name of a linked graphic (sans extension). For example, in the project I'm working on my client provided me with a raw cross reference that looked like this:

(shown on page fig14-3w)

where " fig14-3w" was in the style Xref.

The client actually made a mistake here. The space should not have been in the style but my script is smart enough to notice that and change the space back to no character style.

A Processed cross reference takes the form of a text frame that replaces the Xref text, sitting inline in the paragraph on the baseline. It contains the page number in the same text style as the paragraph and has the character style Xnum applied to it -- up to you whether or not the Xnum style does anything to the text. [By the way, the script will create that style if it doesn't already exist, in which case it will do nothing to the text. So, the above Raw cross reference becomes:

(show on page 391)

where 391 is actually a text frame. As such, you can select it and when you do, in the Script Label palette you'll see:

Xref = fig14-3w

This allows you to correct mistakes (e.g., the client actually typed Fig14-3w but the case-sensitive name is fig14-3w) or redirect an existing cross reference to some other figure.

Every time the script runs, it converts any Raw cross references to the Processed form and then updates all the Processed ones, so, if you've changed the page numbers or reorganized your document, the reference is corrected.

If a referenced link can't be found, the script puts ??? as the page number in the Xnum style, so you can quickly find and repair any such erroneous references by editing the Script Label. It also alerts you that you need to do this.

So, for those of you who've had the patience to read this far, does this sound useful to other people?

And, more specifically, what should I do about Section Prefixes? Strip them out? Leave them in? Offer a Preferences feature?

I welcome any feedback.

Dave
Dave Saunders is offline   Reply With Quote
Old 02-18-2005, 11:19 AM   #2
terrie
Sysop
 
Join Date: Oct 2004
Posts: 10,478
Default

This is on some level a bit beyond me and my limited experience with ID and so my comment may not be relevant...

When you say "where 391 is actually the text frame..."

Does this imply that there is a one to one correspondence between text frame and page? Can't you have more than one text frame on a page and if so, does that muck things up?

Other than that, it seems like it would be a very useful tool...

Terrie
terrie is offline   Reply With Quote
Old 02-18-2005, 11:30 AM   #3
annc
Sysop
 
annc's Avatar
 
Join Date: Oct 2004
Location: Subtropical Queensland, Australia, between the mountains and the Coral Sea
Posts: 4,592
Default

Is it designed to be run immediately before packaging and sending to the printer, so that all references are correct without the need for time-consuming and error-prone human checking?

I can see it being very useful for academic work and software manuals (both vendor and third party) or even professional journals; anywhere where the various articles/chapters are created separately and joined up, or peer review requires changes that may affect pagination.

And if the situation you found yourself in justified the time spent creating and testing it, then I imagine others will have found themselves in similar situatiions, without your skill in developing a solution.

   
__________________
annc is offline   Reply With Quote
Old 02-18-2005, 12:22 PM   #4
Dave Saunders
Member
 
Dave Saunders's Avatar
 
Join Date: Jan 2005
Posts: 103
Default

I guess I didn't express that as well as I might have. Doing this kind of thing with a script requires that the target be easily identifiable -- that's why I limit it to linked graphics (of course, you could play the "invisible GIF" game and put targets anywhere you like).

More important, the reference needs to not only be easy to find but needs to carry withit the identity of what it is pointing at. So, I create a text frame to put the reference in. It's an inline frame, so it will move with the text around it if you edit or reorganize your document. And I use the frame's label to not only tell my script what it's supposed to be pointing at but also the user (via the script label palette).

You can have as many as you like on a page and you can point at as many items as you like. On my iMac/20 (G4 - 1.25Mhz) it takes about .35 seconds per reference in a document with 308 links to 108 external graphics over 40 pages.

One thing I have realized that I've given no thought to at all is what to do if editing/reorganizing a document results in the target being on the same page as the reference. Perhaps I could use "above" or "below" based on the geometric bounds of the reference and the target, but that would make it quite challenging for the user to come up with a wording that works for either of these or a page number.

I'll have to chew on that some more.

Dave
Dave Saunders is offline   Reply With Quote
Old 02-18-2005, 12:29 PM   #5
Dave Saunders
Member
 
Dave Saunders's Avatar
 
Join Date: Jan 2005
Posts: 103
Default

It runs quite quickly (I improved its speed by a factor of 100+ between yesterday and today). It processes about three references a second.

I see myself running it every time I send a PDF whether as a proof or for printing.

Dave
Dave Saunders is offline   Reply With Quote
Old 02-21-2005, 02:50 PM   #6
Dave Saunders
Member
 
Dave Saunders's Avatar
 
Join Date: Jan 2005
Posts: 103
Default

If anyone is interested in helping me alpha-test this, I have put together a package with a 2-page user guide which I'll e-mail (it's a 56K zip file). The fact that I found (and fixed) three bugs while writing the user guide makes me cautious about distributing it too far at this stage.

Send an e-mail to XrefAlphaTest@pdsassoc.com and I'll get back to you with the package. Reminder: this is a JavaScript for InDesign CS. It does not work with InDesign 2.x or earlier.

Dave
Dave Saunders is offline   Reply With Quote
Old 07-04-2006, 08:11 AM   #7
Dave Saunders
Member
 
Dave Saunders's Avatar
 
Join Date: Jan 2005
Posts: 103
Default

A long overdue update (people keep e-mailing me when they find this topic):

I abandoned further development of this effort because it turned out that in the whole 864-page book, I used this script on one page only. The one that caused me to think that a script would be a good idea!

However, there is good news. I have since done a similarly-sized catalog that had well over 2,000 cross-references in it. I used a script by Teus de Jong for this. You can find it at:

http://www.teusdejong.nl/

under InDesign utilities. Or directly download the package (which includes a tutorial) from:

http://www.teusdejong.nl/indesign/crossrefs.zip

Dave
Dave Saunders is offline   Reply With Quote
Old 07-04-2006, 08:26 AM   #8
ktinkel
Founding Sysop
 
ktinkel's Avatar
 
Join Date: Oct 2004
Location: In Connecticut, on the Housatonic River near its mouth at Long Island Sound.
Posts: 11,187
Default

Quote:
Originally Posted by Dave Saunders
A long overdue update
Thanks for the update. And hi — hope you all are well.

   
__________________
[SIZE=2][COLOR=LemonChiffon]::[/COLOR][/SIZE]
[SIGPIC][/SIGPIC]
ktinkel is offline   Reply With Quote
Old 07-04-2006, 08:37 AM   #9
Dave Saunders
Member
 
Dave Saunders's Avatar
 
Join Date: Jan 2005
Posts: 103
Default

Hi KT,

Well, but jet-lagged -- got in from England late last night after two weeks, the center-point of which was our niece's wedding, but this did mean I was able to fit in a day at the InDesign Conference last week.

Dave
Dave Saunders is offline   Reply With Quote
Old 07-04-2006, 10:31 AM   #10
ktinkel
Founding Sysop
 
ktinkel's Avatar
 
Join Date: Oct 2004
Location: In Connecticut, on the Housatonic River near its mouth at Long Island Sound.
Posts: 11,187
Default

Quote:
Originally Posted by Dave Saunders
Well, but jet-lagged -- got in from England late last night after two weeks, the center-point of which was our niece's wedding, but this did mean I was able to fit in a day at the InDesign Conference last week.
Great. Nice to see your friendly eye here.

   
__________________
[SIZE=2][COLOR=LemonChiffon]::[/COLOR][/SIZE]
[SIGPIC][/SIGPIC]
ktinkel is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Font name cross references Norbert Fonts & Typography 5 12-14-2005 08:15 PM
Page # references? Molly/CA Print Production & Automation 19 09-28-2005 05:03 PM


All times are GMT -8. The time now is 08:05 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2023, vBulletin Solutions, Inc.
Contents copyright 2004–2019 Desktop Publishing Forum and its members.