3.11 Footnotes

  3.11.1 Originating Packages
  3.11.2 In-Line LaTeX
  3.11.3 Off-Line in latex
  3.11.4 AMS
  3.11.5 SCR *
  3.11.6 Plain
  3.11.7 On Mouse Over
  3.11.8 Other

3.11.1 Originating Packages

<..latex ltfloat (footnotes)..>
 <.shared config footnotes.>
 \:CheckOption{fn-in}\if:Option
    <.inline footnote latex.>
 \else
    \Log:Note{for inline footnotes use
           command line option ‘fn-in’}
    <.offline footnote latex.>
 \fi
-_-_-

<..configure html4 plain..>
 \:CheckOption{fn-in}\if:Option
    <.inline footnote plain.>
 \else
    \Log:Note{for inline footnotes, use
           the command line option ‘fn-in’}
    <.offline footnote plain.>
 \fi
-_-_-

<..maketitle footnote..>
 \:CheckOption{fn-in}\if:Option
    <.end-thanks author date and.>
 \else
    <.config thanks author date and.>
 \fi
-_-_-

<..revtex maketitle footnote..>
 \:CheckOption{fn-in}\if:Option
    <.revtex end-thanks author date and.>
 \else
    <.revtex config thanks author date and.>
 \fi
-_-_-

<..JHEP maketitle footnote..>
 \:CheckOption{fn-in}\if:Option
    <.JHEP end-thanks author date and.>
 \else
    <.JHEP thanks author date and.>
 \fi
-_-_-

3.11.2 In-Line LaTeX

<..inline footnote latex..>
 \:CheckOption{mouseover} \if:Option
    <.mouseover inline footnote mark.>
    <.mouseover inline footnote text.>
    <.mouseover inline footnote.>
    <.onmouseover footnote css.>
 \else
    <.inline footnote mark.>
    <.inline footnote text.>
    <.inline footnote.>
 \fi
-_-_-

<..inline footnote text..>
 \Configure{footnotetext}
    {<.open inline footnote box.>%
     <.fn mark sup.><.inline fn text /Link.>%
     \NoFonts
     \Tag{<.footnote id.>-bk}{}%
     \special{t4ht@(}%
    }
    {\special{t4ht@)}\EndNoFonts
     <.end inline fn text /Link.><.fn mark end sup.>}
    {\expandafter\global\expandafter
        \let\csname (<.footnote id.>)\endcsname\def
     <.close inline footnote box.>}
-_-_-

<..inline footnote mark..>
 \Configure{footnotemark}
    {<.fn mark sup.><.inline fn mark /Link.>%
     \NoFonts
     \Tag{<.footnote id.>}{}}
    {\EndNoFonts
     <.end inline fn mark /Link.><.fn mark end sup.>%
     \expandafter\global\expandafter
        \let\csname (<.footnote id.>-bk)\endcsname\def}
-_-_-

<..mouseover inline footnote text..>
 \Configure{footnotetext}
    {<.open inline footnote box.>%
     <.js footnote.>%
     <.fn mark sup.><.inline fn text /Link.>%
     \NoFonts   \Tag{<.footnote id.>-bk}{}%
    }
    {\EndNoFonts <.end inline fn text /Link.><.fn mark end sup.>}
    {\expandafter\global\expandafter
        \let\csname (<.footnote id.>)\endcsname\def
     <.js /footnote.>%
     <.close inline footnote box.>}
-_-_-

<..mouseover inline footnote mark..>
 \Configure{footnotemark}
    {<.fn mark sup.><.mouseover inline fn mark /Link.>%
     \NoFonts
     \Tag{<.footnote id.>}{}}
    {\EndNoFonts
     <.end inline fn mark /Link.><.fn mark end sup.>%
     \expandafter\global\expandafter
        \let\csname (<.footnote id.>-bk)\endcsname\def}
-_-_-

