Thread View: adobe.framemaker
6 messages
6 total messages
Started by Gay_Alson
Thu, 26 Feb 2009 18:00
Can a cross-reference use a relative destination?
Author: Gay_Alson
Date: Thu, 26 Feb 2009 18:00
Date: Thu, 26 Feb 2009 18:00
8 lines
1362 bytes
1362 bytes
"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. 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? Unfortunately, we don't have FrameScript, so I'm hoping this is something that Frame can handle natively. Thanks for all suggestions, Gay
Re: Can a cross-reference use a relative destination?
Author: Arnis_Gubins
Date: Mon, 02 Mar 2009 03:37
Date: Mon, 02 Mar 2009 03:37
62 lines
3377 bytes
3377 bytes
Gay, Can you show us what your folder structures look like and how this common chapter relates to the Preface chapter in the books? If you check how a cross-ref is defined and used in MIF, you'll see that it consists of two parts. The first part is the target Marker in the source file, i.e. <Marker <Unique ID> ID, persistent across sessions, assigned when FrameMaker generates a MIF file <MType 9> Marker type number, where 9 is for a cross-ref & is used only for backwards compatibility <MTypeName `Cross-Ref'> Marker name, as it appears in the Marker Type popup menu of the Marker dialog box <MText string> Marker text string <MCurrPage integer> Current page of marker assigned when FrameMaker generates a file; ignored when FrameMaker reads or imports a MIF file > End of Marker statement The second part is the actual cross-ref itself, that makes the call to the above marker, i.e. <XRef <Unique ID> ID, persistent across sessions, assigned when FrameMaker generates a MIF file <XRefName tagstring> Name of cross-reference format <XRefLastUpdate seconds microseconds> Specifies the time when the cross-reference was last updated <XRefLocked boolean> Yes means the cross-reference is part of a text inset that obtains its formatting information from the source document <XRefSrcText string> Text to search for <XRefSrcIsElem boolean> Yes means the source of the cross-reference is an element from a structured document <XRefSrcFile pathname> Device-independent pathname of file in which to search for source text > End of XRef statement FM uses, not just the source filename, but the source text to search for creating the match to the marker in the target file/location from where you want the cross-ref inserted. If you're trying to make this cross-ref "variable" to each <whatever>, then it will only work if the source text is also the same everywhere. To get the source text the same, you need to explicitly enter the cross-reference target marker text yourself and make each entry identical for each <whatever> that you're targeting. This means that you insert the cross-ref marker in the Preface file, instead of letting FM build it using the paragraph contents. When using the GUI for this case, you should then be using the "Cross-Reference Markers" as the "Source Type", rather than the "Paragraphs" option. You could also do this in MIF by *explicitly* setting the XRefSrcText and XRefSrcFile parameters using your own terms in the common file, and then applying these *same* terms in the Preface file. However, maintenance would be a real chore (and possibly quite error-prone) without some sort of automation.
Re: Can a cross-reference use a relative destination?
Author: Gay_Alson
Date: Mon, 02 Mar 2009 20:19
Date: Mon, 02 Mar 2009 20:19
36 lines
2247 bytes
2247 bytes
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
Re: Can a cross-reference use a relative destination?
Author: Arnis_Gubins
Date: Mon, 02 Mar 2009 21:00
Date: Mon, 02 Mar 2009 21:00
17 lines
1440 bytes
1440 bytes
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.
Re: Can a cross-reference use a relative destination?
Author: Van_Kurtz
Date: Mon, 02 Mar 2009 21:23
Date: Mon, 02 Mar 2009 21:23
5 lines
849 bytes
849 bytes
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
Re: Can a cross-reference use a relative destination?
Author: Gay_Alson
Date: Tue, 03 Mar 2009 13:14
Date: Tue, 03 Mar 2009 13:14
7 lines
914 bytes
914 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads