texlive[64937] Master/texmf-dist: xskak support, tex4ht r1235

commits+karl at tug.org commits+karl at tug.org
Fri Nov 4 23:11:53 CET 2022


Revision: 64937
          http://tug.org/svn/texlive?view=revision&revision=64937
Author:   karl
Date:     2022-11-04 23:11:52 +0100 (Fri, 04 Nov 2022)
Log Message:
-----------
xskak support, tex4ht r1235

Revision Links:
--------------
    http://tug.org/svn/texlive?view=revision&revision=1235

Modified Paths:
--------------
    trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
    trunk/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex
    trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
    trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex
    trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht
    trunk/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht

Added Paths:
-----------
    trunk/Master/texmf-dist/tex/generic/tex4ht/xskak.4ht

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2022-11-04 20:00:59 UTC (rev 64936)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2022-11-04 22:11:52 UTC (rev 64937)
@@ -1,3 +1,8 @@
+2022-11-04  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-4ht.tex (xskak.4ht),
+	* tex4ht-html4.tex (html4.4ht): added support for the Xskak package.
+
 2022-11-02  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-mathml.tex (mathml.4ht): added extra group for \mathcal, to

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex	2022-11-04 20:00:59 UTC (rev 64936)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex	2022-11-04 22:11:52 UTC (rev 64937)
@@ -1,4 +1,4 @@
-% $Id: mktex4ht-cnf.tex 1219 2022-10-20 14:40:14Z michal_h21 $
+% $Id: mktex4ht-cnf.tex 1235 2022-11-04 15:46:19Z michal_h21 $
 % Manually-maintained file, listing *.4ht files created by tex4ht-4ht.tex.
 % Read by tex4ht-cond4ht.
 %
@@ -373,6 +373,7 @@
 \AddFile{9}{parallel}
 \AddFile{9}{skak}
 \AddFile{9}{chessboard}
+\AddFile{9}{xskak}
 \AddFile{9}{texmate}
 \AddFile{9}{menukeys}
 \AddFile{9}{animate}

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex	2022-11-04 20:00:59 UTC (rev 64936)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex	2022-11-04 22:11:52 UTC (rev 64937)
@@ -1,4 +1,4 @@
-% $Id: tex4ht-4ht.tex 1229 2022-10-31 11:23:43Z michal_h21 $
+% $Id: tex4ht-4ht.tex 1235 2022-11-04 15:46:19Z michal_h21 $
 % tex tex4ht-4ht   or   ht tex tex4ht-4ht
 %
 % Copyright 2009-2022 TeX Users Group    
@@ -33442,6 +33442,74 @@
 
 
 %%%%%%%%%%%%%%%%%%%%%%%%
