Re: [PATCH] Proposal: Improvements to PDF stylesheet and table column widths

From: Noboru Saito <noborusai(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Proposal: Improvements to PDF stylesheet and table column widths
Date: 2025-08-14 23:25:28
Message-ID: CAAM3qnLWLO9TO7DrTQMeEoCaitCJTUZLfN_WJuwLY_eU_KsLUQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thank you for reviewing the patch.

> > 3. **Replaced `text-indent` with `margin-left` for `func_signature` and
> > `column_definition`**:
> > - The previous `text-indent: -3.5em` only affected the first line, causing
> > inconsistent formatting for multi-line code blocks. Changing this to
> > `margin-left: 0em` ensures consistent alignment across all lines.
>
> I think I found what this is meant to change, but it's not clear why one
> is better than the other. I think you would need to provide some
> concrete examples with screenshots perhaps that people could look at.

For the change to margin-left, I have attached a screenshot for comparison.
(pdf-table-margin.png)

Currently, when the Function/Operator content is too long, it wraps like this:

```
Function/Operator
Description
function(....) ->
Function continued...
Description
```

With the margin-left change, it will look like this:

```
Function/Operator
Description
function(....) ->
function continued...
Description
```

This way, the continuation of the function/operator starts from the
same position as the first line,
making it easier to distinguish from the Description.

> > 4. **Introduced `shade.verbatim.style`**:
> > - Added a shaded background for code blocks to improve visual distinction.
> > This includes a border, padding, and a light gray background color
> > (`#EFEFEF`).
> > - Adjusted padding to reduce excessive spacing above code blocks.
>
> I'm not a fan of this change. The boxes break the flow of the text.
>
> I think it's ok to put boxes and shading around elements that are not in
> the flow of the text, like the warning boxes, are perhaps tables or
> formal examples. But not verbatim text that is part of the main text.

Regarding the background color for code blocks , the HTML version of
the documentation already
uses a background color for code blocks, and I think this makes them
easier to read.

If the current color feels too strong, perhaps we could use a lighter
shade to reduce the
emphasis while still improving readability.

To demonstrate this, I have created a patch (`0004-pdf-shade.patch`)
that adjusts the shading
for code blocks in the PDF output.
I have also attached a comparison image (`pdf-shade.png`) to
illustrate the effect.

Please let me know your thoughts or if you have any suggestions for
further adjustments.

Attachment Content-Type Size
pdf-table-margin.png image/png 307.3 KB
0004-pdf-shade.patch text/x-patch 1.2 KB
pdf-shade.png image/png 360.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2025-08-14 23:26:22 Re: index prefetching
Previous Message Tomas Vondra 2025-08-14 23:21:15 Re: index prefetching