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

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Sun Jul 6 22:00:56 CEST 2025


Author: michal_h21
Date: 2025-07-06 20:00:56 +0000 (Sun, 06 Jul 2025)
New Revision: 1716

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-html5.tex
Log:
fixed invalid html for bibliographies on cut pages

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2025-06-29 16:23:02 UTC (rev 1715)
+++ trunk/lit/ChangeLog	2025-07-06 20:00:56 UTC (rev 1716)
@@ -1,3 +1,10 @@
+2025-07-06  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-html5.tex (html5.4ht): we need to put the bibliography
+	title outside of the <section> to avoid invalid HTML production on
+	cut pages.
+	https://tex.stackexchange.com/a/747342/2891
+
 2025-06-29  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-4ht.tex (mdframed.4ht): fixed support for footnotes inside

Modified: trunk/lit/tex4ht-html5.tex
===================================================================
--- trunk/lit/tex4ht-html5.tex	2025-06-29 16:23:02 UTC (rev 1715)
+++ trunk/lit/tex4ht-html5.tex	2025-07-06 20:00:56 UTC (rev 1716)
@@ -433,16 +433,18 @@
 \Link[https://kb.daisy.org/publishing/docs/html/bibliographies.html]{}{}Accessible
 Publishing Knowledge Base\EndLink. Thanks to Jeffrey Kuan for the suggestion.
 
+Unfortunately, we cannot put the bibliography title inside the section, 
+because it would result in mismatched tags when we put chapters on separate pages. 
+See \Link[https://tex.stackexchange.com/q/747278/2891]{}{}this bug report\EndLink.
+
+
 \<default thebibliography\><<<
-\ConfigureEnv{thebibliography}
-{\ifvmode\IgnorePar\fi\EndP\HCode{<section role="doc-bibliography" class="thebibliography">}}
-{\ifvmode\IgnorePar\fi\EndP\HCode{</section>}\par\ShowPar}{}{}
 % now configure thebibliography to produce a description list
 % \en:bib insertes delimiters for particular bibitems. at the beginning, it is empty, as there is no need to insert the delimiter
 % it is then defined to insert the delimiter after the first bibitem
 \ConfigureList{thebibliography}%
-   {\ifvmode\IgnorePar\fi\EndP\HCode{<dl><dt>}\let\en:bib=\empty}% opening tags
-   {\ifvmode\IgnorePar\fi\EndP\HCode{</dd></dl>}} % closing tags
+   {\ifvmode\IgnorePar\fi\EndP\HCode{<section role="doc-bibliography" class="thebibliography"><dl><dt>}\let\en:bib=\empty}% opening tags
+   {\ifvmode\IgnorePar\fi\EndP\HCode{</dd></dl></section>}} % closing tags
    {\en:bib\def\en:bib{\ifvmode\IgnorePar\fi\HCode{</dd><dt>}}}% at the bibitem
   {\HCode{</dt><dd>}}% after biblabel
 



More information about the tex4ht-commits mailing list.