Skip navigation
ddsbleton 30 posts
Oct 26, 2010
Currently Being Moderated

Converting hyperlinks to cross-references (and/or vice versa)

Aug 7, 2012 10:50 AM

Tags: #cross #indesign #framemaker #hyperlink #reference

Hi folks,

 

I posted about this once before in the FrameMaker forum, and am now wondering if it's possible in InDesign.

 

What we need is two types of crossreference formats - one for print, one for PDF/the web/any other hyperlinkable medium.

 

We would like the crossrefs to appear as follows:

 

Print:

[some arbitrary block of text] (see page xx)

 

PDF

[some arbitrary block of text]

 

As with FrameMaker, InDesign's crossreferences always GENERATE text based on the building blocks, whereas FM's hyperlinks allow an arbitrary chunk of selected text to serve as the "active" text.  The hyperlink behavior is what we want, in both cases.  We're not interested in pulling the name of the target paragraph, or the page number, or anything else - we just want the text we typed to serve as the link, no matter the format.

 

The only solution we've been able to figure out is to actually create both a hyperlink AND a crossreference, and then conditionalize the crossreference (show in print, hide in PDF.)  But this feels unnecesarily complicated.

 

Or, is there any way to create all of the links as one type (either hyperlink or crossreference) and then use some magic to immediately convert them to to the other type (when rendering the other type of document.)

 

I'm surprised this doesn't "just work."  Producing links of this type for two formats seems like something lots and lots of people would need.

 

Thanks in advance.

 
Replies
  • Currently Being Moderated
    Aug 7, 2012 10:52 AM   in reply to ddsbleton

    I've never heard of that feature in InDesign.

     

    Like many things in InDesign, it's possible it could be scripted. You might ask in the InDesign Scripting forum.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 8, 2012 9:18 AM   in reply to ddsbleton

    As in FrameMaker, InDesign's cross-references extract a paragraph's full text, with or without autonumbering and/or page number. It's not clear if your arbitrary text is the paragraph text, or something not in the paragraph at all.

     

    I don't have FM available to look at what hyperlink options other than cross-references may be in recent releases, and what options might be available.

     

    * To retrieve paragraph text with or without page numbers, create a cross-reference format with the building blocks you want and choose it when you define the cross-reference. As in FrameMaker, to create two different behaviors, you'd need two different cross-references to the same source paragraph, each using an appropriate cross-reference format, conditionalizing both x-refs, and setting the conditions before exporting to PDF, where the links would be active.

     

    * To retrieve text that's not in the paragraph, but which links to the paragraph location, create text anchors at the source paragraph location with the "New Hyperlink Destination" option in the Hyperlinks panel's fly-out menu. ID's cross-references can retrieve the text anchor's name (which doesn't appear in the document's text) with or without page numbers, by using text anchor building blocks in the cross-reference format definition. To create cross-references to text anchors rather than to paragraphs, choose Text Anchor from the Link To drop-down list in the New Cross Reference dialog box.

     

    You can change the content of the cross-references in two ways:

     

    * Create cross-references for each condition and apply the conditions before exporting.

     

    * Change the building blocks in the cross-reference format's definition, to include or ignore page numbers.

     

    To manage changing these settings, you can copy the document twice, then change the condition settings or the cross-reference format definitions in them, for your desired result, then load the conditions or cross-reference formats from the desired document by choosing Load Conditions or Load Cross-Reference Formats from the Conditional Text or Hyperlinks panel's fly-out menu.

     

    It might be possible to script the management of these methods. Ask in the scripting forum.

     

     

    HTH

     

     

    Regards,

     

     

    Peter

    _______________________

    Peter Gold

    KnowHow ProServices

     

     

     

    ddsbleton wrote:

     

    Hi folks,

     

    I posted about this once before in the FrameMaker forum, and am now wondering if it's possible in InDesign.

     

    What we need is two types of crossreference formats - one for print, one for PDF/the web/any other hyperlinkable medium.

     

    We would like the crossrefs to appear as follows:

     

    Print:

    [some arbitrary block of text] (see page xx)

     

    PDF

    [some arbitrary block of text]

     

    As with FrameMaker, InDesign's crossreferences always GENERATE text based on the building blocks, whereas FM's hyperlinks allow an arbitrary chunk of selected text to serve as the "active" text.  The hyperlink behavior is what we want, in both cases.  We're not interested in pulling the name of the target paragraph, or the page number, or anything else - we just want the text we typed to serve as the link, no matter the format.

     

    The only solution we've been able to figure out is to actually create both a hyperlink AND a crossreference, and then conditionalize the crossreference (show in print, hide in PDF.)  But this feels unnecesarily complicated.

     

    Or, is there any way to create all of the links as one type (either hyperlink or crossreference) and then use some magic to immediately convert them to to the other type (when rendering the other type of document.)

     

    I'm surprised this doesn't "just work."  Producing links of this type for two formats seems like something lots and lots of people would need.

     

    Thanks in advance.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 9, 2012 8:09 AM   in reply to ddsbleton

    As in FrameMaker, InDesign's cross-references retrieve whole paragraphs, and building blocks in the cross-reference formats control what's retrieved - the complete paragraph text, page number, etc. Cross-references in exported interactive PDFs are links.

     

    AFAIK, some user intervention is required to control the conversion of cross-references for different output requirements - you've mentioned conditional text, for example. I don't see why you need both cross-references and hyperlinks, since you're controlling their presence with conditions. Two conditionalized cross-references, one with page number, one without, should suffice. Or, perhaps, one unconditional cross-reference that captures the paragraph text, followed by one that captures only the page number, but not the paragraph text, would work - in this case, you only need to show or hide the page number cross-reference. Am I missing something?

     

    You mentioned "magic," earlier. Perhaps it's possible with a "magic" script that runs as part of your export-to-PDF process can apply the desired cross-reference format, depending on whether the PDF export is interactive or print.

     

    BTW, FrameMaker has a "Run-in" paragraph property - a paragraph that has no line feed, which causes the following paragraph to remain on the same line. This permits TOC and cross-reference extractions to capture what appears to be partial paragraphs, when, in fact, they're capturing whole paragraphs. Not sure if this helps.

     

    Also, the commercial DTP Tools third-party cross-references plug-in for InDesign has some options that InDesign doesn't have. They have a time-limited fully-functional trial version at dtptools.com.

     

     

    HTH

     

     

    Regards,

     

     

    Peter

    _______________________

    Peter Gold

    KnowHow ProServices

     

    ddsbleton wrote:

     

    peter at knowhowpro wrote:

     

    It's not clear if your arbitrary text is the paragraph text, or something not in the paragraph at all.

     

    Sorry, that wasn't clear.  This simply refers to text that I've manually typed in the paragraph.

     

    What I want is to create one link format that will work for both print and pdf.

     

    In print, the page number will be retrieved, auto-generated/updated, and appended to the selected text ("see page xyz").  In pdf, nothing will be appended - the selected text will just appear clickable, and work like any web link.

     
    |
    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