<..inline fn text /Link..>
 \ifTag{<.footnote id.>}
    {\expandafter\ifx\csname (<.footnote id.>)\endcsname\def
       \Link{<.footnote id.>-bk}{}%
     \else
       \Link{<.footnote id.>-bk}{<.footnote id.>}%
     \fi
    }
    {\expandafter\ifx\csname (<.footnote id.>)\endcsname\def
     \else \Link{}{<.footnote id.>}\fi
    }%
-_-_-

<..end inline fn text /Link..>
 \ifTag{<.footnote id.>}
    {\EndLink}
    {\expandafter\ifx\csname (<.footnote id.>)\endcsname\def
     \else \EndLink\fi
    }%
-_-_-

<..mouseover inline fn mark /Link..>
 <.start js.>%
 \ifTag{<.footnote id.>-bk}
    {\expandafter\ifx\csname (<.footnote id.>-bk)\endcsname\def
       \Link[ <.mouseover-footnote arguments.>\Hnewline
                     ]{<.footnote id.>}{}%
     \else
       \Link[ <.mouseover-footnote arguments.>\Hnewline
                     ]{<.footnote id.>}{<.footnote id.>-bk}%
     \fi
    }
    {\expandafter\ifx\csname (<.footnote id.>-bk)\endcsname\def
     \else \Link[ <.mouseover-footnote arguments.>\Hnewline
                     ]{}{<.footnote id.>-bk}\fi
    }%
-_-_-

<..inline fn mark /Link..>
 \ifTag{<.footnote id.>-bk}
    {\expandafter\ifx\csname (<.footnote id.>-bk)\endcsname\def
       \Link{<.footnote id.>}{}%
     \else
       \Link{<.footnote id.>}{<.footnote id.>-bk}%
     \fi
    }
    {\expandafter\ifx\csname (<.footnote id.>-bk)\endcsname\def
     \else \Link{}{<.footnote id.>-bk}\fi
    }%
-_-_-

<..end inline fn mark /Link..>
 \ifTag{<.footnote id.>-bk}
    {\EndLink}
    {\expandafter\ifx\csname (<.footnote id.>-bk)\endcsname\def
     \else \EndLink\fi
    }%
-_-_-

<..open inline footnote box..>
 \SaveEndP\global\setbox\fn:box=\vtop\bgroup\ShowPar
    \ifvoid\fn:box\else  \csname unvbox\endcsname\fn:box\fi
-_-_-

<..close inline footnote box..>
 \EndP\egroup\RecallEndP
-_-_-

<..save inline footnotes..>
 \ifvoid \fn:box \else
    \expandafter \ifx \csname fn:box\body:level\endcsname\relax
       \csname newbox\expandafter\endcsname
                    \csname fn:box\body:level\endcsname
    \fi
    \global\expandafter\setbox\csname fn:box\body:level\endcsname=
       \vbox{\csname unvbox\endcsname\fn:box}%
 \fi
 \gHAdvance\body:level by 1
-_-_-

<..recall inline footnotes..>
 \gHAdvance\body:level by -1
 \expandafter \ifx \csname fn:box\body:level\endcsname\relax \else
    \global\setbox\fn:box=
       \vbox{\expandafter\ifvoid \csname fn:box\body:level\endcsname \else
           \csname unvbox\expandafter\endcsname
                \csname fn:box\body:level\endcsname\fi}%
 \fi
-_-_-

<..insert inline footnotes..>
 \ifvmode \IgnorePar\fi\EndP
 \ifvoid \fn:box\else
    \HCode{<div class="footnotes">}\box\fn:box\HCode{</div>}
    \IgnorePar\EndP
 \fi
-_-_-

<..file tag into footnote..>
 (L 
-_-_-

<..link tag to footnotetext..>
 )Q
-_-_-

<..mouseover inline footnote..>
 \Configure{BODY}
    {<.save inline footnotes.>\:xhtml{\SaveEndP}\IgnorePar
        \HCode{<body\Hnewline\csname a:!BODY\endcsname
      >}<.overDiv.>\ShowPar\par}
    {<.insert inline footnotes.>%
     \relax \ifnum \FileNumber=1
       <.ol-hauto mouseover-script.>%
     \fi
     \HCode{\Hnewline
      </body>}\:xhtml{\RecallEndP}<.recall inline footnotes.>}%
