texlive[69904] Master/texmf-dist: \ce in mathjax, tex4ht r1460;

commits+karl at tug.org commits+karl at tug.org
Fri Feb 16 17:40:52 CET 2024


Revision: 69904
          https://tug.org/svn/texlive?view=revision&revision=69904
Author:   karl
Date:     2024-02-16 17:40:51 +0100 (Fri, 16 Feb 2024)
Log Message:
-----------
\ce in mathjax, tex4ht r1460; chemfig support, tex4ht r1461

Revision Links:
--------------
    https://tug.org/svn/texlive?view=revision&revision=1460
    https://tug.org/svn/texlive?view=revision&revision=1461

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/source/generic/tex4ht/tex4ht-mathjax.tex
    trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht
    trunk/Master/texmf-dist/tex/generic/tex4ht/mathjax-latex-4ht.4ht

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

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2024-02-16 15:08:58 UTC (rev 69903)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2024-02-16 16:40:51 UTC (rev 69904)
@@ -1,3 +1,12 @@
+2024-02-13  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-4ht.tex (chemfig.4ht),
+	* tex4ht-html4.tex (html4.4ht): added support for the the \chemname
+	command from Chemfig package.
+
+	* tex4ht-mathjax.tex (mathjax-latex-4ht.4ht): fixed handling of the
+	\ce command used inside pictures.
+
 2024-02-07  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-4ht.tex (mhchem.4ht),

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex	2024-02-16 15:08:58 UTC (rev 69903)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex	2024-02-16 16:40:51 UTC (rev 69904)
@@ -1,4 +1,4 @@
-% $Id: mktex4ht-cnf.tex 1448 2024-01-22 11:15:28Z michal_h21 $
+% $Id: mktex4ht-cnf.tex 1461 2024-02-13 15:20:24Z michal_h21 $
 % Manually-maintained file, listing *.4ht files created by tex4ht-4ht.tex.
 % Read by tex4ht-cond4ht.
 %
@@ -404,4 +404,5 @@
 \AddFile{9}{embedfile}
 \AddFile{9}{fontawesome5}
 \AddFile{9}{mhchem}
+\AddFile{9}{chemfig}
 % \AddFile{9}{mktex4ht}

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex	2024-02-16 15:08:58 UTC (rev 69903)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex	2024-02-16 16:40:51 UTC (rev 69904)
@@ -1,4 +1,4 @@
-% $Id: tex4ht-4ht.tex 1459 2024-02-07 13:33:10Z michal_h21 $
+% $Id: tex4ht-4ht.tex 1461 2024-02-13 15:20:24Z michal_h21 $
 % tex tex4ht-4ht   or   ht tex tex4ht-4ht
 %
 % Copyright 2009-2024 TeX Users Group    
@@ -31030,6 +31030,48 @@
 
 >>>
 
