<..eplain.4ht..>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% eplain.4ht 2014-07-12-22:36 %
% Copyright (C) 2004--2009 Eitan M. Gurari %
<.TeX4ht copyright.>
<.shared plain,eplain.>
<.eplain hooks.>
<.eplain listing.>
<.eplain bbl.>
<.eplain toc.>
<.eplain index.>
<.eplain dates.>
<.eplain vfootnote.>
<.eplain lists.>
<.eplain cols.>
<.eplain config.>
\Hinput{eplain}
\endinput
-_-_-
<..eplain bbl..>
\def\@citedef#1#2{\expandafter\gdef\csname
\@citelabel{#1}\endcsname{\a:cite\Link{#1}{}#2\EndLink\b:cite}}
\NewConfigure{cite}{2}
\def\biblabelprint#1{%
\noindent
\hbox to \biblabelwidth{%
\biblabelprecontents
\a:bibitem
\bgroup
\def\csname##1##2##3{##2}%
\edef\:temp{\noexpand\Link{}{#1}}%
\expandafter\egroup \:temp
\biblabelcontents{#1}%
\EndLink
\b:bibitem
\biblabelpostcontents
}%
\kern\biblabelextraspace
}%
\NewConfigure{bibitem}{2}
-_-_-
<..eplain bbl..>+
\def\:tempc{%
\let\:bblhook\bblhook
\append:def\bblhook{\expandafter\everypar
\expandafter{\the\everypar \HtmlPar}}%
\a:bibliography \o:@readbblfile: \b:bibliography
\let\bblhook\:bblhook}
\HLet\@readbblfile=\:tempc
\NewConfigure{bibliography}{2}
-_-_-
<..eplain hooks..>
\pend:def\flushleft{\a:flushleft}
\append:def\flushleft{\pend:def\@eoljustifyaction{\c:flushleft}}
\pend:def\@endflushleft{\b:flushleft}
\NewConfigure{flushleft}{3}
\pend:def\flushright{\a:flushright}
\append:def\flushright{\pend:def\@eoljustifyaction{\c:flushright}}
\pend:def\@endflushright{\b:flushright}
\NewConfigure{flushright}{3}
\pend:def\center{\a:center}
\append:def\center{\pend:def\@eoljustifyaction{\c:center}}
\pend:def\@endcenter{\b:center}
\NewConfigure{center}{3}
-_-_-
<..eplain cols..>
\catcode‘\:=12
\def\makecolumns#1/#2: {\par \begingroup
\@columndepth = #1
\advance\@columndepth by #2
\advance\@columndepth by -1
\divide \@columndepth by #2
\@linestogoincolumn = \@columndepth
\@linestogo = #1
\currentcolumn = 1
\def\@endcolumnactions{%
\ifnum \@linestogo<2
\the\crtok \egroup
\csname b:makecolumns\endcsname \endgroup \par
\else
\global\advance\@linestogo by -1
\ifnum\@linestogoincolumn<2
\global\advance\currentcolumn by 1
\global\@linestogoincolumn = \@columndepth
\expandafter\gdef\csname :makecolumn\endcsname{\csname
c:makecolumns\endcsname
\expandafter\global\expandafter\let
\csname :makecolumn\endcsname\empty}\the\crtok
\else
&\global\advance\@linestogoincolumn by -1
\fi
\fi
}%
\makeactive\^^M
\letreturn \@endcolumnactions
\@columnwidth = \hsize
\advance\@columnwidth by -\parindent
\divide\@columnwidth by #2
\penalty\abovecolumnspenalty
\noindent \csname a:makecolumns\endcsname
\valign\bgroup
&\hbox to \@columnwidth{\strut \hsize = \@columnwidth
\csname d:makecolumns\endcsname
##\csname e:makecolumns\endcsname
\csname :makecolumn\endcsname \hfil}\cr
}
\catcode‘\:=11
\let\:makecolumn=\empty
\NewConfigure{makecolumns}{5}
-_-_-
<..eplain cols..>+
\def\@columns#1{\def\NumColumns{#1}\a:columns\singlecolumn
\ifx \@ndcolumns\relax \let\@ndcolumns=\empty \fi
\append:def\@ndcolumns{\b:columns}}
\NewConfigure{columns}{2}
-_-_-
<..eplain index..>
\pend:defII\@idxwrite{%
\csname if@\@idxprefix indexfileopened\endcsname \else
\expandafter\immediate\openout\csname @\@idxprefix indexfile\endcsname =
\indexfilebasename.\@idxprefix dx
\expandafter\global\csname @\@idxprefix indexfileopenedtrue\endcsname
\fi
\warn:idx{\jobname}\html:addr
\hbox{\Link-{}{<.haddr prefix.>\last:haddr}\EndLink}{}%
\edef\:temp{\write\expandafter\noexpand\csname
@\@idxprefix indexfile\endcsname{\string \beforeentry{\RefFileNumber
\FileNumber}{<.haddr prefix.>\last:haddr}{}}}\:temp
}
<.theindex warning.>
\ind:defs
-_-_-
<..eplain hooks..>+
\def\:tempc#1#2#3{%
\html:addr
\o:definexref:{#1}{\Protect
\Link{xref\last:haddr}{}#2\Protect\EndLink}{#3}%
\Link{}{xref\last:haddr}\EndLink
}
\HLet\definexref\:tempc
-_-_-
<..eplain lists..>
\NewConfigure{li}{2}
\def\@finli{%
\a:li
\ifnum\itemnumber=1 \else \interitemskip \fi
\printitem
\b:li
\ifx\@optionalarg\empty \else
\expandafter\writeitemxref\expandafter{\@optionalarg}%
\fi
\advance\itemnumber by 1
\advance\itemletter by 1
\advance\itemromannumeral by 1
\ignorespaces
}
\NewConfigure{numberedlist}{4}
\append:def\numberedlist{\a:numberedlist
\Configure{li}{\c:numberedlist}{\d:numberedlist}}
\pend:def\endnumberedlist{\b:numberedlist}
\NewConfigure{orderedlist}{4}
\append:def\orderedlist{\a:orderedlist
\Configure{li}{\c:orderedlist}{\d:orderedlist}}
\pend:def\endorderedlist{\b:orderedlist}
\NewConfigure{unorderedlist}{4}
\append:def\unorderedlist{\a:unorderedlist
\Configure{li}{\c:unorderedlist}{\d:unorderedlist}}
\pend:def\endunorderedlist{\b:unorderedlist}
-_-_-
<..eplain listing..>
\def\listing#1{\par \begingroup
\a:listing
\@setuplisting \setuplistinghook
\input #1 \b:listing
\endgroup
}%
\append:def\linenumberedlisting{%
\everypar = {\advance\lineno by 1 \HtmlPar \printlistinglineno}}
\NewConfigure{listing}{2}
-_-_-
<..eplain toc..>
\pend:defI\readcontentsfile{\a:contents}
\append:defI\readcontentsfile{\b:contents}
\NewConfigure{contents}{2}
-_-_-
<..eplain toc..>+
\def\tocchapterentry#1#2{\line{\bf
\a:tocchapterentry #1\b:tocchapterentry #2\c:tocchapterentry}}%
\def\tocsectionentry#1#2{\line{\sl
\a:tocsectionentry #1\b:tocsectionentry #2\c:tocsectionentry}}%
\def\tocsubsectionentry#1#2{\line{\rm
\a:tocsubsectionentry #1\b:tocsubsectionentry
#2\c:tocsubsectionentry}}%
\NewConfigure{tocchapterentry}{3}
\NewConfigure{tocsectionentry}{3}
\NewConfigure{tocsubsectionentry}{3}
-_-_-
<..eplain toc..>+
\HAssign\toc:N=0
\def\:tempc#1#2#3#4{%
\def\:temp##1{%
\o:writenumberedcontentsentry:{#1}{#2}%
{\Link{toc-##1}{}#3\EndLink}{#4}}%
\expandafter\:temp\expandafter{\toc:N}%
\Link{}{toc-\toc:N}\EndLink \gHAdvance\toc:N by 1
}
\HLet\writenumberedcontentsentry=\:tempc
-_-_-
<..eplain dates..>
\let\:tempc\monthname
\pend:def\:tempc{\a:monthname}
\append:def\:tempc{\b:monthname}
\HLet\monthname\:tempc
\let\:tempc\fullmonthname
\pend:def\:tempc{\a:monthname}
\append:def\:tempc{\b:monthname}
\HLet\fullmonthname\:tempc
\NewConfigure{monthname}{2}
\let\:tempc\timestring
\pend:def\:tempc{\a:timestring}
\append:def\:tempc{\b:timestring}
\HLet\timestring\:tempc
\NewConfigure{timestring}{2}
\let\:tempc\timestamp
\pend:def\:tempc{\a:timestamp}
\append:def\:tempc{\b:timestamp}
\HLet\timestamp\:tempc
\NewConfigure{timestamp}{2}
\let\:tempc\today
\pend:def\:tempc{\a:today}
\append:def\:tempc{\b:today}
\HLet\today\:tempc
\NewConfigure{today}{2}
-_-_-