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

Can a cross-reference use a relative destination?

New Here ,
Feb 26, 2009 Feb 26, 2009

Copy link to clipboard

Copied

"How to use the <whatever>" is a chapter common to several books. It contains a cross-reference to a description of the <whatever>. The description is NOT in that chapter but rather in individual "Preface" chapters of each book. In each book, when I update the cross-reference to point to its local description, all of the other books then use that destination, too.<br /><br />Is it possible to create the cross-reference so that its destination is the Preface chapter in each of the books that use the common "How-to" chapter? That is, a "relative" destination instead of the "absolute" destination that I create whenever I apply the cross-reference?<br /><br />Unfortunately, we don't have FrameScript, so I'm hoping this is something that Frame can handle natively.<br /><br />Thanks for all suggestions,<br />Gay

Views

573
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
LEGEND ,
Mar 01, 2009 Mar 01, 2009

Copy link to clipboard

Copied

Gay,<br /><br />Can you show us what your folder structures look like and how this<br />common chapter relates to the Preface chapter in the books?<br /><br />If you check how a cross-ref is defined and used in MIF, you'll see<br />that it consists of two parts.<br /><br />The first part is the target Marker in the source file, i.e.<br /><br /> <Marker<br /> <Unique ID> ID, persistent across sessions, assigned when<br />FrameMaker generates a MIF file<br /> <MType 9> Marker type number, where 9 is for a cross-ref & is used<br />only for backwards compatibility<br /> <MTypeName `Cross-Ref'> Marker name, as it appears in the Marker<br />Type popup menu of the Marker dialog box<br /> <MText string> Marker text string<br /> <MCurrPage integer> Current page of marker assigned when FrameMaker<br />generates a file; ignored when FrameMaker reads or imports a MIF file<br /> > End of Marker statement<br /><br /> The second part is the actual cross-ref itself, that makes the call<br />to the above marker, i.e. <br /><br /> <XRef<br /> <Unique ID> ID, persistent across sessions, assigned when<br />FrameMaker generates a MIF file<br /> <XRefName tagstring> Name of cross-reference format<br /> <XRefLastUpdate seconds microseconds> Specifies the time when the<br />cross-reference was last updated<br /> <XRefLocked boolean> Yes means the cross-reference is part of a<br />text inset that obtains its formatting information from the source<br />document<br /> <XRefSrcText string> Text to search for<br /> <XRefSrcIsElem boolean> Yes means the source of the cross-reference<br />is an element from a structured document<br /> <XRefSrcFile pathname> Device-independent pathname of file in which<br />to search for source text<br /> > End of XRef statement<br /><br />FM uses, not just the source filename, but the source text to search<br />for creating the match to the marker in the target file/location from<br />where you want the cross-ref inserted. If you're trying to make this<br />cross-ref "variable" to each <whatever>, then it will only work if the<br />source text is also the same everywhere.<br /><br />To get the source text the same, you need to explicitly enter the<br />cross-reference target marker text yourself and make each entry<br />identical for each <whatever> that you're targeting. This means that<br />you insert the cross-ref marker in the Preface file, instead of<br />letting FM build it using the paragraph contents. <br /><br />When using the GUI for this case, you should then be using the<br />"Cross-Reference Markers" as the "Source Type", rather than the<br />"Paragraphs" option. <br /><br />You could also do this in MIF by *explicitly* setting the XRefSrcText<br />and XRefSrcFile parameters using your own terms in the common file,<br />and then applying these *same* terms in the Preface file. However,<br />maintenance would be a real chore (and possibly quite error-prone)<br />without some sort of automation.

Votes

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 ,
Mar 02, 2009 Mar 02, 2009

Copy link to clipboard

Copied

Hi Arnis,


Thank you for your reply. Here's how my project is laid out:


Doc package project folder (C:\ProjectName\Documentation), containing:

     â€“  "HowTo.fm" (chapter common to all books in project)

     â€“  Doc1UserGuide folder (containing .book file and chapter files, including "Preface.fm")

     â€“  Doc2UserGuide folder (containing .book file and chapter files, including "Preface.fm")

     â€“  Doc3UserGuide folder (containing .book file and chapter files, including "Preface.fm")


Each .book file looks like this:


C:\ProjectName\Documentation\Doc1UserGuide

   cover.fm

   TOC.fm

   Preface.fm

   Chap1.fm

   Chap2.fm

   Chap3.fm

   ..\HowTo.fm


  "Preface.fm" is a UNIQUE file in each book and resides in each respective book folder.

  "HowTo.fm" is a COMMON file, which resides on the root of the project folder. I want it to contain a cross-reference to "Preface.fm".


However, when entering the cross reference, I can only select it from an open file, after which, whenever the common file is accessed by any book, it looks for its source in the chapter in the book where it was originally defined.


As I see it, the problem is how (in the common file) to make multiple cross-references to the source file. In the .mif of the common file, "XRefSrcFile" displays the path and file to the "Preface.fm" file where I put the cross-reference, but I need to have that "XRefSrcFile" line for each book that accesses the common file.


This is almost as hard to explain as it is to do ;~)


Thanks for your patience and wisdom,


Gay

Votes

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
LEGEND ,
Mar 02, 2009 Mar 02, 2009

Copy link to clipboard

Copied

Gay,

Now that I see how you are trying to link from the HowTo file to the
lower-level Preface files, I don't think that you'll be able to get
this to work with a single cross-reference. The XRefSrcFile component
will have to have the path info to each of the User Guides to make a
link.

The only way I can see how to do this now is to make conditions for
each of the UserGuides in the HowTo file. Then make individual links
to each of the UserGuides and apply the appropriate conditions. Then
for the Book files you'll have to setup some "Not In" conditions to
hide the cross-refs that you don't want for a particular book
(UserGuide).

Which version of FM are you using? This is probably easier with FM8's
conditional expressions.

Votes

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 Beginner ,
Mar 02, 2009 Mar 02, 2009

Copy link to clipboard

Copied

Gay,

I also use a common file in several books with cross-references to chapters in each book. The only way to create the multiple cross-references is using Arnis' method, that is, conditionalize each cross-reference in the How To file.

Van

Votes

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 ,
Mar 03, 2009 Mar 03, 2009

Copy link to clipboard

Copied

LATEST
Thank you, Arnis and Van,

I'm on FM 7.2p158, so perhaps conditional expressions are beyond its capabilities. But I'll experiment with conditionalizing each cross-reference, which would be a step in the right direction.

As always, I appreciated the help and thoughtful consideration.

Gay

Votes

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