-_-_-

<..inline footnote..>
 \Configure{BODY}
    {<.save inline footnotes.>\:xhtml{\SaveEndP}\IgnorePar
        \HCode{<body\Hnewline\csname a:!BODY\endcsname >}\ShowPar\par}
    {<.insert inline footnotes.>\HCode{\Hnewline
        </body>}\:xhtml{\RecallEndP}<.recall inline footnotes.>}%
-_-_-

<..inline footnote latex..>+
 \Configure{crosslinks+}
    {\IgnorePar\EndP\HCode{<.show input line no.>%
                           <div class="crosslinks"><p class="noindent">}}
    {\HCode{</p></div>}\par\ShowPar}
    {<.insert inline footnotes.>%
     \ifvmode \IgnorePar\fi \EndP
     \HCode{<.show input line no.>%
             <div class="crosslinks"><p class="noindent">}}
    {\HCode{</p></div>}\par\ShowPar}
-_-_-

<..inline footnote latex..>+
 \Css{div.footnotes{border-top:solid 1px black;
    border-bottom:solid 1px black;
    padding-bottom:1ex;
    padding-top:0.5ex;
    margin-right:15\%; margin-top:2ex;
    font-style:italic; font-size:85\%;}}
 \Css{div.footnotes p{margin-top:0; margin-bottom:0; text-indent:0;}}
 \ifx \fn:box\:UnDef \csname newbox\endcsname\fn:box \fi
 \HAssign\body:level=0
-_-_-

3.11.3 Off-Line in latex

<..offline footnote latex..>
 \:CheckOption{mouseover} \if:Option
   <.onmouseover offline footnote mark.>
   <.onmouseover offline footnote text.>
   <.onmouseover footnote css.>
   \AtEndDocument{<.ol-hauto mouseover-script.>}
 \else \:CheckOption{frames-fn}  \if:Option
         <.frames footnote mark.>
         <.frames footnote text.>
       \else
         <.default offline footnote mark.>
         <.default offline footnote text.>
 \fi   \fi
-_-_-

<..default offline footnote text..>
 \Configure{footnotetext}
    {<.open footnote page.>%
     <.fn mark sup.>\Link{}{<.footnote id.>}%
     \NoFonts
    }
    {\EndNoFonts \EndLink<.fn mark end sup.>}
    {<.close footnote page.>}
-_-_-

<..default offline footnote mark..>
 \Configure{footnotemark}
    {<.fn mark sup.><.footnotemark link.>\NoFonts
     \Tag{<.footnote id.>}{}}
    {\EndNoFonts <.end footnotemark link.><.fn mark end sup.>}
-_-_-

<..onmouseover offline footnote text..>
 \Configure{footnotetext}
    {<.js open footnote page.>%
     <.fn mark sup.>\Link{}{<.footnote id.>}%
     \NoFonts
    }
    {\EndNoFonts \EndLink<.fn mark end sup.>}
    {<.js close footnote page.>}
-_-_-

<..onmouseover offline footnote mark..>
 \Configure{footnotemark}
    {<.fn mark sup.><.js footnotemark link.>\NoFonts
     \Tag{<.footnote id.>}{}}
    {\EndNoFonts
     <.end js footnotemark link.><.fn mark end sup.>}
-_-_-

<..frames footnote text..>
 \Configure{footnotetext}
    {<.open frames footnote page.>%
     <.fn mark sup.>\Link{}{<.footnote id.>}\NoFonts
    }
    {\EndNoFonts\EndLink<.fn mark end sup.>}
    {<.close frames footnote page.>}
-_-_-

<..frames footnote mark..>
 \Configure{footnotemark}
    {<.fn mark sup.><.frames footnotemark link.>\NoFonts
     \Tag{<.footnote id.>}{}}
    {\EndNoFonts
     <.end frames footnotemark link.><.fn mark end sup.>}
-_-_-

<..open footnote page..>
 \ifTag{<.footnote id.>}
    {\expandafter\ifx\csname (<.footnote id.>)\endcsname\def
        \:warning{Multiple footnote texts for mark \FNnum}%
     \else \csname a:footnote-text\endcsname\fi
    }
    {}%
