mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-12-02 08:22:16 +00:00
ab310f9405
The manual now used better the org.css file. It also reacts to single key presses like "n" and "p", and has a top-level table of contents that is always active and visible.
29 lines
753 B
Perl
Executable File
29 lines
753 B
Perl
Executable File
#!/usr/bin/perl
|
|
|
|
|
|
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";
|
|
|
|
while (<IN>) {
|
|
if (/<meta http-equiv="Content-Style-Type" content="text\/css">/) {
|
|
print OUT;
|
|
print OUT '</style><link rel="stylesheet" href="http://orgmode.org/org.css" type="text/css" />';
|
|
} elsif (/<div class="contents">/) {
|
|
print OUT;
|
|
print OUT '<div id="table-of-contents">';
|
|
} elsif (/<h2>Table of Contents<\/h2>/) {
|
|
print OUT;
|
|
print OUT '<div id="text-table-of-contents">';
|
|
$toc = 1;
|
|
} elsif (/<\/div>/ and $toc) {
|
|
print OUT "</div></div></div>";
|
|
$toc = 0;
|
|
} else {
|
|
print OUT;
|
|
}
|
|
}
|
|
system "rm $page.orig";
|
|
}
|