diff options
| author | Ralph Amissah <ralph.amissah@gmail.com> | 2026-09-30 16:55:58 -0400 |
|---|---|---|
| committer | Ralph Amissah <ralph.amissah@gmail.com> | 2026-10-01 10:00:42 -0400 |
| commit | b7da3f01212570daf9cc9678d7e46158514eb88b (patch) | |
| tree | c5cc6e3d565f2d5167a4684769f8a7d87b784a47 | |
| parent | html & epub header fixes, miscellany (diff) | |
title is h1 class "heading title", sized above h1
html & epub (share css): with <h0> gone the title became <h1>. The title
now carries class "heading title", and each stylesheet's h0 rules are
h1.title rules with the same values; h0 leaves the grouped selectors,
being emitted by nothing. In html the title looks as it did.
(assisted by Claude-Code)
| -rw-r--r-- | org/out_xmls.org | 16 | ||||
| -rw-r--r-- | org/out_xmls_css.org | 20 | ||||
| -rw-r--r-- | src/sisudoc/outputs/io_out/xmls.d | 16 | ||||
| -rw-r--r-- | src/sisudoc/outputs/io_out/xmls_css.d | 60 |
4 files changed, 68 insertions, 44 deletions
diff --git a/org/out_xmls.org b/org/out_xmls.org index 852fcf6..9ea8260 100644 --- a/org/out_xmls.org +++ b/org/out_xmls.org @@ -343,6 +343,18 @@ int _heading_element_level(O)(O obj, string _xml_type) { if (_lev < 1) { return 1; } return (_lev > 6) ? 6 : _lev; } +/+ ↓ the class a heading carries. The title (level A) shares <h1> with level B, + having no element of its own since bespoke <h0> is not recognized and no + longer used, so it is told apart by class: "heading title", which the + stylesheets size a step above h1, as h0 was. Shifting every level down one + instead would give the title alone h1, and would further compress the + limited html heading range (h1 - h6). ++/ +string _heading_class(O)(O obj) { + return (obj.metainfo.heading_lev_markup == 0) + ? obj.metainfo.is_a ~ " title" + : obj.metainfo.is_a; +} #+END_SRC **** anchor tags @@ -1208,7 +1220,7 @@ string heading(O,M)( ? "" : ((obj.metainfo.object_number.empty) ? "" : obj.metainfo.identifier), _heading_element_level(obj, _xml_type), - obj.metainfo.is_a, + _heading_class(obj), obj.metainfo.identifier, tags, heading_lev_anchor_tag, @@ -1224,7 +1236,7 @@ string heading(O,M)( </div>┃", _horizontal_rule, _heading_element_level(obj, _xml_type), - obj.metainfo.is_a, + _heading_class(obj), tags, heading_lev_anchor_tag, _txt, diff --git a/org/out_xmls_css.org b/org/out_xmls_css.org index ae361c0..4a7eccf 100644 --- a/org/out_xmls_css.org +++ b/org/out_xmls_css.org @@ -382,7 +382,7 @@ nav#toc ol { padding-left : 0em; text-indent : 0em; } -p, h0, h1, h2, h3, h4, h5, h6, h7, ul, li { +p, h1, h2, h3, h4, h5, h6, h7, ul, li { display : block; font-family : verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman; margin-left : 5%%; @@ -704,7 +704,7 @@ ul { } #+NAME: css_light_shared_headings #+BEGIN_SRC css -h0, h1, h2, h3, h4, h5, h6, h7 { +h1, h2, h3, h4, h5, h6, h7 { font-weight : bold; line-height : 120%%; text-align : left; @@ -715,7 +715,7 @@ h4.norm, h5.norm, h6.norm, h7.norm { margin-top : 10px; margin-bottom : 0px; } -h0 { font-size : 1.85rem; } +h1.title { font-size : 1.85rem; } h1 { font-size : 1.8rem; } h2 { font-size : 1.75rem; } h3 { font-size : 1.7rem; } @@ -723,7 +723,7 @@ h4 { font-size : 1.65rem; } h5 { font-size : 1.6rem; } h6 { font-size : 1.55rem; } h7 { font-size : 1.5rem; } -h0, h1, h2, h3, h4, h5, h6, h7 { +h1, h2, h3, h4, h5, h6, h7 { text-shadow : .2em .2em .3em #808080; } h1.i { margin-left : 2em; } @@ -740,7 +740,7 @@ h9.i { margin-left : 10em; } margin-top : 6px; margin-bottom : 6px; } -h0.toc { +h1.title.toc { margin-left : 1em; font-size : 1.85rem; line-height : 150%%; @@ -1341,7 +1341,7 @@ nav#toc ol { padding-left : 0em; text-indent : 0em; } -p, h0, h1, h2, h3, h4, h5, h6, h7, ul, li { +p, h1, h2, h3, h4, h5, h6, h7, ul, li { display : block; font-family : verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman; margin-left : 5%%; @@ -1653,7 +1653,7 @@ ul { } #+NAME: css_dark_shared_headings #+BEGIN_SRC css -h0, h1, h2, h3, h4, h5, h6, h7 { +h1, h2, h3, h4, h5, h6, h7 { font-weight : bold; line-height : 120%%; text-align : left; @@ -1664,7 +1664,7 @@ h4.norm, h5.norm, h6.norm, h7.norm { margin-top : 10px; margin-bottom : 0px; } -h0 { font-size : 1.9rem; } +h1.title { font-size : 1.9rem; } h1 { font-size : 1.8rem; } h2 { font-size : 1.75rem; } h3 { font-size : 1.7rem; } @@ -1672,7 +1672,7 @@ h4 { font-size : 1.65rem; } h5 { font-size : 1.6rem; } h6 { font-size : 1.55rem; } h7 { font-size : 1.5rem; } -h0, h1, h2, h3, h4, h5, h6, h7 { +h1, h2, h3, h4, h5, h6, h7 { text-shadow : .2em .2em .3em #999999; } h1.i { margin-left : 2em; } @@ -1689,7 +1689,7 @@ h9.i { margin-left : 10em; } margin-top : 6px; margin-bottom : 6px; } -h0.toc { +h1.title.toc { margin-left : 1em; font-size : 1.8rem; line-height : 150%%; diff --git a/src/sisudoc/outputs/io_out/xmls.d b/src/sisudoc/outputs/io_out/xmls.d index aba0e4f..b6001ea 100644 --- a/src/sisudoc/outputs/io_out/xmls.d +++ b/src/sisudoc/outputs/io_out/xmls.d @@ -236,6 +236,18 @@ template outputXHTMLs() { if (_lev < 1) { return 1; } return (_lev > 6) ? 6 : _lev; } + /+ ↓ the class a heading carries. The title (level A) shares <h1> with level B, + having no element of its own since bespoke <h0> is not recognized and no + longer used, so it is told apart by class: "heading title", which the + stylesheets size a step above h1, as h0 was. Shifting every level down one + instead would give the title alone h1, and would further compress the + limited html heading range (h1 - h6). + +/ + string _heading_class(O)(O obj) { + return (obj.metainfo.heading_lev_markup == 0) + ? obj.metainfo.is_a ~ " title" + : obj.metainfo.is_a; + } /+ ↓ the anchors an object carries. "name" on an <a> is obsolete; "id" is what a link target is. The two are not interchangeable here, because these tags are not all @@ -983,7 +995,7 @@ string tail(M)(M doc_matters) { ? "" : ((obj.metainfo.object_number.empty) ? "" : obj.metainfo.identifier), _heading_element_level(obj, _xml_type), - obj.metainfo.is_a, + _heading_class(obj), obj.metainfo.identifier, tags, heading_lev_anchor_tag, @@ -999,7 +1011,7 @@ string tail(M)(M doc_matters) { </div>┃", _horizontal_rule, _heading_element_level(obj, _xml_type), - obj.metainfo.is_a, + _heading_class(obj), tags, heading_lev_anchor_tag, _txt, diff --git a/src/sisudoc/outputs/io_out/xmls_css.d b/src/sisudoc/outputs/io_out/xmls_css.d index 6cab68e..1d44c5c 100644 --- a/src/sisudoc/outputs/io_out/xmls_css.d +++ b/src/sisudoc/outputs/io_out/xmls_css.d @@ -649,7 +649,7 @@ nav#toc ol { padding-left : 0em; text-indent : 0em; } -p, h0, h1, h2, h3, h4, h5, h6, h7, ul, li { +p, h1, h2, h3, h4, h5, h6, h7, ul, li { display : block; font-family : verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman; margin-left : 5%%; @@ -935,7 +935,7 @@ ul, li { } li { } /* bullets are rendered as text; the background image was never shipped */ ul { } -h0, h1, h2, h3, h4, h5, h6, h7 { +h1, h2, h3, h4, h5, h6, h7 { font-weight : bold; line-height : 120%%; text-align : left; @@ -946,7 +946,7 @@ h4.norm, h5.norm, h6.norm, h7.norm { margin-top : 10px; margin-bottom : 0px; } -h0 { font-size : 1.85rem; } +h1.title { font-size : 1.85rem; } h1 { font-size : 1.8rem; } h2 { font-size : 1.75rem; } h3 { font-size : 1.7rem; } @@ -954,7 +954,7 @@ h4 { font-size : 1.65rem; } h5 { font-size : 1.6rem; } h6 { font-size : 1.55rem; } h7 { font-size : 1.5rem; } -h0, h1, h2, h3, h4, h5, h6, h7 { +h1, h2, h3, h4, h5, h6, h7 { text-shadow : .2em .2em .3em #808080; } h1.i { margin-left : 2em; } @@ -971,7 +971,7 @@ h9.i { margin-left : 10em; } margin-top : 6px; margin-bottom : 6px; } -h0.toc { +h1.title.toc { margin-left : 1em; font-size : 1.85rem; line-height : 150%%; @@ -1465,7 +1465,7 @@ nav#toc ol { padding-left : 0em; text-indent : 0em; } -p, h0, h1, h2, h3, h4, h5, h6, h7, ul, li { +p, h1, h2, h3, h4, h5, h6, h7, ul, li { display : block; font-family : verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman; margin-left : 5%%; @@ -1741,7 +1741,7 @@ ul, li { } li { } /* bullets are rendered as text; the background image was never shipped */ ul { } -h0, h1, h2, h3, h4, h5, h6, h7 { +h1, h2, h3, h4, h5, h6, h7 { font-weight : bold; line-height : 120%%; text-align : left; @@ -1752,7 +1752,7 @@ h4.norm, h5.norm, h6.norm, h7.norm { margin-top : 10px; margin-bottom : 0px; } -h0 { font-size : 1.9rem; } +h1.title { font-size : 1.9rem; } h1 { font-size : 1.8rem; } h2 { font-size : 1.75rem; } h3 { font-size : 1.7rem; } @@ -1760,7 +1760,7 @@ h4 { font-size : 1.65rem; } h5 { font-size : 1.6rem; } h6 { font-size : 1.55rem; } h7 { font-size : 1.5rem; } -h0, h1, h2, h3, h4, h5, h6, h7 { +h1, h2, h3, h4, h5, h6, h7 { text-shadow : .2em .2em .3em #999999; } h1.i { margin-left : 2em; } @@ -1777,7 +1777,7 @@ h9.i { margin-left : 10em; } margin-top : 6px; margin-bottom : 6px; } -h0.toc { +h1.title.toc { margin-left : 1em; font-size : 1.8rem; line-height : 150%%; @@ -2272,7 +2272,7 @@ nav#toc ol { padding-left : 0em; text-indent : 0em; } -p, h0, h1, h2, h3, h4, h5, h6, h7, ul, li { +p, h1, h2, h3, h4, h5, h6, h7, ul, li { display : block; font-family : verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman; margin-left : 5%%; @@ -2558,7 +2558,7 @@ ul, li { } li { } /* bullets are rendered as text; the background image was never shipped */ ul { } -h0, h1, h2, h3, h4, h5, h6, h7 { +h1, h2, h3, h4, h5, h6, h7 { font-weight : bold; line-height : 120%%; text-align : left; @@ -2569,7 +2569,7 @@ h4.norm, h5.norm, h6.norm, h7.norm { margin-top : 10px; margin-bottom : 0px; } -h0 { font-size : 1.85rem; } +h1.title { font-size : 1.85rem; } h1 { font-size : 1.8rem; } h2 { font-size : 1.75rem; } h3 { font-size : 1.7rem; } @@ -2577,7 +2577,7 @@ h4 { font-size : 1.65rem; } h5 { font-size : 1.6rem; } h6 { font-size : 1.55rem; } h7 { font-size : 1.5rem; } -h0, h1, h2, h3, h4, h5, h6, h7 { +h1, h2, h3, h4, h5, h6, h7 { text-shadow : .2em .2em .3em #808080; } h1.i { margin-left : 2em; } @@ -2594,7 +2594,7 @@ h9.i { margin-left : 10em; } margin-top : 6px; margin-bottom : 6px; } -h0.toc { +h1.title.toc { margin-left : 1em; font-size : 1.85rem; line-height : 150%%; @@ -3014,7 +3014,7 @@ nav#toc ol { padding-left : 0em; text-indent : 0em; } -p, h0, h1, h2, h3, h4, h5, h6, h7, ul, li { +p, h1, h2, h3, h4, h5, h6, h7, ul, li { display : block; font-family : verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman; margin-left : 5%%; @@ -3290,7 +3290,7 @@ ul, li { } li { } /* bullets are rendered as text; the background image was never shipped */ ul { } -h0, h1, h2, h3, h4, h5, h6, h7 { +h1, h2, h3, h4, h5, h6, h7 { font-weight : bold; line-height : 120%%; text-align : left; @@ -3301,7 +3301,7 @@ h4.norm, h5.norm, h6.norm, h7.norm { margin-top : 10px; margin-bottom : 0px; } -h0 { font-size : 1.9rem; } +h1.title { font-size : 1.9rem; } h1 { font-size : 1.8rem; } h2 { font-size : 1.75rem; } h3 { font-size : 1.7rem; } @@ -3309,7 +3309,7 @@ h4 { font-size : 1.65rem; } h5 { font-size : 1.6rem; } h6 { font-size : 1.55rem; } h7 { font-size : 1.5rem; } -h0, h1, h2, h3, h4, h5, h6, h7 { +h1, h2, h3, h4, h5, h6, h7 { text-shadow : .2em .2em .3em #999999; } h1.i { margin-left : 2em; } @@ -3326,7 +3326,7 @@ h9.i { margin-left : 10em; } margin-top : 6px; margin-bottom : 6px; } -h0.toc { +h1.title.toc { margin-left : 1em; font-size : 1.8rem; line-height : 150%%; @@ -3747,7 +3747,7 @@ nav#toc ol { padding-left : 0em; text-indent : 0em; } -p, h0, h1, h2, h3, h4, h5, h6, h7, ul, li { +p, h1, h2, h3, h4, h5, h6, h7, ul, li { display : block; font-family : verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman; margin-left : 5%%; @@ -4033,7 +4033,7 @@ ul, li { } li { } /* bullets are rendered as text; the background image was never shipped */ ul { } -h0, h1, h2, h3, h4, h5, h6, h7 { +h1, h2, h3, h4, h5, h6, h7 { font-weight : bold; line-height : 120%%; text-align : left; @@ -4044,7 +4044,7 @@ h4.norm, h5.norm, h6.norm, h7.norm { margin-top : 10px; margin-bottom : 0px; } -h0 { font-size : 1.85rem; } +h1.title { font-size : 1.85rem; } h1 { font-size : 1.8rem; } h2 { font-size : 1.75rem; } h3 { font-size : 1.7rem; } @@ -4052,7 +4052,7 @@ h4 { font-size : 1.65rem; } h5 { font-size : 1.6rem; } h6 { font-size : 1.55rem; } h7 { font-size : 1.5rem; } -h0, h1, h2, h3, h4, h5, h6, h7 { +h1, h2, h3, h4, h5, h6, h7 { text-shadow : .2em .2em .3em #808080; } h1.i { margin-left : 2em; } @@ -4069,7 +4069,7 @@ h9.i { margin-left : 10em; } margin-top : 6px; margin-bottom : 6px; } -h0.toc { +h1.title.toc { margin-left : 1em; font-size : 1.85rem; line-height : 150%%; @@ -4329,7 +4329,7 @@ nav#toc ol { padding-left : 0em; text-indent : 0em; } -p, h0, h1, h2, h3, h4, h5, h6, h7, ul, li { +p, h1, h2, h3, h4, h5, h6, h7, ul, li { display : block; font-family : verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman; margin-left : 5%%; @@ -4605,7 +4605,7 @@ ul, li { } li { } /* bullets are rendered as text; the background image was never shipped */ ul { } -h0, h1, h2, h3, h4, h5, h6, h7 { +h1, h2, h3, h4, h5, h6, h7 { font-weight : bold; line-height : 120%%; text-align : left; @@ -4616,7 +4616,7 @@ h4.norm, h5.norm, h6.norm, h7.norm { margin-top : 10px; margin-bottom : 0px; } -h0 { font-size : 1.9rem; } +h1.title { font-size : 1.9rem; } h1 { font-size : 1.8rem; } h2 { font-size : 1.75rem; } h3 { font-size : 1.7rem; } @@ -4624,7 +4624,7 @@ h4 { font-size : 1.65rem; } h5 { font-size : 1.6rem; } h6 { font-size : 1.55rem; } h7 { font-size : 1.5rem; } -h0, h1, h2, h3, h4, h5, h6, h7 { +h1, h2, h3, h4, h5, h6, h7 { text-shadow : .2em .2em .3em #999999; } h1.i { margin-left : 2em; } @@ -4641,7 +4641,7 @@ h9.i { margin-left : 10em; } margin-top : 6px; margin-bottom : 6px; } -h0.toc { +h1.title.toc { margin-left : 1em; font-size : 1.8rem; line-height : 150%%; |