+\Section{xskak.sty}
+%%%%%%%%%%%%%%%%%%%%%%%%
+
+\<xskak.4ht\><<<
+% xskak.4ht (|version), generated from |jobname.tex
+% Copyright 2022 TeX Users Group
+|<TeX4ht license text|>
+|<xskak depth|>
+|<xskak inline elements|>
+|<xskak.sty|>
+\Hinput{xskak}
+\endinput
+>>>\AddFile{9}{xskak}
+
+This command calculates vertical align for Xskak commands that can be used inline,
+so the image is aligned correctly to the baseline of the surrounding text.
+
+\<xskak depth\><<<
+\ExplSyntaxOn
+\def\:xskakdepth{vertical-align:-\fp_eval:n{ 
+  \dim_to_fp:n{\dp0}/(\dim_to_fp:n{\ht0}+\dim_to_fp:n{\dp0}) * 100
+}\@percentchar;}
+\ExplSyntaxOff
+>>>
+
+The following commands are used in text, so we save the result in a box, which can
+be used for calculation of vertical alignment.
+
+\<xskak inline elements\><<<
+\NewConfigure{mainline}{2}
+\def\:tempa#1{%
+  \setbox0=\hbox{\o:mainline:{#1}}%
+  \edef\:xskakalt{\detokenize{#1}}%
+  %\a:mainline\Picture*[\detokenize{#1}]{ style="\:xskakdepth"}\box0\EndPicture\b:mainline%
+  \a:mainline\box0\b:mainline%
+}
+\HLet\mainline\:tempa
+
+\NewConfigure{xskakget}{2}
+\def\:tempa#1{%
+  \edef\:xskakalt{\detokenize{#1}}%
+  \setbox0=\hbox{\o:xskakget:{#1}}%
+  \a:xskakget\box0\b:xskakget%
+}
+\HLet\xskakget\:tempa
+>>>
+
+The chessboard configuration is defined by chessboard.4ht too. We declare it here
+because 
+
+\<xskak.sty\><<<
+\NewConfigure{chessboard}{2}
+>>>
+
+\<xskak.sty\><<<
+\def\:tempa{%
+  % reset to the original version of \chessboard
+  \let\:currchesboard\chessboard
+  \let\chessboard\o:chessboard:%
+  \o:newchessgame:%
+  % set the TeX4ht version of \chessboard back
+  \let\chessboard\:currchesboard
+}
+\HLet\newchessgame\:tempa
+>>>
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%
 \Section{texmate.sty}
 %%%%%%%%%%%%%%%%%%%%%%%%
 

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex	2022-11-04 20:00:59 UTC (rev 64936)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex	2022-11-04 22:11:52 UTC (rev 64937)
@@ -1,4 +1,4 @@
-% $Id: tex4ht-html4.tex 1226 2022-10-27 14:19:24Z michal_h21 $
+% $Id: tex4ht-html4.tex 1235 2022-11-04 15:46:19Z michal_h21 $
 % Compile 4 times: latex tex4ht-html4
 % Copy html4.4ht into the work directory before all but the last compilation.
 %
@@ -19426,6 +19426,27 @@
 >>>
 
 %%%%%%%%%%%%%%%%%
+\section{xskak}
+%%%%%%%%%%%%%%%%%
+
+\<configure html4 xskak\><<<
+\Configure{mainline}{\Picture*[\:xskakalt]{ style="\:xskakdepth"}}{\EndPicture}
+\Configure{xskakget}{\Picture*[\:xskakalt]{ style="\:xskakdepth"}}{\EndPicture}
+>>>
+
+%%%%%%%%%%%%%%%%%
+\section{chessboard}
+%%%%%%%%%%%%%%%%%
+
+If called from Xskak, we can use the xskakget command to get 
+chess notation as an alt text.
+
+\<configure html4 chessboard\><<<
+\def\chessboard:alt{\ifdefined\o:xskakget:\o:xskakget:{nextfen}\fi}
+\Configure{chessboard}{\Picture*[\chessboard:alt]{}}{\EndPicture}
+>>>
+
+%%%%%%%%%%%%%%%%%
 \section{texmate}
 
 \<configure html4 texmate\><<<

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht	2022-11-04 20:00:59 UTC (rev 64936)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht	2022-11-04 22:11:52 UTC (rev 64937)
@@ -1,4 +1,4 @@
-% html4.4ht (2022-10-27-13:38), generated from tex4ht-html4.tex
+% html4.4ht (2022-11-04-13:31), generated from tex4ht-html4.tex
 % Copyright 2009-2022 TeX Users Group
 % Copyright 1997-2009 Eitan M. Gurari
 %
@@ -17,7 +17,7 @@
 %
 % If you modify this program, changing the
 % version identification would be appreciated.
-\immediate\write-1{version 2022-10-27-13:38}
+\immediate\write-1{version 2022-11-04-13:31}
 
 \exit:ifnot{8859-6,% 
 CJK,% 
@@ -64,6 +64,7 @@
 catalan,% 
 cgloss4e,% 
 chapterbib,% 
+chessboard,% 
 color,% 
 colortbl,% 
 context,% 
@@ -254,6 +255,7 @@
 wrapfig,% 
 writer,% 
 xcolor,% 
+xskak,% 
 xy}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -40409,9 +40411,30 @@
 \endinput\empty\empty\empty\empty\empty\empty
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+                \ConfigureHinput{chessboard}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+    \def\chessboard:alt{\ifdefined\o:xskakget:\o:xskakget:{nextfen}\fi}
+\Configure{chessboard}{\Picture*[\chessboard:alt]{}}{\EndPicture}
 
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+  
+\endinput\empty\empty\empty\empty\empty\empty
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+                \ConfigureHinput{xskak}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+    \Configure{mainline}{\Picture*[\:xskakalt]{ style="\:xskakdepth"}}{\EndPicture}
+\Configure{xskakget}{\Picture*[\:xskakalt]{ style="\:xskakdepth"}}{\EndPicture}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+  
+\endinput\empty\empty\empty\empty\empty\empty
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                 \ConfigureHinput{texmate}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     \Configure{makediagramsfix}{\PictureOff}{\PictureOn}
@@ -40437,6 +40460,7 @@
 \endinput\empty\empty\empty\empty\empty\empty
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                 \ConfigureHinput{sectionbreak}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht	2022-11-04 20:00:59 UTC (rev 64936)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht	2022-11-04 22:11:52 UTC (rev 64937)
@@ -1,4 +1,4 @@
-% usepackage.4ht (2022-10-31-13:02), generated from tex4ht-4ht.tex
+% usepackage.4ht (2022-11-04-13:31), generated from tex4ht-4ht.tex
 % Copyright 2003-2009 Eitan M. Gurari
 % Copyright 2009-2022 TeX Users Group
 %
@@ -17,7 +17,7 @@
 %
 % If you modify this program, changing the
 % version identification would be appreciated.
-\immediate\write-1{version 2022-10-31-13:02}
+\immediate\write-1{version 2022-11-04-13:31}
 
    \def\:temp{tex4ht}\ifx \:temp\@currname
    \:warning{\string\usepackage{tex4ht} again?}

Added: trunk/Master/texmf-dist/tex/generic/tex4ht/xskak.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/xskak.4ht	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/xskak.4ht	2022-11-04 22:11:52 UTC (rev 64937)
@@ -0,0 +1,57 @@
+% xskak.4ht (2022-11-04-13:31), generated from tex4ht-4ht.tex
+% Copyright 2022 TeX Users Group
+%
+% 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.
+\immediate\write-1{version 2022-11-04-13:31}
+
+\ExplSyntaxOn
+\def\:xskakdepth{vertical-align:-\fp_eval:n{
+  \dim_to_fp:n{\dp0}/(\dim_to_fp:n{\ht0}+\dim_to_fp:n{\dp0}) * 100
+}\@percentchar;}
+\ExplSyntaxOff
+
+\NewConfigure{mainline}{2}
+\def\:tempa#1{%
+  \setbox0=\hbox{\o:mainline:{#1}}%
+  \edef\:xskakalt{\detokenize{#1}}%
+  %\a:mainline\Picture*[\detokenize{#1}]{ style="\:xskakdepth"}\box0\EndPicture\b:mainline%
+  \a:mainline\box0\b:mainline%
+}
+\HLet\mainline\:tempa
+
+\NewConfigure{xskakget}{2}
+\def\:tempa#1{%
+  \edef\:xskakalt{\detokenize{#1}}%
+  \setbox0=\hbox{\o:xskakget:{#1}}%
+  \a:xskakget\box0\b:xskakget%
+}
+\HLet\xskakget\:tempa
+
+\NewConfigure{chessboard}{2}
+\def\:tempa{%
+  % reset to the original version of \chessboard
+  \let\:currchesboard\chessboard
+  \let\chessboard\o:chessboard:%
+  \o:newchessgame:%
+  % set the TeX4ht version of \chessboard back
+  \let\chessboard\:currchesboard
+}
+\HLet\newchessgame\:tempa
+
+\Hinput{xskak}
+\endinput
+


Property changes on: trunk/Master/texmf-dist/tex/generic/tex4ht/xskak.4ht
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property


More information about the tex-live-commits mailing list.