Skip navigation
357stringband
Currently Being Moderated

Variable to Pull Book Name?

Apr 2, 2012 3:15 PM

I document a modular system that uses some of the same screens between the different modules (and each module is a book because companies can pick and choose which modules they want to purchase and we only give them documentation for those modules). I don't want to have a separate file for each book (placing the book name in the header for each) because if that one screen changes I have to change each file in each book (which defeats single-sourcing). Therefore, I want to one file with a variable that will read the name of the book file I am currently regenerating. The only other solution I could think of was to make the header text contain all headings, then create a conditional tag for each book name.................clunky to say the least, and I already have more conditional tags than I'd like (4 of them in each book).

 

BTW I use FM10, unstructured.

 

Thanks in advance to anyone who can lend a hand with this!

 

Melissa

 
Replies
  • Currently Being Moderated
    Apr 2, 2012 6:47 PM   in reply to 357stringband

    Melissa,

     

    You could create a  MIF snippet (a simple text file) to import into your "book" files' that will contain the name, e.g.

     

    <MIFFile 10.00>

    <VariableFormats

    <VariableFormat

       <VariableName `MyBookName'>

       <VariableDef `The title of this book'>

      > # end of VariableFormat

    > # end of VariableFormats

     

    Then just import this file into every file of the current book when re-generating before output.

     

    Alternatively, if you aren't using global variables such as <$volnum>, then you could just define the book name here using the "Text" numbering option and setup <$volnum> in your heading/footer entries.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points