-_-_-

<..close footnote page..>
 \ifTag{<.footnote id.>}
    {\expandafter\ifx\csname (<.footnote id.>)\endcsname\def
     \else  \csname b:footnote-text\endcsname\fi
    }
    {}%
 \expandafter\global\expandafter
    \let\csname (<.footnote id.>)\endcsname\def
-_-_-

<..js open footnote page..>
 \ifTag{<.footnote id.>}
    {\expandafter\ifx\csname (<.footnote id.>)\endcsname\def
        \:warning{Multiple footnote texts for mark \FNnum}%
     \else  \csname a:footnote-text\endcsname\fi
    }
    {}%
-_-_-

<..js close footnote page..>
 \ifTag{<.footnote id.>}
    {\expandafter\ifx\csname (<.footnote id.>)\endcsname\def
     \else  \csname b:footnote-text\endcsname\fi
    }
    {}%
 \expandafter\global\expandafter
    \let\csname (<.footnote id.>)\endcsname\def
-_-_-

<..footnotemark link..>
 \ifTag{<.link tag to footnotetext.><.footnote id.>}
    {\Link{<.footnote id.>}{}}
    {}%
-_-_-

<..end footnotemark link..>
 \ifTag{<.link tag to footnotetext.><.footnote id.>}
    {\EndLink}
    {}%
-_-_-

<..js footnotemark link..>
 \ifTag{<.link tag to footnotetext.><.footnote id.>}
    {<.start js.>%
        \leavevmode \Link[ <.mouseover-footnote arguments.>%
                                 \Hnewline]{<.footnote id.>}{}}
    {}%
-_-_-

<..end js footnotemark link..>
 \ifTag{<.link tag to footnotetext.><.footnote id.>}
    {\EndLink}
    {}%
-_-_-

<..open frames footnote page..>
 \ifTag{<.footnote id.>}
    {\expandafter\ifx\csname (<.footnote id.>)\endcsname\def
        \:warning{Multiple footnote texts for mark \FNnum}%
     \else
       \Configure{!BODY}{id="<.tex4ht-fn.>" }%
       \BeginHPage[<.footnote id.>]{ }%
       \Configure{!BODY}{}%
     \fi
    }
    {}%
-_-_-

<..close frames footnote page..>
 \ifTag{<.footnote id.>}
    {\expandafter\ifx\csname (<.footnote id.>)\endcsname\def
     \else
       \close:fn\EndHPage{}
     \fi
    }
    {}%
 \expandafter\global\expandafter
    \let\csname (<.footnote id.>)\endcsname\def
-_-_-

<..frames footnote text..>+
 \def\close:fn{\HPage{}\Link{}{hide-fn}\EndLink\EndHPage{}%
    \gdef\close:fn{\rightline{\Link{hide-fn}{}@\EndLink}}\close:fn}
-_-_-

<..frames footnotemark link..>
 \ifTag{<.footnote id.><.file tag into footnote.>}
    {\Link[\RefFile{<.footnote id.>}
                              target="<.tex4ht-fn.>"]{}{}}
    {}%
-_-_-

<..end frames footnotemark link..>
 \ifTag{<.footnote id.><.file tag into footnote.>}
    {\EndLink}
    {}%
-_-_-

<..footnote id..>
 fn\FNnum x\minipageNum
-_-_-

<..fn mark sup..>
 \csname a:footnote-mark\endcsname
-_-_-

<..fn mark end sup..>
 \csname b:footnote-mark\endcsname
-_-_-

<..thank mark sup..>
 \csname a:thank-mark\endcsname
-_-_-

<..thank mark end sup..>
 \csname b:thank-mark\endcsname
-_-_-

<..shared config footnotes..>
 \NewConfigure{footnote-mark}{2}
 \NewConfigure{thank-mark}{2}
 \Configure{footnote-mark}
    {\HCode{<span class="footnote-mark">}}
    {\HCode{</span>}}
 \Configure{thank-mark}
    {\HCode{<span class="thank-mark">}}
    {\HCode{</span>}}
 \Css{span.thank-mark{ vertical-align: super }}
