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

deimi at gnu.org.ua deimi at gnu.org.ua
Fri Sep 30 11:51:40 CEST 2016


Author: deimi
Date: 2016-09-30 12:51:40 +0300 (Fri, 30 Sep 2016)
New Revision: 194

Added:
   trunk/lit/mktex4ht-cnf.tex
Modified:
   trunk/lit/ChangeLog
   trunk/lit/common-info.tex
   trunk/lit/tex4ht-4ht.tex
   trunk/lit/tex4ht-cond4ht.tex
   trunk/lit/tex4ht-info-html4.tex
   trunk/lit/tex4ht-info-javahelp.tex
   trunk/lit/tex4ht-info-mml.tex
   trunk/lit/tex4ht-info.tex
Log:
fix latex error(s) on first run

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2016-09-20 22:43:40 UTC (rev 193)
+++ trunk/lit/ChangeLog	2016-09-30 09:51:40 UTC (rev 194)
@@ -1,3 +1,21 @@
+2016-09-29 Deimantas Galcius <deimantas.galcius at gmail.com>
+
+	* common-info.tex (CleanComment): fix CleanComment to not
+	raise latex run error on first pass.
+	* mktex4ht-cnf.tex (new file): copy of mktex4ht.cnf. The file
+	should not be generated by literate sources
+	* tex4ht-4ht.tex (mktex4ht.4ht,mktex4ht.cnf): remove mktex4ht.4ht
+	generation. Remove mktex4ht.cnf processing. Define macro \Skipmkfilename.
+	* tex4ht-cond4ht.cnf (ConfigFiles,FirstPass): \ConfigFiles set to a new file
+	mktex4ht-cnf.tex; skip processing lit entries on FirstPass; set a hook
+	\Skipmkfilename for skipping mktex4ht.4ht generation from tex4ht-4ht.tex
+	* tex4ht-info-html4.tex: remove code duplication; input common-info.tex and
+	common.tex; this also fixes latex run error as in common-info.tex
+	* tex4ht-info-javahelp.tex: remove code duplication; ensure to load
+	local mktex4ht.4ht
+	* tex4ht-info-mml.tex: ensure to load local mktex4ht.4ht
+	* tex4ht-info.tex: remove code duplication
+
 2016-09-20  Karl Berry  <karl at freefriends.org>
 
 	* tex4ht-c.tex (scan postamble): allow any value <= the xdv byte,

Modified: trunk/lit/common-info.tex
===================================================================
--- trunk/lit/common-info.tex	2016-09-20 22:43:40 UTC (rev 193)
+++ trunk/lit/common-info.tex	2016-09-30 09:51:40 UTC (rev 194)
@@ -22,7 +22,13 @@
 % version identification would be appreciated.
 
 \expandafter\ifx \csname YES\HTML\endcsname\relax
