30.9.4 Formatting jump footnote text with macros

By default, DITA2Go removes any paragraph start/end coding within a footnote. However, for Jump footnotes (see §30.9.1 Configuring and placing footnotes) you can provide HTML formatting by specifying macros to precede and follow each footnote.

To surround footnotes with HTML code:

[HtmlOptions]
; FootnoteStartCode macro is used after <a name=...>
;  of each Jump footnote
;FootnoteStartCode = 
; FootnoteEndCode macro is used at end of each Jump footnote
;FootnoteEndCode = 

For example, if some footnotes include bulleted lists, you could assign starting and ending macro code to the paragraph formats you use for list items in footnotes. Suppose you use formats FootBullet1 and FootBullet2 (for bullet items indented within other bullet items). You could specify the following settings, macros, and macro variables:

[HTMLOptions]
FootnoteEndCode = <$FootEnd>
[HtmlStyles]
FootBullet1 = CodeStart NoAnum
FootBullet2 = CodeStart NoAnum
[StyleCodeStart]
FootBullet1 = <$FootBullStart1>
FootBullet2 = <$FootBullStart2>
[FootBullStart1]
<$_if ($$F2Started)></ul>\n<$$F2Started=0><$_endif>\
<$_if not ($$F1Started)><ul type="disc">\n<$$F1Started=1><$_endif>\
<li>\
[FootBullStart2]
<$_if not ($$F2Started)><ul type="circle">\n<$$F2Started=1><$_endif>\
<li>\
[FootEnd]
<$_if ($$F2Started)></ul>\n<$$F2Started=0><$_endif>\
<$_if ($$F1Started)></ul>\n<$$F1Started=0><$_endif>\
[MacroVariables]
; Put any macro definition sections before this section.
F1Started = 0
F2Started = 0

This macro code provides the proper <ul> and <li> coding for the bulleted paragraphs.

Note:  In HTML the convention is not to use </li>, because this closing tag can create extra unwanted spacing in some browsers. However, </li> is required in XHTML and XML.

If you code numbered footnotes as <li> items, they should be in an <ol> block, which provides the numbering. Numbering restarts at 1 for each HTML page. See §30.10.2 Converting list formats to HTML list styles.

Previous Topic:  30.9.3 Using list tags or <div> and <p> tags for jump footnotes

Next Topic:  30.10 Converting list formats to HTML (deprecated)

Parent Topic:  30.9 Converting footnotes to HTML or XML

Sibling Topics:

30.9.1 Configuring and placing footnotes

30.9.2 Eliminating links to jump footnotes

30.9.3 Using list tags or <div> and <p> tags for jump footnotes