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

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Tue Jan 10 16:04:17 CET 2023


Author: michal_h21
Date: 2023-01-10 15:04:17 +0000 (Tue, 10 Jan 2023)
New Revision: 1283

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-html5.tex
Log:
Added default CSS style for page dimensions and sections

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2023-01-08 15:27:15 UTC (rev 1282)
+++ trunk/lit/ChangeLog	2023-01-10 15:04:17 UTC (rev 1283)
@@ -1,3 +1,9 @@
+2023-01-10  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-html5.tex (html5.4ht): added default CSS style for sections
+	and page dimensions.
+	https://puszcza.gnu.org.ua/bugs/?592
+
 2023-01-08  Karl Berry  <karl at freefriends.org>
 
 	* Makefile (common_no_tex4ht_sty): rename to common_no_cond_sty,

Modified: trunk/lit/tex4ht-html5.tex
===================================================================
--- trunk/lit/tex4ht-html5.tex	2023-01-08 15:27:15 UTC (rev 1282)
+++ trunk/lit/tex4ht-html5.tex	2023-01-10 15:04:17 UTC (rev 1283)
@@ -69,6 +69,45 @@
 \fi
 >>>
 
+\section{Default CSS style}
+
+This style fixes some common issues regarding size of sectioning commands,
+background of generated images in the dark mode, or line lenght. 
+
+
+\<configure html5 tex4ht\><<<
+\:CheckOption{nostyle}\if:Option
+\else
+\Log:Note{We use a default CSS style. Use the `nostyle' option if you want to use custom a CSS design}
+\Css{body{
+    margin:1em auto;
+    max-width:80ch;
+    padding:0 .62em;
+}}
+
+\Css{h1,h2,h3,h4,h5 {
+    line-height:1.2;
+}}
+\Css{@media print{
+    body{
+      max-width:none
+    }
+}}
+\Css{.partHead, likepartHead  { font-size: 2em; }}
+\Css{.chapterHead, likechapterHead  { font-size: 1.7411em; }}
+\Css{.sectionHead, likesectionHead  { font-size: 1.5157em; }}
+\Css{.subsectionHead, likesubsectionHead  { font-size: 1.3195em; }}
+\Css{.subsubsectionHead, likesubsubsectionHead  { font-size: 1.1487em; }}
+
+\Css{
+  @media (prefers-color-scheme: dark) {
+    img[src^="\jobname"]{filter: invert(1); }
+  }
+}
+\fi
+>>>
+
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{Language and charset setting}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



More information about the tex4ht-commits mailing list.