Changing HTML Configurations

  • Configure environments \begin{foo}...\end{foo}
    with \ConfigureEnv{foo}{...}{...}{...}{...}
    % file.cfg  
    \Preamble{html}  
    \begin{document}  
       \ConfigureEnv{titlepage}  
           {\ifvmode \IgnorePar\fi \EndP  
            \HCode{<div class="titlepage">}\IgnorePar }  
           {\ifvmode \IgnorePar\fi \EndP \HCode{</div>}}  
           {} {}  
       \Css{div.titlepage {width:50\%; float:right;}}  
    \EndPreamble  
    xhlatex source "file"
  • Configure lists \begin{foo}\item... \item...\end{foo}
    with \ConfigureList{foo}{...}{...}{...}{...}
    % file.cfg  
    \Preamble{html}  
    \begin{document}  
       \ConfigureList{enumerate}  
           {\HCode{<div>}\let\NL\empty}  
           {\HCode{</div>}}  
           {\NL \def\NL{\newline}\HCode{<span class="bullet">}}  
           {\HCode{</span>}}  
       \Css{span.bullet {  
             font-size : 150\% ;  
             color : red ;  
             background-color : yellow ;  
             border: black solid 1px  
           }}  
    \EndPreamble  
    xhlatex source "file"
% source.tex  
\documentclass{article}  
\begin{document}  
 
  \begin{titlepage} A sample source LaTeX file for  
                    the above configuration files.  
  \end{titlepage}  
 
  \begin{enumerate} \item First item  
                    \item Second item  \end{enumerate}  
 
\end{document}  

11, next, prev, up, toc