summaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-11-30 03:01:25 +0000
committerNorbert Preining <norbert@preining.info>2022-11-30 03:01:25 +0000
commitcb9bbbf5f4fdb303e5da460ebf17b50811d06a6a (patch)
tree56df1557b5fe16b5c9850a957e81ac160ddcb91b /support
parentd3420ed49446361fef055ad7f989ff41ce7362b6 (diff)
CTAN sync 202211300301
Diffstat (limited to 'support')
-rw-r--r--support/TeX4ht/source/ChangeLog21
-rw-r--r--support/TeX4ht/source/mktex4ht-cnf.tex3
-rw-r--r--support/TeX4ht/source/tex4ht-4ht.tex88
-rw-r--r--support/TeX4ht/source/tex4ht-mathjax.tex49
4 files changed, 153 insertions, 8 deletions
diff --git a/support/TeX4ht/source/ChangeLog b/support/TeX4ht/source/ChangeLog
index 0730a3684e..596ecd2340 100644
--- a/support/TeX4ht/source/ChangeLog
+++ b/support/TeX4ht/source/ChangeLog
@@ -1,3 +1,24 @@
+2022-11-28 Michal Hoftich <michal.h21@gmail.com>
+
+ * tex4ht-mathjax.tex (mathjax-latex-4ht.4ht): restore math
+ environments automatically at the beginning of TikZ environments.
+ https://tex.stackexchange.com/a/666771/2891
+
+ * tex4ht-mathjax.tex (mathjax-latex-4ht.4ht): provided the
+ \RestoreMathJaxEnvironments command.
+ https://tex.stackexchange.com/a/666771/2891
+
+ * tex4ht-mathjax.tex (mathjax-latex-4ht.4ht): removed the
+ \fixmathjaxsec command, robust commands should be used instead.
+ https://tex.stackexchange.com/q/666705/2891
+
+ * tex4ht-4ht.tex (musicography.4ht): added support for the
+ Musicography package.
+
+2022-11-27 Karl Berry <karl@freefriends.org>
+
+ * tex4ht-4ht.tex (imakeidx.4ht): copyright 2022.
+
2022-11-25 Michal Hoftich <michal.h21@gmail.com>
* tex4ht-4ht.tex (imakeidx.4ht): fixed error in
diff --git a/support/TeX4ht/source/mktex4ht-cnf.tex b/support/TeX4ht/source/mktex4ht-cnf.tex
index 7d3c09146e..2b108f81c1 100644
--- a/support/TeX4ht/source/mktex4ht-cnf.tex
+++ b/support/TeX4ht/source/mktex4ht-cnf.tex
@@ -1,4 +1,4 @@
-% $Id: mktex4ht-cnf.tex 1251 2022-11-25 14:09:11Z michal_h21 $
+% $Id: mktex4ht-cnf.tex 1253 2022-11-28 09:54:31Z michal_h21 $
% Manually-maintained file, listing *.4ht files created by tex4ht-4ht.tex.
% Read by tex4ht-cond4ht.
%
@@ -381,6 +381,7 @@
\AddFile{9}{xskak}
\AddFile{9}{texmate}
\AddFile{9}{menukeys}
+\AddFile{9}{musicography}
\AddFile{9}{animate}
\AddFile{9}{sectionbreak}
\AddFile{9}{subfiles}
diff --git a/support/TeX4ht/source/tex4ht-4ht.tex b/support/TeX4ht/source/tex4ht-4ht.tex
index dbc95f3272..e55a7e212e 100644
--- a/support/TeX4ht/source/tex4ht-4ht.tex
+++ b/support/TeX4ht/source/tex4ht-4ht.tex
@@ -1,4 +1,4 @@
-% $Id: tex4ht-4ht.tex 1251 2022-11-25 14:09:11Z michal_h21 $
+% $Id: tex4ht-4ht.tex 1253 2022-11-28 09:54:31Z michal_h21 $
% tex tex4ht-4ht or ht tex tex4ht-4ht
%
% Copyright 2009-2022 TeX Users Group
@@ -31110,7 +31110,7 @@ multind.sty\EndLink
\<imakeidx.4ht\><<<
% imakeidx.4ht (|version), generated from |jobname.tex
-% Copyright 2019 TeX Users Group
+% Copyright 2019-2022 TeX Users Group
|<TeX4ht license text|>
|<imakeidx.sty|>
@@ -33749,6 +33749,90 @@ because
\endinput
>>> \AddFile{9}{menukeys}
+\<musicography.4ht\><<<
+% musicography.4ht (|version), generated from |jobname.tex
+% Copyright 2022 TeX Users Group
+|<TeX4ht license text|>
+|<musicography symbols|>
+\Hinput{musicography}
+\endinput
+>>>\AddFile{9}{musicography}
+
+We convert most of the musicography symbols to pictures.
+It isn't optiomal, but I found that corresponding Unicode characters
+are either missing, or produce weird overlapping with the following
+character.
+
+The biggest issue with pictures is that it can produce a huge number
+of images for repeated use of the each command. It could be
+better to use specific image for each symbol only once. And
+also to better handle the vertical alignment to the baseline,
+similarly how the \''\PicMath' command does. But my tests
+in this area failed so far, so I will leave it as it is now.
+
+\<musicography symbols\><<<
+\NewConfigure{musSymbol}{2}
+\NewDocumentCommand{\:musSymbol}{ O{\musFont} m m m m }{%
+ \a:musSymbol\o:musSymbol:[#1]{#2}{#3}{#4}{#5}\b:musSymbol%
+}
+
+\NewConfigure{musFlaggedNote}{2}
+\NewDocumentCommand{\:musFlaggedNote}{ m m }{%
+ \a:musFlaggedNote\o:musFlaggedNote:{#1}{#2}\b:musFlaggedNote
+}
+\HLet\musFlaggedNote\:musFlaggedNote
+
+
+\NewConfigure{musStemmedNote}{2}
+\NewDocumentCommand{\:musStemmedNote}{ m }{%
+ \a:musStemmedNote\o:musStemmedNote:{#1}\b:musStemmedNote%
+}
+
+\HLet\musStemmedNote\:musStemmedNote
+
+
+\NewConfigure{musDottedNote}{2}
+\NewDocumentCommand{\:musDottedNote}{ m }{%
+ \a:musDottedNote\o:musDottedNote:{#1}\b:musDottedNote%
+}
+
+\HLet\musDottedNote\:musDottedNote
+
+
+\NewConfigure{musStack}{2}
+\NewDocumentCommand{\:musStack}{ O{\musNumFont} m }{%
+ \a:musStack\o:musStack:[#1]{#2}\b:musStack%
+}
+
+\HLet\musStack\:musStack
+
+\NewConfigure{meterCplus}{2}
+\NewDocumentCommand{\:meterCplus}{ m }{\a:meterCplus\o:meterCplus:{#1}\b:meterCplus}
+\HLet\meterCplus\:meterCplus
+
+
+\Configure{musStack}{\Picture+{}}{\EndPicture}
+\Css{.mustack{display:block-inline}}
+\Configure{musDottedNote}{\Picture+{}}{\EndPicture}
+\Configure{musStemmedNote}{\Picture+{}}{\EndPicture}
+\Configure{musFlaggedNote}{\Picture+{}}{\EndPicture}
+\Configure{musSymbol}{\Picture+{}}{\EndPicture}
+\Configure{meterCplus}{\Picture+{}}{\EndPicture}
+
+
+% \def\:tempa#1#2{%
+% \def\:tempb{\x:unicode{#2}}%
+% \HLet#1\:tempb%
+% }
+% these characters are strange, they seems to overlap with the following character, and they are too small
+% it is probably better to use images
+% \:tempa\musEighth{1D160}
+% \:tempa\musSixteenth{1D161}
+% \:tempa\musThirtySecond{1D162}
+% \:tempa\musSixtyFourth{1D163}
+
+>>>
+
%%%%%%%%%%%%%%%%%%%%%%%%
\Section{vanilla.sty}
%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/support/TeX4ht/source/tex4ht-mathjax.tex b/support/TeX4ht/source/tex4ht-mathjax.tex
index e93531455a..0e62cc872e 100644
--- a/support/TeX4ht/source/tex4ht-mathjax.tex
+++ b/support/TeX4ht/source/tex4ht-mathjax.tex
@@ -1,4 +1,4 @@
-% $Id: tex4ht-mathjax.tex 1215 2022-10-17 13:58:09Z michal_h21 $
+% $Id: tex4ht-mathjax.tex 1256 2022-11-28 15:50:18Z michal_h21 $
% compile: latex tex4ht-mathjax
%
% Copyright 2018-2022 TeX Users Group
@@ -26,6 +26,7 @@
\AtBeginDocument{%
|<configurations|>
|<mhchem configurations|>
+|<restore environments|>
}
\endinput
>>>
@@ -114,6 +115,32 @@ environments. They will then keep the LaTeX code unchanged.
}
>>>
+In pictures, we want to use the original version of the math environments. Because we use
+an agressive verbatim method for the environments, we cannot use the usual \verb'\HLet' method.
+Instead, we save the original meaning, and user needs to restore it manually, using
+the \verb'\RestoreMathJaxEnvironments' command.
+
+\<defined commands\><<<
+\ExplSyntaxOn
+\seq_new:N\:savedmathjaxenvs
+
+\newcommand\:savemathjaxenv[1]{%
+ \seq_gput_right:Nn\:savedmathjaxenvs{#1}
+ \expandafter\let\csname mathjax-#1\expandafter\endcsname\csname #1\endcsname%
+ \expandafter\let\csname mathjax-end#1\expandafter\endcsname\csname end#1\endcsname%
+}
+
+\newcommand\RestoreMathJaxEnvironment[1]{%
+ \expandafter\let\csname #1\expandafter\endcsname\csname mathjax-#1\endcsname%
+ \expandafter\let\csname end#1\expandafter\endcsname\csname mathjax-end#1\endcsname%
+}
+
+\newcommand\RestoreMathJaxEnvironments{%
+ \seq_map_function:NN\:savedmathjaxenvs\RestoreMathJaxEnvironment%
+}
+\ExplSyntaxOff
+>>>
+
The \verb|\VerbMath| command redefines environments to pass their content
verbatim to the HTML output.
@@ -129,6 +156,7 @@ numbers them consecutively. In these cases, other mechanisms may be necessary.
\cs_generate_variant:Nn \regex_extract_once:nnNTF {nV}
\newcommand\VerbMath[2][]{%
\cs_if_exist:cTF{#2}{
+ \:savemathjaxenv{#2}%
\RenewDocumentEnvironment{#2}{+!b}{%
\NoFonts\expandafter\VerbMathToks\expandafter{\detokenize{##1}}{#2}\EndNoFonts%
\ifx\relax#1\relax\else%
@@ -148,10 +176,13 @@ keep their verbatim appearance in the TOC
\def\fixmathjaxtoc#1{\Configure{writetoc}{\def#1{\detokenize{#1}}}}
>>>
-Some math commands cause issues when used in sections, so we will deactivate them.
+This was meant to fix some commands in sectioning commands, but it is not
+a good solution. Better is to define the problematic commands as robust.
-\<defined commands\><<<
+\<not defined commands\><<<
\def\fixmathjaxsec#1{\def#1{\detokenize{#1}}}
+\fixmathjaxsec\right
+\fixmathjaxsec\left
>>>
Require verbatim math environments.
@@ -207,8 +238,6 @@ them into pictures.
Fixes for tables of contents.
\<configurations\><<<
-\fixmathjaxsec\left
-\fixmathjaxsec\right
\fixmathjaxtoc\int
\fixmathjaxtoc\,
\fixmathjaxtoc\sin
@@ -241,4 +270,14 @@ Fixes for tables of contents.
}{}
>>>
+Restore environments redefined to produce verbatim output to their
+original meaning in the picture mode. Otherwise math cannot work
+inside TikZ etc.
+
+\<restore environments\><<<
+\@ifpackageloaded{tikz}{%
+\tikzset{every picture/.append code={\RestoreMathJaxEnvironments}}
+}{}
+>>>
+
\endinput