[tex4ht-commits] [SCM] tex4ht updated: r473 - trunk/lit

michal_h21 at gnu.org.ua michal_h21 at gnu.org.ua
Sat Jan 5 15:40:27 CET 2019


Author: michal_h21
Date: 2019-01-05 16:40:26 +0200 (Sat, 05 Jan 2019)
New Revision: 473

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-tei.tex
Log:
Added definitions of the CSS support commands

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2018-12-30 17:39:42 UTC (rev 472)
+++ trunk/lit/ChangeLog	2019-01-05 14:40:26 UTC (rev 473)
@@ -1,3 +1,7 @@
+2019-01-05  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-tei.tex (tei.4ht): added definitions of the CSS support commands.
+
 2018-12-27  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-svg.tex (svg-option.4ht, html4-svg.4ht): renamed svg.4ht to

Modified: trunk/lit/tex4ht-tei.tex
===================================================================
--- trunk/lit/tex4ht-tei.tex	2018-12-30 17:39:42 UTC (rev 472)
+++ trunk/lit/tex4ht-tei.tex	2019-01-05 14:40:26 UTC (rev 473)
@@ -603,7 +603,70 @@
 |<early xslt Decl|>
 >>>
 
+%%%%%%%%%%%%%%%%%%%%
+\section{Css}
+%%%%%%%%%%%%%%%%%%%%
 
+The following code has been copied from tex4ht-docbook.tex. It provides basic
+support for writing to the CSS file produced by tex4ht.
+
+\<configure tei tex4ht\><<<
+|<cascade style sheets|>
+\Configure{Preamble}
+   {|<default cascade style sheets|>} {}
+\Configure{CssFile}{\jobname.css}
+  {/* \aa:CssFile\space from \jobname.tex (TeX4ht) */}
+\Configure{Needs}{l. 
+   \the\inputlineno\space--- needs --- #1 ---}
+\Configure{Needs-}{l.
+   \the\inputlineno\space--- needs --- #1 ---}
+>>>
+
+\<default cascade style sheets\><<<
+{\ifdim \lastskip>\z@ \unskip\fi  \IgnorePar\parindent\z@
+\leavevmode}%
+\immediate\write-1{--- file \aa:CssFile\space ---}%
+\ht:special{t4ht>\aa:CssFile}\ht:special{t4ht=\Hnewline /* css.sty */}%
+\ht:special{t4ht<\aa:CssFile}%
+>>>
+
+
+\<cascade style sheets\><<<
+\ScriptCommand{\CssFile}{%
+  \immediate\write-1{--- 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}}
+>>>
+
+
+
+\<cascade style sheets\><<<
+\def\Css#1{{\def\:temp{\Configure{Needs}}%
+   \expandafter\:temp\expandafter{\aa:Css}\Needs{#1}}}
+
+\expandafter\ifx \csname aa:Css\endcsname\relax
+   \Configure{Css}{Css: ##1}
+\fi
+>>>
+
+
 %%%%%%%%%%%%%%%%%%
 \section{Sections}
 %%%%%%%%%%%%%%%%%%



More information about the tex4ht-commits mailing list