Commit Graph

16 Commits

Author SHA1 Message Date
Tom Lane a042750646 Doc: reformat catalog/view description tables.
This changes our catalog and view descriptions to use a style inspired
by the new format for function/operator tables: each table entry is
formatted roughly like a <varlistentry>, with the column name and type
on the first line and then an indented description.  This provides much
more room for expansive descriptions than we had before, and thereby
eliminates a passel of PDF build warnings.

Discussion: https://postgr.es/m/12984.1588643549@sss.pgh.pa.us
2020-05-13 23:03:39 -04:00
Tom Lane 336aa51b70 Doc: marginal hacking to remove some PDF build warnings.
This patch eliminates a few more "exceed the available area" warnings
whose causes aren't particularly connected to anything else.

The only one really worthy of comment is that I increased the space
allowed for an <orderedlist>'s numbers, because the default of 1em
doesn't quite work for more than one digit.  The rest are one-off
insertions of &zwsp; and suchlike tweaks, in places where they
shouldn't do any damage to the material.  (In particular, although
I split some long identifiers with zwsp's, there are other nearby
occurrences of each one; so those changes shouldn't hurt greppability
of the document sources.)
2020-05-10 16:20:28 -04:00
Tom Lane f21599311e Doc: further fooling-about with rendering of tables in PDF output.
I concluded that we really just ought to force all tables in PDF output
to default to "left" alignment (instead of "justify"); that is what the
HTML toolchain does and that's what most people have been designing the
tables to look good with.  There are few if any places where "justify"
produces better-looking output, and there are many where it looks
horrible.  So change stylesheet-fo.xsl to make that true.

Also tweak column widths in a few more tables to make them look better
and avoid "exceed the available area" warnings.  This commit fixes
basically everything that can be fixed through that approach.  The
remaining tables that give warnings either are scheduled for redesign
as per recent discussions, or need a fundamental rethink because they
Just Don't Work in a narrow view.
2020-05-06 12:23:54 -04:00
Tom Lane 4ad047a6ea Doc: re-re-revise markup for tables of functions.
Make the markup a bit less ad-hoc.  A function-table cell now contains
several <para> units, and we label the ones that contain function
signatures with role="func_signature".  The CSS or FO stylesheets then
key off of that to decide how to set the indentation.  A very useful
win from this approach is that we can have more than one signature
entry per table cell, simplifying the documentation of closely-related
operators and functions.

This patch mostly just replaces the markup in the tables I converted so
far.  But I did alter a couple of places where multiple signatures were
helpful.

Discussion: https://postgr.es/m/5561.1587922854@sss.pgh.pa.us
2020-04-30 00:34:12 -04:00
Tom Lane 5ac2475548 Doc: render &pi; more nicely in PDF output.
We need to select symbol font explicitly, or it comes out misaligned.

Alexander Lakhin, Tom Lane

Discussion: https://postgr.es/m/10598.1587928415@sss.pgh.pa.us
2020-04-27 11:00:28 -04:00
Tom Lane 00f4aba46d Doc: sync functableentry markup choices with website style.
Jonathan Katz felt that slightly different indentation settings made
for a better-looking result, so sync stylesheet-fo.xsl (for PDF) and
stylesheet.css (for non-website-style HTML) with those choices.

Discussion: https://postgr.es/m/31464.1587156281@sss.pgh.pa.us
2020-04-18 15:36:43 -04:00
Tom Lane 737d69ffc3 Doc: revise formatting of function/operator tables.
The table layout ideas proposed in commit e894c6183 were not as widely
popular as I'd hoped.  After discussion, we've settled on a layout
that's effectively a single-column table with cell contents much like a
<varlistentry> description of the function or operator; though we're not
actually using <varlistentry>, because it'd add way too much vertical
space.  Instead the effect is accomplished using line-break processing
instructions to separate the description and example(s), plus CSS or FO
customizations to produce indentation of all but the first line in each
cell.  While technically this is a bit grotty, it does have the
advantage that we won't need to write nearly as much boilerplate markup.

This patch updates tables 9.30, 9.31, and 9.33 (which were touched by
the previous patch) to the revised style, and additionally converts
table 9.10.  A lot of work still remains to do, but hopefully it won't
be too controversial.

Thanks to Andrew Dunstan, Pierre Giraud, Robert Haas, Alvaro Herrera,
David Johnston, Jonathan Katz, Isaac Morland for valuable ideas.

Discussion: https://postgr.es/m/8691.1586798003@sss.pgh.pa.us
2020-04-17 20:50:40 -04:00
Tom Lane e894c61836 Doc: introduce new layout for tables of functions and operators.
We've long fought with the draconian space limitations of our
traditional table layout for describing SQL functions and operators.
This commit introduces a new approach, though so far I've only applied
it to a few of those tables.  The new way makes use of DocBook's support
for different layouts in different rows of a table, and allows the
descriptions and examples for a function or operator to run to several
lines without as much ugliness and wasted space as before.

