% (1)  latex tex4ht-mkht      
% (2)  latex mkht-scripts.4ht
%
% or
%
% (1) xhlatex tex4ht-mkht "html,3" 
% (2) xhlatex mkht-scripts.4ht "html,3"


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% tex4ht-mkht.tex                                        %
% Copyright (C) 1997--           Eitan M. Gurari         %
%                                                        %
% This work may be distributed and/or modified under the %
% conditions of the LaTeX Project Public License, either %
% version 1.3 of this license or (at your option) any    %
% later version. The latest version of this license is   %
% in                                                     %
%   http://www.latex-project.org/lppl.txt                %
% and version 1.3 or later is part of all distributions  %
% of LaTeX version 2003/12/01 or later.                  %
%                                                        %
% This work has the LPPL maintenance status "maintained".%
%                                                        %
% This Current Maintainer of this work                   %
% is Eitan M. Gurari.                                    %
%                                                        %
%                             gurari@cse.ohio-state.edu  %
%                 http://www.cse.ohio-state.edu/~gurari  %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\documentclass{article}

\def\CodeDel{{<<<-}{->>>}}
\ifx \HCode\UnDef
   \input tex4ht.sty
   \Preamble{xhtml}
   \input ProTex.sty     
   \AlProTex{4ht,<<<>>>,?,title,list}
\else
   \Configure{ProTex}{4ht,<<<>>>,?,title,list,[[]]}
\fi

\begin{document}

%%%%%%%%%%%%%%%%%%%%% definitions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcount\tmpcnt  \tmpcnt\time  \divide\tmpcnt  60
\edef\temp{\the\tmpcnt}
\multiply\tmpcnt  -60 \advance\tmpcnt  \time

\edef\version{\the\year-\ifnum \month<10 0\fi
  \the\month-\ifnum \day<10 0\fi\the\day
   -\ifnum \temp<10 0\fi \temp
   :\ifnum \tmpcnt<10 0\fi\the\tmpcnt}

\def\CopyYear.#1.{%
   \ifnum #1=\year #1\space\space\space\space\space\space
    \else          #1--\the\year\fi
}

\def\mkhtNote{

}
\newtoks\toks
\expandafter\toks\expandafter{\mkhtNote}

%%%%%%%%%%%%%%%%%%%%% end definitions %%%%%%%%%%%%%%%%%%%%%%%%%



%%%%%%%%%%%%%%%%%%
\section{TeX Dialects}
%%%%%%%%%%%%%%%%%%



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{\LaTeX}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\<def script\><<<-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{LaTeX}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\<htlatex ...\><<<
        |<unix line|>|<latex|>
        |<latex|>
        |<latex|>
        |<base|>tex4ht |<dir ch|>|<@|>1  |<III|>
        |<base|>t4ht |<dir ch|>|<@|>1 |<IV|>

>>>


\<latex\><<<
latex |<@|>5 |<'|>|<definitions|>|<get parameters|>|empty>>>

\<get parameters\><<<
\HCode |<'|>|<@|>2|<'|>.a.b.c.\input |<'|> |<@|>1>>>


\<definitions\><<<
\makeatletter|<get 2nd arg|>|<2e + 209|>\makeatother>>>

\<get 2nd arg\><<<
\def\HCode{\futurelet\HCode\HChar}\def\HChar{|<double quotes??|>}>>>

\<double quotes??\><<<
\ifx"\HCode|<remove qts|>\expandafter\HCode\else\expandafter\Link\fi>>>

