[tex4ht-commits] [SCM] tex4ht updated: r1609 - trunk/lit
Michal Hoftich
INVALID.NOREPLY at gnu.org.ua
Wed Dec 4 12:44:50 CET 2024
Author: michal_h21
Date: 2024-12-04 11:44:50 +0000 (Wed, 04 Dec 2024)
New Revision: 1609
Modified:
trunk/lit/ChangeLog
trunk/lit/tex4ht-4ht.tex
trunk/lit/tex4ht-html4.tex
Log:
fixed formatting of glossaries
Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog 2024-12-03 12:43:17 UTC (rev 1608)
+++ trunk/lit/ChangeLog 2024-12-04 11:44:50 UTC (rev 1609)
@@ -1,5 +1,10 @@
-2024-12-03 Michal Hoftich <michal.h21 at gmail.com>
+2024-12-04 Michal Hoftich <michal.h21 at gmail.com>
+ * tex4ht-4ht.tex (glossaries.4ht),
+ * tex4ht-html4.tex (html4.4ht): added formatting for glossary
+ entries.
+ https://tex.stackexchange.com/a/732132/2891
+
* tex4ht-4ht.tex (latex.4ht): fixed picture support for characters
defined using \DeclareTextSymbol.
Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex 2024-12-03 12:43:17 UTC (rev 1608)
+++ trunk/lit/tex4ht-4ht.tex 2024-12-04 11:44:50 UTC (rev 1609)
@@ -13912,6 +13912,23 @@
\HLet\@gls at removespaces\:tempc
>>>
+Add formatting for glossary entries:
+
+\<config glossaries\><<<
+\NewConfigure{glossentry}{2}
+
+% Add formatting for glossary entries only if the environment used for printing
+% is not description. It would lead to errors otherwise.
+\def\:glsdescriptionname{description}
+\def\:tempa#1{\ifx\@currenvir\:glsdescriptionname\o:glossentry:{#1}\else\a:glossentry\o:glossentry:{#1}\b:glossentry\fi}
+\HLet\glossentry\:tempa
+
+\NewConfigure{glsgroupskip}{1}
+\def\:tempa{\a:glsgroupskip}
+\HLet\glsgroupskip\:tempa
+
+>>>
+
This should fix wrong handling of paragraphs in glossary.
The problem is that extra paragraph is inserted
when a new letter is started.
Modified: trunk/lit/tex4ht-html4.tex
===================================================================
--- trunk/lit/tex4ht-html4.tex 2024-12-03 12:43:17 UTC (rev 1608)
+++ trunk/lit/tex4ht-html4.tex 2024-12-04 11:44:50 UTC (rev 1609)
@@ -4723,7 +4723,22 @@
\Configure{gloskip}{long}{\cr\HCode{<p class="gloskip"></p>}}
>>>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Glossaries}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\<configure html4 glossaries\><<<
+\Configure{glossentry}
+{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="glossary">}}
+{\ifvmode\IgnorePar\fi\EndP\HCode{</div>}}
+
+\Configure{glsgroupskip}{\ifvmode\Ignore\Par\fi\EndP\HCode{<div class="glsgroupskip"></div>\Hnewline}}
+\Css{.glsgroupskip{margin-bottom:1rem;}}
+\Css{.glsgroupskip + .glsgroupskip{margin-bottom: 0;}}
+>>>
+
+
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Captions}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
More information about the tex4ht-commits
mailing list.