* A glitch in CSS for lists at https://orgmode.org/org.html
@ 2020-11-27 16:32 Maxim Nikulin
2021-10-02 16:51 ` [PATCH] Fix patching of single-page manuals Max Nikulin
0 siblings, 1 reply; 3+ messages in thread
From: Maxim Nikulin @ 2020-11-27 16:32 UTC (permalink / raw)
To: emacs-orgmode
Unordered lists are styled a bit incorrectly in the single-page org
manual. Compare e.g. "Installation" section:
https://orgmode.org/org.html#Installation
https://orgmode.org/manual/Installation.html#Installation
For some reason whole text of single-page manual is a part of table of
contents (div.contents), so bold font and suppressed marker rules are
applied for regular ul elements.
It is a minor issue. Maybe someone familiar with export settings for the
manual could have a look and decide either CSS should be tweaked of main
part of the manual should be pulled out of the TOC block.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] Fix patching of single-page manuals
2020-11-27 16:32 A glitch in CSS for lists at https://orgmode.org/org.html Maxim Nikulin
@ 2021-10-02 16:51 ` Max Nikulin
2021-10-02 17:13 ` Bastien
0 siblings, 1 reply; 3+ messages in thread
From: Max Nikulin @ 2021-10-02 16:51 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1072 bytes --]
On 27/11/2020 23:32, Maxim Nikulin wrote:
> Unordered lists are styled a bit incorrectly in the single-page org
> manual. Compare e.g. "Installation" section:
>
> https://orgmode.org/org.html#Installation
> https://orgmode.org/manual/Installation.html#Installation
>
> For some reason whole text of single-page manual is a part of table of
> contents (div.contents), so bold font and suppressed marker rules are
> applied for regular ul elements.
>
> It is a minor issue. Maybe someone familiar with export settings for the
> manual could have a look and decide either CSS should be tweaked of main
> part of the manual should be pulled out of the TOC block.
Currently the problem exists e.g. for "Plain Lists" section
https://orgmode.org/manual/Plain-Lists.html - OK
https://orgmode.org/org.html#Plain-Lists - bold items with no markers
Output of makeinfo changed a bit, so a pattern in a helper script
postprocessing HTML files is not suitable for currently generated files.
CSS styles intended to tune table of contents are applied to all
unordered lists.
[-- Attachment #2: 0001-manfull.pl-Adjust-pattern-for-current-makeinfo.patch --]
[-- Type: text/x-patch, Size: 1377 bytes --]
From 6c2e0872df94c7c970aebabafc4b809be446485a Mon Sep 17 00:00:00 2001
From: Max Nikulin <manikulin@gmail.com>
Date: Sat, 2 Oct 2021 23:36:49 +0700
Subject: [PATCH 1/2] manfull.pl: Adjust pattern for current makeinfo
* mk/manfull.pl: During patching of single-page html manuals allow
current form of table of contents headers.
Older makeinfo did not add "contents-heading" class to "<h2>" element.
Helper script failed to properly modify HTML files generated by current
version of makeinfo. With partially patched file, CSS stiles intended
for table of contents were applied to all unordered lists, so e.g. in
"Plain Lists" section items were bold and with missed markers.
---
mk/manfull.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mk/manfull.pl b/mk/manfull.pl
index 95ffa392c..307ce396e 100755
--- a/mk/manfull.pl
+++ b/mk/manfull.pl
@@ -13,7 +13,7 @@ while (<IN>) {
} elsif (/<div class="contents">/) {
print OUT;
print OUT '<p>This is the official manual for the latest <a href="https://orgmode.org">Org mode</a> release.</p><div id="table-of-contents">';
- } elsif (/<h2>Table of Contents<\/h2>/) {
+ } elsif (/<h2>Table of Contents<\/h2>|<h2 class="contents-heading">/) {
print OUT;
print OUT '<a href="https://orgmode.org">https://orgmode.org</a><br/><div id="text-table-of-contents">';
$toc = 1;
--
2.25.1
[-- Attachment #3: 0002-manfull.pl-Avoid-silent-failures.patch --]
[-- Type: text/x-patch, Size: 1201 bytes --]
From 78bc4d01e1cc2aeb8264166d734add7a2d5a1810 Mon Sep 17 00:00:00 2001
From: Max Nikulin <manikulin@gmail.com>
Date: Sat, 2 Oct 2021 23:41:23 +0700
Subject: [PATCH 2/2] manfull.pl: Avoid silent failures
* mk/manfull.pl: Report failures of patching of single-page HTML
manuals.
It should prevent silent generating of manual pages inconsistent with
provided CSS files when output of makeinfo will change next time.
---
mk/manfull.pl | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/mk/manfull.pl b/mk/manfull.pl
index 307ce396e..39439bd4b 100755
--- a/mk/manfull.pl
+++ b/mk/manfull.pl
@@ -1,11 +1,14 @@
#!/usr/bin/perl
+$failures = 0;
while ($page = shift) {
system "mv $page $page.orig";
open IN,"<$page.orig" or die "Cannot read from $page.orig\n";
open OUT,">$page" or die "Cannot write to $page\n";
+$toc = undef;
+
while (<IN>) {
if (/<meta http-equiv="Content-Style-Type" content="text\/css">/) {
print OUT;
@@ -25,4 +28,11 @@ while (<IN>) {
}
}
system "rm $page.orig";
+
+if (!defined($toc) || $toc != 0) {
+ ++$failures;
+ print STDERR "Patching of $page failed\n";
}
+}
+
+$failures == 0 or die "Patching of $failures files failed\n";
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix patching of single-page manuals
2021-10-02 16:51 ` [PATCH] Fix patching of single-page manuals Max Nikulin
@ 2021-10-02 17:13 ` Bastien
0 siblings, 0 replies; 3+ messages in thread
From: Bastien @ 2021-10-02 17:13 UTC (permalink / raw)
To: Max Nikulin; +Cc: emacs-orgmode
Max Nikulin <manikulin@gmail.com> writes:
> Currently the problem exists e.g. for "Plain Lists" section
> https://orgmode.org/manual/Plain-Lists.html - OK
> https://orgmode.org/org.html#Plain-Lists - bold items with no markers
>
> Output of makeinfo changed a bit, so a pattern in a helper script
> postprocessing HTML files is not suitable for currently generated
> files. CSS styles intended to tune table of contents are applied to
> all unordered lists.
Applied, thanks!
--
Bastien
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-02 17:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-27 16:32 A glitch in CSS for lists at https://orgmode.org/org.html Maxim Nikulin
2021-10-02 16:51 ` [PATCH] Fix patching of single-page manuals Max Nikulin
2021-10-02 17:13 ` Bastien
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).