-    \def\CleanComment{[0]}
+    % begin comment. 21/07/2016 (dg)
+    %   on first run \infoIVht expects \ConfigureHinput
+    %   ( \def\infoIVht#1\ConfigureHinput{..} )
+    %   so we feed it with "\ConfigureHinput" (no expansion here, merely a delimiter)
+    %   the rest is slurped until the "//".
+    % end
+    \def\CleanComment{[0]\ConfigureHinput\id:gobble}
 \else
     \let\saveCd=\<
     \def\<{\edef\FIRST{\the\inputlineno}\let\<\saveCd \saveCd}

Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex	2016-09-20 22:43:40 UTC (rev 193)
+++ trunk/lit/tex4ht-4ht.tex	2016-09-30 09:51:40 UTC (rev 194)
@@ -36257,31 +36257,12 @@
 \NewConfigure{frontmatter} {2}
 >>>
 
-\AddFile{9}{mktex4ht}
-
-\Part{The Template mktex4ht.4ht}
-
-\bgroup
-\immediate\openout15=mktex4ht.cnf
-\def\AddFile#1#2{\immediate\write15{\string\AddFile{#1}{#2}}}
-\ConfigFiles
-\immediate\closeout15
-\egroup
-
-\openin15=th4.4ht
-\ifeof15 
-   \<mktex4ht.4ht\><<<
-   \write16{**********************************}
-   \write16{*** recompile 'tex tex4ht-4ht' ***}
-   \write16{**********************************}
-   >>>
-   \OutFiles
-   \write16{****************************************************}
-   \write16{*** compile the file again with 'tex tex4ht-4ht' ***}
-   \write16{****************************************************}
-   \csname bye\endcsname
-\fi
-
+%% begin comment. 29/09/2016 (dg)
+%% mktex4ht.4ht is generated by cond4ht.4ht
+%% Remove file generation from tex4ht-4ht.tex
+%% Detaching mktex4ht.cnf, mktex4ht-cnf.tex is read instead.
+%% end
+\def\Skipmkfilename{\csname BYE\endcsname\endinput}
 \input cond4ht.4ht
 
 %-------------------------------------------------------

Modified: trunk/lit/tex4ht-cond4ht.tex
===================================================================
--- trunk/lit/tex4ht-cond4ht.tex	2016-09-20 22:43:40 UTC (rev 193)
+++ trunk/lit/tex4ht-cond4ht.tex	2016-09-30 09:51:40 UTC (rev 194)
@@ -17,7 +17,11 @@
 
 \<cond4ht.4ht\><<<<
 %Needs: tex cond4ht.4ht
-\def\ConfigFiles{\input mktex4ht.cnf}  %  Please, modify the bodies of the 
+%% begin comment 29/09/2016 (dg)
+%% detaching mktex4ht.cnf as
+%% a separate file mktex4ht-cnf.tex (copy of mktex4ht.cnf)
+%% end
+\def\ConfigFiles{\input mktex4ht-cnf.tex}  %  Please, modify the bodies of the
 \def\mkfilename{mktex4ht.4ht}          %  first four macros.
                                        %  The input file should consist
                                        %  of records \AddFile{i}{name}
@@ -34,23 +38,8 @@
 ?<TeX4ht copywrite?>
 
 \ifx \BREAK\UnDef
-
-\csname newcount\endcsname\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\BREAK{^^J}
-
+  \def\BREAK{^^J}
+  \input common.tex
 \fi
 
 
@@ -640,16 +629,36 @@
 
 |<set Hinclude|>
 
+%% begin comment 29/09/2016 (dg)
+%% file \jobname.4ct does not exist on first run;
+%% it should be available on second and third run
+%% end
+\newif\ifFirstPass\FirstPassfalse
+\openin15=\Jobname.4ct
+  \ifeof15
+    \FirstPasstrue
+    \message{^^J warning *********** FIRST PASS **************************** ^^J}
+  \fi
+\closein15
 
+
 \chapter{Containers for the Configurations}
 
+%%
+%% Skip processing lit entries on first pass
+%%
 
+\ifFirstPass\else
+
    \catcode`\:=11
 \expandafter\GetLit\HTML,,,?<par del?>\relax
    \catcode`\:=12
 
+\fi
+
 |<include info4ht|>
 
+
 \end{document}
 \endinput
 >>>
@@ -712,6 +721,13 @@
 >>>
 
 
+%%
+%% set a hook for skipping mktex4ht.4ht generation from tex4ht-4ht.tex
+%% The file should be generated when cond4ht.4ht is processed,
+%% not when tex4ht-4ht.
+%%
+%%
+\csname Skipmkfilename\endcsname
   \expandafter\OutputCodE\expandafter\<\mkfilename\>
 
 \csname BYE\endcsname

Modified: trunk/lit/tex4ht-info-html4.tex
===================================================================
--- trunk/lit/tex4ht-info-html4.tex	2016-09-20 22:43:40 UTC (rev 193)
+++ trunk/lit/tex4ht-info-html4.tex	2016-09-30 09:51:40 UTC (rev 194)
@@ -36,45 +36,10 @@
    \expandafter\next
 \fi
 
+\input{common-info}
+\input{common}
 
-%%%%%%%%%%%%%%%%%% definitions %%%%%%%%%%%%%%%%%%%%%%%%%
 
-\expandafter\ifx \csname YES\HTML\endcsname\relax
-    \def\CleanComment{[0]}
-\else
-    \let\saveCd=\<
-    \def\<{\edef\FIRST{\the\inputlineno}\let\<\saveCd \saveCd}
-    \def\CleanComment#1tex4ht-info-html4#2#3#4.#5>#6//{[#4%  <--jobname
-                  \if,\ifnum \FIRST=#6 .\else ,0\fi\fi]#6//}
-\fi
-
-\Comment{
-
-\string\ifx\string\infoIVht\string\UnDeF\string\def\string\infoIVht#1//{}\string\fi\string\infoIVht\CleanComment}{//
-
-}
-
-
-\def\>>>#1<<<{\bgroup\csname no:catcodes\endcsname0{255}{12}%
-   \csname no:catcodes\endcsname{13}{13}{13}% ^^M
-   \def\temp##1>>>{\egroup
-      \expandafter \def\csname #1\endcsname{##1}}\temp}
-
-\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
-}
-
-
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \chapter{INFO}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Modified: trunk/lit/tex4ht-info-javahelp.tex
===================================================================
--- trunk/lit/tex4ht-info-javahelp.tex	2016-09-20 22:43:40 UTC (rev 193)
+++ trunk/lit/tex4ht-info-javahelp.tex	2016-09-30 09:51:40 UTC (rev 194)
@@ -1,5 +1,6 @@
 % compile 3 times: latex tex4ht-info-javahelp   
 %          or htlatex tex4ht-info-javahelp "html,sections+"
