Bundle of O'Reilly-related fixups, mostly table column-width related.

parent 4328a8cf
...@@ -68,6 +68,11 @@ msg ("Adding closing / to XREF and COLSPEC tags..."); ...@@ -68,6 +68,11 @@ msg ("Adding closing / to XREF and COLSPEC tags...");
$data =~ s{<(xref|colspec) (.+?)>} $data =~ s{<(xref|colspec) (.+?)>}
{<$1 $2 />}gs; {<$1 $2 />}gs;
# arjen 2002-04-26
msg ("Removing separate target titles from LINKs and make them XREFs...");
$data =~ s{<link (linkend=.+?)>.+?</link>}
{<xref $1 />}gs;
# Probably need to strip these # Probably need to strip these
msg ('Adding "See " to XREFs that used to be @xref...'); msg ('Adding "See " to XREFs that used to be @xref...');
$data =~ s{([.'!)])\s*<xref } $data =~ s{([.'!)])\s*<xref }
...@@ -77,11 +82,6 @@ msg ('Adding "see " to (XREFs) that used to be (@pxref)...'); ...@@ -77,11 +82,6 @@ msg ('Adding "see " to (XREFs) that used to be (@pxref)...');
$data =~ s{([([,;])(\s*)<xref } $data =~ s{([([,;])(\s*)<xref }
{$1$2see <xref }gs; {$1$2see <xref }gs;
# arjen 2002-04-26
msg ("Removing separate target titles from LINKs and make them XREFs...");
$data =~ s{<link (linkend=.+?)>.+?</link>}
{<xref $1 />}gs;
msg ("Making first row in table THEAD..."); msg ("Making first row in table THEAD...");
$data =~ s{( *)<tbody>(\s*<row>.+?</row>)} $data =~ s{( *)<tbody>(\s*<row>.+?</row>)}
{$1<thead>$2\n$1</thead>\n$1<tbody>}gs; {$1<thead>$2\n$1</thead>\n$1<tbody>}gs;
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
# Implemented in Perl by jeremy@mysql.com # Implemented in Perl by jeremy@mysql.com
# 2001-11-20 Fixups by arjen@mysql.com, 2 keywords and 15 synonyms were missing # 2001-11-20 Fixups by arjen@mysql.com, 2 keywords and 15 synonyms were missing
# 2001-12-07 Fixup by arjen@mysql.com, add column headings for multitable. # 2001-12-07 Fixup by arjen@mysql.com, add column headings for multitable.
# 2002-05-01 Fixup by arjen@mysql.com, use 3 columns instead of 4.
print STDERR "Scanning lex.h for symbols..\n"; print STDERR "Scanning lex.h for symbols..\n";
open LEX, "<../sql/lex.h"; open LEX, "<../sql/lex.h";
...@@ -40,11 +41,11 @@ print STDERR "Sorting array...\n"; ...@@ -40,11 +41,11 @@ print STDERR "Sorting array...\n";
printf STDERR "There are %i reserved words.\n", scalar @words; printf STDERR "There are %i reserved words.\n", scalar @words;
@pre = ("\@item", "\@tab", " \@tab", "\@tab"); @pre = ("\@item", " \@tab", " \@tab");
@post = ("", "\n", "", "\n"); @post = ("\n", "\n", "\n");
for($i=0; $word = shift(@words); $i++) { for($i=0; $word = shift(@words); $i++) {
$list .= sprintf "%s %-30s %s", $pre[$i%4], "\@code\{$word\}", $post[$i%4]; $list .= sprintf "%s %-30s %s", $pre[$i%3], "\@code\{$word\}", $post[$i%3];
}; $list .= "\n"; }; $list .= "\n";
open OLD, "<manual.texi"; open OLD, "<manual.texi";
...@@ -54,8 +55,9 @@ print STDERR "Copying beginning of manual.texi...\n"; ...@@ -54,8 +55,9 @@ print STDERR "Copying beginning of manual.texi...\n";
while(($line = <OLD>) !~ /START_OF_RESERVED_WORDS/) { print NEW $line; }; while(($line = <OLD>) !~ /START_OF_RESERVED_WORDS/) { print NEW $line; };
print NEW "\@c START_OF_RESERVED_WORDS\n\n"; print NEW "\@c START_OF_RESERVED_WORDS\n\n";
print STDERR "Inserting list of reserved words...\n"; print STDERR "Inserting list of reserved words...\n";
print NEW "\@multitable \@columnfractions .25 .25 .25 .25\n"; # Ensure the fractions add up to 100% otherwise it looks funny in print:
print NEW "\@item \@strong{Word} \@tab \@strong{Word} \@tab \@strong{Word} \@tab \@strong{Word}\n"; print NEW "\@multitable \@columnfractions .33 .33 .34\n";
print NEW "\@item \@strong{Word} \@tab \@strong{Word} \@tab \@strong{Word}\n";
print NEW $list; print NEW $list;
print NEW "\@end multitable\n"; print NEW "\@end multitable\n";
print STDERR "Skipping over old list...\n"; print STDERR "Skipping over old list...\n";
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment