Chapter 4
Etc
{\ifdim \lastskip>\z@ \unskip\fi \IgnorePar\parindent\z@
\leavevmode}%
\immediate\write16{--- file \aa:CssFile\space ---}%
\ht:special{t4ht>\aa:CssFile}\ht:special{t4ht=\Hnewline /* css.sty */}%
\ht:special{t4ht<\aa:CssFile}%
-_-_-
\special are like \hbox, and they so they may introduve empty lines in vertical
mode. That might be a problem if we don’t want empty lines at the start of the files.
Hence, in latex we give them special treatment.
\ScriptCommand{\CssFile}{%
\immediate\write16{--- file \aa:CssFile\space ---}%
\def\FontSize##1##2{\:Context{##1}\ht:special{t4ht;\%##2}\%}%
\def\FontName##1{\:Context{##1}\ht:special{t4ht;=}}%
\def\:Context##1{\ht:special{t4ht>\jobname.tmp}##1\ht:special
{t4ht>\aa:CssFile}}%
\ht:special{t4ht>\jobname.tmp}\ht:special{t4ht>\aa:CssFile}\bb:CssFile
\hfil\break\NoFonts}{\EndNoFonts
\ht:special{t4ht<\aa:CssFile}\ht:special{t4ht<\jobname.tmp}}
\let\Css:File=\CssFile
\def\CssFile{\futurelet\:temp\Css:Fl}
\def\Css:Fl{\ifx [\:temp \expandafter\Css:fl
\else \expand:after{\Css:File \space}\fi}
\def\Css:fl[#1]{\Css:File\space \css:files #1,,<.par del.>}
\def\css:files#1,#2<.par del.>{\def\:temp{#1}\ifx \:temp\empty
\else \def\:temp{\in:css#1.<.par del.>\css:files#2,,<.par del.>}\fi
\:temp }
\def\in:css#1.#2<.par del.>{\def\:temp{#2}\ifx \:temp\empty \input #1.css
\else \inc:ss#1.#2<.par del.>\fi}
\def\inc:ss#1.<.par del.>{\input #1 }
\NewConfigure{CssFile}[2]{\def\aa:CssFile{#1}\def\bb:CssFile{#2}} -_-_-
\CssFile[file-name,filename.ext,..]...\EndCssFile.
Default file, just in case the user doesn’t provide one. If the user does, the
following file will be overwritten.
Can’t use below \a:CssFile and \b:CssFile, because \ScriptFile{\CssFile}
also needs them.
\Css changes its definition upon reachin \CssFile. The first definition is needed
within the sty files, and the info is sent to the lg file (where else it can be
sent?).
\def\Css#1{{\def\:temp{\Configure{Needs}}%
\expandafter\:temp\expandafter{\aa:Css}\Needs{#1}}}
\let\send:css=\Css
\ScriptCommand{\Css}{\HCode{<style
type="text/css">\Hnewline}\NoFonts}{\EndNoFonts\HCode{</style>}}
\let\loc:css=\Css
\def\Css{\futurelet\:temp\:Css}
\def\:Css{\ifx \:temp\bgroup \expandafter\send:css
\else \expandafter\loc:css\fi}
-_-_-
\tmp:cnt=\time \divide\tmp:cnt by 60
\edef\:temp{\the\tmp:cnt}
\multiply\tmp:cnt by -60 \advance\tmp:cnt by \time
\edef\:today{\the\year-\ifnum \month<10 0\fi
\the\month-\ifnum \day<10 0\fi\the\day
\space\ifnum \:temp<10 0\fi \:temp
:\ifnum \tmp:cnt<10 0\fi\the\tmp:cnt :00}
-_-_-
\:CheckOption{hooks++} \if:Option
\else \:CheckOption{hooks+}
\if:Option \else \:CheckOption{hooks}\fi
\fi
\if:Option
\Configure{hooks}
{\HCode{<strong class="hooks"><}}{\HCode{></strong>}}{}{}
\fi
-_-_-
The following provides a faster version than \LinkCommand\Link{a,href,name,}
for the \Link command
\Configure{Link}{a}{href=}{name=}{}
-_-_-