Conditional Paragraph Tags?

Combs, Richard richard.combs at Polycom.com
Wed Jun 6 19:48:46 PDT 2012


John Newman wrote: 
 
> Since the appended version is a new requirement, I created one manually
> to meet an immediate deadline by making a copy of the whole FM book and
> adding the parenthetical element using Autonumber Formatting to the
> appropriate paragraph tags.
> 
> I don't want to maintain two versions of the exact same content (it's
> over 150 pages), so how can I do what amounts to conditional paragraph
> tags? It'd be great to somehow tell FM, "Use NORMAL-LAYOUT because this
> is a normal document." And then after producing a PDF tell FM, "Use
> FUNKY-LAYOUT because this is a funky document."  The solution is
> probably staring me in the face, but my brain can't seem to find the
> way.

Make a special-purpose template file for each. In an FM file that has your existing book's paragraph formats, delete everything except the paragraph formats that need to be switched between the normal and funky definitions -- conditions, xrefs, table formats, char formats, etc. (This isn't strictly necessary, but it simplifies the file, avoids confusion, and prevents you from accidentally importing from it things you don't want to import.) Save it as NORMAL-LAYOUT.fm. 

Now make a copy of NORMAL-LAYOUT.fm and save it as FUNKY-LAYOUT.fm. In it, redefine the paragraph formats to have the autonumbers you need in the funky version. 

To output a funky version of the book: 

1) Open FUNKY-LAYOUT.fm. 
2) Open the book and select all the files in it (or all the chapter files, if your frontmatter uses a different paragraph catalog). 
3) Select File > Import > Formats. 
4) In the Import Formats dialog, set Import from Document to FUNKY-LAYOUT.fm, select only Paragraph Formats, and click Import. 
5) Update/generate the book and create your funky PDF. 

To output a normal version of the book, repeat the above steps, but at steps 1 and 4, use NORMAL-LAYOUT.fm. 

Once you've created NORMAL-LAYOUT.fm and FUNKY-LAYOUT.fm, switching the book from one to the other takes less time than it took to describe the process. 

HTH!

Richard G. Combs
Senior Technical Writer
Polycom, Inc.
richardDOTcombs AT polycomDOTcom
303-223-5111
------
rgcombs AT gmailDOTcom
303-903-6372
------









More information about the framers mailing list