Can a cross-reference use a relative destination?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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