+%%%%%%%%%%%%%%%
+\Section{Chemfig}
+%%%%%%%%%%%%%%%
+
+\<chemfig.4ht\><<<
+% chemfig.4ht (|version), generated from |jobname.tex
+% Copyright 2024 TeX Users Group
+|<TeX4ht license text|>
+|<chemfig redefinitions|>
+
+\Hinput{chemfig}
+\endinput
+>>> \AddFile{9}{chemfig}
+
+The chemname command should print label under chemical diagram, so we need to
+envelop both of these elements in hooks, to handle this structure in the configuration 
+for output formats.
+
+\<chemfig redefinitions\><<<
+\ExplSyntaxOn
+\NewConfigure{chemname}{3}
+\def\:tempa[#1]#2#3{%
+	\setbox\CF_boxstuff\hbox{#2}%
+	\edef\CF_wdstuffbox{\the\wd\CF_boxstuff}\edef\CF_dpstuffbox{\the\dp\CF_boxstuff}%
+	\leavevmode
+	\ifdim\CF_dpmax<\CF_dpstuffbox
+		\ifboolKV[chemfig]{gchemname}\global{}\let\CF_dpmax\CF_dpstuffbox
+	\fi
+  \a:chemname
+	\vtop{%
+		\box\CF_boxstuff
+		\nointerlineskip
+		\kern\dimexpr#1\ifCF_adjust_name_dp+\CF_dpmax-\CF_dpstuffbox\fi\relax
+    \b:chemname
+		\CF_parsemolname#3\\\_nil
+	}%
+  \c:chemname
+}
+\HLet\CF_chemnameb\:tempa
+\ExplSyntaxOff
+>>>
+
 %%%%%%%%%%%%%
 \Section{Ushort}
 %%%%%%%%%%%%%

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex	2024-02-16 15:08:58 UTC (rev 69903)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex	2024-02-16 16:40:51 UTC (rev 69904)
@@ -1,4 +1,4 @@
-% $Id: tex4ht-html4.tex 1459 2024-02-07 13:33:10Z michal_h21 $
+% $Id: tex4ht-html4.tex 1461 2024-02-13 15:20:24Z michal_h21 $
 % Compile 4 times: latex tex4ht-html4
 % Copy html4.4ht into the work directory before all but the last compilation.
 %
@@ -21800,6 +21800,20 @@
 >>>
 
 %%%%%%%%%%%%%%%%%%%%%%
+\section{chemfig}
+%%%%%%%%%%%%%%%%%%%%%%
+
+Display chemname as two inline rows
+
+\<configure html4 chemfig\><<<
+\Configure{chemname}{\ifvmode\IgnorePar\fi\EndP\HCode{<span class="chemname"><span class="chemnametop">}\IgnorePar}
+{\HCode{</span><span class="chemnamebot">}}{\HCode{</span></span>}}
+
+\Css{.chemname {display: inline-grid; text-align:center;}}
+\Css{.chemnamebot{font-size: 0.8rem;}}
+>>>
+
+%%%%%%%%%%%%%%%%%%%%%%
 \section{transparent}
 %%%%%%%%%%%%%%%%%%%%%%
 

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-mathjax.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-mathjax.tex	2024-02-16 15:08:58 UTC (rev 69903)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-mathjax.tex	2024-02-16 16:40:51 UTC (rev 69904)
@@ -1,4 +1,4 @@
-% $Id: tex4ht-mathjax.tex 1382 2023-10-12 12:52:53Z michal_h21 $
+% $Id: tex4ht-mathjax.tex 1460 2024-02-13 13:55:59Z michal_h21 $
 % compile: latex tex4ht-mathjax
 %
 % Copyright 2018-2023 TeX Users Group
@@ -271,7 +271,8 @@
 
 \<mhchem configurations\><<<
 \@ifpackageloaded{mhchem}{%
-\def\ce#1{\texttt{\detokenize{\(\ce{#1}\)}}}
+\def\:tempa#1{\texttt{\detokenize{\(\ce{#1}\)}}}
+\HLet\ce\:tempa
 }{}
 >>>
 

Added: trunk/Master/texmf-dist/tex/generic/tex4ht/chemfig.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/chemfig.4ht	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/chemfig.4ht	2024-02-16 16:40:51 UTC (rev 69904)
@@ -0,0 +1,46 @@
+% chemfig.4ht (2024-02-14-09:16), generated from tex4ht-4ht.tex
+% Copyright 2024 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 2024-02-14-09:16}
+
+\ExplSyntaxOn
+\NewConfigure{chemname}{3}
+\def\:tempa[#1]#2#3{%
+  \setbox\CF_boxstuff\hbox{#2}%
+  \edef\CF_wdstuffbox{\the\wd\CF_boxstuff}\edef\CF_dpstuffbox{\the\dp\CF_boxstuff}%
+  \leavevmode
+  \ifdim\CF_dpmax<\CF_dpstuffbox
+    \ifboolKV[chemfig]{gchemname}\global{}\let\CF_dpmax\CF_dpstuffbox
+  \fi
+  \a:chemname
+  \vtop{%
+    \box\CF_boxstuff
+    \nointerlineskip
+    \kern\dimexpr#1\ifCF_adjust_name_dp+\CF_dpmax-\CF_dpstuffbox\fi\relax
+    \b:chemname
+    \CF_parsemolname#3\\\_nil
+  }%
+  \c:chemname
+}
+\HLet\CF_chemnameb\:tempa
+\ExplSyntaxOff
+
+
+\Hinput{chemfig}
+\endinput
+


Property changes on: trunk/Master/texmf-dist/tex/generic/tex4ht/chemfig.4ht
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht	2024-02-16 15:08:58 UTC (rev 69903)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht	2024-02-16 16:40:51 UTC (rev 69904)
@@ -1,4 +1,4 @@
-% html4.4ht (2024-02-07-13:12), generated from tex4ht-html4.tex
+% html4.4ht (2024-02-14-09:16), generated from tex4ht-html4.tex
 % Copyright 2009-2024 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 2024-02-07-13:12}
+\immediate\write-1{version 2024-02-14-09:16}
 
 \exit:ifnot{8859-6,% 
 CJK,% 
@@ -66,6 +66,7 @@
 cgloss4e,% 
 changepage,% 
 chapterbib,% 
+chemfig,% 
 chessboard,% 
 color,% 
 colortbl,% 
@@ -40776,6 +40777,21 @@
 \endinput\empty\empty\empty\empty\empty\empty
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+                \ConfigureHinput{chemfig}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+    \Configure{chemname}{\ifvmode\IgnorePar\fi\EndP\HCode{<span class="chemname"><span class="chemnametop">}\IgnorePar}
+{\HCode{</span><span class="chemnamebot">}}{\HCode{</span></span>}}
 
+\Css{.chemname {display: inline-grid; text-align:center;}}
+\Css{.chemnamebot{font-size: 0.8rem;}}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+  
+\endinput\empty\empty\empty\empty\empty\empty
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+
 \endinput
 

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/mathjax-latex-4ht.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/mathjax-latex-4ht.4ht	2024-02-16 15:08:58 UTC (rev 69903)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/mathjax-latex-4ht.4ht	2024-02-16 16:40:51 UTC (rev 69904)
@@ -1,4 +1,4 @@
-% mathjax-latex-4ht.4ht (2023-10-12-14:42), generated from tex4ht-mathjax.tex
+% mathjax-latex-4ht.4ht (2024-02-14-09:16), generated from tex4ht-mathjax.tex
 % Copyright 2018-2023 TeX Users Group
 %
 % This work may be distributed and/or modified under the
@@ -16,7 +16,7 @@
 %
 % If you modify this program, changing the
 % version identification would be appreciated.
-\immediate\write-1{version 2023-10-12-14:42}
+\immediate\write-1{version 2024-02-14-09:16}
 
 
 \ExplSyntaxOn
@@ -157,7 +157,8 @@
 \fixmathjaxtoc\right
 
 \@ifpackageloaded{mhchem}{%
-\def\ce#1{\texttt{\detokenize{\(\ce{#1}\)}}}
+\def\:tempa#1{\texttt{\detokenize{\(\ce{#1}\)}}}
+\HLet\ce\:tempa
 }{}
 
 \@ifpackageloaded{tikz}{%
@@ -216,6 +217,18 @@
 
 
 
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 



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