diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2020-05-11 20:03:55 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2020-05-11 20:03:55 -0400 |
commit | 4d1563717fb1860168a40b852e1d61a33ecdd62f (patch) | |
tree | d8058fb1b47fcd98b269f33ec939a946f64c9a0f | |
parent | 60c90c16c1885bb9aa2047b66f958b865c5d397e (diff) | |
download | postgresql-4d1563717fb1860168a40b852e1d61a33ecdd62f.tar.gz postgresql-4d1563717fb1860168a40b852e1d61a33ecdd62f.zip |
Doc: fix remaining over-length entries in SQL keywords table.
Even after the tweaking I did in commit 5545b69ae, some of the
longer keywords mentioned in the SQL standard don't fit the
available space in PDF output.
I experimented with various solutions like putting such keywords
on their own table lines, but everything looked ugly or confusing
or both; worse, the weirdness also appeared in the HTML version,
which (normally) doesn't need it.
The best answer seems to be to insert &zwsp; into long keywords
so that they can be broken into two lines when, and only when,
needed. It doesn't look too awful if the break happens after
an underscore --- and fortunately, all the problematic keywords
have underscores.
Discussion: https://postgr.es/m/6916.1589146280@sss.pgh.pa.us
-rw-r--r-- | doc/src/sgml/generate-keywords-table.pl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/doc/src/sgml/generate-keywords-table.pl b/doc/src/sgml/generate-keywords-table.pl index 5aa1c39d2ab..824b324ef78 100644 --- a/doc/src/sgml/generate-keywords-table.pl +++ b/doc/src/sgml/generate-keywords-table.pl @@ -82,8 +82,13 @@ END foreach my $word (sort keys %keywords) { + # Insert zwsp's into very long keywords, so that they can be broken + # into multiple lines in PDF format (or narrow HTML windows). + my $printword = $word; + $printword =~ s/_/_&zwsp;/g if (length($printword) > 20); + print " <row>\n"; - print " <entry><token>$word</token></entry>\n"; + print " <entry><token>$printword</token></entry>\n"; print " <entry>"; if ($keywords{$word}{pg}{'unreserved'}) |