summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-02-16 16:40:51 +0000
committerKarl Berry <karl@freefriends.org>2024-02-16 16:40:51 +0000
commit26aa7f8c8f0242a91b7da00f75e0f13b00fbc74b (patch)
tree270012c76c822d59649cc9cfe910d3b8626b01c0
parentb10b25ad42e12629c0bbc1644fc5c9f16513194a (diff)
\ce in mathjax, tex4ht r1460; chemfig support, tex4ht r1461
git-svn-id: svn://tug.org/texlive/trunk@69904 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/ChangeLog9
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex3
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex44
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex16
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/tex4ht-mathjax.tex5
-rw-r--r--Master/texmf-dist/tex/generic/tex4ht/chemfig.4ht46
-rw-r--r--Master/texmf-dist/tex/generic/tex4ht/html4.4ht20
-rw-r--r--Master/texmf-dist/tex/generic/tex4ht/mathjax-latex-4ht.4ht19
8 files changed, 152 insertions, 10 deletions
diff --git a/Master/texmf-dist/source/generic/tex4ht/ChangeLog b/Master/texmf-dist/source/generic/tex4ht/ChangeLog
index adb567263a3..096e58db310 100644
--- a/Master/texmf-dist/source/generic/tex4ht/ChangeLog
+++ b/Master/texmf-dist/source/generic/tex4ht/ChangeLog
@@ -1,3 +1,12 @@
+2024-02-13 Michal Hoftich <michal.h21@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@gmail.com>
* tex4ht-4ht.tex (mhchem.4ht),
diff --git a/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex b/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex
index b13850c6c96..13b9e3dee4e 100644
--- a/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex
+++ b/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex
@@ -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}
diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
index d18a1123c82..b48cac55f5c 100644
--- a/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
+++ b/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
@@ -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 @@ it come out as a complete mess.
>>>
+%%%%%%%%%%%%%%%
+\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}
%%%%%%%%%%%%%
diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex
index b11bd85bd8f..e09bb507b20 100644
--- a/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex
+++ b/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex
@@ -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 @@ users redefine the latter macro.
>>>
%%%%%%%%%%%%%%%%%%%%%%
+\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}
%%%%%%%%%%%%%%%%%%%%%%
diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-mathjax.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-mathjax.tex
index a02f8d1c544..24c0ec87aee 100644
--- a/Master/texmf-dist/source/generic/tex4ht/tex4ht-mathjax.tex
+++ b/Master/texmf-dist/source/generic/tex4ht/tex4ht-mathjax.tex
@@ -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 @@ Fixes for tables of contents.
\<mhchem configurations\><<<
\@ifpackageloaded{mhchem}{%
-\def\ce#1{\texttt{\detokenize{\(\ce{#1}\)}}}
+\def\:tempa#1{\texttt{\detokenize{\(\ce{#1}\)}}}
+\HLet\ce\:tempa
}{}
>>>
diff --git a/Master/texmf-dist/tex/generic/tex4ht/chemfig.4ht b/Master/texmf-dist/tex/generic/tex4ht/chemfig.4ht
new file mode 100644
index 00000000000..b2943a9df9e
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/tex4ht/chemfig.4ht
@@ -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
+
diff --git a/Master/texmf-dist/tex/generic/tex4ht/html4.4ht b/Master/texmf-dist/tex/generic/tex4ht/html4.4ht
index 78cff66f4a4..17fee6e5a2e 100644
--- a/Master/texmf-dist/tex/generic/tex4ht/html4.4ht
+++ b/Master/texmf-dist/tex/generic/tex4ht/html4.4ht
@@ -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 @@ catalan,%
cgloss4e,%
changepage,%
chapterbib,%
+chemfig,%
chessboard,%
color,%
colortbl,%
@@ -40776,6 +40777,21 @@ y{\ht:special{t4ht@+\string&{35}x00FD{59}}y}%
\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
diff --git a/Master/texmf-dist/tex/generic/tex4ht/mathjax-latex-4ht.4ht b/Master/texmf-dist/tex/generic/tex4ht/mathjax-latex-4ht.4ht
index b9955a6fe57..be7a13199e0 100644
--- a/Master/texmf-dist/tex/generic/tex4ht/mathjax-latex-4ht.4ht
+++ b/Master/texmf-dist/tex/generic/tex4ht/mathjax-latex-4ht.4ht
@@ -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}{%
@@ -664,5 +665,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
\endinput