-_-_-

<..shared config footnotes..>+
 \NewConfigure{footnote-text}{2}
-_-_-

<..default offline footnote text..>+
 \Configure{footnote-text}
    {\HPage{}\HCode{<div class="footnote-text">}\par}
    {\ifvmode \IgnorePar\fi \EndP
     \HCode{</div>}\EndHPage{}}
-_-_-

<..onmouseover offline footnote text..>+
 \Configure{footnote-text}
    {\HPage{}\HCode{<div>}<.js footnote.>}
    {\ifvmode \IgnorePar\fi \EndP
     <.js /footnote.>\HCode{</div>}\EndHPage{}}
-_-_-

<..shared config footnotes..>+
 % \Css{span.footnote-mark{ vertical-align: super }}
 \Css{span.footnote-mark   sup.textsuperscript,
      span.footnote-mark a sup.textsuperscript{ font-size:80\%; }}
-_-_-

3.11.4 AMS

<..footnote for ams title..>
 \:CheckOption{fn-in}\if:Option
    \:CheckOption{mouseover}\if:Option
       <.mouseover inline ams title fn text.>%
    \else
       <.inline ams title fn text.>%
    \fi
 \else
    \:CheckOption{mouseover}\if:Option
       <.mouseover ams title fn text.>%
    \else \:CheckOption{frames-fn}\if:Option
            <.frames ams title fn text.>%
          \else
            <.offline ams title fn text.>%
    \fi   \fi
 \fi
-_-_-

<..offline ams title fn text..>
 \Configure{footnotetext}
    {<.fn mark sup.>\HPage{\FNnum}\HCode{<div>}\NoFonts}
    {\EndNoFonts}
    {\HCode{</div>}\EndHPage{}<.fn mark end sup.>}%
-_-_-

<..frames ams title fn text..>
 <.offline ams title fn text.>%
-_-_-

<..mouseover ams title fn text..>
 <.offline ams title fn text.>%
-_-_-

<..mouseover inline ams title fn text..>
 <.offline ams title fn text.>%
-_-_-

<..inline ams title fn text..>
 <.offline ams title fn text.>%
-_-_-

<..ams art,proc,book..>+
 \Css{span.footnote-mark{ vertical-align: super; font-size:80\%; }}
 % \Css{span.footnote-mark   sup.textsuperscript,
 %     span.footnote-mark a sup.textsuperscript{ font-size:80\%; }}
-_-_-

3.11.5 SCR *

<..scrbook maketitle footnote..>
 \:CheckOption{fn-in}\if:Option
    <.scrbook end-thanks author date and.>
 \else
    <.scrbook thanks author date and.>
 \fi
-_-_-

<..scrreprt maketitle footnote..>
 \:CheckOption{fn-in}\if:Option
    <.scrreprt end-thanks author date and.>
 \else
    <.scrreprt thanks author date and.>
 \fi
-_-_-

<..scr article,report,book..>
 %  \Css{span.footnote-mark{ vertical-align: super }}
 \Css{span.footnote-mark   sup.textsuperscript,
      span.footnote-mark a sup.textsuperscript{ font-size:80\%; }}
-_-_-

3.11.6 Plain

<..inline footnote plain..>
 \Configure{vfootnote}
   {<.mark inline vfootnote.>}
   {<.open inline vfootnote.>}
   {<.close inline vfootnote.>}
-_-_-

<..mark inline vfootnote..>
 \HCode{<sup>}\Link{fn\FNnum}{fn\FNnum-bk}%
       \ifx \FNmark\empty +\else \FNmark\fi\EndLink
 \HCode{</sup>}%
-_-_-

<..open inline vfootnote..>
 <.open inline footnote box.>%
 \HCode{<sup>}\Link{fn\FNnum-bk}{fn\FNnum}%
 \ifx \FNmark\empty +\else \FNmark\fi
 \EndLink\space\HCode{</sup>}%
-_-_-

<..close inline vfootnote..>
 <.close inline footnote box.>
