2.9 Footnotes

<..configure html-mltx latex..>+
 \Configure{footnote-mark}
    {\ifmathltx \ifmtext \else
         \HCode{<mrow \mml:class="footnote-mark">}\fi
     \else \HCode{<span class="footnote-mark">}\fi }
    {\ifmathltx \ifmtext \else \HCode{</mrow>}\fi
     \else \HCode{</span>}\fi }
 \Configure{thank-mark}
    {\HCode{<\ifmathltx mrow  \expandafter\mml:class\else span class\fi
                                    ="thank-mark">}}
    {\HCode{</\ifmathltx mrow\else span\fi>}}
-_-_-

The following code segments handle the different listed cases, with possible exception of the last.

a\footnote{b c}  
 
$a\footnote{b c}$  
 
$a\footnote{\hbox{b c}}$  
 
$a\footnote{\mbox{b c}}$  
 
$a\mbox{\footnote{b c}}$

We have the following hooks

\def\@footnotemark{...\a:@makefnmark\@makefnmark  
                                           \b:@makefnmark...}  
\long\def\@footnotetext#1{...\a:footnote-text\a:@makefntext  
                \@makefntext{\b:@makefntext  
                                   \a:@makefnbody #1\b:@makefnbody  
                            }\c:@makefntext\b:footnote-text...}

<..configure html-mltx latex..>+
 \:CheckOption{fn-in}\if:Option  \else
    \expandafter\let\csname A:footnote-text\expandafter\endcsname
                      \csname a:footnote-text\endcsname
    \expandafter\let\csname B:footnote-text\expandafter\endcsname
                      \csname b:footnote-text\endcsname
    \NewConfigure{footnote-text}[2]{%
       \expandafter\def\csname a:footnote-text\endcsname{%
          #1%
          \ifmathltx
              \HCode{<\a:@math\Hnewline
                 \csname a:math-xmlns\endcsname \Hnewline >%
                 \ifmtext <mtext>\fi}
          \fi
          \ifmathltx  \fi
       }%
       \expandafter\def\csname b:footnote-text\endcsname{%
          \ifmathltx
             \HCode{\ifmtext</mtext>\fi </\a:@math>}%
          \fi
          #2%
       }%
    }
    \Configure{footnote-text}
       {\csname A:footnote-text\endcsname}
       {\csname B:footnote-text\endcsname}
 \fi
-_-_-

<..configure html-mltx latex..>+
 \let\A:footnotetext=\a:footnotetext
 \let\B:footnotetext=\b:footnotetext
 \let\C:footnotetext=\c:footnotetext
 \NewConfigure{footnotetext}[3]{%
    \def\a:footnotetext{%
       \ifmathltx \ifmtext  <.end mtext space.>\fi\fi
       #1%
       \ifmathltx \ifmtext  <.end mtext space.>\fi\fi
    }%
    \def\b:footnotetext{%
       \ifmathltx \ifmtext  <.end mtext space.>\fi\fi
       #2%
       \ifmathltx \ifmtext  <.end mtext space.>\fi\fi
    }%
    \def\c:footnotetext{%
       \ifmathltx \ifmtext  <.end mtext space.>\fi\fi
       #3%
       \ifmathltx \ifmtext  <.start mtext space.>\fi\fi
    }%
 }
 \Configure{footnotetext}
    {\A:footnotetext}
    {\B:footnotetext}
    {\C:footnotetext}
-_-_-

<..configure html-mltx latex..>+
 \Configure{footnotebody}
    {\tmp:toks=}
    {\ifmathltx \ifmmode $\mbox{$\the\tmp:toks$}$
               \else $\mbox{\the\tmp:toks}$\fi
     \else \the\tmp:toks\fi}
-_-_-

<..configure html-mltx latex..>+
 \:CheckOption{mouseover} \if:Option
    \pend:def\js:on{\ifmathltx \ifmtext  <.end mtext space.>\fi\fi}
    \append:def\js:on{\ifmathltx \ifmtext  <.start mtext space.>\fi\fi}
 \fi
-_-_-