\<remove qts\><<<
\def\HCode"##1"{\Link##1}>>>


\<2e + 209\><<<
\def\Link#1.a.b.c.{|<2e|>|<209|>}>>>

\<2e\><<<
\g@addto@macro\@documentclasshook{|<require package|>}>>>

\<209\><<<
|<save|>\def\documentstyle{|<recall|>|<options|>|<209+tex4ht|>}>>>

\<require package\><<<
\RequirePackage[#1|<II|>|<,html|>]{tex4ht}>>>


\<options\><<<
|<def tex4ht|>{#1|<II|>|<,html|>}>>>


\<209+tex4ht\><<<
|<209+tex4ht+...|>\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}>>>

\<209+tex4ht+...\><<<
\def\HCode####1{\documentstyle[tex4ht,}>>>


\<save\><<<
\let\HCode\documentstyle>>>

\<recall\><<<
\let\documentstyle\HCode>>>



\<htlatex 2e...\><<<
        |<unix line|>|<latex2e|>
        |<latex2e|>
        |<latex2e|>
        |<base|>tex4ht |<dir ch|>|<@|>1  |<III|>
        |<base|>t4ht |<dir ch|>|<@|>1 |<IV|>

>>>




\<latex2e\><<<
latex |<@|>5 |<'|>|<definitions2e|>|<get parameters|>|empty>>>

\<definitions2e\><<<
\makeatletter|<get 2nd arg|>|<2e only|>\makeatother>>>


\<2e only\><<<
\def\Link#1.a.b.c.{|<2e|>}>>>





\<htlatex 209...\><<<
        |<unix line|>|<latex209|>
        |<latex209|>
        |<latex209|>
        |<base|>tex4ht |<dir ch|>|<@|>1  |<III|>
        |<base|>t4ht |<dir ch|>|<@|>1 |<IV|>

>>>




\<latex209\><<<
latex  |<@|>5 |<'|>|<definitions209|>|<get parameters|>|empty>>>

\<definitions209\><<<
\makeatletter|<get 2nd arg|>|<209 only|>\makeatother>>>


\<209 only\><<<
\def\Link#1.a.b.c.{|<209|>}>>>

->>>


\<add script\><<<-
\OutputCodE\<\pref latex\latex.\ext\>   \script{\pref latex}{\ext}  %
\expandafter\let\csname\pref latex\latex\endcsname=\UnDef
%
->>>


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{\TeX}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\<def script\><<<-

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{TeX}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\<httex...\><<<
        |<unix line|>|<tex|>
        |<tex|>
        |<tex|>
        |<base|>tex4ht |<dir ch|>|<@|>1 |<III|>
        |<base|>t4ht |<dir ch|>|<@|>1 |<IV|>

>>>

\<tex\><<<
tex  |<@|>5 |<'|>|<tex definitions|>|<get parameters|>|empty>>>


\<tex definitions\><<<
|<set hook|>|<get 2nd arg|>|empty>>>

\<set hook\><<<
\def\Link#1.a.b.c.{|<def tex4ht|>{|<options|>\input tex4ht.sty }}>>>


\<def tex4ht\><<<
\expandafter\def\csname tex4ht\endcsname>>>

->>>


\<add script\><<<-
\<\pref tex.\ext\><<<
\<httex...\>
>>> %
%
\OutputCodE\<\pref tex.\ext\>    \script{\pref tex}{\ext}  %
%
->>>

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Texinfo}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\<def script\><<<-
%%%%%%%%%%%%%%%%%%%%
\section{TeXinfo}
%%%%%%%%%%%%%%%%%%%%

The loading of tex4ht takes place at the @rm command at the end of the
texinfo.tex file.

\<httexi...\><<<
        |<unix line|>|<texinfo|>
        |<texinfo|>
        |<texinfo|>
        |<base|>tex4ht |<dir ch|>|<@|>1 |<III|>
        |<base|>t4ht |<dir ch|>|<@|>1 |<IV|>
|<Rem|>        texindex ??

>>>

\<texinfo\><<<
tex  |<@|>5 |<'|>|<texinfo definitions|>|<get parameters|>|empty>>>


\<texinfo definitions\><<<
|<tex definitions|>\let\svrm=\rm\def\rm{\svrm|<tex4ht into texinfo|>}>>>

\<tex4ht into texinfo\><<<
\ifx\c\comment\def\rm{\let\rm=\svrm|<load into texinfo|>}\expandafter\rm\fi>>>

\<load into texinfo\><<<
|<change cats|>\csname tex4ht\endcsname|<restore cats|>|empty>>>

\<change cats\><<<
\catcode`\@=12\catcode`\\=0 >>>

\<restore cats\><<<
\catcode`\@=0\catcode`\\=13 >>>
->>>


\<add script\><<<-
\<\pref texi.\ext\><<<
\<httexi...\>
>>> %
%
\OutputCodE\<\pref texi.\ext\>   \script{\pref texi}{\ext}  %
%
->>>


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Context}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\<def script\><<<-
%%%%%%%%%%%%%%%
\section{ConTeXt}
%%%%%%%%%%%%%%%


\<context...\><<<
        |<unix line|>|<texexec|>
        |<base|>tex4ht |<dir ch|>|<@|>1 |<III|>
        |<base|>t4ht |<dir ch|>|<@|>1 |<IV|>

>>>

\<texexec\><<<
texexec --arg="opt-arg=|<@|>2" --use=tex4ht |<@|>5 |<@|>1 >>>

\immediate\write16{...............................fix......}
\immediate\write16{%
perl /home/4//gurari/main.dir/try.dir/context.dir/context/perltk/texexec.pl%
}
\immediate\write16{........................................}
->>>

\<add script\><<<-
\<\pref context.\ext\><<<
\<context...\>
>>> %
%
\OutputCodE\<\pref context.\ext\>   \script{\pref texexec}{\ext}  %
%
->>>


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Mex}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\<def script\><<<-

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{MeX}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\<htmex...\><<<
        |<unix line|>|<mex|>
        |<mex|>
        |<mex|>
        |<base|>tex4ht |<dir ch|>|<@|>1 |<III|>
        |<base|>t4ht |<dir ch|>|<@|>1 |<IV|>

>>>

\<mex\><<<
mex |<@|>5 |<'|>|<tex definitions|>|<get parameters|>|empty>>>

->>>


