TeX4ht: Configuration Files

Eitan M. Gurari

May 24, 2014

[index] [the 4ht files]

<..TeX4ht copyright..>
 %
 % This work may be distributed and/or modified under the
 % conditions of the LaTeX Project Public License, either
 % version 1.3c 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.3c or later is part of all distributions
 % of LaTeX version 2005/12/01 or later.
 %
 % This work has the LPPL maintenance status "maintained".
 %
 % The Current Maintainer of this work
 % is the TeX4ht Project <http://tug.org/tex4ht>.
 %
 % If you modify this program, changing the
 % version identification would be appreciated.
-_-_-

<..TeX4ht copywrite..>
 <.TeX4ht copyright.>\immediate\write-1{version 2014-05-24-12:31}
-_-_-

Chapter 1
Shared

<..par del..>
 !*?: 
-_-_-

<..tag of Tag..>
  cw:
-_-_-

<..tail..>
 tail
-_-_-

<..addr for Tag and Ref of Sec..>
 \xdef\:cursec{<.section html addr.>}%
-_-_-

<..tex4ht.4ht..>
 \ifnum\the\catcode‘\%=14\else \expandafter\edef\csname
   \string:RestoreCatcodes\endcsname{\catcode‘\%=\the
   \catcode‘\%}\catcode‘\%=14\fi
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % tex4ht.4ht (2014-05-24-12:31), generated from tex4ht-options.tex
 % Copyright (C) 2009-2010 TeX Users Group
 % Copyright (C) 1997-2009 Eitan M. Gurari
 <.TeX4ht copywrite.>
 <.save catcodes.>
 <.note about tex4ht.usr.>
 
 \:CheckOption{info}\if:Option
                \Hinclude[*]{info4ht.4ht}
    \Log:Note{For additional information,
       compile ‘xhlatex mktex4ht.4ht’^^J and review the appropriate
       pointers under mktex4ht.html => index}
 \else
    \Log:Note{for additional information, use
       the command line option ‘info’}
 \fi
 \immediate\write16{::::::::::::::::::::::::::::::::::::::::::}
 \immediate\write16{ TeX4ht info is available in the log file }
 \immediate\write16{::::::::::::::::::::::::::::::::::::::::::}
 <.redefine Configure.>
 <.built-in settings.>
 <.user’s configuration files.>
 <.recall Configure.>
 \:tempc
 
 \:RestoreCatcodes
 \endinput
-_-_-

