Skip to main content
Feb 28, 2011 2:41 PM UTC
Question

How can I link to a marker (and display the marker content)?

Hi all,

I have a marker in my text containung a text string (e.g. an ID number). I tried to create a cross-ref format that allows me to link to the marker. But if I insert the paragraph text placeholder, then the cross-ref displays the entire paragraph in which the marker is placed, not just the marker text. Which placeholder would I need to use to display only the marker?

    This topic is closed to new replies. Start a new post to keep the conversation going.

    9 replies

    Bob_Niland
    Community Expert
    Community Expert
    Jun 11, 2013 12:54 PM UTC

    Another hack-of-the day technique is to use run-in formats. This hack is just for the case where we want to xref to a word or string in a target para, and have that word or string appear where referenced, and be a hyperlink. This doesn't cover the case where we want a different word or string to appear where referenced.

    As in the earlier examples, suppose we want to cross-ref, by word or text snippet, to "amet" in a paragraph nominally of format Body:

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore ...

    Create two new formats:

    Body.Start

    String.Xref

    Both of these are identical to normal Body except for:

    Properties: Pagination

    <*> Run-In Head - - Default Punctuation [ <none> ]

    Author the paragraph in Body, then apply Body.Start to "Lorem ipsum dolor sit ", and String.Xref to "amet".

    Now you can cross-reference, by
    Source Type: Paragraph Tags: [String.Xref]

    Format: <$paratext>

    Translate
    Bob_Niland
    Community Expert
    Community Expert
    Mar 2, 2011 8:52 PM UTC

    Another technique I haved used is a bit less trouble than the invisible text overlay trick, but you'd probably only want to do it for small numbers of objects, unless you don't mind polluting the Cross-Reference format namespaces. Suppose we have a paragraph:

    Lorem ipsum dolor sit amet, consectetur adipisicing word123 elit, sed do eiusmod tempor incididunt ut labore ...

    At "word123" insert a Marker of type Cross-Ref, named "word123 key".

    Everywhere else you need to hypertext back to that, insert a Cross-Reference,

    to Marker "word123 key"

    of Format Name: "word123 xref"

    of Format Definition "word123"

    (literal text, no quotes. no constructs, unless you need some set-off).

    All but the key instance of word123 become atomic objects hyperlinked to the marker at the key instance.

    ________

    I use this for page nav in the margins. Marker format "Cover" appears as "Cover", but goes to the document title on the cover page, regardless of the content of that text string.

    Translate
    Mar 3, 2011 10:09 AM UTC

    Thanks for the ideas lads. I will discuss them and we may use the invisible color trick a few times, but I think that both manually inserting text boxes and re-writing the target text, as well as using literal text in cross-ref definitions will be too unflexible for a wider use.

    I filed a feature request using the whishform (https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform).

    What we would need is a possibility to link to an atomic text using a standardized, easy method and to update this link when changes occur. 

    Translate
    Matt-Tech Comm Tools
    Community Expert
    Community Expert
    Jun 4, 2013 12:07 AM UTC

    Has anyone found a more elegant solution to displaying the marker text in a cross-reference? (like we can do using Running Header/Footers)

    -Matt

    Translate
    -Matt Sullivan, FrameMaker Course Creator, Author, Trainer, Consultant
    Bob_Niland
    Community Expert
    Community Expert
    Feb 28, 2011 6:56 PM UTC

    I have a marker in my text containing a text string (e.g. an ID number).  I tried to create a cross-ref format that allows me to link to the  marker.

    Do you need hypertext linking to the source instance of the ID number?

    If not (and you are just doing a define-once, clone everwhere else), then ...

    It's been a while since I looked into this, but the conclusion I recall coming to was that:

    a. There's no construct for a format of $markertextonly

    (as of 7.1 anyway), and

    b. You can't use Index markers, or create A CustomMarkerType,

    because Cross-Reference only lists markers of type Cross-Ref.

    Presumably there are aftermarket tools ... anyway ...

    What I do is:

    • For small numbers of such objects, put the text in variables. Use variables everywhere the text needs to appear. Text generated by variables, of course, gets no hypertext link.
    • For larger numbers of such objects, put them in a table on a Reference page. You can even give them a unique paragraph format to make them easy to Xref by paragraph tag. Text generated by Xref to RefPage does get a hypertext link, but it goes nowhere.

    If a hyperlink to the source instance is required, I've also used run-in paragraph types to isolate the text string to its own paragraph. I've done this for glossaries, for example, where the lead word/phrase is the text to be cloned, and all Xrefs to it then are also hypertext links to that entry in the Glossary.

    _________

    I'd be delighted to be mistaken.

    Translate
    Mar 1, 2011 12:18 PM UTC

    Thanks for the ideas, actually I have already been using parts lists etc. on the reference pages (easy to copy between documents) but in this case an actual link would have been required. I will file a feature request.

    Translate
    Arnis Gubins
    Inspiring
    Mar 2, 2011 5:53 PM UTC

    Robert,

    There is a technique to make the type of cross-reference that you want, i.e. a link to a unique string instead of the entire paragraph of text.

    You need to go about it in a round about manner using FM's Views with an invisible colour.

    1. Create a custom colour, e.g. Xref_color, for the text that you want to make a cross-ref to. Note: it can be any colour that you want as it will never be output.

    2. Now go to your Color Views; View > Color > Views... and set View 6 to have this new colour moved to the Invisible column.

    3. Create a new paratag, e.g. myXref, for text to be entered using the new colour.

    3. Now at the location that you want to make the cross-ref to (e.g. an Id number referenced in a paragraph), drop in an anchored frame using either outside column or outside text frame (as these locations do not repel text) and then insert a text frame within that anchored frame. Using the new paratag, enter the ID number inside the Aframe text box.

    4. From the location that you want the xref, insert your xref format and use the myXref paratag as the target.

    5. If you want the cross-ref link to take you to exactly the location of the ID in the text, then move the anchored frame over top of the text in the paragraph, ie.

    5. When you want to output your results change the View back to #1 (either through the View panel or use the shortcut esc v 1 to toggle) and the paragraph content for the myXref tag will disappear from view. However, FM still knows it's there and can access the content. When you create a PDF, the link will behave as if you directly linked to the content inside of the paragraph.

    To make inserting the Aframe properly set-up easier, create one with the text frame and paratag on the Reference page so that you can copy and paste as required.

    You can use this technique to mimic the <$marker1> <$marker2> behaviour in running h/f 's if you run out of markers as well.

    Note: You can toggle colour views at the Book level for all documents at once. Using the keyboard shortcuts, it's a snap.

    I hope this technique helps.

    Translate