Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

28 Working with macros > 28.9 Deploying macros and macro variables > 28.9.4 Converting a dictionary-style list to an HTML table > 28.9.4.3 Putting it all together


28.9.4.3 Putting it all together

To construct a two-column HTML table around the dictionary list (after §28.9.4.2 Assembling the pieces), you can use the following settings:

[HTMLParaStyles]

*=CodeBefore

[ParaStyleCodeBefore]

List_Term=<$TableStart>

List_Defn=<$BetweenCells>

Defn*=

Italics=

CodeStyle=

*=<$TableEnd>

Only the two formats that form the dictionary list need the <$TableStart> and <$BetweenCells> macros; other formats either do not need to be involved in constructing the table, or are not part of the list. Empty settings for the other paragraph and character formats used in the list prevent the table from ending prematurely. All other formats are assigned <$TableEnd>, which acts only when a table is being generated from a list.

The macros are defined as follows:

[TableStart]

<$_if ($$InTable==0)><table attr=val ... ><$$InTable=1>\

<$_else></td></tr><$_endif>\

<tr><td>

[BetweenCells]

</td><td>

[TableEnd]

<$_if ($$InTable==1)></td></tr></table><$$InTable=0><$_endif>

Next, see §28.9.4.4 Making it work everywhere.



28 Working with macros > 28.9 Deploying macros and macro variables > 28.9.4 Converting a dictionary-style list to an HTML table > 28.9.4.3 Putting it all together