texlive[71072] Master/texmf-dist: letterspacing support, tex4ht
commits+karl at tug.org
commits+karl at tug.org
Thu Apr 25 00:11:10 CEST 2024
Revision: 71072
https://tug.org/svn/texlive?view=revision&revision=71072
Author: karl
Date: 2024-04-25 00:11:10 +0200 (Thu, 25 Apr 2024)
Log Message:
-----------
letterspacing support, tex4ht r1508-1511
Revision Links:
--------------
https://tug.org/svn/texlive?view=revision&revision=1508
Modified Paths:
--------------
trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex
trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht
trunk/Master/texmf-dist/tex/generic/tex4ht/microtype.4ht
Modified: trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog 2024-04-24 21:11:14 UTC (rev 71071)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog 2024-04-24 22:11:10 UTC (rev 71072)
@@ -1,3 +1,22 @@
+2024-04-24 Karl Berry <karl at freefriends.org>
+
+ * tex4ht-4ht.tex (microtype.4ht): use |<TeX4ht copywrite|>
+ to get version ident, etc.
+
+2024-04-24 Michal Hoftich <michal.h21 at gmail.com>
+
+ * tex4ht-4ht.tex (microtype.4ht),
+ * tex4ht-html4.tex (html4.4ht): use default value of letter spacing
+ provided by Microtype.
+ https://github.com/michal-h21/tex4ebook/issues/127
+
+2024-04-23 Michal Hoftich <michal.h21 at gmail.com>
+
+ * tex4ht-4ht.tex (microtype.4ht),
+ * tex4ht-html4.tex (html4.4ht): added support for letter spacing
+ using the \textls command.
+ https://github.com/michal-h21/tex4ebook/issues/127
+
2024-04-22 Michal Hoftich <michal.h21 at gmail.com>
* tex4ht-4ht.tex (tcolorbox.4ht): fixed handling of labels in
Modified: trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex 2024-04-24 21:11:14 UTC (rev 71071)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex 2024-04-24 22:11:10 UTC (rev 71072)
@@ -1,4 +1,4 @@
-% $Id: tex4ht-4ht.tex 1507 2024-04-22 13:28:48Z michal_h21 $
+% $Id: tex4ht-4ht.tex 1512 2024-04-24 22:10:14Z karl $
% tex tex4ht-4ht or ht tex tex4ht-4ht
%
% Copyright 2009-2024 TeX Users Group
@@ -31389,11 +31389,11 @@
%%%%%%%%%%%%%
\<microtype.4ht\><<<
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% microtype.4ht |version %
-% Copyright (C) |CopyYear.2007. Eitan M. Gurari %
-|<TeX4ht copyright|>
+% microtype.4ht (|version), generated from |jobname.tex
+% Copyright |CopyYear.2007. Eitan M. Gurari
+|<TeX4ht copywrite|>
|<disable microtype|>
+ |<microtype textls|>
\Hinput{microtype}
\endinput
>>> \AddFile{9}{microtype}
@@ -31406,11 +31406,31 @@
\renewcommand{\UseMicroTypeSet}[2][]{}
\renewcommand{\SetProtrusion}[3][]{}
\renewcommand{\SetExpansion}[3][]{}
-\ifx \textls\UnDef\else
- \renewcommand{\textls}[2][]{#2}
+>>>
+
+We can try to provide a letterspacing command:
+
+\<microtype textls\><<<
+\NewConfigure{textls}{2}
+\ExplSyntaxOn
+\ifx\MT at letterspace\m at ne
+\edef\:letterspacedefault{\fp_eval:n{\MT at letterspace@default/1000}}
+\else
+\edef\:letterspacedefault{\fp_eval:n{\MT at letterspace/1000}}
\fi
+\providecommand\:textls[2][]{%
+ \begingroup%
+ \ifx\relax#1\relax\else%
+ \edef\:letterspacing{\fp_eval:n{#1/1000}}%
+ \fi%
+ \a:textls%
+ #2%
+ \b:textls%
+ \endgroup%
+}
+\ExplSyntaxOff
+\HLet\MT at textls\:textls
>>>
-
%%%%%%%%%%%%%
\Section{Bm.sty}
%%%%%%%%%%%%%
Modified: trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex 2024-04-24 21:11:14 UTC (rev 71071)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex 2024-04-24 22:11:10 UTC (rev 71072)
@@ -1,4 +1,4 @@
-% $Id: tex4ht-html4.tex 1504 2024-04-19 15:48:03Z michal_h21 $
+% $Id: tex4ht-html4.tex 1511 2024-04-24 12:46:19Z michal_h21 $
% Compile 4 times: latex tex4ht-html4
% Copy html4.4ht into the work directory before all but the last compilation.
%
@@ -21751,7 +21751,16 @@
\ExplSyntaxOff
>>>
+%%%%%%%%%%%%%%%%%%%%%
+\section{microtype}
+%%%%%%%%%%%%%%%%%%%%%
+\<configure html4 microtype\><<<
+\Configure{textls}{\HCode{<span class="textls" \ifdefined\:letterspacing style="letter-spacing:\:letterspacing rem" \fi>}}{\HCode{</span>}}
+\Css{.textls{letter-spacing:\:letterspacedefault rem;}} % default letter spacing, if no amount is specified
+>>>
+
+
%%%%%%%%%%%%%%%%%%%%%
\section{mhchem}
%%%%%%%%%%%%%%%%%%%%%
Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht 2024-04-24 21:11:14 UTC (rev 71071)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht 2024-04-24 22:11:10 UTC (rev 71072)
@@ -1,4 +1,4 @@
-% html4.4ht (2024-04-20-08:15), generated from tex4ht-html4.tex
+% html4.4ht (2024-04-24-13:39), 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-04-20-08:15}
+\immediate\write-1{version 2024-04-24-13:39}
\exit:ifnot{8859-6,%
CJK,%
@@ -160,6 +160,7 @@
mex,%
mfpic,%
mhchem,%
+microtype,%
minitoc,%
minted,%
mls,%
@@ -36754,7 +36755,16 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \ConfigureHinput{microtype}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \Configure{textls}{\HCode{<span class="textls" \ifdefined\:letterspacing style="letter-spacing:\:letterspacing rem" \fi>}}{\HCode{</span>}}
+\Css{.textls{letter-spacing:\:letterspacedefault rem;}} % default letter spacing, if no amount is specified
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\endinput\empty\empty\empty\empty\empty\empty
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -36761,6 +36771,7 @@
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ConfigureHinput{appendix}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/microtype.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/microtype.4ht 2024-04-24 21:11:14 UTC (rev 71071)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/microtype.4ht 2024-04-24 22:11:10 UTC (rev 71072)
@@ -1,30 +1,23 @@
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% microtype.4ht 2009-05-21-09:32 %
-% Copyright (C) 2007--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}
+% microtype.4ht (2024-04-24-15:10), generated from tex4ht-4ht.tex
+% Copyright 2007-2009 Eitan M. Gurari
+% Copyright 2009-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-04-24-15:10}
\MT at protrusionfalse
\MT at expansionfalse
@@ -33,9 +26,26 @@
\renewcommand{\UseMicroTypeSet}[2][]{}
\renewcommand{\SetProtrusion}[3][]{}
\renewcommand{\SetExpansion}[3][]{}
-\ifx \textls\UnDef\else
- \renewcommand{\textls}[2][]{#2}
+
+ \NewConfigure{textls}{2}
+\ExplSyntaxOn
+\ifx\MT at letterspace\m at ne
+\edef\:letterspacedefault{\fp_eval:n{\MT at letterspace@default/1000}}
+\else
+\edef\:letterspacedefault{\fp_eval:n{\MT at letterspace/1000}}
\fi
+\providecommand\:textls[2][]{%
+ \begingroup%
+ \ifx\relax#1\relax\else%
+ \edef\:letterspacing{\fp_eval:n{#1/1000}}%
+ \fi%
+ \a:textls%
+ #2%
+ \b:textls%
+ \endgroup%
+}
+\ExplSyntaxOff
+\HLet\MT at textls\:textls
\Hinput{microtype}
\endinput
More information about the tex-live-commits
mailing list.