Copy link to clipboard
Copied
I am trying to single source two documents using structured FM 9. Each document describes a product, where both products are about 90% identical. If the documents are maintained separately, they each have a set of variables that are named the same, but have different values depending on the document, for example 'prodname' = ABC and 'prodname' = XYZ. While it is quite straightforward to mark the texts conditionally, for example 'Product ABC is used at home' and 'Product XYZ is used in an office' I cant figure out a way to reference the variable in the same document. What I would be trying to achieve would be something like 'Product <prodname> is used in an office at home' where prodname would automatically toggle between XYZ and ABC depending on the 'Show/Hide conditional text' setting. Of course it would be easy to create a variable 'ProdnameXYZ' for XYZ and 'ProdnameABC' for the other product, but this would defeat the purpose and wreck other documents that rely on 'prodname'. The example is also simplified because I have a mass of other variables for each document like document numbers, revisions, dates, and so on that rely on a standard set of variables. Maybe this can't be done, but if anyone could point me to a reference or some clue about how to solve this I would be most grateful. Thanks.
Copy link to clipboard
Copied
1roach,
I'm not quite clear on what you are asking... because the whole nature of a variable is that it is variable. What I mean is... if you need it to change, you would generally import the desired definitions before publishing. You couldn't tie it directly to the condition management features, whichever you are using, so it would be an extra step, but I think this is generally standard practice.
Am I missing something? I don't mean to oversimplify. To help with variable management, there are some useful tools out there, in particular I'm thinking of BookVars by Leximation.
http://www.leximation.com/tools/info/bookvars.php
Russ
Copy link to clipboard
Copied
Thanks Russ. I think I have set myself a too high ambition level with this, and as I cant even get conditional texting to work, I am giving up and going back to producing separate documents.Thanks for your time anyway.
Copy link to clipboard
Copied
Too bad to hear you have given up! When you decide to try again, just remember that use of variables and conditional text are independent. You can use them both in the same document. In your case, you can maintain the two sets of variables, just as you've done in the past and use them in your conditional documents.
You cannot put conditional text inside the definition of a variable, just as you can't refer to one variable within the definition of another.
To use your example, you can type something like "Product <prodname> is used in an officeat home" where <prodname> is a variable and bold indicates one condition and italics the other. To prepare one version of the document, make the appropriate show/hide settings and import variable definitions from a document that has the definitions you want. To parepare the other, reverse the show/hide settings and import variable definitions from a document with the other set of definitions.
--Lynne
Copy link to clipboard
Copied
Hello Lynne
Thanks for taking interest in my question. I have eventually solved it in the following way.
1. I put all the chapters with the conditional text in two bookfiles, one for Home_Product.book and one for Office_Product.book.
2. I created two additional files that went before the TOC, which behaved like cover pages, eg "Welcome to the Home Product" and "Welcome to the Office Product"
3. I made a set of variables for each cover, obviously based around the product names "Home Product" and "Office Product".
4. When I wanted to create a PDF file for "Home Product" I opened its cover, imported its Variable Definitions and Conditional Text Settings to the rest of the chapters inHome_Product.book, and saved it all to the Home Product pdf.
5. For the "Office Product" I repeated the procedure with the "Office Product" cover and Office_Product.book.
It all turned out much more straightforward that I originally feared.