[tex4ht-commits] [SCM] tex4ht updated: r886 - trunk/lit
michal_h21 at gnu.org.ua
michal_h21 at gnu.org.ua
Sun Feb 14 15:43:21 CET 2021
Author: michal_h21
Date: 2021-02-14 16:43:21 +0200 (Sun, 14 Feb 2021)
New Revision: 886
Modified:
trunk/lit/ChangeLog
trunk/lit/mktex4ht-cnf.tex
trunk/lit/tex4ht-4ht.tex
trunk/lit/tex4ht-html4.tex
trunk/lit/tex4ht-html5.tex
Log:
Added support for the subcaption package
Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog 2021-02-10 22:15:30 UTC (rev 885)
+++ trunk/lit/ChangeLog 2021-02-14 14:43:21 UTC (rev 886)
@@ -1,3 +1,11 @@
+2021-02-14 Michal Hoftich <michal.h21 at gmail.com>
+
+ * tex4ht-4ht.tex (subcaption.4ht, caption.4ht),
+ * tex4ht-html4.tex (html4.4ht),
+ * tex4ht-html5.tex (html5.4ht): added support for the subcaption package,
+ fixed support subfloat captions.
+ https://tex.stackexchange.com/q/582846/2891
+
2021-02-10 Michal Hoftich <michal.h21 at gmail.com>
* tex4ht-4ht.tex (svg.4ht): added support for image dimension specification.
Modified: trunk/lit/mktex4ht-cnf.tex
===================================================================
--- trunk/lit/mktex4ht-cnf.tex 2021-02-10 22:15:30 UTC (rev 885)
+++ trunk/lit/mktex4ht-cnf.tex 2021-02-14 14:43:21 UTC (rev 886)
@@ -57,6 +57,7 @@
\AddFile{9}{subscript}
\AddFile{9}{subfigure}
\AddFile{9}{caption}
+\AddFile{9}{subcaption}
\AddFile{9}{makeidx}
\AddFile{9}{splitidx}
\AddFile{6}{glossaries}
Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex 2021-02-10 22:15:30 UTC (rev 885)
+++ trunk/lit/tex4ht-4ht.tex 2021-02-14 14:43:21 UTC (rev 886)
@@ -11418,9 +11418,30 @@
\cptA:\caption@@make{\cap:ref{#1}}{\cptC:#2}\cptD:%
\caption at make@below%
}
+\long\def\caption at makecaption#1#2{%
+ \caption at make@above%
+ \cptA:\caption@@make{\cap:ref{#1}}{\cptC:#2}\cptD:%
+ \caption at make@below%
+}
>>>
+%%%%%%%%%%%%%
+\Section{subcaption.sty}
+%%%%%%%%%%%%%
+
+\<subcaption.4ht\><<<
+% subcaption.4ht (|version), generated from |jobname.tex
+% Copyright 2020 TeX Users Group
+|<TeX4ht copyright|>
+\NewConfigure{subfigure}{2}
+\ConfigureEnv{subfigure}{\a:subfigure}{\b:subfigure}{}{}
+\ConfigureEnv{subtable}{\a:subfigure}{\b:subfigure}{}{}
+\Hinput{subcaption}
+\endinput
+>>> \AddFile{9}{subcaption}
+
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Chapter{Index and Glossary}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Modified: trunk/lit/tex4ht-html4.tex
===================================================================
--- trunk/lit/tex4ht-html4.tex 2021-02-10 22:15:30 UTC (rev 885)
+++ trunk/lit/tex4ht-html4.tex 2021-02-14 14:43:21 UTC (rev 886)
@@ -4664,6 +4664,9 @@
>>>
+
+
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Footnotes}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -5533,6 +5536,20 @@
\Css{div.subfigure {text-align:center;display:inline-block;}}
>>>
+\subsection{subcaption}
+
+\<configure html4 subcaption\><<<
+\Configure{subfigure}
+{\ifvmode\IgnorePar\fi\EndP%
+\HCode{<div class="subfigure">}\par\ShowPar%
+\Configure{caption}{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="caption" ><span class="id">}}%
+ {:} {\HCode{</span><span \Hnewline class="content">}}%
+ {\HCode{</span></div>}}%
+}%
+{\ifvmode\IgnorePar\fi\EndP\HCode{</div>}}%
+\Css{div.subfigure {text-align:center;display:inline-block; max-width:45\%;}}
+>>>
+
%%%%%%%%%%%%%%%%%%%%%
\subsection{Wrapfig}
%%%%%%%%%%%%%%%%%%%
Modified: trunk/lit/tex4ht-html5.tex
===================================================================
--- trunk/lit/tex4ht-html5.tex 2021-02-10 22:15:30 UTC (rev 885)
+++ trunk/lit/tex4ht-html5.tex 2021-02-14 14:43:21 UTC (rev 886)
@@ -296,6 +296,9 @@
|<abstract|>
>>>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\chapter{Packages configuration}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Logical structure configurations}
@@ -336,7 +339,7 @@
\Css{figure.float, div.figure {margin-left: auto; margin-right: auto;}}
\Css{figure.float img, figure.figure img {display: block; margin-left: auto; margin-right: auto;}}
-\Css{figure.figure > p {text-align:center;}}
+\Css{figure.figure {text-align:center;}}
\Configure{caption}{\:xhtml{\IgnorePar\EndP}\HCode{<figcaption class="caption" ><span class="id">}}
{:} {\HCode{</span><span \Hnewline class="content">}}
More information about the tex4ht-commits
mailing list.