-_-_-

<..offline footnote plain..>
 \Configure{vfootnote}
    {\HPageButton[fn\FNnum]{\FNmark}}
    {\BeginHPage[fn\FNnum]{ }}
    {\EndHPage{}}
-_-_-

3.11.7 On Mouse Over

<..onmouseover footnote css..>
 \expandafter\def\csname c:mouseover-footnote:\endcsname{%
   \def\:tempb{footnote}\csname c:mouseover-?:\endcsname}
 \Configure{mouseover-footnote} {tex4ht.body,FULLHTML}
-_-_-

<..onmouseover footnote mark..>
 <.start js.>\let\sv:link=\Link
 \def\Link[##1]{\let\Link=\sv:link
    \Link[##1 <.mouseover-footnote arguments.>\Hnewline]}%
-_-_-

<..mouseover-footnote arguments..>
 \mo:args{footnote}{\FNnum}{<.footnote id.>}%
-_-_-

<..js footnote..>
 <.start js.>%
 \HCode{<!--}%
 <.js From fn.>%
 \HCode{<footnote><.footnote id.>=<div class="js">}%
 <.js Skip fn.>%
 \HCode{-->}%
 <.js Cont fn.>%
-_-_-

<..js /footnote..>
 <.js Skip fn.>%
 \HCode{<!--}%
 <.js Cont fn.>%
 \HCode{</div></footnote>\Hnewline}%
 <.js Until fn.>%
 \HCode{-->}%
-_-_-

An alternative css-based approach:

\Configure{tableofcontents}  
   {\IgnorePar\EndP\HCode{<div class="tableofcontents">}\IgnorePar}  
   {}  
   {\IgnorePar\EndP\HCode{</div>}\ShowPar}  
   {\HCode{<br />}}   {}  
 
\ConfigureToc{section}  
  {\HCode{<div class="sectionToc" \a:LRdir><span class="mark">}}  
  { \HCode{</span>}}  
  {}  
  {\HCode{</div>}}  
\ConfigureToc{subsection}  
  {\HCode{<div class="subsectionToc" \a:LRdir><span class="mark">}}  
  { \HCode{</span>}}  
  {}  
  {\HCode{</div>}}  
\ConfigureToc{subsubsection}  
  {\HCode{<div class="subsubsectionToc" \a:LRdir><span class="mark">}}  
  { \HCode{</span>}}  
  {}  
  {\HCode{</div>}}  
 
\ConfigureToc{likesection}  
  {}  
  {\HCode{<div class="likesectionToc" \a:LRdir>}}  
  {}  
  {\HCode{</div>}}  
\ConfigureToc{likesubsection}  
  {}  
  {\HCode{<div class="likesubsectionToc" \a:LRdir>}}  
  {}  
  {\HCode{</div>}}  
\ConfigureToc{likesubsubsection}  
  {}  
  {\HCode{<div class="likesubsubsectionToc" \a:LRdir>}}  
  {}  
  {\HCode{</div>}}  
 
 
 
\Css{div.sectionToc { margin-left: 1em; text-indent: -1em;  }}  
\Css{div.sectionToc span.mark { text-align:right; width: 1em;  
               padding-right:0.25em; }}  
 
\Css{div.subsectionToc { margin-left:2.5em; text-indent: -2.5em; }}  
\Css{div.subsectionToc span.mark { text-align:right; width: 2.5em;  
               padding-right:0.25em; }}  
\Css{div.likesubsectionToc { margin-left: 2.5em; text-indent: -1.5em; }}  
 
\Css{div.subsubsectionToc { margin-left: 4.5em; text-indent: -4.5em; }}  
\Css{div.subsubsectionToc span.mark { text-align:right; width: 4.5em;  
               padding-right:0.25em; }}  
\Css{div.likesubsubsectionToc { margin-left: 4.5em; text-indent: -2em; }}

3.11.8 Other

<..latex ltfloat (footnotes)..>+
 \Configure{textsuperscript}
   {\HCode{<sup class="textsuperscript">}\bgroup \small}
   {\egroup \HCode{</sup>}}
-_-_-