diff options
author | Karl Berry <karl@freefriends.org> | 2023-01-10 21:34:55 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-01-10 21:34:55 +0000 |
commit | fd2f9ef68518c5ae05d71a76af7835f3022200e6 (patch) | |
tree | 203dff35980bccf7ddd7e79a9b08085ebf34e259 /Master/texmf-dist/source | |
parent | ac7bb10446cf82e03245669e79ecc4953a2fc2c0 (diff) |
css for sections and page dimensions, tex4ht r1283
git-svn-id: svn://tug.org/texlive/trunk@65513 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
5 files changed, 77 insertions, 23 deletions
diff --git a/Master/texmf-dist/source/generic/tex4ht/ChangeLog b/Master/texmf-dist/source/generic/tex4ht/ChangeLog index 5974b09e6fc..d1cb7c2edcb 100644 --- a/Master/texmf-dist/source/generic/tex4ht/ChangeLog +++ b/Master/texmf-dist/source/generic/tex4ht/ChangeLog @@ -1,3 +1,20 @@ +2023-01-10 Michal Hoftich <michal.h21@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@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@gmail.com> * tex4th-html4.tex (html4.4ht): set font size for \subsubsection diff --git a/Master/texmf-dist/source/generic/tex4ht/Makefile b/Master/texmf-dist/source/generic/tex4ht/Makefile index f901ebbb4f9..e66c7e99133 100644 --- a/Master/texmf-dist/source/generic/tex4ht/Makefile +++ b/Master/texmf-dist/source/generic/tex4ht/Makefile @@ -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 @@ HTTEX = ht "etex $(tex_opts)" # set tex options for plain tex 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 @@ endif # 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_bibtex2_derived): tex4ht-bibtex2.tex $(common) $(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_ooimpress_derived): tex4ht-ooimpress.tex $(common) $(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) diff --git a/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex b/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex index 8bc9a1deb1a..3143a5b33dd 100644 --- a/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex +++ b/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex @@ -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. % diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex index 6308f08f7b2..27620e4ee1c 100644 --- a/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex +++ b/Master/texmf-dist/source/generic/tex4ht/tex4ht-html4.tex @@ -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|> >>> diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-html5.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-html5.tex index 761e9968fd6..d69fe6dfa1d 100644 --- a/Master/texmf-dist/source/generic/tex4ht/tex4ht-html5.tex +++ b/Master/texmf-dist/source/generic/tex4ht/tex4ht-html5.tex @@ -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} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |