texlive[65513] Master/texmf-dist: css for sections and page

commits+karl at tug.org commits+karl at tug.org
Tue Jan 10 22:34:55 CET 2023


Revision: 65513
          http://tug.org/svn/texlive?view=revision&revision=65513
Author:   karl
Date:     2023-01-10 22:34:55 +0100 (Tue, 10 Jan 2023)
Log Message:
-----------
css for sections and page dimensions, tex4ht r1283

Revision Links:
--------------
    http://tug.org/svn/texlive?view=revision&revision=1283

Modified Paths:
--------------
    trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
    trunk/Master/texmf-dist/source/generic/tex4ht/Makefile
    trunk/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex
    trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex
    trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html5.tex
    trunk/Master/texmf-dist/tex/generic/tex4ht/html5.4ht
    trunk/Master/texmf-dist/tex/generic/tex4ht/tex4ht.sty
    trunk/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2023-01-10 21:23:30 UTC (rev 65512)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2023-01-10 21:34:55 UTC (rev 65513)
@@ -1,3 +1,20 @@
+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,
+	since tex4ht.sty is what is left out. Mention that we also leave
+	out mktex4ht.4ht from all, since it's mostly just the list of packages.
+	(tex4ht_sty_derived): dependency is now $(common_no_tex4ht_sty).
+	(tex4ht_cond4ht_derived): can depend on $(common).
+	
+	* mktex4ht-cnf.tex,
+	* tex4ht-html4.tex (html4.4ht, html4-math.4ht): copyright 2023.
+
 2023-01-01  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4th-html4.tex (html4.4ht): set font size for \subsubsection 

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/Makefile
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/Makefile	2023-01-10 21:23:30 UTC (rev 65512)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/Makefile	2023-01-10 21:34:55 UTC (rev 65513)
@@ -1,4 +1,4 @@
-# $Id: Makefile 1239 2022-11-16 22:27:35Z karl $
+# $Id: Makefile 1282 2023-01-08 15:27:15Z karl $
 # This file is public domain.  Originally written 2010, Karl Berry.
 # Assumes GNU make.
 
@@ -72,18 +72,18 @@
 
 default: all
 
-# most files (not all, but it's not worth worrying about) read
-# mktex4ht.4ht, but we have to avoid depending on it for the file which
-# generates it (cond4ht), so we need two different variables.
-# Similarly for tex4ht.sty, though that is modified far less often.
+# tex4ht.sty is read by most (all?) files, but we have to avoid
+# depending on it for the file which generates it (tex4ht-sty.tex), so
+# we need two different variables.
 # 
-common_no_cond_sty = tex4ht-cpright.tex common.tex common-code.tex \
+common_no_tex4ht_sty = tex4ht-cpright.tex common.tex common-code.tex \
   ProTex.sty AlProTex.sty tex4ht-dir.tex
-# common = mktex4ht.4ht tex4ht.sty $(common_no_cond_sty)
 common = tex4ht.sty $(common_no_cond_sty)
-# Michal 10/05/2017: it seems that when mktex4ht.4ht is included as
-# common, it causes constant recompilations.
 common_info = $(common) common-info.tex
+#
+# mktex4ht.4ht is read by almost everything, but since it is mostly just
+# the list of packages, it changes often, without any particular need to
+# rebuild everything when it does. So leave it out.
 
 # Substitute directories used, especially for Java.
 tex4ht-dir.tex: tex4ht-dir.m4
@@ -389,8 +389,7 @@
 
 # 

 all: $(derived)
-	rm -f texput.log
-	texlua checklog.lua *.log
+	rm -f texput.log; texlua checklog.lua *.log
 
 $(tex4ht_4ht_derived): tex4ht-4ht.tex cond4ht.4ht $(common)
 	etex $(tex_opts) $<
@@ -401,8 +400,7 @@
 $(tex4ht_c_derived): tex4ht-c.tex $(common)
 	etex $(tex_opts) $<
 
-$(tex4ht_cond4ht_derived): tex4ht-cond4ht.tex mktex4ht-cnf.tex \
-                           $(common_no_cond_sty)
+$(tex4ht_cond4ht_derived): tex4ht-cond4ht.tex mktex4ht-cnf.tex $(common)
 	etex $(tex_opts) $<
 	etex $(tex_opts) cond4ht.4ht
 
@@ -548,7 +546,7 @@
 $(tex4ht_options_derived): tex4ht-options.tex $(common)
 	htlatex $< "html,3,sections+" "" "" $(tex_1opt)
 
-$(tex4ht_sty_derived): tex4ht-sty.tex $(common_no_cond_sty)
+$(tex4ht_sty_derived): tex4ht-sty.tex $(common_no_tex4ht_sty)
 	$(HTTEX) $< ""
 
 $(tex4ht_svg_derived): tex4ht-svg.tex $(common)

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex	2023-01-10 21:23:30 UTC (rev 65512)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex	2023-01-10 21:34:55 UTC (rev 65513)
@@ -1,8 +1,8 @@
-% $Id: mktex4ht-cnf.tex 1261 2022-12-09 16:06:10Z michal_h21 $
+% $Id: mktex4ht-cnf.tex 1282 2023-01-08 15:27:15Z karl $
 % Manually-maintained file, listing *.4ht files created by tex4ht-4ht.tex.
 % Read by tex4ht-cond4ht.
 %
-% Copyright 2016-2020 TeX Users Group    
+% Copyright 2016-2023 TeX Users Group    
 % Released under LPPL 1.3c+.
 % See tex4ht-cpright.tex for license text.
 %

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex	2023-01-10 21:23:30 UTC (rev 65512)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex	2023-01-10 21:34:55 UTC (rev 65513)
@@ -1,8 +1,8 @@
-% $Id: tex4ht-html4.tex 1281 2023-01-01 22:05:02Z michal_h21 $
+% $Id: tex4ht-html4.tex 1282 2023-01-08 15:27:15Z karl $
 % Compile 4 times: latex tex4ht-html4
 % Copy html4.4ht into the work directory before all but the last compilation.
 %
-% Copyright 2009-2022 TeX Users Group
+% Copyright 2009-2023 TeX Users Group
 % Copyright 1996-2009 Eitan M. Gurari
 % Released under LPPL 1.3c+.
 % See tex4ht-cpright.tex for license text.
@@ -65,7 +65,7 @@
 
 \<html4\><<<
 % html4.4ht (|version), generated from |jobname.tex
-% Copyright 2009-2022 TeX Users Group
+% Copyright 2009-2023 TeX Users Group
 % Copyright |CopyYear.1997. Eitan M. Gurari
 |<TeX4ht copywrite|>
 >>>
@@ -73,7 +73,7 @@
 
 \<html4-math\><<<
 % html4-math.4ht (|version), generated from |jobname.tex
-% Copyright 2009-2022 TeX Users Group
+% Copyright 2009-2023 TeX Users Group
 % Copyright |CopyYear.1999. Eitan M. Gurari
 |<TeX4ht copywrite|>
 >>>

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html5.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html5.tex	2023-01-10 21:23:30 UTC (rev 65512)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-html5.tex	2023-01-10 21:34:55 UTC (rev 65513)
@@ -1,8 +1,8 @@
-% $Id: tex4ht-html5.tex 1182 2022-08-11 19:21:27Z michal_h21 $
+% $Id: tex4ht-html5.tex 1284 2023-01-10 21:33:09Z karl $
 % compile 3 times: latex tex4ht-moz
 %           or   xhlatex tex4ht-moz "html,3,sections+"
 %
-% Copyright 2009-2022 TeX Users Group
+% Copyright 2009-2023 TeX Users Group
 % Copyright 2000-2009 Eitan M. Gurari
 % Released under LPPL 1.3c+.
 % See tex4ht-cpright.tex for license text.
@@ -26,7 +26,7 @@
 
 \<html5\><<<
 % html5.4ht (|version), generated from |jobname.tex
-% Copyright 2016-2022 TeX Users Group
+% Copyright 2016-2023 TeX Users Group
 |<TeX4ht copywrite|>
 >>>
 
@@ -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}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/html5.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/html5.4ht	2023-01-10 21:23:30 UTC (rev 65512)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/html5.4ht	2023-01-10 21:34:55 UTC (rev 65513)
@@ -1,5 +1,5 @@
-% html5.4ht (2022-08-11-14:16), generated from tex4ht-html5.tex
-% Copyright 2016-2022 TeX Users Group
+% html5.4ht (2023-01-10-13:34), generated from tex4ht-html5.tex
+% Copyright 2016-2023 TeX Users Group
 %
 % This work may be distributed and/or modified under the
 % conditions of the LaTeX Project Public License, either
@@ -16,7 +16,7 @@
 %
 % If you modify this program, changing the
 % version identification would be appreciated.
-\immediate\write-1{version 2022-08-11-14:16}
+\immediate\write-1{version 2023-01-10-13:34}
 
 \exit:ifnot{amsart,% 
 amsbook,% 
@@ -68,6 +68,35 @@
 \else
   \Log:Note{To print a timestamp, use the command line option timestamp}
 \fi
+\: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
 \def\Declare:Language#1#2{%
 \expandafter\gdef\csname rfclang#1\endcsname{#2}%
 }
@@ -369,6 +398,8 @@
 
 
 
+
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                 \ConfigureHinput{amsart}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -416,7 +447,6 @@
 \endinput\empty\empty\empty\empty\empty\empty
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                 \ConfigureHinput{amsbook}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -741,6 +771,16 @@
 
 
 
+
+
+
+
+
+
+
+
+
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                 \ConfigureHinput{scrbook}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -932,6 +972,11 @@
 
 
 
+
+
+
+
+
 
 
 

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/tex4ht.sty
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/tex4ht.sty	2023-01-10 21:23:30 UTC (rev 65512)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/tex4ht.sty	2023-01-10 21:34:55 UTC (rev 65513)
@@ -1,8 +1,8 @@
 \ifnum\the\catcode`\%=14\else\expandafter\edef\csname
   \string:RestoreCatcodes\endcsname{\catcode`\%\the
   \catcode`\%}\catcode`\%14\fi
-% tex4ht.sty (2022-09-16-14:11), generated from tex4ht-sty.tex
-% Copyright 2009-2022 TeX Users Group
+% tex4ht.sty (2023-01-01-18:19), generated from tex4ht-sty.tex
+% Copyright 2009-2023 TeX Users Group
 % Copyright 1996-2009 Eitan M. Gurari
 %
 % This work may be distributed and/or modified under the
@@ -20,7 +20,7 @@
 %
 % If you modify this program, changing the
 % version identification would be appreciated.
-\immediate\write-1{version 2022-09-16-14:11}
+\immediate\write-1{version 2023-01-01-18:19}
 
 
 \ifx  \Preamble\UnDef  \else

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht	2023-01-10 21:23:30 UTC (rev 65512)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht	2023-01-10 21:34:55 UTC (rev 65513)
@@ -1,6 +1,6 @@
-% usepackage.4ht (2022-11-22-14:29), generated from tex4ht-4ht.tex
+% usepackage.4ht (2023-01-10-13:30), generated from tex4ht-4ht.tex
 % Copyright 2003-2009 Eitan M. Gurari
-% Copyright 2009-2022 TeX Users Group
+% Copyright 2009-2023 TeX Users Group
 %
 % This work may be distributed and/or modified under the
 % conditions of the LaTeX Project Public License, either
@@ -17,7 +17,7 @@
 %
 % If you modify this program, changing the
 % version identification would be appreciated.
-\immediate\write-1{version 2022-11-22-14:29}
+\immediate\write-1{version 2023-01-10-13:30}
 
    \def\:temp{tex4ht}\ifx \:temp\@currname
    \:warning{\string\usepackage{tex4ht} again?}



More information about the tex-live-commits mailing list.