\<add script\><<<-
\<\pref mex.\ext\><<<
\<htmex...\>
>>> %
%
\OutputCodE\<\pref mex.\ext\>    \script{\pref mex}{\ext}  %
%
->>>

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Mex}
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 
% 
% \<def script\><<<-
% 
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{MeX il2-pl}
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 
% \<htmex-pl...\><<<
%         |<unix line|>|<mex-pl|>
%         |<mex-pl|>
%         |<mex-pl|>
%         |<base|>tex4ht |<dir ch|>|<@|>1 |<III|>
%         |<base|>t4ht |<dir ch|>|<@|>1 |<IV|>
% 
% >>>
% 
% \<mex-pl\><<<
% mex-pl -translate-file=il2-pl |<'|>|<tex definitions|>|<get parameters|>|empty>>>
% 
% ->>>
% 
% 
% \<add script\><<<-
% \<\pref mex-pl.\ext\><<<
% \<htmex-pl...\>
% >>> %
% %
% \OutputCodE\<\pref mex-pl.\ext\>    \script{\pref mex-pl}{\ext}  %
% %
% ->>>



%%%%%%%%%%%%%%%%%%
\section{Markup Dialects}
%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%
\subsection{HTML: ht}
%%%%%%%%%%%%%

\<unix scripts\><<<-
\Ii{,html}
\Iii{-i~/tex4ht.dir/texmf/tex4ht/ht-fonts/#1}
\Iv{#1 -cvalidatehtml  ## -d~/WWW/temp/ -m644  }

\make{ht}
->>>

\<ms scripts\><<<-
\Ii{,html}
\Iii{-ic:\tex4ht\texmf\tex4ht\ht-fonts\#1 
     -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env}
\Iv{#1 -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cvalidatehtml }

\make{ht}
->>>

The first line is for `ht ...  ...' scripts.

\<perl options\><<<-
 "",     "ht",        "",         "", "", "-cvalidatehtml",
 "ht",   "htlatex",   "latex",    "", "", "-cvalidatehtml",
 "ht",   "httex",     "tex",      "", "", "-cvalidatehtml",
 "ht",   "httexi",    "texi",     "", "", "-cvalidatehtml",
 "ht",   "httexexec", "texexec",  "", "", "-cvalidatehtml",
->>>


%%%%%%%%%%%%%
\subsection{XHTML: xh}
%%%%%%%%%%%%%

\<unix scripts\><<<-
\Ii{,xhtml}
\Iii{-i~/tex4ht.dir/texmf/tex4ht/ht-fonts/#1}
\Iv{#1  -cvalidate   ## -d~/WWW/temp/ -m644 }
\make{xh}
->>>

\<ms scripts\><<<-
\Ii{,xhtml}
\Iii{-ic:\tex4ht\texmf\tex4ht\ht-fonts\#1 
     -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env}
\Iv{#1 -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cvalidate }
\make{xh}
->>>





%%%%%%%%%%%%%
\subsection{Unicode XHTML: uxh}
%%%%%%%%%%%%%

\<unix scripts\><<<-
\Ii{,xhtml,uni-html4}
\Iii{-i~/tex4ht.dir/texmf/tex4ht/ht-fonts/#1 -cunihtf}
\Iv{#1 -cvalidate  ## -d~/WWW/temp/ -m644 }
\make{uxh}
->>>

\<ms scripts\><<<-
\Ii{,xhtml,uni-html4}
\Iii{-ic:\tex4ht\texmf\tex4ht\ht-fonts\#1 
     -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env
      -cunihtf}
\Iv{#1 -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cvalidate }
\make{uxh}
->>>

\<perl options\><<<-
 "uxh", "uxhlatex",  "latex",   "xhtml,uni-html4", " -cunihtf", "-cvalidate",
 "uxh", "uxhtex",    "tex",     "xhtml,uni-html4", " -cunihtf", "-cvalidate",
 "uxh", "uxhtexi",   "texi",    "xhtml,uni-html4", " -cunihtf", "-cvalidate",
 "uxh", "uxhtexexec","texexec,  "xhtml,uni-html4", " -cunihtf", "-cvalidate",
->>>

%%%%%%%%%%%%%
\subsection{XHTML+MathML: xhm}
%%%%%%%%%%%%%

\<unix scripts\><<<-
\Ii{,xhtml,mathml}
\Iii{-i~/tex4ht.dir/texmf/tex4ht/ht-fonts/#1 -cunihtf}
\Iv{#1 -cvalidate   ## -d~/WWW/temp/ -m644 }
\make{xhm}
->>>

\<ms scripts\><<<-
\Ii{,xhtml,mathml}
\Iii{-ic:\tex4ht\texmf\tex4ht\ht-fonts\#1
     -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cunihtf}
\Iv{#1 -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cvalidate }
\make{xhm}
->>>


\<perl options\><<<-
 "xhm", "xhmlatex", "latex",  "xhtml,mathml", " -cunihtf", "-cvalidate",
 "xhm", "xhmtex",   "tex",    "xhtml,mathml", " -cunihtf", "-cvalidate",
 "xhm", "xhmtexi",  "texi",   "xhtml,mathml", " -cunihtf", "-cvalidate",
 "xhm", "xhmtexexec,"texexec", "xhtml,mathml", " -cunihtf", "-cvalidate"
->>>


%%%%%%%%%%%%%
\subsection{Mozilla XHTML+MathML: mz}
%%%%%%%%%%%%%

\<unix scripts\><<<-
\Ii{,xhtml,mozilla}
\Iii{-i~/tex4ht.dir/texmf/tex4ht/ht-fonts/#1 -cmozhtf}
\Iv{#1 -cvalidate   ## -d~/WWW/temp/ -m644 }
\make{mz}
->>>

\<ms scripts\><<<-
\Ii{,xhtml,mozilla}
\Iii{-ic:\tex4ht\texmf\tex4ht\ht-fonts\#1
     -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env  -cmozhtf}
\Iv{#1 -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cvalidate }
\make{mz}
->>>


\<perl options\><<<-
 "mz", "mzlatex",   "latex",   "xhtml,mozilla", " -cmozhtf",  "-cvalidate",
 "mz", "mztex",     "tex",     "xhtml,mozilla", " -cmozhtf",  "-cvalidate",
 "mz", "mztexi",    "texi",    "xhtml,mozilla", " -cmozhtf",  "-cvalidate",
 "mz", "mztexexec", "texexec", "xhtml,mozilla", " -cmozhtf",  "-cvalidate",
->>>


%%%%%%%%%%%%%
\subsection{OpenOffice: oo}
%%%%%%%%%%%%%

\<unix scripts\><<<-
\Ii{,xhtml,ooffice}
\Iii{-i~/tex4ht.dir/texmf/tex4ht/ht-fonts/#1 -cmozhtf}
\Iv{#1 -coo }
\make{oo}
->>>

\<ms scripts\><<<-
\Ii{,xhtml,ooffice}
\Iii{-ic:\tex4ht\texmf\tex4ht\ht-fonts\#1
     -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cmozhtf}
\Iv{#1 -coo -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cvalidate }
\make{oo}
->>>


\<perl options\><<<-
 "oo", "oolatex",   "latex",   "xhtml,ooffice", "ooffice/\! -cmozhtf",  "-coo -cvalidate",
 "oo", "ootex",     "tex",     "xhtml,ooffice", "ooffice/\! -cmozhtf",  "-coo -cvalidate",
 "oo", "ootexi",    "texi",    "xhtml,ooffice", "ooffice/\! -cmozhtf",  "-coo -cvalidate",
 "oo", "ootexexec", "texexec", "xhtml,ooffice", "ooffice/\! -cmozhtf",  "-coo -cvalidate",
->>>

%%%%%%%%%%%%%
\subsection{TEI: tei, teim}
%%%%%%%%%%%%%

\<unix scripts\><<<-
\Ii{,xhtml,tei}
\Iii{-i~/tex4ht.dir/texmf/tex4ht/ht-fonts/#1 -cunihtf}
\Iv{#1 -cvalidate   ## -d~/WWW/temp/ -m644 }
\make{tei}

\Ii{,xhtml,tei-mml}
\Iii{-i~/tex4ht.dir/texmf/tex4ht/ht-fonts/#1 -cunihtf}
\Iv{#1 -cvalidate   ## -d~/WWW/temp/ -m644 }
\make{teim}
->>>

\<ms scripts\><<<-
\Ii{,xhtml,tei}
\Iii{-ic:\tex4ht\texmf\tex4ht\ht-fonts\#1
     -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cunihtf}
\Iv{#1 -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cvalidate }
\make{tei}

\Ii{,xhtml,tei-mml}
\Iii{-ic:\tex4ht\texmf\tex4ht\ht-fonts\#1 
     -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cunihtf}
\Iv{#1 -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cvalidate }
\make{teim}
->>>


\<perl options\><<<-
 "tei",  "teilatex",  "latex",   "xhtml,tei",    " -cunihtf",  "-cvalidate",
 "tei",  "teitex",    "tex",     "xhtml,tei",    " -cunihtf",  "-cvalidate",
 "tei",  "teitexi",   "texi",    "xhtml,tei",    " -cunihtf",  "-cvalidate",
 "tei",  "teitexexec","texexec", "xhtml,tei",    " -cunihtf",  "-cvalidate",
 "teim", "teimlatex", "latex", " "xhtml,tei-mml"," -cunihtf",  "-cvalidate",
 "teim", "teimtex",   "tex",     "xhtml,tei-mml"," -cunihtf",  "-cvalidate",
 "teim", "teimtexi",  "texi",    "xhtml,tei-mml"," -cunihtf",  "-cvalidate",
 "teim", "teimtexexec","texexec","xhtml,tei-mml"," -cunihtf",  "-cvalidate",
->>>


%%%%%%%%%%%%%
\subsection{DocBook: db, dbm}
%%%%%%%%%%%%%

\<unix scripts\><<<-
\Ii{,xhtml,docbook}
\Iii{-i~/tex4ht.dir/texmf/tex4ht/ht-fonts/#1 -cunihtf}
\Iv{#1    -cvalidate ## -d~/WWW/temp/ -m644  }
\make{db}

\Ii{,xhtml,docbook-mml}
\Iii{-i~/tex4ht.dir/texmf/tex4ht/ht-fonts/#1 -cunihtf}
\Iv{#1    -cvalidate ## -d~/WWW/temp/ -m644  }
\make{dbm}
->>>

\<ms scripts\><<<-
\Ii{,xhtml,docbook}
\Iii{-ic:\tex4ht\texmf\tex4ht\ht-fonts\#1
     -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cunihtf}
\Iv{#1 -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cvalidate }
\make{db}

\Ii{,xhtml,docbook-mml}
\Iii{-ic:\tex4ht\texmf\tex4ht\ht-fonts\#1
     -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cunihtf}
\Iv{#1 -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cvalidate }
\make{dbm}
->>>



\<perl options\><<<-
 "db",  "dblatex",   "latex",   "xhtml,docbook",     " -cunihtf",  "-cvalidate",
 "db",  "dbtex",     "tex",     "xhtml,docbook",     " -cunihtf",  "-cvalidate",
 "db",  "dbtexi",    "texi",    "xhtml,docbook",     " -cunihtf",  "-cvalidate",
 "db",  "dbtexexec", "texexec", "xhtml,docbook",     " -cunihtf",  "-cvalidate",
 "dbm", "dbmlatex",  "latex",   "xhtml,docbook-mml", " -cunihtf",  "-cvalidate",
 "dbm", "dbmtex",    "tex",     "xhtml,docbook-mml", " -cunihtf",  "-cvalidate",
 "dbm", "dbmtexi",   "texi",    "xhtml,docbook-mml", " -cunihtf",  "-cvalidate",
 "dbm", "dbmtexexec","texexec", "xhtml,docbook-mml", " -cunihtf",  "-cvalidate",
->>>



%%%%%%%%%%%%%
\subsection{MS Word HTML: w}
%%%%%%%%%%%%%


\<unix scripts\><<<-
\Ii{,xhtml,word}
\Iii{-i~/tex4ht.dir/texmf/tex4ht/ht-fonts/#1  -csymhtf}
\Iv{#1    -cvalidate ## -d~/WWW/temp/ -m644 }
\make{w}
->>>

\<ms scripts\><<<-
\Ii{,xhtml,word}
\Iii{-ic:\tex4ht\texmf\tex4ht\ht-fonts\#1 
     -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env  -csymhtf}
\Iv{#1 -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -cvalidate }
\make{w}
->>>




\<perl options\><<<-
 "w", "wlatex",   "latex",   "xhtml,word", " -csymhtf", "",
 "w", "wtex",     "tex",     "xhtml,word", " -csymhtf", "",
 "w", "wtexi",    "texi",    "xhtml,word", " -csymhtf", "",
 "w", "wtexexec", "texexec", "xhtml,word", " -csymhtf", "",
->>>




%%%%%%%%%%%%%
\subsection{JavaHelp: jh}
%%%%%%%%%%%%%

\<unix scripts\><<<-
\Ii{,html,javahelp,3.2,unicode}
\Iii{-i~/tex4ht.dir/texmf/tex4ht/ht-fonts/#1 -cmozhtf -u10}
\Iv{#1 -d$1-doc/ -m644  -cjavahelp -cvalidate }
\make{jh}
->>>

\<ms scripts\><<<-
\Ii{,html,javahelp,3.2,unicode}
\Iii{-ic:\tex4ht\texmf\tex4ht\ht-fonts\#1 
     -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env
      -cmozhtf -u10}
\Iv{#1 -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -d%1-doc\ -cjavahelp }
\make{jh}
->>>


\<unix scripts\><<<-
\Ii{,html,javahelp,3.2,unicode,jh1.0}
\Iii{-i~/tex4ht.dir/texmf/tex4ht/ht-fonts/#1 -cmozhtf -u10}
\Iv{#1 -d$1-doc/ -m644 ## -cvalidate }
\make{jh1}
->>>

\<ms scripts\><<<-
\Ii{,html,javahelp,3.2,unicode,jh1.0}
\Iii{-ic:\tex4ht\texmf\tex4ht\ht-fonts\#1 
     -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env
      -cmozhtf -u10}
\Iv{#1 -ec:\tex4ht\texmf\tex4ht\base\win32\tex4ht.env -d%1-doc\ -cjavahelp1 }
\make{jh1}
->>>

\<perl options\><<<-
 "jh", "jhlatex",  "latex",  "html,javahelp,3.2,unicode,jh1.0", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp -cvalidate",
 "jh", "jhtex",    "tex",    "html,javahelp,3.2,unicode,jh1.0", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp -cvalidate",
 "jh", "jhtexi",   "texi",   "html,javahelp,3.2,unicode,jh1.0", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp -cvalidate",
 "jh", "jhtexexec","texexec, "html,javahelp,3.2,unicode,jh1.0", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp -cvalidate",
->>>


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{mkht.4ht}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\<mkht\><<<-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% mkht.4ht                              ?version %
% Copyright (C) ?CopyYear.1997.       Eitan M. Gurari         %
?<TeX4ht copyright?>

\def\exit{\documentclass{article}\begin{document}\end{document}\endinput}
\bgroup
  \def\missing#1{\aftergroup\exit
     \immediate\write16{---------------------------- error 
        ---------------------------- 
        ^^JRequires #1ProTex.sty from 
        http://www.cse.ohio-state.edu/\string
       ~gurari/systems.html^^J%
       ---------------------------------------------------------------}}
  \openin15=ProTex.sty \ifeof15 \missing{}\else \closein15 \fi
  \openin15=AlProTex.sty \ifeof15 \missing{Al}\else \closein15 \fi
\egroup

\documentclass{article}

\ifx \HCode\UnDef
  \input tex4ht.sty
  \Preamble{xhtml}
  \input ProTex.sty
  \AlProTex{foo,<<<>>>,|,title,list}
  \begin{document}
  \EndPreamble
\else
  \Configure{ProTex}{foo,<<<>>>,|,title,list,[[]]}
  \begin{document}
\fi

\tableofcontents

?<def script?>

%%%%%%%%%%%%%%%%%%%%%%
\section{Script Components}
%%%%%%%%%%%%%%%%%%%%%%

\def\setcats{\catcode`\\=12 \catcode`\%=12 \catcode`\~=12
 \catcode`\_=12
}

\def\Remark{\bgroup \catcode`\#=12 \setcats \Rema}  \def\Rema#1{\egroup\def\Rem{#1}}
\def\Ii{\def\II}
\def\Iii{\bgroup \setcats \Iiicont}  \def\Iiicont#1{\egroup\def\III.##1.{#1}}
\def\Iv{\bgroup \setcats \Ivcont}    \def\Ivcont#1{\egroup\def\IV.##1.{#1}}
\def\Quote{\bgroup \setcats \Qcont}  \def\Qcont#1{\egroup\def\quote{#1}}
\def\Argchar{\bgroup \setcats \Acont}\def\Acont#1{\egroup\def\argchar{#1}}
\def\Dirchar{\bgroup \setcats \Dcont}\def\Dcont#1{\egroup\def\dirchar{#1}}
\def\Ext{\bgroup \setcats \Econt}    \def\Econt#1{\egroup\def\ext{#1}%
  ?<unix shebang line?>}
\def\Base{\bgroup \setcats \Bcont}   \def\Bcont#1{\egroup\def\base{#1}}
\def\Script{\def\script##1##2}  % #1 -- file    #2 -- extension   
\def\Options#1{\ifx \OPTIONS\UnDef \def\OPTIONS{#1}\fi}
\def\Latex#1{\ifx \latex\UnDef \def\latex{#1}\fi}

\let\Rem=\relax       
\let\II=\relax       
\let\III=\relax
\let\IV=\relax
\let\quote=\relax
\let\argchar=\relax
\let\dirchar=\relax
\let\ext=\relax
\ifx \script\UnDef \let\script=\relax \fi
\let\base=\relax
\let\firstln=\relax
       

\<Rem\><<<
|Rem>>>

\<II\><<<
|II>>>

\<III\><<<
|III.|<@|>3.>>>

\<IV\><<<
|IV.|<@|>4.>>>

\<'\><<<
|quote>>>

\<@\><<<
|argchar>>>

\<dir ch\><<<
|dirchar>>>

\<base\><<<
|base>>>

\<unix line\><<<
|firstln
        endfirstln>>>

\def\IfExt#1,#2//{\def\next{#1}%
   \ifx \next\ext \def\next{\csname iftrue\endcsname}%
   \else \ifx \next\empty \def\next{\csname iffalse\endcsname}%
   \else \def\next{\IfExt#2,,//}\fi\fi \next}

\begingroup
\catcode`\:=11 \catcode`\^=7    \catcode`\^^M=13%
%
\gdef\make#1{%
  \expandafter\IfExt\OPTIONS,,//%
  %
   \subsection{#1}%
   \def\temp##1{\par{\tt\string##1: \meaning##1}}%
   \temp\quote
   \temp\argchar
   \temp\dirchar
   \temp\ext
   \temp\script
   \temp\base
   \temp\firstln
   \temp\latex
   \temp\Rem
   \temp\II
   \temp\III
   \temp\IV
   \def\pref{#1} %
   \<\pref latex\latex.\ext\><<<
   \<htlatex \latex...\>
   >>> %
   ?<add script?>%
  \fi
}                                      %
\endgroup


\input \JOBNAME

\end{document}
\endinput
->>>


The script should have an explicit shebang (\#!) line.  A command on
the first line implies a call for [t]csh interpretation.  To avoid
shebang at the first line, leave the first line blank.


\<unix shebang line\><<<-
  \def\firstln{unix}\ifx \firstln\ext
           \def\firstln##1endfirstln{##1}%
  \else    \def\firstln##1endfirstln{}\fi
->>>





%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{mkht-scripts.4ht}
%%%%%%%%%%%%%%%%%%%%%%%%%%%




\<mkht-scripts\><<<-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% mkht-scripts.4ht                      ?version %
% Copyright (C) ?CopyYear.2000.       Eitan M. Gurari         %
?<TeX4ht copyright?>

\ifx \JOBNAME\UnDef
   \def\JOBNAME{mkht-scripts.4ht}
   \def\next{\input mkht.4ht  \endinput}
   \expandafter\next
\fi

\Options{unix,bat}   % {unix,bat}, {unix}, {bat}
\Latex{}             % {}, {2e}, {209}

%%%%%%%%%%%%%%%%%%
\section{Unix Scripts}
%%%%%%%%%%%%%%%%%%

%%%%%%%%%%
\Ext{unix}
%%%%%%%%%%
\ifOption{Needs}{%
\Script{%                        #1 -- file    #2 -- extension
   \Needs{"sed -e 's/\#\# -d/ -d/g' < #1.#2 >  /home/4/gurari/tex4ht.dir/bin/solaris/#1"}%
   \Needs{"chmod 700 /home/4/gurari/tex4ht.dir/bin/solaris/#1"}%
   \Needs{"mkdir  mn.dir/ht-unix"}%
   \Needs{"cp #1.#2  mn.dir/ht-unix/#1"}%
}}{}
\Base{}
\Quote{'}
\Argchar{$}
\Dirchar{-f/}
\Remark{#}

?<unix scripts?>

%%%%%%%%%%%%%%%%%%
\section{MS Window Scripts}
%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%
\Options{bat}
%%%%%%%%%%%%%%%%%%

%%%%%%%%%
\Ext{bat}
%%%%%%%%%
\ifOption{Needs}{\Script{%
   \Needs{"mkdir  mn.dir/ht-win32"}%
   \Needs{"cp #1.#2  mn.dir/ht-win32/."}%
}}{}
\Quote{}
\Argchar{%}
\Dirchar{}
\Remark{Rem }

?<ms scripts?>
?<mkht note?>

\end{document}
->>>





The htlatex-oriented scripts have the following outline.

\begin{verbatim}
        latex  $5 $1
        latex  $5 $1
        latex  $5 $1   
        tex4ht -f/$1  -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3  
        t4ht -f/$1 $4 
\end{verbatim}

The latex command may be introduced with a filename residing out of
the work directory. However, it produces the dvi code in the work
directory. Consequently, when activated by htlatex-oriented scripts,
the tex4ht.c and t4ht.c utilities need to look for the dvi code in the
work directory.  The -f prefix asks these utilities to ignore the
paths possibly appearing in \verb!$1!. A path is recognized by
determining whether the character immediately after \verb'-f' is a
directory indicator character `\verb+\+' or `\verb+/+'.


 



%%%%%%%%%%%%%%%%%%
\section{Perl Script}
%%%%%%%%%%%%%%%%%%




\<mk4ht.perl\><<<-
#!/usr/bin/env perl
?<perl copyright notice?>
use strict;
$^W=1; # turn warning on
?<available options?>
?<help info?>
print "mk4ht (?version)\n";
if(  !@ARGV  ){
  print "improper command\n";
  showInstrucions(); exit(1);
}
my @command=("","","","","");
my $i=0;
my $j=0;
my $param;
foreach $param (@ARGV) {
  if( $i == 0 ){
    for( $j=1; $j<$#options; $j+=6 ){
      if( $param eq $options[$j] ){
         if( $options[$j-1] eq "" ){
           $command[0] = $options[$j];
         } else {
           $command[0] = "ht".$options[$j+1];
         }
         $command[2] = $options[$j+2];
         $command[3] = $options[$j+3];
         $command[4] = $options[$j+4];
         last;
    } }
    if( $j>$#options ){ print "improper command: $param \n";
                        showInstrucions(); exit(1); }
  } elsif ( $i== 1 ) {
    $command[1] = $param;
  } elsif ( $i== 2 ) {
    if( $command[2] eq "" ){
      $command[2] = $param;
    } else {
      $command[2] = $param. "," . $command[2];
    }
  } elsif ( $i== 3 ) {
    $command[3] = $param . $command[3];
  } else {
    $command[4] = $param. " " .$command[4];
  }
  $i++;
}
my $commando = $command[0] . " "    . $command[1] . " \"".
            $command[2] . "\" \"". $command[3] . "\" \"" .
            $command[4] . "\"";
print "$commando\n";
my $rtrn;
if( $rtrn = system($commando) ){
   print "--- error --- failed to execute command\n";
} else { exit( !$rtrn ); }

->>>



\<available options\><<<-
my @options = (
?<perl options?>
);
->>>

\<help info\><<<-
sub showInstrucions(){
  print " option1:  mk4ht #1 \"#2\" \"#3\" \"#4\" \"#5\"\n";
  print " \n";
  print "    #1: htlatex, mzlatex, oolatex, dblatex, dbmlatex,\n";
  print "        teilatex, teimlatex, uxhlatex, wlatex, xhlatex,\n";
  print "        xhmlatex\n";
  print " \n";
  print "        also 'tex', 'texi', and 'texexec' instead of 'latex'\n";
  print " \n";
  print "    #2: file name\n";
  print "    #3: optional arguments for latex/tex/texi/texexec \n";
  print "    #4: optional arguments for tex4ht.c\n";
  print "    #5: optional arguments for t4ht.c\n";
  print " \n";
  print " option2:  mk4ht ht #2 #3 \"#4\" \"#5\"\n";
  print " \n";
  print "    #1: ht\n";
  print "    #2: latex, tex\n";
  print "    #3: file name\n";
  print "    #4: optional arguments for tex4ht.c\n";
  print "    #5: optional arguments for t4ht.c\n";
  print " \n";
  print " Within the program, in column three of the options\n";
  print " variable, the  requests for the commands \"latex\",\n";
  print " \"tex\", etc. can be replaced with other equivalent\n";
  print " commands (e.g., \"tex -fmt=latex\").\n";
}
->>>





Safety guards:

\begin{itemize}
\item The `use strict'  should be employed when not
   dynamically exporting variables. 
\item Put `my' on local declarations.
\item The `W'  (?)

\end{itemize}



%%%%%%%%%%%%%%%%%%
\section{Info}
%%%%%%%%%%%%%%%%%%



\<mkht note\><<<-
\immediate\write16{--------------------------------------------------------}
\immediate\write16{* Compile mkht-scripts.4ht with latex to get the 
                                                              full scripts.}
\immediate\write16{* For shorter latex2e scripts, compile a file whose 
                                                                content is:}
\immediate\write16{\space\space\space\space\def\string\latex{2e}
                                      \string\input\space mkht-scripts.4ht }
\immediate\write16{* For shorter latex209 scripts, compile a file whose 
                                                                content is:}
\immediate\write16{\space\space\space\space\def\string\latex{209}
                                      \string\input\space mkht-scripts.4ht }
\immediate\write16{* Remove the extension .unix from the file names        }
\immediate\write16{--------------------------------------------------------}
->>>

\<TeX4ht copyright\><<<-
%                                                        %
% This work may be distributed and/or modified under the %
% conditions of the LaTeX Project Public License, either %
% version 1.3 of this license or (at your option) any    %
% later version. The latest version of this license is   %
% in                                                     %
%   http://www.latex-project.org/lppl.txt                %
% and version 1.3 or later is part of all distributions  %
% of LaTeX version 2003/12/01 or later.                  %
%                                                        %
% This work has the LPPL maintenance status "maintained".%
%                                                        %
% This Current Maintainer of this work                   %
% is Eitan M. Gurari.                                    %
%                                                        %
% If you modify this program your changing its signature %
% with a directive of the following form will be         %
% appreciated.                                           %
%            \message{signature}                         %
%                                                        %
%                             gurari@cse.ohio-state.edu  %
%                 http://www.cse.ohio-state.edu/~gurari  %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\immediate\write-1{version |version}
->>>

\<perl copyright notice\><<<-
# mk4ht                                ?version
# Copyright (C) ?CopyYear.2003.              Eitan M. Gurari             
#                                                      
#                                                        %
# This work may be distributed and/or modified under the %
# conditions of the LaTeX Project Public License, either %
# version 1.3 of this license or (at your option) any    %
# later version. The latest version of this license is   %
# in                                                     %
#   http://www.latex-project.org/lppl.txt                %
# and version 1.3 or later is part of all distributions  %
# of LaTeX version 2003/12/01 or later.                  %
#                                                        %
# This work has the LPPL maintenance status "maintained".%
#                                                        %
# This Current Maintainer of this work                   %
# is Eitan M. Gurari.                                    %
#                                                        %
#                             gurari@cse.ohio-state.edu  %
#                 http://www.cse.ohio-state.edu/~gurari  %
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
->>>













%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\OutputCode\<mkht\>
\OutputCode\<mkht-scripts\>

\OutputCodE\<mk4ht.perl\>
%"mv mk4ht.perl mk4ht"



\immediate\write16{--------------------------------------------------------}
\immediate\write16{Compile mkht-scripts.4ht with latex to get the 
                                                              full scripts.}
\immediate\write16{Use the option `Needs' to automatically move the
    files to private directories.}
\immediate\write16{--------------------------------------------------------}

\end{document}
\endinput










