summaryrefslogtreecommitdiff
path: root/support/TeX4ht
diff options
context:
space:
mode:
Diffstat (limited to 'support/TeX4ht')
-rw-r--r--support/TeX4ht/source/ChangeLog120
-rw-r--r--support/TeX4ht/source/Makefile4
-rw-r--r--support/TeX4ht/source/mktex4ht-cnf.tex5
-rw-r--r--support/TeX4ht/source/tex4ht-4ht.tex278
-rw-r--r--support/TeX4ht/source/tex4ht-cpright.tex4
-rw-r--r--support/TeX4ht/source/tex4ht-env.tex17
-rw-r--r--support/TeX4ht/source/tex4ht-fonts-noncjk.tex166
-rw-r--r--support/TeX4ht/source/tex4ht-html4.tex76
-rw-r--r--support/TeX4ht/source/tex4ht-jats.tex26
-rw-r--r--support/TeX4ht/source/tex4ht-mathjax.tex39
-rw-r--r--support/TeX4ht/source/tex4ht-mathml.tex215
11 files changed, 902 insertions, 48 deletions
diff --git a/support/TeX4ht/source/ChangeLog b/support/TeX4ht/source/ChangeLog
index 9fa8d8a125..0efdd8bc4f 100644
--- a/support/TeX4ht/source/ChangeLog
+++ b/support/TeX4ht/source/ChangeLog
@@ -1,4 +1,120 @@
-2024-06-17 Michal Hoftich <michal.h21@gmail.com>
+2024-09-11 Michal Hoftich <michal.h21@gmail.com>
+
+ * tex4ht-mathjax.tex (mathjax-latex-4ht.4ht): prevent insertion of
+ spaces after \begin and \end in \VerbMath.
+
+2024-09-10 Michal Hoftich <michal.h21@gmail.com>
+
+ * tex4ht-mathjax.tex (mathjax-latex-4ht.4ht): use \detokenize again,
+ the alternative method could lead to commands joined with the
+ following text (\int A to \intA).
+
+2024-09-09 Michal Hoftich <michal.h21@gmail.com>
+
+ * tex4ht-4ht.tex (usepackage.4ht, enumitem-hooks.4ht, enumitem.4ht),
+ * tex4ht-html4.tex (html4.4ht): added support for environments
+ defined using \newlist.
+ https://github.com/michal-h21/make4ht/issues/150
+
+2024-09-03 Michal Hoftich <michal.h21@gmail.com>
+
+ * tex4ht-fonts-noncjk.tex (
+ ./tex4ht.dir/texmf/tex4ht/ht-fonts/unicode/bbm/bbm.htf
+ ): added support for the BBM font. Thanks to Arkady Benediktov.
+ * tex4ht-fonts-noncjk.tex (
+ ./tex4ht.dir/texmf/tex4ht/ht-fonts/unicode/TeXvect10/vect10.htf
+ ./tex4ht.dir/texmf/tex4ht/ht-fonts/unicode/TeXvect10/vect.htf
+ ): fixed Esvect fonts characters. Thanks to Arkady Benediktov.
+ * tex4ht-mathml.tex (mathml.4ht): use actual arrow symbol defined in
+ the vect10.htf font.
+
+2024-08-27 Michal Hoftich <michal.h21@gmail.com>
+
+ * tex4ht-mathml.tex (mathml.4ht): fixed support of upper case Greek
+ letters inside pictures.
+ https://tex.stackexchange.com/q/725157/2891
+
+2024-08-19 Michal Hoftich <michal.h21@gmail.com>
+
+ * tex4ht-4ht.tex (moderncv.4ht),
+ * tex4ht-html4.tex (html4.4ht): added support for the Moderncv
+ package.
+ https://tex.stackexchange.com/q/721180/2891
+
+2024-08-13 Michal Hoftich <michal.h21@gmail.com>
+
+ * tex4ht-4ht.tex (amsfonts.4ht): fixed support for \mathbb and
+ \mathfrak.
+
+ * tex4ht-jats.tex (jats.4ht): added support for LaTeX
+ bibliographies.
+
+2024-08-11 Karl Berry <karl@freefriends.org>
+
+ * tex4ht-mathml.tex (html-mml.4ht): copyright 2024.
+
+2024-08-02 Michal Hoftich <michal.h21@gmail.com>
+
+ * tex4ht-mathml.tex (mathml.4ht): added "texsource" option. It will
+ keep the original LaTeX code as an annotation in MathML.
+ https://chat.stackexchange.com/rooms/154333/discussion-on-question-by-yannisl-alternatives-to-mathml-for-pdf-tagging
+
+ * tex4ht-4ht.tex (esvect.4ht),
+ * tex4ht-mathml.tex (mathml.4ht): added support for the Esvect
+ package.
+ https://tex.stackexchange.com/a/723587/2891
+
+2024-07-31 Michal Hoftich <michal.h21@gmail.com>
+
+ * tex4ht-fonts-noncjk.tex (
+ ./tex4ht.dir/texmf/tex4ht/ht-fonts/unicode/TeXvect10/vect10.htf
+ ): Added support for the vector font from the Esvect package.
+ https://tex.stackexchange.com/q/723560/2891
+
+2024-07-28 Michal Hoftich <michal.h21@gmail.com>
+
+ * tex4ht-mathjax.tex (mathjax-latex-4ht.4ht): don't add spaces after
+ LaTeX commands.
+
+2024-07-26 Michal Hoftich <michal.h21@gmail.com>
+
+ * tex4ht-4ht.tex (tagpdf-hooks.4ht, tagpdf-base-hooks.4ht): removed
+ \__tag_whatsits definitions, they fix is no longer necessary.
+ https://github.com/michal-h21/make4ht/issues/145#issuecomment-2085215582
+
+2024-07-07 Karl Berry <karl@freefriends.org>
+
+ * Makefile (tex4ht_env_derived),
+ * tex4ht-env.tex: no longer generate tex4ht.env, just
+ .env-unix and .env-win32, since those are the only ones we use.
+
+2024-07-06 Michal Hoftich <michal.h21@gmail.com>
+
+ * tex4ht-html4.tex (html4.4ht): added itemize+ option. It will keep
+ original characters for itemize bullets.
+ https://tex.stackexchange.com/a/722062/2891
+
+2024-07-03 Michal Hoftich <michal.h21@gmail.com>
+
+ * tex4ht-4ht.tex (fontawesome5.4ht): use icon name as the alt text.
+
+2024-06-21 Michal Hoftich <michal.h21@gmail.com>
+
+ * tex4ht-4ht.tex (arydshln.4ht): fixed clash between Colortbl and
+ Arydshln packages.
+ https://tex.stackexchange.com/a/721185/2891
+
+2024-06-23 Karl Berry <karl@freefriends.org>
+
+ * tex4ht-cpright.tex: https for urls.
+
+2024-06-21 Michal Hoftich <michal.h21@gmail.com>
+
+ * tex4ht-html4.tex (html4.4ht): don't use picture name as alt in
+ \epsfbox, it can lead to spurious characters in the resulting HTML.
+ Thanks to Rolf Brigola
+
+2024-06-20 Michal Hoftich <michal.h21@gmail.com>
* tex4ht-4ht.tex (footmisc.4ht): fixed handling of footnote counter
reset.
@@ -9,7 +125,7 @@
* tex4ht-4ht.tex (tabularray.4ht): updated names of token lists that
holds rowspan and colspan.
- https://tex.stackexchange.com/a/720800/2891
+ https://tex.stackexchange.com/a/720800/2891
2024-06-15 Michal Hoftich <michal.h21@gmail.com>
diff --git a/support/TeX4ht/source/Makefile b/support/TeX4ht/source/Makefile
index fd6995f4a5..5328185f78 100644
--- a/support/TeX4ht/source/Makefile
+++ b/support/TeX4ht/source/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile 1503 2024-04-18 22:51:03Z karl $
+# $Id: Makefile 1538 2024-07-07 15:55:16Z karl $
# This file is public domain. Originally written 2010, Karl Berry.
# Assumes GNU make.
@@ -138,7 +138,7 @@ tex4ht_docbook_xtpipes_derived = docbook.4xt $(wd)/src/DbUtilities.java
endif
derived += $(tex4ht_env_derived)
-tex4ht_env_derived = tex4ht.env-unix tex4ht.env-win32 tex4ht.env
+tex4ht_env_derived = tex4ht.env-unix tex4ht.env-win32
derived += $(tex4ht_fonts_cjk_derived)
tex4ht_fonts_cjk_derived = \
diff --git a/support/TeX4ht/source/mktex4ht-cnf.tex b/support/TeX4ht/source/mktex4ht-cnf.tex
index 7bc692fff6..2bddd28013 100644
--- a/support/TeX4ht/source/mktex4ht-cnf.tex
+++ b/support/TeX4ht/source/mktex4ht-cnf.tex
@@ -1,4 +1,4 @@
-% $Id: mktex4ht-cnf.tex 1523 2024-05-27 14:16:04Z michal_h21 $
+% $Id: mktex4ht-cnf.tex 1552 2024-09-09 14:48:03Z michal_h21 $
% Manually-maintained file, listing *.4ht files created by tex4ht-4ht.tex.
% Read by tex4ht-cond4ht.
%
@@ -238,8 +238,10 @@
\AddFile{9}{europecv}
\AddFile{9}{resume}
\AddFile{9}{curve}
+\AddFile{9}{moderncv}
\AddFile{9}{vowel}
\AddFile{9}{enumitem}
+\AddFile{9}{enumitem-hooks}
\AddFile{9}{esperanto}
\AddFile{9}{IEEEtran}
\AddFile{9}{enumerate}
@@ -415,4 +417,5 @@
\AddFile{9}{fontawesome5}
\AddFile{9}{mhchem}
\AddFile{9}{chemfig}
+\AddFile{9}{esvect}
% \AddFile{9}{mktex4ht}
diff --git a/support/TeX4ht/source/tex4ht-4ht.tex b/support/TeX4ht/source/tex4ht-4ht.tex
index 6993bc74f5..2bd694407c 100644
--- a/support/TeX4ht/source/tex4ht-4ht.tex
+++ b/support/TeX4ht/source/tex4ht-4ht.tex
@@ -1,4 +1,4 @@
-% $Id: tex4ht-4ht.tex 1532 2024-06-20 12:47:49Z michal_h21 $
+% $Id: tex4ht-4ht.tex 1552 2024-09-09 14:48:03Z michal_h21 $
% tex tex4ht-4ht or ht tex tex4ht-4ht
%
% Copyright 2009-2024 TeX Users Group
@@ -4265,18 +4265,19 @@ icons to pictures by TeX4ht conversion.
\<fontawesome5.4ht\><<<
% fontawesome5.4ht (|version), generated from |jobname.tex
-% Copyright 2021 TeX Users Group
+% Copyright 2021-2024 TeX Users Group
|<TeX4ht license text|>
\NewConfigure{fontawesome}{2}
\ExplSyntaxOn
\cs_new_protected:Nn\temp:nn{%
+\def\:fontawesomeicon{#2}% to be used in the alt text
\a:fontawesome%
\o:fontawesome_use_icon:nn:{#1}{#2}
\b:fontawesome}
\HLet\fontawesome_use_icon:nn\temp:nn
\ExplSyntaxOff
-\Configure{fontawesome}{\Picture+{}}{\EndPicture}
+\Configure{fontawesome}{\Picture+[icon: \:fontawesomeicon]{}}{\EndPicture}
\Hinput{fontawesome5}
\endinput
>>> \AddFile{9}{fontawesome5}
@@ -5099,13 +5100,14 @@ as it leads to a fatal error.
\Configure{PackageHooks}{tagpdf.sty}{tagpdf-hooks.4ht}
>>>
+% This is no longer useful, it was fixed in tagpdf code
+% \cs_set_protected:Npn \__tag_whatsits: {}
+
\<tagpdf-hooks.4ht\><<<
% tagpdf-hooks.4ht (|version), generated from |jobname.tex
% Copyright 2022-2024 TeX Users Group
|<TeX4ht license text|>
\ExplSyntaxOn
-% ignore tagpdf's specials
-\cs_set_protected:Npn \__tag_whatsits: {}
\ExplSyntaxOff
\:AtEndOfPackage{%
\RenewDocumentCommand \tagpdfsetup { m }{}
@@ -5117,16 +5119,17 @@ as it leads to a fatal error.
\Configure{PackageHooks}{tagpdf-base.sty}{tagpdf-base-hooks.4ht}
>>>
-This file can be used explicitly, we need to provide the whatsits command
-here as well.
+This file can be used explicitly, we used to provide the whatsits command
+here as well, but it is no longer neeeded.
+
+% ignore tagpdf's specials
+% we use csname, because \ExplSyntaxOn .. Off caused catcode issues
+% \expandafter\def\csname __tag_whatsits:\endcsname{}
\<tagpdf-base-hooks.4ht\><<<
% tagpd-base-hooks.4ht (|version), generated from |jobname.tex
% Copyright 2024 TeX Users Group
|<TeX4ht license text|>
-% ignore tagpdf's specials
-% we use csname, because \ExplSyntaxOn .. Off caused catcode issues
-\expandafter\def\csname __tag_whatsits:\endcsname{}
\endinput
>>> \AddFile{9}{tagpdf-base-hooks}
@@ -11225,12 +11228,13 @@ compilation errors
\<arydshln.4ht\><<<
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% arydshln.4ht (|version), generated from |jobname.tex
-% Copyright 2022 TeX Users Group
+% Copyright 2022-2024 TeX Users Group
|<TeX4ht license text|>
% this is a copy of code that arydshln inserts to \@array
\def\:new:array{\adl@everyvbox\everyvbox
\everyvbox{\adl@arrayinit \the\adl@everyvbox \everyvbox\adl@everyvbox}%
- \ifadl@inactive \adl@inactivate \else \adl@activate \fi
+ % this line may lead to errors if the document uses Colortbl:
+ % \ifadl@inactive \adl@inactivate \else \adl@activate \fi
\let\adl@noalign\noalign}
\ifcsname n:@array:\endcsname% if \@array was already patched by TeX4ht
\let\orig:n@array\n:@array:
@@ -22275,14 +22279,14 @@ $$
\<amsfonts sty\><<<<
\NewConfigure{mathbb}{2}
-\def\:temp#1{{\a:mathbb \o:@mathbb:{#1}\b:mathbb}}
-\HLet\@mathbb\:temp
+\def\:temp#1{{\a:mathbb \o:mathbb:{#1}\b:mathbb}}
+\HLet\mathbb\:temp
>>>
\<amsfonts sty\><<<<
\NewConfigure{mathfrak}{2}
-\def\:temp#1{{\a:mathfrak \o:@mathfrak:{#1}\b:mathfrak}}
-\HLet\@mathfrak\:temp
+\def\:temp#1{{\a:mathfrak \o:mathfrak:{#1}\b:mathfrak}}
+\HLet\mathfrak\:temp
>>>
Commands like \''\rm' need low level implemetation through
@@ -30143,6 +30147,173 @@ A style file for resumes.
>>>
%%%%%%%%%%%%%%%%%%%%%%%%%
+\Section{moderncv}
+%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\<moderncv.4ht\><<<
+% moderncv.4ht (|version), generated from |jobname.tex
+% Copyright 2024 TeX Users Group
+|<TeX4ht license text|>
+|<moderncv configs|>
+\Hinput{moderncv}
+\endinput
+>>>\AddFile{9}{moderncv}
+
+This is a bit messy. We had to redefine a bunch of commands from various
+files that Moderncv uses, mostly to prevent compilation errors and to
+insert some basic formatting.
+
+\<moderncv configs\><<<
+\NewConfigure{section}{2}
+\RenewDocumentCommand\section{sm}{\a:section #2\b:section}
+
+\NewConfigure{subsection}{2}
+\RenewDocumentCommand\subsection{sm}{\a:subsection #2\b:subsection}
+
+
+\NewConfigure{cvitem}{3}
+\renewcommand*{\cvitem}[3][.25em]{
+\a:cvitem #2\b:cvitem #3\c:cvitem
+}
+
+\NewConfigure{cvdoubleitem}{2}
+\renewcommand*{\cvdoubleitem}[5][.25em]{%
+\a:cvdoubleitem
+\cvitem{#2}{#3}
+\cvitem{#4}{#5}
+\b:cvdoubleitem
+}
+
+\NewConfigure{cvlistitem}{2}
+\renewcommand*{\cvlistitem}[2][.25em]{%
+ \a:cvlistitem\cvitem[#1]{\listitemsymbol}{#2}\b:cvlistitem
+}
+
+\NewConfigure{cvlistdoubleitem}{2}
+\renewcommand*{\cvlistdoubleitem}[3][.25em]{%
+ \a:cvlistdoubleitem%
+ \cvitem[#1]{\listitemsymbol}{#2}%
+ \cvitem[#1]{\listitemsymbol}{#3}%
+ \b:cvlistdoubleitem%
+}
+
+\NewConfigure{cvhead}{2}
+\NewConfigure{cvphoto}{2}
+
+
+\renewcommand*{\makecvhead}{%
+ \a:cvhead
+ % recompute lengths (in case we are switching from letter to resume, or vice versa)
+ \recomputecvlengths%
+ % optional detailed information (pre-rendering)
+ \@initializebox{\makecvheaddetailsbox}%
+ \if@details%
+ \def\phonesdetails{}%
+ \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
+ \protected@edef\phonesdetails{\phonesdetails\protect\makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
+ \def\socialsdetails{}%
+ \collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
+ \protected@edef\socialsdetails{\socialsdetails\protect\makenewline\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}%
+ \savebox{\makecvheaddetailsbox}{%
+ \addressfont\color{color2}%
+ \if@left\begin{tabular}[b]{@{}r@{}}\fi%
+ \if@right\begin{tabular}[b]{@{}l@{}}\fi%
+ \ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
+ \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty
+ \ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
+ \ifthenelse{\isundefined{\@born}}{}{\makenewline\bornsymbol\@born}%
+ \phonesdetails% needs to be pre-rendered as loops and tabulars seem to conflict
+ \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
+ \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httpslink{\@homepage}}%
+ \socialsdetails% needs to be pre-rendered as loops and tabulars seem to conflict
+ \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}%
+ \end{tabular}
+ }\fi%
+ % optional photo (pre-rendering)
+ \@initializebox{\makecvheadpicturebox}%
+ \savebox{\makecvheadpicturebox}{%
+ \ifthenelse{\isundefined{\@photo}}%
+ {}%
+ {%
+ \a:cvphoto\includegraphics[]{\@photo}\b:cvphoto}%
+ }%
+ % name and title (pre-rendering)
+ \@initializelength{\makecvheaddetailswidth}\settowidth{\makecvheaddetailswidth}{\usebox{\makecvheaddetailsbox}}%
+ \@initializelength{\makecvheadpicturewidth}\settowidth{\makecvheadpicturewidth}{\usebox{\makecvheadpicturebox}}%
+ \ifthenelse{\lengthtest{\makecvheadnamewidth=0pt}}% check for dummy value (equivalent to \ifdim\makecvheadnamewidth=0pt)
+ {\setlength{\makecvheadnamewidth}{\textwidth-\makecvheaddetailswidth-\makecvheadpicturewidth}}%
+ {}%
+ \@initializebox{\makecvheadnamebox}%
+ \savebox{\makecvheadnamebox}{%
+ \begin{minipage}[b]{\makecvheadnamewidth}%
+ \if@left\raggedright\fi%
+ \if@right\raggedleft\fi%
+ \namestyle{\@firstname\ \@lastname}%
+ \ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%
+ \end{minipage}}%
+ % rendering
+ \if@left%
+ \usebox{\makecvheadnamebox}%
+ \hfill%
+ \llap{\usebox{\makecvheaddetailsbox}}% \llap is used to suppress the width of the box, allowing overlap if the value of makecvheadnamewidth is forced
+ \usebox{\makecvheadpicturebox}\fi%
+ \if@right%
+ \usebox{\makecvheadpicturebox}%
+ \rlap{\usebox{\makecvheaddetailsbox}}% \llap is used to suppress the width of the box, allowing overlap if the value of makecvheadnamewidth is forced
+ \hfill%
+ \usebox{\makecvheadnamebox}\fi%
+ \\[2.5em]%
+ % optional quote
+ \ifthenelse{\isundefined{\@quote}}%
+ {}%
+ {{\centering\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%
+ \b:cvhead\par}% to avoid weird spacing bug at the first section if no blank line is left after \makecvhead
+
+
+\RenewDocumentCommand\cvskilllegend{s +O{.25em} +O{\skillLegend@defaultLevelOne} +O{\skillLegend@defaultLevelTwo} +O{\skillLegend@defaultLevelThree} +O{\skillLegend@defaultLevelFour} +O{\skillLegend@defaultLevelFive} +m}{%
+\begin{tabular}{l l l l l l}
+ \raggedleft\hintstyle{#8} & \cvskill{1}\, & \,{\skillLegend@FontSize #3} & \cvskill{3}\, &\,{\skillLegend@FontSize #5 } \\%
+ %
+ & \cvskill{2}\, & \,\multirow{2}{\cvskilllegend@leftdescriptorwidth}{{\skillLegend@FontSize #4}} & \cvskill{4}\, &\,{\skillLegend@FontSize #6 } \\%
+ %
+ & & & \cvskill{5}\, &\,{\skillLegend@FontSize #7 }%
+ \end{tabular}%
+}%
+
+
+\NewConfigure{cvskill}{2}
+\def\:tempa#1{\def\:cvskillamount{#1}\a:cvskill\o:cvskill:{#1}\b:cvskill}
+\HLet\cvskill\:tempa
+
+\NewConfigure{cvskillhead}{2}
+\NewConfigure{cvskillentry}{2}
+\RenewDocumentCommand\cvskillhead{O{.25em} +O{\skillMatrix@HeaderDefaultOne} +O{\skillMatrix@HeaderDefaultTwo} +O{\skillMatrix@HeaderDefaultThree} +O{\skillMatrix@HeaderDefaultFour}}{%
+ \begingroup
+ \a:cvskillhead
+ \begin{tabular}{ p{6em} p{12em} p{4em} p{20em}}%
+ { #2} & { #3} & { #4} & { #5}
+ \end{tabular}%
+ \b:cvskillhead
+ \endgroup
+ \par\addvspace{#1}
+}
+
+\RenewDocumentCommand\cvskillentry{s +O{.25em} +m +m +m +m +m}{%
+\a:cvskillentry
+\cvitem{#3}{
+ \begin{tabular}{ p{6em} p{12em} p{4em} p{20em}}
+ \centering \cvskill{#4} &\centering {#5} & \centering {#6} &{\itshape#7}%
+ \end{tabular}}%
+ \b:cvskillentry
+ \par\addvspace{#2}
+}
+
+>>>
+
+%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Small Ones}
%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -30169,6 +30340,7 @@ A style file for resumes.
% Copyright |CopyYear.2009. Eitan M. Gurari
|<TeX4ht copywrite|>
|<enumitem config|>
+|<enumitem newlist|>
\Hinput{enumitem}
\endinput
>>> \AddFile{9}{enumitem}
@@ -30203,6 +30375,61 @@ See \Link[https://github.com/hendricius/the-sourdough-framework/pull/312]{}{}for
\def\enit@postlabel{}
>>>
+We need to provide a configuration for environments defined using \Verb+\newlist+.
+Because they are defined in the preamble, we must catch them using the early hooks
+file.
+
+The test file and report can be found \Link[https://github.com/michal-h21/make4ht/issues/150]{}{}here\EndLink.
+
+
+\<add to usepackage\><<<
+\Configure{PackageHooks}{enumitem.sty}{enumitem-hooks.4ht}
+>>>
+
+\<enumitem-hooks.4ht\><<<
+% enumitem-hooks.4ht (|version), generated from |jobname.tex
+% Copyright 2024 TeX Users Group
+|<TeX4ht license text|>
+\:AtEndOfPackage{%
+|<enumitem patch newlist|>
+}
+>>> \AddFile{9}{enumitem-hooks}
+
+
+We save all defined environments in \Verb+\enumitem:newlist+. This command
+is then called in the \Verb+\Configure{enumitemnewlist}+, which can
+be used in the output format configuration.
+
+\<enumitem patch newlist\><<<
+\def\enumitem:newlist{}
+\def\:tempa#1#2#3#4{\concat:config\enumitem:newlist{\Configure{enumitemenv}{#2}}\o:enit@newlist{#1}{#2}{#3}{#4}}
+\let\o:enit@newlist\enit@newlist
+\let\enit@newlist\:tempa
+>>>
+
+
+This configuration is called automatically by \Verb+\Configure{enumitenewlist}+ for each
+declared environment. The environment name is saved in \Verb+\a:enumitemenv+,
+and then we call \Verb+\enumitem:newlist+, which should provide a configuration for lists
+in the current output format.
+
+\<enumitem newlist\><<<
+\NewConfigure{enumitemenv}[1]{%
+\def\a:enumitemenv{#1}%
+\enumitem:newlistconfig
+}
+>>>
+
+This configuration should provide a configuration for a list in the current output format.
+Name of the configured environment is saved in \Verb+\a:enumitemenv+.
+
+\<enumitem newlist\><<<
+\NewConfigure{enumitemnewlist}[1]{
+ \def\enumitem:newlistconfig{#1}
+ \enumitem:newlist
+}
+>>>
+
%%%%%%%%%%%%%
\Section{esperanto.sty}
@@ -31406,6 +31633,25 @@ for output formats.
\ExplSyntaxOff
>>>
+%%%%%%%%%%%%%%%
+\Section{Esvect}
+%%%%%%%%%%%%%%%
+
+\<esvect.4ht\><<<
+% esvect.4ht (|version), generated from |jobname.tex
+% Copyright 2024 TeX Users Group
+|<TeX4ht license text|>
+|<esvect redefinitions|>
+
+\Hinput{esvect}
+\endinput
+>>> \AddFile{9}{esvect}
+
+
+\<esvect redefinitions\><<<
+>>>
+
+
%%%%%%%%%%%%%
\Section{Ushort}
%%%%%%%%%%%%%
diff --git a/support/TeX4ht/source/tex4ht-cpright.tex b/support/TeX4ht/source/tex4ht-cpright.tex
index 3527690921..c15155fcc5 100644
--- a/support/TeX4ht/source/tex4ht-cpright.tex
+++ b/support/TeX4ht/source/tex4ht-cpright.tex
@@ -4,14 +4,14 @@
% 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
+% https://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>.
+% is the TeX4ht Project <https://tug.org/tex4ht>.
%
% If you modify this program, changing the
% version identification would be appreciated.>>>
diff --git a/support/TeX4ht/source/tex4ht-env.tex b/support/TeX4ht/source/tex4ht-env.tex
index 5d66aa43d0..3ac0f4443d 100644
--- a/support/TeX4ht/source/tex4ht-env.tex
+++ b/support/TeX4ht/source/tex4ht-env.tex
@@ -1,8 +1,8 @@
-% $Id: tex4ht-env.tex 1419 2023-12-11 23:23:52Z karl $
+% $Id: tex4ht-env.tex 1538 2024-07-07 15:55:16Z karl $
% latex tex4ht-env
% or htlatex tex4ht-env "xhtml,3"
%
-% Copyright 2009-2023 TeX Users Group
+% Copyright 2009-2024 TeX Users Group
% Copyright 1997-2009 Eitan M. Gurari
% Released under LPPL 1.3c+.
% See tex4ht-cpright.tex for license text.
@@ -1650,27 +1650,30 @@ Note: the permission option `S' takes into account also trailing spaces.
\<unix copyright\><<<
% tex4ht.env-unix (@version), generated from @jobname.tex
-% (can be used as ~/.tex4ht)
-% Copyright 2009-2023 TeX Users Group
+% Copyright 2009-2024 TeX Users Group
% Copyright @CopyYear.1997. Eitan M. Gurari
@<TeX4ht copyright@>>>>
\<private copyright\><<<
% tex4ht.env (private) (@version), generated from @jobname.tex
% (can be used as ~/.tex4ht)
-% Copyright 2009-2023 TeX Users Group
+% Copyright 2009-2024 TeX Users Group
% Copyright @CopyYear.1997. Eitan M. Gurari
@<TeX4ht copyright@>>>>
\<win32 copyright\><<<
% tex4ht.env-win32 (@version), generated from @jobname.tex
-% Copyright 2009-2023 TeX Users Group
+% Copyright 2009-2024 TeX Users Group
% Copyright @CopyYear.1997. Eitan M. Gurari
@<TeX4ht copyright@>>>>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\OutputCode\<tex4ht\>
+% Let's no longer create tex4ht.env; it's too easy to mistakenly update
+% a system version with it. Post-Eitan, we haven't tried to keep it in
+% sync with the others.
+%\OutputCode\<tex4ht\>
+
\OutputCodE\<tex4ht.env-unix\>
\OutputCodE\<tex4ht.env-win32\>
diff --git a/support/TeX4ht/source/tex4ht-fonts-noncjk.tex b/support/TeX4ht/source/tex4ht-fonts-noncjk.tex
index ae68aa34d5..91e506635d 100644
--- a/support/TeX4ht/source/tex4ht-fonts-noncjk.tex
+++ b/support/TeX4ht/source/tex4ht-fonts-noncjk.tex
@@ -1,8 +1,8 @@
-% $Id: tex4ht-fonts-noncjk.tex 1517 2024-05-10 11:27:42Z michal_h21 $
+% $Id: tex4ht-fonts-noncjk.tex 1551 2024-09-03 22:26:09Z karl $
% tex tex4ht-fonts-noncjk
% or ht tex tex4ht-fonts-noncjk
%
-% Copyright 2009-2023 TeX Users Group
+% Copyright 2009-2024 TeX Users Group
% Copyright 1997-2009 Eitan M. Gurari
% Released under LPPL 1.3c+.
% See tex4ht-cpright.tex for license text.
@@ -24483,6 +24483,168 @@ fplmbb 49 90
+\Section{Esvect}
+
+Font file for the Esvect package.
+
+% writing vect10.htf hash: d9018d0b41b7639bd8c3bf0419c3b8a5
+\<vect10\><<<
+vect10 0 47
+'&#x2192;' '' 0000 0 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+'&#x2192;' '' 0001 1 %% vect.htf (unicode) %
+'&#x2192;' '' 0002 2 %% generated from vect10.tfm, 2024-07-31-11:51 %
+'&#x2192;' '' 0003 3 %% Copyright 2024 TeX Users Group, Arkady Benediktov %
+'&#x2192;' '' 0004 4 %% %
+'&#x2192;' '' 0005 5 %% This work may be distributed and/or modified under the %
+'&#x2192;' '' 0006 6 %% conditions of the LaTeX Project Public License, either %
+'&#x2192;' '' 0007 7 %% version 1.3c of this license or (at your option) any %
+'&#x2192;' '' 0008 8 %% later version. The latest version of this license is in %
+'&#x0009;' '' 0009 9 %% http://www.latex-project.org/lppl.txt %
+'&#x000A;' '' 000A 10 %% and version 1.3c or later is part of all distributions %
+'&#x000B;' '' 000B 11 %% of LaTeX version 2005/12/01 or later. %
+'&#x000C;' '' 000C 12 %% %
+'&#x000D;' '' 000D 13 %% This work has the LPPL maintenance status "maintained". %
+'&#x000E;' '' 000E 14 %% %
+'&#x000F;' '' 000F 15 %% The Current Maintainer of this work %
+'&#x2192;' '' 0010 16 %% is the TeX4ht Project <http://tug.org/tex4ht>. %
+'&#x2192;' '' 0011 17 %% %
+'&#x2192;' '' 0012 18 %% If you modify this program, changing the %
+'&#x2192;' '' 0013 19 % % version identification would be appreciated. %
+'&#x2192;' '' 0014 20 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+'&#x2192;' '' 0015 21
+'&#x2192;' '' 0016 22
+'&#x2192;' '' 0017 23
+'&#x2192;' '' 0018 24
+'&#x0019;' '' 0019 25
+'&#x001A;' '' 001A 26
+'&#x001B;' '' 001B 27
+'&#x001C;' '' 001C 28
+'&#x001D;' '' 001D 29
+'&#x001E;' '' 001E 30
+'&#x001F;' '' 001F 31
+'&#x23AF;' '' 0020 32
+'&#x23AF;' '' 0021 33
+'&#x23AF;' '' 0022 34
+'&#x23AF;' '' 0023 35
+'&#x23AF;' '' 0024 36
+'&#x23AF;' '' 0025 37
+'&#x23AF;' '' 0026 38
+'&#x23AF;' '' 0027 39
+'&#x23AF;' '' 0028 40
+'&#x23AF;' '' 0029 41
+'&#x23AF;' '' 002A 42
+'&#x23AF;' '' 002B 43
+'&#x23AF;' '' 002C 44
+'&#x23AF;' '' 002D 45
+'&#x23AF;' '' 002E 46
+'&#x23AF;' '' 002F 47
+vect10 0 47
+
+
+>>>
+\AddFont{vect10}{unicode/TeXvect10/vect10}{}
+
+\<vect\><<<
+.vect10
+htfcss: vect10 font-family: 'TeXvect10', serif;
+htfcss: vect5 font-family: 'TeXvect10', serif;
+>>>
+
+\AddFont{vect}{unicode/TeXvect10/vect}{}
+
+
+
+\Section{BBM}
+
+\<bbm\><<<
+bbm 8 90 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+'&#x2985;' '' 8 %% bbm.htf (unicode) %
+'&#x2986;' '' 9 %% generated from bbm.tfm, 2024-09-03 %
+'' '1' 10 %% Copyright 2024 TeX Users Group, Arkady Benediktov %
+'' '1' 11 %% %
+'' '1' 12 %% This work may be distributed and/or modified under the %
+'' '1' 13 %% conditions of the LaTeX Project Public License, either %
+'' '1' 14 %% version 1.3c of this license or (at your option) any %
+'' '1' 15 %% later version. The latest version of this license is in %
+'' '1' 16 %% http://www.latex-project.org/lppl.txt %
+'&#x1d7d9;' '' 17 %% and version 1.3c or later is part of all distributions %
+'&#x1d7da;' '' 18 %% of LaTeX version 2005/12/01 or later. %
+'' '1' 19 %% %
+'' '1' 20 %% This work has the LPPL maintenance status "maintained". %
+'' '1' 21 %% %
+'' '1' 22 %% The Current Maintainer of this work %
+'' '1' 23 %% is the TeX4ht Project <http://tug.org/tex4ht>. %
+'' '1' 24 %% %
+'' '1' 25 %% If you modify this program, changing the %
+'' '1' 26 % % version identification would be appreciated. %
+'' '1' 27 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+'' '1' 28
+'' '1' 29
+'' '1' 30
+'' '1' 31
+'' '1' 32
+'&#x1d538;' '' 33
+'&#x1d539;' '' 34
+'&#x2102;' '' 35
+'&#x1d53b;' '' 36
+'&#x1d53c;' '' 37
+'&#x1d53d;' '' 38
+'&#x1d53e;' '' 39
+'&#x210d;' '' 40
+'&#x1d540;' '' 41
+'&#x1d541;' '' 42
+'&#x1d542;' '' 43
+'&#x1d543;' '' 44
+'&#x1d544;' '' 45
+'&#x2115;' '' 46
+'&#x1d546;' '' 47
+'&#x2119;' '' 48
+'&#x211a;' '' 49
+'&#x211d;' '' 50
+'&#x1d54a;' '' 51
+'&#x1d54b;' '' 52
+'&#x1d54c;' '' 53
+'&#x1d54d;' '' 54
+'&#x1d54e;' '' 55
+'&#x1d54f;' '' 56
+'&#x1d550;' '' 57
+'&#x2124;' '' 58
+'&#x27e6;' '' 59
+'' '1' 60
+'&#x27e7;' '' 61
+'' '1' 62
+'' '1' 63
+'' '1' 64
+'&#x1d552;' '' 65
+'&#x1d553;' '' 66
+'&#x1d554;' '' 67
+'&#x1d555;' '' 68
+'&#x1d556;' '' 69
+'&#x1d557;' '' 70
+'&#x1d558;' '' 71
+'&#x1d559;' '' 72
+'&#x1d55a;' '' 73
+'&#x1d55b;' '' 74
+'&#x1d55c;' '' 75
+'&#x1d55d;' '' 76
+'&#x1d55e;' '' 77
+'&#x1d55f;' '' 78
+'&#x1d560;' '' 79
+'&#x1d561;' '' 80
+'&#x1d562;' '' 81
+'&#x1d563;' '' 82
+'&#x1d564;' '' 83
+'&#x1d565;' '' 84
+'&#x1d566;' '' 85
+'&#x1d567;' '' 86
+'&#x1d568;' '' 87
+'&#x1d569;' '' 88
+'&#x1d56a;' '' 89
+'&#x1d56b;' '' 90
+bbm 8 90
+>>>
+
+\AddFont{bbm}{unicode/bbm/bbm}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/support/TeX4ht/source/tex4ht-html4.tex b/support/TeX4ht/source/tex4ht-html4.tex
index a2f3a57781..60ddfad048 100644
--- a/support/TeX4ht/source/tex4ht-html4.tex
+++ b/support/TeX4ht/source/tex4ht-html4.tex
@@ -1,4 +1,4 @@
-% $Id: tex4ht-html4.tex 1526 2024-05-28 19:03:35Z michal_h21 $
+% $Id: tex4ht-html4.tex 1552 2024-09-09 14:48:03Z michal_h21 $
% Compile 4 times: latex tex4ht-html4
% Copy html4.4ht into the work directory before all but the last compilation.
%
@@ -2950,6 +2950,22 @@ such a case, we don't have proper nestings of environments.
\EndP\HCode{</li></ul>}\ShowPar}
{\end:itm \global\def\end:itm{\EndP\Tg</li>}\DeleteMark}
{\HCode{<li class="\getClass{li}itemize">}\afterGetClass{li}|<list par|>}
+
+\:CheckOption{itemize+}\if:Option
+\ConfigureList{itemize}%
+ {\EndP\HCode{<ul \a:LRdir
+ class="\getClass{itemize}itemize\expandafter\the
+ \csname @itemdepth\endcsname">}%
+ \afterGetClass{itemize}%
+ |<save end:itm|>\global\let\end:itm=\empty}
+ {|<recall end:itm|>\ifvmode \IgnorePar\fi
+ \EndP\HCode{</li></ul>}\ShowPar}
+ {\end:itm \global\def\end:itm{\EndP\Tg</li>}\HCode{<li class="\getClass{li}itemize"><span class="itemizeHead" aria-hidden="true">}\afterGetClass{li}}
+ {\HCode{</span>}|<list par|>}
+\Css{.itemizeHead{float: left; margin-left: -1em; width: 1em;}}
+\Css{li.itemize{list-style: none;}}
+\fi
+
\NewConfigure{itemizeClass}{2}
\Configure{itemizeClass}{}{}
\NewConfigure{liClass}{2}
@@ -13824,7 +13840,7 @@ for margin pars.
\<configure html4 epsf\><<<
\Configure{epsfsetgraph}
- {\Picture+[\PicName]{}}
+ {\Picture+[]{}}
{\EndPicture}
>>>
@@ -16830,9 +16846,26 @@ Blue = 1-minimum(1,Yellow *(1-Black)+Black)
{\end:itm \global\def\end:itm{\EndP\Tg</dd>}\HCode{<dt
class="enumerate-enumitem">}\bgroup \bf}
{\egroup\EndP\HCode{</dt><dd\Hnewline class="enumerate-enumitem">}}
+
\Css{dl.enumerate-enumitem{display:grid; grid-template-columns: 3ch 1fr; align-items: top; row-gap:1ch;}}
>>>
+Configurations for new list environments.
+
+\<configure html4 enumitem\><<<
+\Configure{enumitemnewlist}{%
+\ConfigureList{\a:enumitemenv}%
+ {\EndP\HCode{<dl \a:LRdir class="enumerate-enumitem enumitem-\a:enumitemenv">}%
+ |<save end:itm|>\global\let\end:itm=\empty}
+ {|<recall end:itm|>\EndP\HCode{</dd></dl>}\ShowPar}
+ {\end:itm \global\def\end:itm{\EndP\Tg</dd>}\HCode{<dt
+ class="enumerate-enumitem enumitem-\a:enumitemenv">}\bgroup \bf}
+ {\egroup\EndP\HCode{</dt><dd\Hnewline class="enumerate-enumitem">}}
+}
+
+
+>>>
+
%%%%%%%%%%%%%
\subsection{IEEEtran}
@@ -17790,6 +17823,45 @@ Blue = 1-minimum(1,Yellow *(1-Black)+Black)
>>>
%%%%%%%%%%%%%%%%%%
+\section{moderncv}
+%%%%%%%%%%%%%%%%%%
+
+\<configure html4 moderncv\><<<
+\Configure{cvhead}{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="cvhead">}}{\ifvmode\IgnorePar\fi\EndP\HCode{</div>}}
+\Configure{cvphoto}{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="cvphoto">}}{\ifvmode\IgnorePar\fi\EndP\HCode{</div>}}
+
+\Configure{section}{\ifvmode\IgnorePar\fi\EndP\HCode{<h2>}}{\HCode{</h2>}}
+\Configure{subsection}{\ifvmode\IgnorePar\fi\EndP\HCode{<h3>}}{\HCode{</h3>}}
+\Configure{cvitem}{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="cvitem"><span class="cvitemhead">}}{\HCode{</span><span class="cvitembody">}}{\HCode{</span></div>}}
+\Configure{cvdoubleitem}{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="cvdoubleitem">}}{\HCode{</div>}}
+\Configure{cvlistitem}{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="cvlistitem">}}{\HCode{</div>}}
+\Configure{cvlistdoubleitem}{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="cvlistdoubleitem">}}{\HCode{</div>}}
+
+\Configure{cvskillhead}{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="cvskillhead">}}{\HCode{</div>}}
+\Configure{cvskillentry}{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="cvskillentry">}}{\HCode{</div>}}
+
+\Configure{cvskill}{\Picture*[skill level: \:cvskillamount]{}}{\EndPicture}
+
+\Css{.cvskillentry .tabular, .cvskillhead .tabular {margin:0pt;}}
+\Css{.cvskillentry .tabular td:nth-child(1), .cvskillhead .tabular td:nth-child(1){width: 8ch}}
+\Css{.cvskillentry .tabular td:nth-child(2), .cvskillhead .tabular td:nth-child(2){width: 12ch}}
+\Css{.cvskillentry .tabular td:nth-child(3), .cvskillhead .tabular td:nth-child(3){width: 6ch}}
+\Css{.cvskillentry .tabular td:nth-child(4), .cvskillhead .tabular td:nth-child(4){width: 54ch}}
+
+\Css{.cvitemhead{margin-right: 1em;}}
+
+\Css{
+@media (min-width:94ch) {
+.cvitemhead{
+ margin-left: -14ch;
+ width: 12ch;
+ float: left;
+ text-align: right;
+ }
+}}
+>>>
+
+%%%%%%%%%%%%%%%%%%
\section{CSS}
%%%%%%%%%%%%%%%%%%
diff --git a/support/TeX4ht/source/tex4ht-jats.tex b/support/TeX4ht/source/tex4ht-jats.tex
index e54de5ad20..16182ba8f5 100644
--- a/support/TeX4ht/source/tex4ht-jats.tex
+++ b/support/TeX4ht/source/tex4ht-jats.tex
@@ -1,4 +1,4 @@
-% $Id: tex4ht-jats.tex 1473 2024-02-23 12:26:51Z michal_h21 $
+% $Id: tex4ht-jats.tex 1545 2024-08-13 19:02:54Z michal_h21 $
% compile 3 times: latex tex4ht-jats
% or xhlatex tex4ht-jats "html,3,sections+"
%
@@ -201,6 +201,7 @@ Configurations that are shared only for article and report
|<latex footnotes|>
|<latex quotes|>
|<latex lists|>
+|<latex bibliography|>
>>>
\<shared article,report\><<<
@@ -841,6 +842,29 @@ them separatelly.
{\EndNoFonts\HCode{</term><def>}\HtmlParOn|<list par|>}
>>>
+
+We cannot create a structured bibliographic record for plain LaTeX references, so we
+at least mark individual entries.
+
+Entry id is set on the label element. The id comes from a child xref element that is removed
+by make4ht. Ideally, it should be set on ref, but we need to use label here, to catch
+potential entry number.
+
+
+\<latex bibliography\><<<
+\ConfigureList{thebibliography}%
+ {\ifvmode\IgnorePar\fi \EndP \HCode{<ref-list>}\let\en:bib=\empty}
+ {\en:bib \ifvmode\IgnorePar\fi \EndP \HCode{</ref-list>}}
+ {\en:bib\def\en:bib{\HCode{</mixed-citation></ref>}}%
+ \HCode{<ref><label>}%
+ \Configure{HtmlPar}%
+ {\EndP}%
+ {\EndP}%
+ {} {}%
+ }
+ {\HCode{</label><mixed-citation>}}
+>>>
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Packages}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/support/TeX4ht/source/tex4ht-mathjax.tex b/support/TeX4ht/source/tex4ht-mathjax.tex
index 23ca24a586..56c53e3698 100644
--- a/support/TeX4ht/source/tex4ht-mathjax.tex
+++ b/support/TeX4ht/source/tex4ht-mathjax.tex
@@ -1,4 +1,4 @@
-% $Id: tex4ht-mathjax.tex 1474 2024-02-25 16:27:19Z karl $
+% $Id: tex4ht-mathjax.tex 1554 2024-09-11 13:41:52Z michal_h21 $
% compile: latex tex4ht-mathjax
%
% Copyright 2018-2024 TeX Users Group
@@ -37,12 +37,14 @@ in LaTeX kernel now.
\<required packages\><<<
>>>
-The \verb|\alteqtoks| command saves the used command in HTML. It uses detokenize command
-to insert arguments verbatim. The side effect of this is that detokeize inserts space
+The \verb|\alteqtoks| command prints the used LaTeX math code to the output document in
+verbatim.
+
+In the past, we used \verb|\detokenize|. The side effect of this is that detokeize inserts space
after each control sequence. This is completely valid TeX code, but earlier versions of
MathJax didn't like that, rendering resulted in error.
-Fortunatelly, MathJax 3 supports these spaces, so we can remove regular expressions for space handling.
+Fortunatelly, MathJax 3 supports these spaces, so we could remove regular expressions for space handling.
The original code was this:
% % convert \ { to \:{
@@ -53,7 +55,28 @@ The original code was this:
% \regex_replace_all:nnN { \x{5C} \x{5C} \x{3A} \x{7B} } { \x{5C} \x{5C} \x{20} \x{7B} } \l_tmpa_tl
-We still use regula expressions to escape invalid XML characters to entities, so it works only with LaTeX.
+In July 2024, when I researched another issue, I've found that it is actually possible to avoid these
+extra spaces using LaTeX 3 commands. The inspiration comes from
+\Link[https://tex.stackexchange.com/a/44444/2891]this Bruno Le Foch\EndLink.
+One ongoing issue is that newlines are not presented. But they weren't preserved with \verb|\detokenize|
+either, so it shouldn't be a problem.
+
+In September 2024 I found that the LaTeX 3 method of preserving spaces didn't work correctly for
+code like this: \verb|$\int A f(x)\;dx$| -- the space between \verb|\int| and \verb|A| was removed,
+so it ended like command \verb|\intA|. So we are moving back to \verb|\detokenize|.
+
+This is the code that was promising, but didn't work in the end:
+
+\begin{verbatim}
+ % save tokens, but preserve spaces
+ % https://tex.stackexchange.com/a/44444/2891
+ \tl_set:Nn \l_tmpa_tl {#1}
+ \regex_replace_all:nnN { . } { \c{string} \0 } \l_tmpa_tl
+ \tl_set:Nx \l_tmpa_tl { \l_tmpa_tl }
+\end{verbatim}
+
+
+We still use regular expressions to escape invalid XML characters to entities, so it works only with LaTeX.
\<defined commands\><<<
\ExplSyntaxOn
@@ -109,9 +132,9 @@ environments. They will then keep the LaTeX code unchanged.
\long\def\AltlDisplayDollars#1$${\alteqtoks{\[#1\]}$$}
\newcommand\VerbMathToks[2]{%
- \alteqtoks{\begin{#2}
- #1
- \end{#2}}%
+ \HCode{\string\begin{#2}}%
+ \alteqtoks{#1}%
+ \HCode{\string\end{#2}}%
}
>>>
diff --git a/support/TeX4ht/source/tex4ht-mathml.tex b/support/TeX4ht/source/tex4ht-mathml.tex
index e7f496d6bf..8c294f48b7 100644
--- a/support/TeX4ht/source/tex4ht-mathml.tex
+++ b/support/TeX4ht/source/tex4ht-mathml.tex
@@ -1,8 +1,8 @@
-% $Id: tex4ht-mathml.tex 1495 2024-03-21 16:39:31Z michal_h21 $$
+% $Id: tex4ht-mathml.tex 1551 2024-09-03 22:26:09Z karl $$
% compile 3 times: latex tex4ht-mathltx
% or xhlatex tex4ht-mathltx "html,3,sections+"
%
-% Copyright 2009-2023 TeX Users Group
+% Copyright 2009-2024 TeX Users Group
% Copyright 1999-2009 Eitan M. Gurari
% Released under LPPL 1.3c+.
% See tex4ht-cpright.tex for license text.
@@ -584,7 +584,7 @@ in italic and without space that would separate it from the following element.
\<html-mml\><<<
% html-mml.4ht (|version), generated from |jobname.tex
-% Copyright 2009-2022 TeX Users Group
+% Copyright 2009-2024 TeX Users Group
% Copyright |CopyYear.1999. Eitan M. Gurari
|<TeX4ht copywrite|>
>>>
@@ -1939,6 +1939,189 @@ primes.
\fi
>>>
+
+We may want to include LaTeX source as an annotation in MathML. In particular LaTeX PDF tagging code can use
+this feature. We will not use it by default, but only with texsource option, as it can potentially
+break some functionality.
+
+The code is based on the LaTeX MathJax code, but heavily modified.
+
+\<configure html-mml latex\><<<
+\:CheckOption{texsource}\if:Option
+
+\newtoks\mmleqtoks
+\ExplSyntaxOn
+\cs_new_protected:Npn \mmlalteqtoks #1
+{
+ % save tokens, but preserve spaces
+ % https://tex.stackexchange.com/a/44444/2891
+ \tl_set:Nn \l_tmpa_tl {#1}
+ \regex_replace_all:nnN { . } { \c{string} \0 } \l_tmpa_tl
+ \tl_set:Nx \l_tmpa_tl { \l_tmpa_tl }
+ % % replace < > and & with xml entities
+ \regex_replace_all:nnN { \x{26} } { &amp; } \l_tmpa_tl
+ \regex_replace_all:nnN { \x{3C} } { &lt; } \l_tmpa_tl
+ \regex_replace_all:nnN { \x{3E} } { &gt; } \l_tmpa_tl
+ % \regex_replace_all:nnN { \n } {\HCode{ \Hnewline }} \l_tmpa_tl
+ % replace \par command with blank lines
+ \regex_replace_all:nnN { \x{5C}par\b } {\x{A}\x{A}} \l_tmpa_tl
+ \tl_set:Nx \mmleqtoks{ \l_tmpa_tl }
+
+ %\HCode{\l_tmpb_tl}
+}
+\ExplSyntaxOff
+
+
+\def\AltMath#1${\mmlalteqtoks{#1}%
+ #1\HCode{</\a:mathml mrow><\a:mathml annotation encoding="application/x-tex">\mmleqtoks</\a:mathml annotation>}$}
+\Configure{$}{\Configure{@math}{display="inline"}\DviMath\HCode{<\a:mathml semantics><\a:mathml mrow>}}{\HCode{</\a:mathml semantics>}\EndDviMath}{\expandafter\AltMath}
+
+\def\AltMathParen#1\){\mmlalteqtoks{#1}%
+ #1\HCode{</\a:mathml mrow><a\a:mathml nnotation encoding="application/x-tex">\mmleqtoks</\a:mathml annotation>}$}
+
+\def\AltMathParen#1\){\mmlalteqtoks{#1}#1\HCode{</\a:mathml mrow><\a:mathml annotation encoding="application/x-tex">\mmleqtoks</\a:mathml annotation>}\)}
+%\Configure{()}{\Configure{@math}{display="inline"}\DviMath\HCode{<\a:mathml semantics><\a:mathml mrow>}\AltMathParen$}{\EndDviMath\HCode{</\a:mathml semantics>}}
+\Configure{()}
+ {\Configure{@math}{%\a:mathml
+ display="inline"
+}\csname a:mathml()\endcsname
+\DviMath\HCode{<\a:mathml semantics><\a:mathml mrow>}$\expandafter\AltMathParen}
+{$\HCode{</\a:mathml semantics>}\EndDviMath\csname b:mathml()\endcsname}
+
+
+\long\def\AltDisplay#1\]{\mmlalteqtoks{#1}#1\HCode{</\a:mathml mrow><\a:mathml annotation encoding="application/x-tex">\mmleqtoks</\a:mathml annotation></\a:mathml semantics>}\]}
+\Configure{[]}{\Configure{@math}{display="block"}\DviMath$$\DisplayMathtrue\HCode{<\a:mathml semantics><\a:mathml mrow>}\AltDisplay}{$$\EndDviMath}
+
+
+% \long\def\MMLAltlDisplayDollars#1$${\mmlalteqtoks{\[#1\]}#1\HCode{</\a:mathml mrow><\a:mathml annotation encoding="application/x-tex">\mmleqtoks</\a:mathml annotation>}$$}
+
+% configuarartion of display math doesn't work yet. need to investigate it.
+% \Configure{$$}
+% {\Configure{@math}{%\a:mathml
+% display="block"
+% }\IgnorePar
+% \ifvmode\else \HCode{<!--tex4ht:inline-->}\fi
+% \EndP\DviMath\HCode{<\a:mathml semantics><\a:mathml mrow>}}
+% {\HCode{</\a:mathml semantics>}\EndDviMath\ShowPar\par{\csname HCondtrue\endcsname\noindent}}
+% {\DisplayMathtrue\expandafter\MMLAltlDisplayDollars}
+
+
+% \renewcommand\eqannotate[1]{\mmlalteqtoks{#1}\HCode{<\a:mathml semantics><\a:mathml mrow>}#1\HCode{</\a:mathml mrow><\a:mathml annotation encoding="application/x-tex">\mmleqtoks</\a:mathml annotation></\a:mathml semantics>}}
+
+
+% environment support
+\newcommand\MMLVerbMathToks[2]{%
+ \mmlalteqtoks{\begin{#2}
+ #1
+ \end{#2}}%
+ \begingroup%
+ \ifvmode\IgnorePar\fi\EndP\Configure{@math}{display="block"}\DviMath\DisplayMathtrue\HCode{<\a:mathml semantics><\a:mathml mrow>}
+ \Configure{$$}{}{}{}
+ \begin{old#2}
+ #1
+ \end{old#2}
+ \HCode{</\a:mathml mrow><\a:mathml annotation encoding="application/x-tex">}
+ \HCode{\mmleqtoks}
+ \HCode{</\a:mathml annotation></\a:mathml semantics>}
+ \EndDviMath
+ \endgroup
+}
+
+% we must handle equations separatelly.
+% it is a bit messy
+\newcommand\MMLVerbMathToksEquation[2]{%
+ \mmlalteqtoks{\begin{#2}
+ #1
+ \end{#2}}%
+ \begingroup%
+ \def\@tempa{#2}%
+ \def\@equationname{equation}%
+ \def\mlabeledtr{mtr}
+ \ifx\@equationname\@tempa%
+ \def\mlabeledtr{mlabeledtr} % this element can be used to print the equation number, but it is supported only by MathJax
+ \fi
+ \ifvmode\IgnorePar\fi\EndP\Configure{@math}{display="block"}\DviMath\DisplayMathtrue\HCode{<\a:mathml semantics><\a:mathml mrow><\a:mathml mtable><\a:mathml \mlabeledtr><\a:mathml mtd>}%
+ \ifx\@equationname\@tempa%
+ \incr@eqnum%
+ \print@eqnum%
+ \HCode{</\a:mathml mtd><\a:mathml mtd>}%
+ \fi
+ #1%
+ \HCode{</\a:mathml mtd></\a:mathml \mlabeledtr></\a:mathml mtable></\a:mathml mrow><\a:mathml annotation encoding="application/x-tex">}%
+ \HCode{\mmleqtoks}%
+ \HCode{</\a:mathml annotation></\a:mathml semantics>}%
+ \EndDviMath%
+ \endgroup%
+}
+
+\ExplSyntaxOn
+\newcommand\MMLVerbMath[1]{%
+ \cs_if_exist:cTF{#1}{
+ \expandafter\let\csname old#1\expandafter\endcsname\csname #1\endcsname
+ \expandafter\let\csname endold#1\expandafter\endcsname\csname end#1\endcsname
+ \RenewDocumentEnvironment{#1}{+!b}{%
+ \NoFonts\expandafter\MMLVerbMathToks\expandafter{##1}{#1}\EndNoFonts%
+ }{}
+ }{}%
+}
+
+\newcommand\MMLVerbEquation[1]{%
+ \cs_if_exist:cTF{#1}{
+ \expandafter\let\csname old#1\expandafter\endcsname\csname #1\endcsname
+ \expandafter\let\csname endold#1\expandafter\endcsname\csname end#1\endcsname
+ \RenewDocumentEnvironment{#1}{+!b}{%
+ \NoFonts\expandafter\MMLVerbMathToksEquation\expandafter{##1}{#1}\EndNoFonts%
+ }{}
+ }{}%
+}
+\ExplSyntaxOff
+
+% \MMLVerbEquation{equation}
+% \MMLVerbEquation{equation*}
+
+\fi
+>>>
+
+\<configure html-mml amsmath\><<<
+\:CheckOption{texsource}\if:Option
+\MMLVerbMath{subarray}
+\MMLVerbMath{smallmatrix}
+\MMLVerbMath{matrix}
+\MMLVerbMath{pmatrix}
+\MMLVerbMath{bmatrix}
+\MMLVerbMath{Bmatrix}
+\MMLVerbMath{vmatrix}
+\MMLVerbMath{Vmatrix}
+\MMLVerbMath{cases}
+\MMLVerbMath{subequations}
+\MMLVerbMath{aligned}
+\MMLVerbMath{alignedat}
+\MMLVerbMath{gathered}
+\MMLVerbMath{gather}
+\MMLVerbMath{gather*}
+\MMLVerbMath{alignat}
+\MMLVerbMath{alignat*}
+\MMLVerbMath{xalignat}
+\MMLVerbMath{xalignat*}
+\MMLVerbMath{xxalignat}
+\MMLVerbMath{align}
+\MMLVerbMath{align*}
+\MMLVerbMath{flalign}
+\MMLVerbMath{flalign*}
+\MMLVerbMath{split}
+\MMLVerbMath{multline}
+\MMLVerbMath{multline*}
+% equations fails with errors, even though it worked in a .cfg
+% I will need to investigate it more
+% \MMLVerbEquation{equation}
+% \MMLVerbEquation{equation*}
+\MMLVerbMath{math}
+\MMLVerbMath{displaymath}
+\MMLVerbMath{eqnarray}
+\MMLVerbMath{eqnarray*}
+\fi
+>>>
+
%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{plain.sty}
%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -3584,14 +3767,19 @@ charactes.
Extra brackets are used in order to support subscripts and superscripts.
\<configure mathml latex\><<<
-\def\:temp#1#2{\def#1{\PauseMathClass{\HCode{<mi mathvariant="normal">}\ht:special{t4ht@+\string&{35}x#2{59}}\a:HChar\HCode{</mi>}}\EndPauseMathClass}}
-\:temp\Psi{03A8}
+\def\:temp#1#2{\def\:tempa{\PauseMathClass{\HCode{<mi mathvariant="normal">}\ht:special{t4ht@+\string&{35}x#2{59}}\a:HChar\HCode{</mi>}}\EndPauseMathClass}\HLet#1\:tempa}
+\:temp\Gamma{0393}
\:temp\Delta{0394}
+\:temp\Theta{0398}
+\:temp\Lambda{039B}
\:temp\Xi{039E}
\:temp\Pi{03A0}
\:temp\Sigma{03A3}
\:temp\Upsilon{03A5}
+\:temp\Phi{03A6}
+\:temp\Psi{03A8}
\:temp\Omega{03A9}
+
>>>
@@ -5703,6 +5891,23 @@ elements that are printed to support the munderover element easily.
>>>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{esvec}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+We need to redefine these commands only for MathML. By default, Esvect produces images, which is OK.
+
+\<configure mathml esvect\><<<
+\def\:tempa#1{%
+\bgroup\HCode{<\a:mathml mover><\a:mathml mrow>}#1\HCode{</\a:mathml mrow><\a:mathml mo \a:mathml stretchy="true">}
+\PauseMathClass\fldr\EndPauseMathClass%
+\HCode{</\a:mathml mo></\a:mathml mover>}\egroup
+}
+
+\HRestore\ESV@vecteur
+\HLet\ESV@vecteur\:tempa
+>>>
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Notes}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%