+%          or ht latex tex4ht-info
 %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % tex4ht-info-javahelp.tex                               %
@@ -27,7 +28,6 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 \message{(<signature>)}
 
-% Compile with the command `ht latex tex4ht-info'
 
 \ifx \HTML\UnDef
    \def\HTML{infojh}
@@ -38,49 +38,10 @@
 \fi
 
 
-%%%%%%%%%%%%%%%%%% definitions %%%%%%%%%%%%%%%%%%%%%%%%%
+\input{common-info}
+\input{common}
 
-\expandafter\ifx \csname YES\HTML\endcsname\relax
-    \def\CleanComment{[0]}
-\else
-    \let\saveCd=\<
-    \def\<{\edef\FIRST{\the\inputlineno}\let\<\saveCd \saveCd}
-%    \def\CleanComment#1tex4ht-info#2#3#4.#5>#6//{[\eatIX#4%     <--jobname
-    \def\CleanComment#1tex4ht-info#2#3#4.#5>#6//{[#4%     <--jobname
-                  \if,\ifnum \FIRST=#6 .\else ,0\fi\fi]#6//}
-    \def\eatIX#1#2#3#4#5#6#7#8#9{}
-\fi
 
-\Comment{
-
-\string\ifx\string\infoIVht\string\UnDeF\string\def\string\infoIVht#1//{}\string\fi\string\infoIVht\CleanComment}{//
-
-}
-
-
-
-
-
-\def\>>>#1<<<{\bgroup\csname no:catcodes\endcsname0{255}{12}%
-   \csname no:catcodes\endcsname{13}{13}{13}% ^^M
-   \def\temp##1>>>{\egroup
-      \expandafter \def\csname #1\endcsname{##1}}\temp}
-
-\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
-}
-
-
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \chapter{INFO}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Modified: trunk/lit/tex4ht-info-mml.tex
===================================================================
--- trunk/lit/tex4ht-info-mml.tex	2016-09-20 22:43:40 UTC (rev 193)
+++ trunk/lit/tex4ht-info-mml.tex	2016-09-30 09:51:40 UTC (rev 194)
@@ -12,7 +12,7 @@
    \def\HTML{infomml}
    \def\CONFIG{\jobname}
    \def\MAKETITLE{\author{Eitan M. Gurari}}
-   \def\next{\input mktex4ht.4ht   \endinput}
+   \def\next{\input ./mktex4ht.4ht \endinput}
    \expandafter\next
 \fi
 

Modified: trunk/lit/tex4ht-info.tex
===================================================================
--- trunk/lit/tex4ht-info.tex	2016-09-20 22:43:40 UTC (rev 193)
+++ trunk/lit/tex4ht-info.tex	2016-09-30 09:51:40 UTC (rev 194)
@@ -38,47 +38,10 @@
 \fi
 
 
-%%%%%%%%%%%%%%%%%% definitions %%%%%%%%%%%%%%%%%%%%%%%%%
+\input{common-info}
+\input{common}
 
-\expandafter\ifx \csname YES\HTML\endcsname\relax
-    \def\CleanComment{[0]}
-\else
-    \let\saveCd=\<
-    \def\<{\edef\FIRST{\the\inputlineno}\let\<\saveCd \saveCd}
-    \def\CleanComment#1tex4ht-info#2#3#4.#5>#6//{[#4%     <--jobname
-                  \if,\ifnum \FIRST=#6 .\else ,0\fi\fi]#6//}
-\fi
 
-\Comment{
-
-\string\ifx\string\infoIVht\string\UnDeF\string\def\string\infoIVht#1//{}\string\fi\string\infoIVht\CleanComment}{//
-
-}
-
-
-
-
-
-\def\>>>#1<<<{\bgroup\csname no:catcodes\endcsname0{255}{12}%
-   \csname no:catcodes\endcsname{13}{13}{13}% ^^M
-   \def\temp##1>>>{\egroup
-      \expandafter \def\csname #1\endcsname{##1}}\temp}
-
-\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
-}
-
-
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \chapter{INFO}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



More information about the tex4ht-commits mailing list