The core layout concept is now

     Name              Signature
                      Description
                 Example     Example Result

so that a function or operator really has three table rows not one,
but we group them to look like one row by having the name column
have only one entry for all three rows.  (Actually, there could be
four or more rows if you wanted to have more than one example, which
is another thing that was painful before but works easily now.)
This is handled by a "morerows" annotation on the name entry, which
isn't perfect (notably, the toolchain is not smart enough to avoid
breaking these row groups across PDF pages) but there seems no better
solution in DocBook.  The name column is normally fairly narrow,
allowing plenty of space for the other column(s), and not wasting too
much space when one of the other components runs to multiple lines.

The varying row layout is managed by defining named "spans" and then
tagging entries with a "spanname" of "name", "sig", "desc", "example",
or "exresult".  This provides a bit of semantic annotation to go with
the formatting improvement, which seems like a good thing.  (It seems
that we have to re-define these spans afresh for each table, which is
annoying, but it's not any worse than the duplication involved in
the table headers.  At least that gives us an opportunity to vary the
relative column widths per-table, which is handy since function tables
sometimes need much wider name columns than operator tables.)

Signature entries should be written in the style
    <function>fname</function>(<type>typename</type> ...)
    <returnvalue>typename</returnvalue>
The <returnvalue> tag produces a right arrow before the result type
name.  (I'll document that convention in a user-visible place later.)

While this provides significantly more horizontal space than before
for examples, it's still true that PDF output is a lot narrower than
typical webpage viewing windows, so some examples need to be broken
in places where there is no whitespace.  I've added &zwsp; markers in
suitable places to allow the tables to render warning-free in PDF.

I've so far converted only the date/time operator, date/time function,
and enum function tables in sections 9.9 and 9.10; these were chosen
to provide a reasonable sample of the formatting problems that need
to be solved.  Assuming that this looks good on the website and doesn't
provoke howls of anguish, I'll work on the other similar tables in the
near future.

There's a moderate amount of new editorial content in this patch along
with the raw formatting changes; for instance I had to write text
descriptions for operators that lacked them.  I failed to resist the
temptation to improve some other descriptions and examples, too.

Patch by me, with thanks to Alexander Lakhin for assistance with
figuring out some formatting issues.

Discussion: https://postgr.es/m/9326.1581457869@sss.pgh.pa.us
2020-04-12 18:03:20 -04:00
Peter Eisentraut 270fec9f0b doc: Improve PDF bookmarks
Also create PDF bookmarks/ToC entries for subsections of reference
pages.  This was a regression from the previous jadetex-based build.

Reported-by: Erik Rijkers <er@xs4all.nl>
2017-08-15 14:37:44 -04:00
Peter Eisentraut a071fe87a2 doc: Formatting fix for XSL-FO PDF build 2017-04-06 12:27:45 -04:00
Peter Eisentraut 6e31c3e135 doc: Improve rendering of notes/cautions using XSL-FO
Center title and put a border around it, like the output that the DSSSL
version gave.
2017-03-27 13:33:36 -04:00
Peter Eisentraut d637624524 doc: Clean up bibliography rendering for XSLT
In the DSSSL stylesheets, we had an extensive customization of the
bibliography rendering.  Since the bibliography isn't that used much, it
doesn't seem worth doing an elaborate porting of that to XSLT.  So this
just moves some things around, removes some unused things, and does some
minimal XSLT stylesheet customizations to make things look clean.
2017-03-26 14:54:56 -04:00
Peter Eisentraut afae1f7854 doc: Fix PDF build with FOP
Because of a bug in the DocBook XSL FO style sheet, an xref to a
varlistentry whose term includes an indexterm fails to build.  One such
instance was introduced in commit
5086dfceba.  Fix by adding the upstream
bug fix to our customization layer.
2015-06-03 20:19:47 -04:00
Peter Eisentraut a5963efa8f doc: Improve setup for documentation building with FOP
Add a makefile rule for building PDFs with FOP.  Two new build targets
in doc/src/sgml are postgres-A4-fop.pdf and postgres-US-fop.pdf.

Run .fo output through xmllint for reformatting, so that errors are
easier to find.  (The default output has hardly any line breaks, so you
might be looking for an error in column 20000.)

Set some XSLT parameters to optimize for building with FOP.

Remove some redundant or somewhat useless chapterinfo/author
information, because it renders strangely with the FO stylesheet.

Reviewed-by: Álvaro Herrera <alvherre@2ndquadrant.com>
2013-10-21 06:43:08 -04:00
Peter Eisentraut 61c84b4761 Fix display of <command> elements on man pages
We had changed this from the default bold to monospace for all output
formats, but for man pages, this creates visual inconsistencies, so
revert to the default for man pages.
2012-04-30 21:18:03 +03:00
Peter Eisentraut 5f1f30d136 Reorganize XSLT stylesheet support. Put common things into a separate
file (instead of repeating), add XSL-FO stylesheet and appropriate make
rules.
2006-12-10 16:01:06 +00:00