[tex4ht-commits] [SCM] tex4ht updated: r871 - trunk/lit

michal_h21 at gnu.org.ua michal_h21 at gnu.org.ua
Sun Jan 24 21:45:34 CET 2021


Author: michal_h21
Date: 2021-01-24 22:45:33 +0200 (Sun, 24 Jan 2021)
New Revision: 871

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-4ht.tex
   trunk/lit/tex4ht-html4.tex
   trunk/lit/tex4ht-html5.tex
Log:
improved support for abstracts in base classes

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2021-01-24 17:10:43 UTC (rev 870)
+++ trunk/lit/ChangeLog	2021-01-24 20:45:33 UTC (rev 871)
@@ -2,6 +2,10 @@
 
 	* tex4ht-4ht.tex (latex.4ht): added support for environment hooks.
 	https://puszcza.gnu.org.ua/bugs/?477
+	* tex4ht-4ht.tex (article.4ht, report.4ht): added support for abstract
+	titles.
+	tex4ht-html4.tex (html4.4ht),
+	tex4ht-html5.tex (html5.4ht): fixes support for abstracts.
 
 2021-01-21  Michal Hoftich  <michal.h21 at gmail.com>
 

Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex	2021-01-24 17:10:43 UTC (rev 870)
+++ trunk/lit/tex4ht-4ht.tex	2021-01-24 20:45:33 UTC (rev 871)
@@ -8198,6 +8198,18 @@
    \fi}
 >>>
 
+\Section{Abstract}
+
+Standard LaTeX classes use centering environment to place abstract title. 
+We want to place some configurable tags instead of that centering. For example
+header element. To do that, we can use the new LaTeX environment hook mechanism
+to redefine configuration of centering at the beginning of abstract.
+
+\<config report / article shared\><<<
+\NewConfigure{abstracttitle}{2}
+\AtBeginEnvironment[tex4ht]{abstract}{\ConfigureEnv{center}{\a:abstracttitle}{\b:abstracttitle}{\@empty}{\@empty}}
+>>>
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \Chapter{Boxes}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Modified: trunk/lit/tex4ht-html4.tex
===================================================================
--- trunk/lit/tex4ht-html4.tex	2021-01-24 17:10:43 UTC (rev 870)
+++ trunk/lit/tex4ht-html4.tex	2021-01-24 20:45:33 UTC (rev 871)
@@ -8663,12 +8663,23 @@
 
 
 \<config report / article 4.0t\><<<
+|<abstract|>
+>>>
+
+
+\<abstract\><<<
 \ConfigureEnv{abstract}
    {\IgnorePar\EndP
     \HCode{<div\Hnewline class="abstract"\Hnewline>}\par\ShowPar} 
    {\ifvmode \IgnorePar\fi \EndP\HCode{</div>}}{}{}
-\Css{.abstract p {margin-left:5\%; margin-right:5\%;}}
+
+
+\Configure{abstracttitle}{\ifvmode\IgnorePar\fi\EndP\HCode{<h3 class="abstracttitle">}\HtmlParOff}
+   {\HCode{</h3>}\HtmlParOn}
+
+\Css{div.abstract p {margin-left:5\%; margin-right:5\%;}}
 \Css{div.abstract {width:100\%;}} 
+\Css{.abstracttitle{text-align:center;margin-bottom:1em;}}
 >>>
 
 

Modified: trunk/lit/tex4ht-html5.tex
===================================================================
--- trunk/lit/tex4ht-html5.tex	2021-01-24 17:10:43 UTC (rev 870)
+++ trunk/lit/tex4ht-html5.tex	2021-01-24 20:45:33 UTC (rev 871)
@@ -213,6 +213,7 @@
 \section{Article, book and report classes}
 \<configure html5 article\><<<
 |<article,report,book|>
+|<article,report|>
 >>>
 
 \<configure html5 book\><<<
@@ -221,6 +222,7 @@
 
 \<configure html5 report\><<<
 |<article,report,book|>
+|<article,report|>
 >>>
 
 Shared configurations for base LaTeX classes.
@@ -229,6 +231,13 @@
 |<figcaption|>
 >>>
 
+Configurations that are shared only for article and report
+
+\<article,report\><<<
+|<abstract|>
+>>>
+
+
 \section{Configurations for Koma Script}
 
 \<configure html5 scrartcl\><<<
@@ -266,6 +275,12 @@
 |<figcaption|>
 >>>
 
+\section{Configurations for Memoir}
+
+\<configure html5 memoir\><<<
+|<figcaption|>
+>>>
+
 \section{Tables}
 cellspacing and cellpading attributes are prohibited in html5
 
@@ -308,6 +323,17 @@
 \Css{figcaption.caption span.id{font-weight: bold; white-space: nowrap; }}
 >>>
 
+\section{Abstracts}
+
+
+\<abstract\><<<
+\ConfigureEnv{abstract}
+{\ifvmode\IgnorePar\fi\EndP\HCode{<section role="doc-abstract" class="abstract">\Hnewline}}
+{\ifvmode\IgnorePar\fi\EndP\HCode{</section>}}{}{}
+
+\Css{.abstract{margin:1em;}}
+>>>
+
 \section{Utilities}
 \<try env inline par\><<<
 \ShowPar 



More information about the tex4ht-commits mailing list.