[Date Prev][Date Next] [Thread Prev][Thread Next]
[Date Index] [Thread Index] [New search]

Re: Question: Single-source using conditional text



On Fri, 02 Oct 1998 01:45:17 -0400, "Write Now, Inc." <writer@jlc.net> wrote:

>Subject: Question: Single-source using conditional text. 
>
>I have used conditional text quite successfully with graphics and 
>paragraphs for different products by one company. It is a powerful tool. 
>But now, I have another conditional text question that perhaps someone 
>else has had experience with in their manuals.
>
>We have manuals that have been written for three products, that we have
>conditionalized successfully - including graphics. We are now in the 
>process of converting the manuals into HTML docs. However, when this 
>project started, the writers were not planning for this conversion and 
>the 500 page manual has many references to a chapter and a page. Can 
>you conditionalize a variable so that when it converts to HTML that it 
>only does an Xref to a section head?

This is easily done, but it does not require either a variable or the
use of conditional text.  We do it all the time.  The key point is
that the text put into your xref is determined by the Xref Format,
so what you need to do is (temporarily) change the definition of that
format.  If you use several xref formats, you need to change them all,
just the definitions, not the names.  Fortunately, this can be done
in one operation for an entire book; details are below.

>With a technical manual such as this, we don't want to loose page Xrefs 
>in the hard copy but we need to change to section head Xrefs in the HTML
>version. How do others handle this?
>
>Another question in this same vein, has anyone been able to use single
>sourcing for the same document that has to use two different templates?
>This one has me baffled. Two customers, same book, they want different
>templates. Sigh....

Your second question actually contains the answer to the first!  We use
multiple templates to enable single-sourcing all the time; it's one of
Frame's best features!  Here's what you do:

1. Copy one of your chapters to a new name, like "OurHTML.fm", with
File Manager, Explorer, or whatever.  The content doesn't matter,
but make sure that it has all the formats you need to change defined.

2. Edit the new file, which will be your "HTML template", so that
all the formats (paragraph, character, and xref) are the way you
want them for on-line use.  Don't change any format names, just the
definitions.  You can do the same with variables, master pages,
colors, and conditional text settings.  Make sure your conditional
text Show/Hide settings say to Hide "PrintOnly" and Show "HTMLOnly".
You can delete the actual text, or leave it; doesn't matter.  Save
this document as .fm.

3. Assuming you are using a book file, open it, and open all the
chapters (hold down Shift, then do File | Open).  If you don't have
a book file, just select the file you're about to convert.  Make
sure you have Saved the current versions (as .fm), and that AutoSave
is **off** for all of them.

4. Open your HTML template file.

5. From the book file, select File | Import | Formats...  In the
dialog, select your template file in the top right box.  Make sure
the boxes are checked for everything you want to modify.  Import.

6. Select Edit | Update References, check All Cross-References,
Update. 

7. If you are using Frame's built-in HTML, save the files as
HTML now.  If you are using a third-party tool instead, save 
all files (except the template and the book file itself) as MIF.  
Be very careful not to save over the .fm files!  If you have 
Frame 5.5, you can use MifSave to do this with one command from
the book file; it's freeware, on our Web site, under Tools:
  http://www.omsys.com/tools/mifsave.zip
You use the .mif files for your conversion, and delete them 
when you're done.

8. Close all files *without* saving again.  Now your original
version, in the .fm files, is safe.  You may want to copy a
set elsewhere the first time you do this... just in case. <g>

                ****************************

You can use the same technique for multiple output formats; we
use it for WinHelp conversions quite often.  All you need is
one small template file for each output format.  Simple and fast.

>Thanks in advance for any help you can give me!

You are quite welcome.

-- Jeremy H. Griffith, at Omni Systems Inc.
   (jeremy@omsys.com)     http://www.omsys.com/
** To subscribe to Free Framers, email the message
   body "subscribe framers" to majordomo@omsys.com **

** To unsubscribe, send a message to majordomo@omsys.com **
** with "unsubscribe framers" (no quotes) in the body.   **