texlive[65134] Master/texmf-dist: support musicography package,
commits+karl at tug.org
commits+karl at tug.org
Mon Nov 28 22:49:52 CET 2022
Revision: 65134
http://tug.org/svn/texlive?view=revision&revision=65134
Author: karl
Date: 2022-11-28 22:49:52 +0100 (Mon, 28 Nov 2022)
Log Message:
-----------
support musicography package, tex4ht r1253; remove \fixmathjaxsec, tex4ht r1254; provide \RestoreMathJaxEnvironments, tex4ht r1255; restore math at beginning of tikz, tex4ht r1256
Revision Links:
--------------
http://tug.org/svn/texlive?view=revision&revision=1253
http://tug.org/svn/texlive?view=revision&revision=1254
http://tug.org/svn/texlive?view=revision&revision=1255
http://tug.org/svn/texlive?view=revision&revision=1256
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-mathjax.tex
trunk/Master/texmf-dist/tex/generic/tex4ht/glossaries.4ht
trunk/Master/texmf-dist/tex/generic/tex4ht/imakeidx.4ht
trunk/Master/texmf-dist/tex/generic/tex4ht/mathjax-latex-4ht.4ht
Added Paths:
-----------
trunk/Master/texmf-dist/tex/generic/tex4ht/musicography.4ht
Modified: trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog 2022-11-28 21:00:21 UTC (rev 65133)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog 2022-11-28 21:49:52 UTC (rev 65134)
@@ -1,3 +1,24 @@
+2022-11-28 Michal Hoftich <michal.h21 at 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 at freefriends.org>
+
+ * tex4ht-4ht.tex (imakeidx.4ht): copyright 2022.
+
2022-11-25 Michal Hoftich <michal.h21 at gmail.com>
* tex4ht-4ht.tex (imakeidx.4ht): fixed error in
Modified: trunk/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex 2022-11-28 21:00:21 UTC (rev 65133)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex 2022-11-28 21:49:52 UTC (rev 65134)
@@ -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}
Modified: trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex 2022-11-28 21:00:21 UTC (rev 65133)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex 2022-11-28 21:49:52 UTC (rev 65134)
@@ -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 @@
\<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 @@
\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}
%%%%%%%%%%%%%%%%%%%%%%%%
Modified: trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-mathjax.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-mathjax.tex 2022-11-28 21:00:21 UTC (rev 65133)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-mathjax.tex 2022-11-28 21:49:52 UTC (rev 65134)
@@ -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 @@
}
>>>
+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 @@
\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 @@
\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 @@
Fixes for tables of contents.
\<configurations\><<<
-\fixmathjaxsec\left
-\fixmathjaxsec\right
\fixmathjaxtoc\int
\fixmathjaxtoc\,
\fixmathjaxtoc\sin
@@ -241,4 +270,14 @@
}{}
>>>
+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
Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/glossaries.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/glossaries.4ht 2022-11-28 21:00:21 UTC (rev 65133)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/glossaries.4ht 2022-11-28 21:49:52 UTC (rev 65134)
@@ -1,31 +1,23 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% glossaries.4ht 2009-05-21-09:32 %
-% Copyright (C) 2008--2009 Eitan M. Gurari %
-% %
-% 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".%
-% %
-% This Current Maintainer of this work %
-% is Eitan M. Gurari. %
-% %
-% If you modify this program your changing its signature %
-% with a directive of the following form will be %
-% appreciated. %
-% \message{signature} %
-% %
-% gurari at cse.ohio-state.edu %
-% http://www.cse.ohio-state.edu/~gurari %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\immediate\write-1{version 2009-05-21-09:32}
-
+% glossaries.4ht 2022-11-25-13:16 %
+% Copyright (C) 2008-2009 Eitan M. Gurari %
+% Copyright 2009-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.
\def\:tempc#1#2{\Link{#1}{}#2\EndLink}
\HLet\@glslink\:tempc
\def\:tempc#1#2{\Link{}{#1}\EndLink#2}
@@ -47,6 +39,12 @@
}
\HLet\@gls at removespaces\:tempc
+\Configure{@begin}{theglossary}{
+ \Configure{theindex}{}{}{}{}{}{}{}{}{}{}
+ \def\idx:item{\SaveEverypar\ht:everypar{}}
+ \let\end:theidx\empty
+}
+
\Hinput{glossaries}
\endinput
Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/imakeidx.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/imakeidx.4ht 2022-11-28 21:00:21 UTC (rev 65133)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/imakeidx.4ht 2022-11-28 21:49:52 UTC (rev 65134)
@@ -1,5 +1,5 @@
-% imakeidx.4ht (2022-11-25-13:16), generated from tex4ht-4ht.tex
-% Copyright 2019 TeX Users Group
+% imakeidx.4ht (2022-11-27-07:50), generated from tex4ht-4ht.tex
+% Copyright 2019-2022 TeX Users Group
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -16,7 +16,7 @@
%
% If you modify this program, changing the
% version identification would be appreciated.
-\immediate\write-1{version 2022-11-25-13:16}
+\immediate\write-1{version 2022-11-27-07:50}
\def\:temp#1#2#3{\html:addr%
Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/mathjax-latex-4ht.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/mathjax-latex-4ht.4ht 2022-11-28 21:00:21 UTC (rev 65133)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/mathjax-latex-4ht.4ht 2022-11-28 21:49:52 UTC (rev 65134)
@@ -1,4 +1,4 @@
-% mathjax-latex-4ht.4ht (2022-10-17-13:57), generated from tex4ht-mathjax.tex
+% mathjax-latex-4ht.4ht (2022-11-28-13:11), generated from tex4ht-mathjax.tex
% Copyright 2018-2022 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 2022-10-17-13:57}
+\immediate\write-1{version 2022-11-28-13:11}
\ExplSyntaxOn
@@ -54,9 +54,28 @@
\end{#2}}%
}
\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
+\ExplSyntaxOn
\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%
@@ -68,7 +87,6 @@
}
\ExplSyntaxOff
\def\fixmathjaxtoc#1{\Configure{writetoc}{\def#1{\detokenize{#1}}}}
-\def\fixmathjaxsec#1{\def#1{\detokenize{#1}}}
\AtBeginDocument{%
\VerbMath{subarray}
@@ -108,8 +126,6 @@
\ConfigureEnv{gather*}{}{}{}{}
\ConfigureEnv{multline}{}{}{}{}
\ConfigureEnv{multline*}{}{}{}{}
-\fixmathjaxsec\left
-\fixmathjaxsec\right
\fixmathjaxtoc\int
\fixmathjaxtoc\,
\fixmathjaxtoc\sin
@@ -139,6 +155,10 @@
\def\ce#1{\texttt{\detokenize{\(\ce{#1}\)}}}
}{}
+\@ifpackageloaded{tikz}{%
+\tikzset{every picture/.append code={\RestoreMathJaxEnvironments}}
+}{}
+
}
\endinput
@@ -191,6 +211,16 @@
+
+
+
+
+
+
+
+
+
+
Added: trunk/Master/texmf-dist/tex/generic/tex4ht/musicography.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/musicography.4ht (rev 0)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/musicography.4ht 2022-11-28 21:49:52 UTC (rev 65134)
@@ -0,0 +1,84 @@
+% musicography.4ht (2022-11-28-13:11), 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-28-13:11}
+
+\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}
+
+
+\Hinput{musicography}
+\endinput
+
Property changes on: trunk/Master/texmf-dist/tex/generic/tex4ht/musicography.4ht
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
More information about the tex-live-commits
mailing list.