<..redefine Configure..>
 \let\:tempd=\Configure
 \def\Configure#1#2{%
    \:CheckOption{#1}\if:Option \def\:tempc{#2}\fi}
-_-_-

<..recall Configure..>
 \let\Configure=\:tempd
-_-_-

<..user’s configuration files..>
 \openin15=tex4ht.usr \ifeof15 \else \closein15
    \input tex4ht.usr
 \fi
-_-_-

<..note about tex4ht.usr..>
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % It is highly recommended NOT TO CHANGE THIS FILE. Options
 %                          ^^^^^^^^^^^^^^^^^^^^^^^
 % defined in this file may be redefined, and new ones may be
 % added, within a user supplied file named tex4ht.usr.
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-_-_-

<..built-in settings..>
 <.html4 settings.>
 <.0.0 and 3.2 settings.>
 <.mozilla settings.>
 <.tei settings.>
 <.docbook settings.>
 <.html for word settings.>
 <.open office settings.>
 <.html mathltx settings.>
 <.html jsmath settings.>
 <.html emacspeak settings.>
-_-_-

<..html4 settings..>
 \def\:tempc{\:CheckOption{info}\if:Option
                         \Hinclude[*]{infoht4.4ht}%
             \:CheckOption{javahelp}\if:Option
                         \Hinclude[*]{infojh.4ht}\fi
             \fi
             \Hinclude[*]{html4.4ht}%
             \Hinclude[*]{html4-math.4ht}%
             \:CheckOption{svg}%
              \if:Option \else\:CheckOption{svg-}\fi
              \if:Option \else\:CheckOption{svg-obj}\fi
              \if:Option
                 \Hinclude[*]{svg.4ht}%
                 \Hinclude[*]{html4-svg.4ht}%
                 \:CheckOption{info}\if:Option \Hinclude[*]{infosvg.4ht}\fi
              \fi
 }
 \Configure{uni-html4}{%
    \:CheckOption{info}\if:Option
                \Hinclude[*]{infoht4.4ht}\fi
    \Hinclude[*]{html4.4ht}%
    \Hinclude[*]{html4-math.4ht}%
    \Hinclude[*]{unicode.4ht}
    \Hinclude[*]{html4-uni.4ht}%
    \:CheckOption{svg}%
              \if:Option \else\:CheckOption{svg-}\fi
              \if:Option \else\:CheckOption{svg-obj}\fi
              \if:Option \Hinclude[*]{svg.4ht}%
                         \:CheckOption{info}\if:Option \Hinclude[*]{infosvg.4ht}\fi
              \fi
    }
 \Configure{mathml}{%
    \:CheckOption{info}\if:Option
                \Hinclude[*]{infoht4.4ht}\fi
    \:CheckOption{info}\if:Option
                \Hinclude[*]{infomml.4ht}\fi
    \Hinclude[*]{html4.4ht}%
    \Hinclude[*]{unicode.4ht}%
    \Hinclude[*]{mathml.4ht}%
    \Hinclude[*]{html-mml.4ht}%
    \Hinclude[*]{html4-uni.4ht}%
    \:CheckOption{svg}%
              \if:Option \else\:CheckOption{svg-}\fi
              \if:Option \else\:CheckOption{svg-obj}\fi
              \if:Option \Hinclude[*]{svg.4ht}%
                         \:CheckOption{info}\if:Option \Hinclude[*]{infosvg.4ht}\fi
              \fi
    \:CheckOption{mathplayer}\if:Option
       \:CheckOption{pmathml}\if:Option \else
       \:CheckOption{pmathml-css}\if:Option \else
          \Hinclude[*]{mathplayer.4ht}
       \fi\fi
    \else
        \Log:Note{For MathML on MSIE + MathPlayer use
            the command line option ‘mathplayer’}
    \fi
 }
-_-_-

<..html for word settings..>
 \Configure{word}{%
    \:CheckOption{info}\if:Option
                \Hinclude[*]{infoht4.4ht}\fi
    \Hinclude[*]{html4.4ht}%
    \Hinclude[*]{html4-math.4ht}%
    \Hinclude[*]{htmlw.4ht}%
    \:CheckOption{svg}%
              \if:Option \else\:CheckOption{svg-}\fi
              \if:Option \else\:CheckOption{svg-obj}\fi
              \if:Option \Hinclude[*]{svg.4ht}%
                         \:CheckOption{info}\if:Option \Hinclude[*]{infosvg.4ht}\fi
              \fi
 }
-_-_-

<..0.0 and 3.2 settings..>
 \Configure{0.0}{%
    \Hinclude[*]{html0.4ht}%
 }
 \Configure{3.2}{%
    \:CheckOption{info}\if:Option
        \:CheckOption{javahelp}\if:Option
                \Hinclude[*]{infojh.4ht}\fi\fi
    \Hinclude[*]{html32.4ht}%
    \Hinclude[*]{html32-math.4ht}%
    \:CheckOption{javahelp}\if:Option
        <.option javahelp.>%
    \fi
    \:CheckOption{unicode}\if:Option \Hinclude[*]{unicode.4ht}\fi
 }
-_-_-

Allows cleanup using xtpipes.

<..option javahelp..>
 \Hinclude[*]{javahelp.4ht}%
 \:CheckOption{jh-}     \if:Option
 \else
    \edef\Preamble{\Preamble,xml}%
    \Log:Note{for sources failing to produce
        XML versions of HTML, try the command line option ‘jh-’}%
 \fi
-_-_-

<..mozilla settings..>
 \Configure{mozilla}{%
    \:CheckOption{info}\if:Option
                \Hinclude[*]{infoht4.4ht}\fi
    \:CheckOption{info}\if:Option
                \Hinclude[*]{infomml.4ht}\fi
    \Hinclude[*]{html4.4ht}%
    \Hinclude[*]{unicode.4ht}%
    \Hinclude[*]{mathml.4ht}%
    \Hinclude[*]{html-mml.4ht}%
    \Hinclude[*]{mozilla.4ht}%
    \:CheckOption{svg}%
              \if:Option \else\:CheckOption{svg-}\fi
              \if:Option \else\:CheckOption{svg-obj}\fi
              \if:Option \Hinclude[*]{svg.4ht}%
                         \:CheckOption{info}\if:Option \Hinclude[*]{infosvg.4ht}\fi
              \fi
    \:CheckOption{mathplayer}\if:Option
        \Hinclude[*]{mathplayer.4ht}
    \else
        \Log:Note{For MathML on MSIE + MathPlayer use
            the command line option ‘mathplayer’}
    \fi
 }
-_-_-

<..tei settings..>
 \Configure{tei}{%
    \Hinclude[*]{tei.4ht}%
    \Hinclude[*]{unicode.4ht}%
    \Hinclude[*]{tei-math.4ht}%
    \:CheckOption{svg}%
              \if:Option \else\:CheckOption{svg-}\fi
              \if:Option \else\:CheckOption{svg-obj}\fi
              \if:Option \Hinclude[*]{svg.4ht}%
                         \:CheckOption{info}\if:Option \Hinclude[*]{infosvg.4ht}\fi
              \fi
 }
 \Configure{tei-mml}{%
    \:CheckOption{info}\if:Option
                \Hinclude[*]{infomml.4ht}\fi
    \Hinclude[*]{tei.4ht}%
    \Hinclude[*]{unicode.4ht}%
    \Hinclude[*]{mathml.4ht}%
    \Hinclude[*]{tei-mml.4ht}%
    \:CheckOption{svg}%
              \if:Option \else\:CheckOption{svg-}\fi
              \if:Option \else\:CheckOption{svg-obj}\fi
              \if:Option \Hinclude[*]{svg.4ht}%
                         \:CheckOption{info}\if:Option \Hinclude[*]{infosvg.4ht}\fi
              \fi
 }
-_-_-

<..docbook settings..>
 \Configure{docbook}{%
    \Hinclude[*]{docbook.4ht}%
    \Hinclude[*]{unicode.4ht}%
    \Hinclude[*]{docbook-math.4ht}%
    \:CheckOption{svg}%
              \if:Option \else\:CheckOption{svg-}\fi
              \if:Option \else\:CheckOption{svg-obj}\fi
              \if:Option \Hinclude[*]{svg.4ht}%
                         \:CheckOption{info}\if:Option \Hinclude[*]{infosvg.4ht}\fi
              \fi
 }
 \Configure{docbook-mml}{%
    \:CheckOption{info}\if:Option
                \Hinclude[*]{infomml.4ht}\fi
    \Hinclude[*]{docbook.4ht}%
    \Hinclude[*]{unicode.4ht}%
    \Hinclude[*]{mathml.4ht}%
    \Hinclude[*]{docbook-mml.4ht}%
    \:CheckOption{svg}%
              \if:Option \else\:CheckOption{svg-}\fi
              \if:Option \else\:CheckOption{svg-obj}\fi
              \if:Option \Hinclude[*]{svg.4ht}%
                         \:CheckOption{info}\if:Option \Hinclude[*]{infosvg.4ht}\fi
              \fi
 }
-_-_-

<..open office settings..>
 \Configure{ooffice}{%
    \:CheckOption{info}\if:Option
                \Hinclude[*]{infoht4.4ht}%
                \Hinclude[*]{infomml.4ht}%
                \Hinclude[*]{infoof.4ht}\fi
    \Hinclude[*]{ooffice.4ht}%
    \:CheckOption{1}\if:Option\else
       \:CheckOption{2}\if:Option\else
       \:CheckOption{3}\if:Option\else
       \:CheckOption{4}\if:Option\else
       \:CheckOption{5}\if:Option\else
       \:CheckOption{6}\if:Option\else
       \:CheckOption{7}
       \fi
       \fi
       \fi
       \fi
       \fi
    \fi
    \if:Option
                \Hinclude[*]{ooimpress.4ht}%
    \fi
    \Hinclude[*]{unicode.4ht}%
    \Hinclude[*]{mathml.4ht}%
    \Hinclude[*]{ooffice-mml.4ht}%
 }
-_-_-

<..save catcodes..>
 \expandafter\edef\csname :RestoreCatcodes\endcsname{%
    \expandafter\ifx \csname :RestoreCatcodes\endcsname\relax\else
       \csname :RestoreCatcodes\endcsname \fi
    \catcode‘\noexpand :=\the\catcode‘:%
    \ifnum \the\catcode‘\#=6 \else
       \catcode‘\noexpand \#=\the\catcode‘\#\fi
    \ifnum \the\catcode‘\^=7 \else
       \catcode‘\noexpand \^=\the\catcode‘\^\fi
    \let\expandafter\noexpand\csname :RestoreCatcodes\endcsname=
                                    \noexpand\UnDefcS}
 \catcode‘\:=11  \catcode‘\#=6   \catcode‘\^=7
-_-_-

<..html mathltx settings..>
 \Configure{mathltx}{%
    \:CheckOption{info}\if:Option
                \Hinclude[*]{infoht4.4ht}\fi
    \Hinclude[*]{html4.4ht}%
    \Hinclude[*]{unicode.4ht}%
    \Hinclude[*]{html4-uni.4ht}%
    \Hinclude[*]{mathltx.4ht}%
    \Hinclude[*]{html-mltx.4ht}%
 }
-_-_-

<..html jsmath settings..>
 \Configure{jsmath}{%
    \:CheckOption{info}\if:Option
                \Hinclude[*]{infoht4.4ht}\fi
    \Hinclude[*]{html4.4ht}%
    \Hinclude[*]{unicode.4ht}%
    \Hinclude[*]{html4-uni.4ht}%
    \Hinclude[*]{mathltx.4ht}%
    \Hinclude[*]{html-mltx.4ht}%
    \Hinclude[*]{jsmath.4ht}%
    \Hinclude[*]{html-jsmath.4ht}%
 }
-_-_-

<..html emacspeak settings..>
 \Configure{emspk}{%
    \:CheckOption{info}\if:Option
                \Hinclude[*]{infoht4.4ht}\fi
    \Hinclude[*]{html4.4ht}%
    \Hinclude[*]{unicode.4ht}%
    \Hinclude[*]{html4-uni.4ht}%
    \Hinclude[*]{mathml.4ht}%
    \Hinclude[*]{html-mml.4ht}%
    \Hinclude[*]{html-speech.4ht}%
    \Hinclude[*]{html-speech-math.4ht}%
    \Hinclude[*]{emacspeak.4ht}%
 }
-_-_-

<..html emacspeak settings..>+
 \Configure{jsml}{%
    \:CheckOption{info}\if:Option
                \Hinclude[*]{infoht4.4ht}\fi
    \Hinclude[*]{html4.4ht}%
    \Hinclude[*]{unicode.4ht}%
    \Hinclude[*]{html4-uni.4ht}%
    \Hinclude[*]{mathml.4ht}%
    \Hinclude[*]{html-mml.4ht}%
    \Hinclude[*]{jsml.4ht}%
    \Hinclude[*]{jsml-math.4ht}%
 }
-_-_-

Contents

1 Shared
2 Utilities
3 Containers for the Configurations

Chapter 2
Utilities

<..Hinclude plain..>
 \ifx \contextversion\Un:def
    \Hinclude{\input #1.4ht}{plain}
    \def\:temp{t}%
    \ifx \eplain\:temp
       \Hinclude{\input #1.4ht}{eplain}
    \fi
    <.include mex.>
    \ifx \d@nger\:UnDef \else
       \let\leftheadline\empty
       \let\rightheadline\empty
       \Hinclude{\input #1.4ht}{manmac}
    \fi
 \else
    \Hinclude{\input #1.4ht}{context}
 \fi
-_-_-

<..Hinclude latex..>
 \Hinclude{\input #1.4ht}{latex}
-_-_-

<..Hinclude plain lib..>
 <.Hinclude util.>
-_-_-

<..Hinclude latex lib..>
 <.Hinclude util.>
-_-_-

<..Hinclude plain + latex lib..>
 <.Hinclude util.>
-_-_-

<..include mex..>
 \def\:temp{M\kern-.111em\lower.6ex\hbox{E}\kern-.075emX}
 \ifx \nM@X\:temp
    \expandafter\ifx\csname emulateplain\endcsname\relax \else
      \Hinclude{\input #1.4ht}{mex}
 \fi\fi
-_-_-

Style files, like xy, may be loaded in latex with \usepackage or \input. The latter case doesn’t leave footprints, hence we need for it an explicitly check. On the other hand, we should avoid duplications.

<..Hinclude util..>
 \expandafter\let\csname tex4ht:4ht\endcsname\empty
 \def\no:dupl#1#2{%
    \expandafter\ifx \csname #1:4ht\endcsname\relax
       \expandafter\let \csname #1:4ht\endcsname\empty
       \expand:after{#2}%
    \fi
 }
-_-_-

<..Hinclude plain lib..>+
 \Hinclude{\def\:temp{\ht:everypar={\setbox0=\lastbox\ht:everypar={}}}%
    \ifx \NoindentAfter\:temp
       \no:dupl{#1}{\expand:after{\input #1.4ht}}\fi}
    {osudeG}
 \Hinclude{\ifx\amstexloaded@\relax
      \no:dupl{#1}{
       \ifx  \Space@\:UnDef   \expand:after{\input #1.4ht} %
       \else                  \input vanilla.4ht  \fi}%
    \fi}
    {amstex}
 \Hinclude{\expandafter\ifx \csname amsppt.sty\endcsname\relax \else
        \no:dupl{#1}{\expand:after{\input #1.4ht}}\fi}
    {amsppt}
 \Hinclude{\ifx \texinfoversion\:UnDef\else
       \no:dupl{#1}{\expand:after{\input texinfo.4ht}}\fi}
    {texinfo}
 \Hinclude{\ifx \thistubstyle\:UnDef\else
       \no:dupl{#1}{\expand:after{\input tugboat.4ht}}\fi}
    {tugboat}
-_-_-

<..Hinclude latex lib..>+
 \Hinclude{\input #1.4ht}{fontmath}
 \Hinclude{\@ifpackageloaded{colortbl}{%
       \no:dupl{array}{\input  array.4ht}%
       \no:dupl{color}{\input  color.4ht}%
       \no:dupl{colortbl}{\input  colortbl.4ht}%
     }{}}{colortbl}
 
 \def\h:input#1.#2.#3!*?: {%
    \:CheckOption{no_#1}\if:Option
       \let\:temp\empty
    \else
       \let\:temp\empty
       \no:dupl{#1}{%
          \openin15 #1.4ht
          \ifeof15
             \:CheckOption{debug}\if:Option
                \:warning{No configuration file for
                    #1.\if .#2.tex\else #2\fi}%
             \fi
             \let\:temp\empty
          \else
             \def\:temp{\input #1.4ht }%
          \fi   \closein15
        }%
    \fi  \:temp}
 \edef\:temp{\noexpand\Hinclude
    {\noexpand\h:input ##1..!*?: }{\@filelist}}
 \:temp
-_-_-

<..Hinclude plain + latex lib..>+
 \Hinclude{\ifx \PsfigVersion\:UnDef \else
       \no:dupl{#1}{\expand:after{\input psfig.4ht}}\fi}
    {psfig}
 \Hinclude{\:CheckOption{#1}
    \if:Option     \no:dupl{#1}{\expand:after{\input #1.4ht}}\fi}
    {pictex}
 \Hinclude{%
    \expandafter\ifx \csname PSTricksLoaded\endcsname\relax\else
                   \no:dupl{#1}{\expand:after{\input #1.4ht}}\fi}
    {pstricks}
 \Hinclude{%
    \ifx \:DraCatCodes\:UnDef \else
                   \no:dupl{#1}{\expand:after{\input #1.4ht}}\fi}
    {dratex}
 \Hinclude{%
    \ifx \xyloaded\:UnDef \else
                   \no:dupl{#1}{\expand:after{\input #1.4ht}}\fi}
    {xy}
 
 \Hinclude{%
    \ifx \epsfsetgraph\:UnDef \else
                   \no:dupl{#1}{\expand:after{\input #1.4ht}}\fi}
    {epsf}
 
 \Hinclude{%
    \ifx \diagram@help@messages\:UnDef \else
                   \no:dupl{#1}{\expand:after{\input #1.4ht}}\fi}
    {diagrams}
 
 \Hinclude{%
    \ifx \figvisu\:UnDef \else
                   \no:dupl{#1}{\expand:after{\input #1.4ht}}\fi}
    {fig4tex}
 
 \Hinclude{}
    {pctable}
 \Hinclude{%
    \:CheckOption{xhtml}\if:Option \fi}
    {xhtml}
 \Hinclude{\:CheckOption{#1}
       \if:Option\else   \:CheckOption{ShowFont}\fi
       \if:Option\else   \:CheckOption{frames-}\fi
       \if:Option\else   \:CheckOption{frames}\fi
       \if:Option\else   \:CheckOption{image-maps}\fi
       \if:Option\else   \:CheckOption{java}\fi
       \if:Option\else   \:CheckOption{javascript}\fi
       \if:Option \no:dupl{#1}{\expand:after{\input #1.4ht}}\fi}
    {th4}
 \Hinclude{\ifx \sethebrew\:UnDef\else \ifx \ArabTeX\:UnDef\else
       \no:dupl{#1}{\expand:after{\input hebtex.4ht}}\fi \fi}
    {hebtex}
-_-_-

<..pctex table 4ht..>
 \ifx \BeginTable\:UnDef \else\ifx \EndTable\:UnDef \else
 \expandafter\ifx \csname !ttBeginTable\endcsname\relax\else
   \no:dupl{#1}{\input #1.4ht}%
 \fi\fi\fi
-_-_-

Chapter 3
Containers for the Configurations

Preamble

tex4ht

latex

book

report

article

fontmath

graphics

amsart

amsbook

amsproc

amsthm

amsmath

amsfonts

amstex1

amsppt

babel

plain

url

hyperref

array

longtable

CJK

moreverb

fancyvrb

xy

psfig

epsfig

amscd

color

colortbl

minitoc

index

fancybox

alltt

vanilla

ntheorem

hebtex

emulateapj

aa

doc

elsart

seminar

slides

foils

slidesec

pictex

pb-diagram

ltugboat

listings

float

endnotes

web

exerquiz

ProTex

th4

mktex4ht

tex4ht

latex

book

report

article

amsart

tex4ht

latex

plain

//