Skip to main content
April 12, 2009
Question

Complicated cross-reference question

  • April 12, 2009
  • 2 replies
  • 806 views

I am continuing to work on a very complex document for a client. I was hired to fix lots of FrameMaker errors left by the previous contractor, while at the same time keeping the same appearance of the original pdfs. These documents are FULL of cross-references, with several situations that I have never seen before. I've already posted questions about one situation, and Arnis Gubins was able to help (thanks Arnis!). Here's another:

There are lots of cross-references from Chapter 4 to Chapter 5. In most cases, the same wording appears in headings in both chapters, so it's a very simple cross-ref: Just highlight the heading in Chapter 4, select the corresponding heading in Chapter 5, and use the Heading cross-reference format to insert the wording into the first location. The Heading cross-reference format is set up to appear in blue underline but no page number, which is what the client wants.

However, in some cases the wording in Chapter 4 DIFFERS from the target in Chapter 5. In this case, I can't use the Heading cross-ref format, because it will bring in the wrong wording.

I think the solution has something to do with changing the Source Type from Paragraphs to Cross-Reference Markers (which I have never used before in 15 years of working with FrameMaker!) But I can't seem to figure out the next step. Can someone help?

Gilda Spitz

    This topic has been closed for replies.

    2 replies

    April 15, 2009

    Hi Arnis. Thanks for your very detailed fix  for this problem. I haven’t experimented with it yet, but I’m not sure it’s the  right solution, for two reasons:

    • · You said “This is  reasonably maintainable if you have one or two tags that you need alternate  cross-refs to, but can become quite unwieldly for many.” Unfortunately, there  ARE many instances of this cross-ref mismatch throughout the documents. I’ve  counted 19 so far, and I think there are many more.
    • · Whatever solution we  use MUST be simple enough for the relatively novice Frame users at the client site to  maintain on their own. I don’t think your solution will  qualify.

    I have two other ideas. Tell me what you  think.

    Alternative  #1

    Let’s say the heading in Chapter 4 is AAA,  and the heading in Chapter 5 is BBB.

    As previously discussed, I can’t use the  Heading cross-ref format. But I could create a NEW cross-ref format with the  name AAA. The definition for this format would be  <hyperlink>AAA<Default ¶ Font>. This would indeed insert the correct  text into the cross-ref, with the required blue text and underline (as defined  in the hyperlink character tag).

    I don’t like this idea because it inserts  hard-coded text, instead of using building blocks to “grab” text automatically.  However, it has two advantages:

    • The original badly  formatted Frame files that I was fixing in the first place used this method. I  was trying to eliminate it, because it circumvented FrameMaker automation, but  at least the client is familiar with it.
    • · It would be easier for  the client to maintain on their own.

    There are of course several  disadvantages:

    • ·I would have to create  a different new cross-ref format for each new wording (but it’s relatively  simple to do).
    • ·If in the future the client has to change the wording of the heading, they would also have to change the  wording of the cross-ref format.
    • · In the original badly  formatted Frame files, there were literally hundreds of these. I think they hit  an internal FrameMaker limit that nobody ever expected to hit. I’m hoping that  this would not happen in this case, because I would use traditional cross-ref  formats (Heading, and Heading on page) wherever possible. But I would have to  count the total first, to make sure.

    Alternative  #2

    I like this idea because it is automated.  The problem is that I can’t see how to make it work with the conventional Frame  functionality. However, perhaps there’s a way through a Frame  script?

    I’m thinking about the concept of the  spot cross-ref. It is currently unworkable, because there is no building block  that would “grab” text inside the spot cross-ref marker. The only building  blocks that I know of are <$paratext>. <$paranum> and so on.

    Is there any way to create a Frame script  to grab marker text? If so, then I could create a spot cross-ref in Chapter 5  beside Heading BBB containing the marker text AAA, and the script would pop AAA  into the correct place in Chapter 4. Is this  possible?

    The big disadvantage for this one (if it is  possible at all) is that it would not be maintainable by the client.  Their plan was just to hire a contractor to fix the Frame problems, but then continue to update the content on their own.

    Thoughts?

    Gilda

    Arnis Gubins
    Inspiring
    April 15, 2009

    Gilda,

    When I mentioned "one or two tags", I meant one or two paratags, not physical entries. But I do understand and sympathize with your issue.

    I would definitely not recommend going with alternative 1, which lead to the problem in the first place.

    I think that a custom Framescript solution would probably be the best for long term maintainability. However, it would also require the client to get a copy of Framescript on their machine and then run your custom script for maintenance to re-build these special cross-refs whenever they make changes.

    Arnis Gubins
    Inspiring
    April 14, 2009

    Gilda,

    The content that you can display in a cross-reference in FM is defined [limited] by the building blocks available. In unstructured FM, these are primarily either $paratext, $paranum or $paranumonly.  So the content in a spot cross-reference marker won’t really help in this situation.

    What can be done is to create another paratag (for the x-ref that is required) to have different text to be placed *before* the actual paragraph. Let me explain how this can be done in way that is invisible in the final output.

    Assume that you need second level headings (H2 tag for instance) to have slightly different text in the cross-ref from the actual heading. You will need to make two variations on the H2 tag.

    The first variant is to create an H2_altXref to hold the text that you actually want to see in the cross-ref text when it shows up in the document. The only two attributes that would need to be different for this from the H2 tag would be the colour used and the Below Pgf spacing setting. Create a custom colour (that will visually stand out) using the View > Colors > Definition... option, called AltXref fro example. For the Below Pgf spacing, set it to a negative value of the actual Line Spacing, say -14pt. This is the paratag that you would use to enter your alternate text and place it immediately *before* the current H2 tag that you want to cross-reference.

    For the actual H2 tag content that should be here, apply a modified tag (H2_alt) that has the Above Pgf spacing set to the same negative value as for the H2_altXref tag used in the Below Pgf. This will have the affect of moving this paragraph up over top of the previous alternate text.

    You can then make your cross-references to the H2_altXref tag to get the text you want and for the hypertext link to land at the exact spot of the H2_alt text. But you will need one more step to hide the visual double entry line of the H2 alternate tags. You need to use FM’s Views to make the AltXref colour invisible.

    In the View > Color > Views... option, set the AltXref colour to be invisible in View 6. You can then use the keyboard shortcuts <esc> v 6 to hide the alternate text (before print and PDF creation) and <esc> v 1 to show it again. To make editing the alternate text easier, you could also create a custom black colour for the H2_alt tag and set that to toggle invisible in View 2 (<esc> v 2).

    This is reasonably maintainable if you have one or two tags that you need alternate cross-refs to, but can become quite unwieldly for many.