Skip to main content
Participant
May 6, 2020
Question

How to create Exception to TblTitle in Table Format for MIF file

  • May 6, 2020
  • 1 reply
  • 2258 views

When creating tables via a MIF file, how doI create an exception to the table title of an existing table tag. The point of the exception is to populate the table title with info from the database.

It is a numbered table title. I intend to create the MIF file via a script. 

I'll be using 2 MIF files to create my FM file. One MIF file will hold all the template info. The other MIF file will hold all the tables in the <Tbls> as well as a simple text flow calling each of these tables. 

 

The following syntax is not working for me. 

What am I doing wrong? 

<Tbl
<TblID 11>
<TblTag `Register'>

<TblTitle
<TblTitleContent

<Para
<PgfTag `TableRegTitle'>
<PgfNumString `Table 1:\t'>
<ParaLine
<String `Text Name'>
> # end of ParaLine
> # end of Para
> # end of TblTitleContent
> # end of TblTitle

<TblH #this is the Header Row
<Row
<Cell
<CellContent
<Para
<PgfTag `Cell Head'>
<ParaLine
<String `Bits'>
>
> # end of Para
> # end of CellContent
> # end of Cell

...etc...

    This topic has been closed for replies.

    1 reply

    Community Expert
    May 7, 2020

    Hi oz1010,

     

    What is the exact syntax to include the MIF file with the table formatting?

    Then I could test this myself.

     

    Best regards

     

    Winfried

    oz1010Author
    Participant
    May 7, 2020

    HI Winfried, 

    First of all, thanks so much for replying. 

    Since I'm not sure what you mean about the include syntax, I've copied most of the smaller MIF file, (not the  template MIF) to this post below the line. You can probably use any template file  that has the same para and table tag formats to test. 

    The template MIF file (5_XS_Registers.mif - see second line of code) was created by opening my FM template file and simply saving it as a MIF. Then I removed the <Tbls> and deleted the Text Flow associated with the TextRect ID of the first body page (this process is described in "Including Template Files" in the MIF manual) and attached that TextFlow to this MIF file copied below.  (Please let me know if this is not clear enough).

    My problem is that I would like to manually populate the numbered ParaTag: TableRegTitle - as you can see, it's populated in the MIF, but does not show in FM (see image).

    If you need the template file - then I'll have to email it - I cannot upload a MIF file to this forum, it's not supported. 

    This is the result of the code below when opened in FM. Here, I've removed 2 of the body rows, so you should end up with a table  that has a single header row and a single body row.

     

     

    <MIFFile 2017> # Generated by FrameMaker 2017
    include (5_XS_Registers.mif)

    <TextFlow
    <TFTag `A'>
    <TFAutoConnect Yes>
    <TFSideheads Yes>
    <FlowDir INHERITLTR>
    <Notes
    > # end of Notes
    <Para
    <Unique 1029499>
    <PgfTag `0 Heading'>
    <PgfNumString `1\t'>
    <ParaLine
    <TextRectID 8>
    <String `Registers'>
    > # end of ParaLine
    > # end of Para
    <Para
    <Unique 1041062>
    <PgfTag `BodyAfterHeading'>
    <ParaLine
    <TextRectID 8>
    > # end of ParaLine
    > # end of Para
    > # end of TextFlow

    #: Info above this line does not change - it should appear once (think of it as a header for the file
    # "Tbls" holds a number of tables (Tbl) each with its own "TblID" tagged with Table Format Register. The script should be creating a number of different Tbl's. The TblID number is used below in conjunction with the ATbl - which is its anchor. You can have a list of ATbl at the bottom (each with its own ID number).

    <Tbls
    <Tbl
    <TblID 11>
    <TblFormat
    <TblTag `Register'>
    <TblTitle
    <TblTitleContent
    <Para
    <PgfTag `TableRegTitle'> # Forces lookup in Paragraph Catalog.
    <ParaLine
    <String `Example Register1 Name (Ex_Reg1_SN)'> #this string is missing when opening in FM (see image)
    > # end of ParaLine
    > # end of Para
    > # end of TblTitleContent
    > # end of TblTitle
    > #end of TblFormat


    <TblH  # Header Row
    <Row
    <Cell
    <CellContent
    <Para
    <PgfTag `CellHead'>
    <ParaLine
    <String `Bits'>
    >
    > # end of Para
    > # end of CellContent
    > # end of Cell

    <Cell
    <CellContent
    <Para
    <PgfTag `CellHead'>
    <ParaLine
    <String `Field Name'>
    >
    > # end of Para
    > # end of CellContent
    > # end of Cell

    <Cell
    <CellContent
    <Para
    <PgfTag `CellHead'>
    <ParaLine
    <String `Type'>
    >
    > # end of Para
    > # end of CellContent
    > # end of Cell

    <Cell
    <CellContent
    <Para
    <PgfTag `CellHead'>
    <ParaLine
    <String `Reset'>
    >
    > # end of Para
    > # end of CellContent
    > # end of Cell

    <Cell
    <CellContent
    <Para
    <PgfTag `CellHead'>
    <ParaLine
    <String `Description'>
    >
    > # end of Para
    > # end of CellContent
    > # end of Cell

    > # end of Row
    > # end of TblH

    # begin Body Rows
    <TblBody
    <Row
    <Cell
    <CellContent
    <Para
    <PgfTag `CellBody'>
    <ParaLine
    <String `63:60'>
    >
    > # end of Para
    > # end of CellContent
    > # end of Cell

    <Cell
    <CellContent
    <Para
    <PgfTag `RegisterField'>
    <ParaLine
    <String `SRAM_WS'>
    >
    > # end of Para
    > # end of CellContent
    > # end of Cell

    <Cell
    <CellContent
    <Para
    <PgfTag `CellBody'>
    <ParaLine
    <String `RW'>
    >
    > # end of Para
    > # end of CellContent
    > # end of Cell

    <Cell
    <CellContent
    <Para
    <PgfTag `CellBody'>
    <ParaLine
    <String `0xA'>
    >
    > # end of Para
    > # end of CellContent
    > # end of Cell

    <Cell
    <CellContent
    <Para
    <PgfTag `CellBody'>
    <ParaLine
    <String `Some sort of description goes here.'>
    >
    > # end of Para
    > # end of CellContent
    > # end of Cell
    > # end of Row

     

    > # end of TblBody
    > # end of Tbl
    > # end of Tbls

    <Para
    <PgfTag `Body'>
    <ParaLine
    <String `Register Tables for XYZ Block.'>
    <ATbl 11>

    > # end of ParaLine
    > # end of Para

    Community Expert
    May 8, 2020

    Hi oz1010,

     

    I tested this, but I also could not populate the table title with the text from the MIF file.

    I suggest to contact the FrameMaker support: tcssup@adobe.com 

    If they cannot help, please report this issue in the Adobe tracker:

    https://tracker.adobe.com/#/home 

     

    Best regards

     

    Winfried