DOCS QUESTION - space added within synopsis replaceable tag.

Started by Peter Smith9 months ago5 messageshackers
Jump to latest
#1Peter Smith
smithpb2250@gmail.com

Hi,

Looking at the Server Applications page synopses:

AFAICT whenever there is a preceeding <group> in the SGML, then the
next <replaceable> part renders jammed against that group.

It seems like historically some people did not like that result, so
have added a space in the <replaceable> to make the rendered synopsis
look (they judged) a bit more readable.

But this "fix" is quite ad-hoc: Only a couple of pages do it, other
pages do not.

e.g
initdb - space added in <replaceable> datadir</replaceable>
pg_rewind - space in <replaceable> datadir</replaceable>

versus

pg_checksums - no space before datadir
pg_controldata - no space before datadir
pg_createsubscriber - no space before any of dbname,datadir,connstr
pg_resetwal - no space before datadir

~~~

The only examples I can find that do this are in initdb.sgml and pg_rewind.sgml.

What do others think about it, and what is the next step?

0. Do nothing. It's harmless. Leave as-is.
1. Remove the space hacks, and just let the SGML rendering do whatever it wants.
2. Add more space hacks to other places so they render the same.

TBH, I prefer option 0.

Thanks.

======
[1]: initdb - https://www.postgresql.org/docs/devel/app-initdb.html
[2]: pg_checksums - https://www.postgresql.org/docs/devel/app-pgchecksums.html

Kind Regards.
Peter Smith.
Fujitsu Australia.

#2Peter Smith
smithpb2250@gmail.com
In reply to: Peter Smith (#1)
Re: DOCS QUESTION - space added within synopsis replaceable tag.

I've been studying this some more...

As described in my previous post, I discovered that a leading space
was present in some <replaceable> terms as a hacky workaround to help
the rendering. Sometimes this space was added, and sometimes it
wasn't, therefore some synopses would appear OK and some would look
more squishy.

By more careful arrangement of the <arg> and <group> SGML tags I've
eliminated the need for this spacing hack completely.

Now the synopses for all the client/server applications [1]https://www.postgresql.org/docs/19/reference-client.html[2]https://www.postgresql.org/docs/19/reference-server.html render
properly with no squishiness. Basically, nothing has changed at all
for each synopsis content, but now the spacing is all how it should
be.

PSA patch v1.

======
[1]: https://www.postgresql.org/docs/19/reference-client.html
[2]: https://www.postgresql.org/docs/19/reference-server.html

Kind Regards,
Peter Smith.
Fujitsu Australia

Attachments:

t53353_2
v1-0001-Fix-synopsis-spacing.patchapplication/octet-stream; name=v1-0001-Fix-synopsis-spacing.patchDownload+34-25
#3Bruce Momjian
bruce@momjian.us
In reply to: Peter Smith (#2)
Re: DOCS QUESTION - space added within synopsis replaceable tag.

On Thu, Jul 23, 2026 at 06:55:32PM +1000, Peter Smith wrote:

I've been studying this some more...

As described in my previous post, I discovered that a leading space
was present in some <replaceable> terms as a hacky workaround to help
the rendering. Sometimes this space was added, and sometimes it
wasn't, therefore some synopses would appear OK and some would look
more squishy.

By more careful arrangement of the <arg> and <group> SGML tags I've
eliminated the need for this spacing hack completely.

Now the synopses for all the client/server applications [1][2] render
properly with no squishiness. Basically, nothing has changed at all
for each synopsis content, but now the spacing is all how it should
be.

Patch applied back to PG 19, thanks. I always thought that spacing was
odd.

--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com

Do not let urgent matters crowd out time for investment in the future.

#4Peter Smith
smithpb2250@gmail.com
In reply to: Bruce Momjian (#3)
Re: DOCS QUESTION - space added within synopsis replaceable tag.

On Thu, Jul 30, 2026 at 4:21 AM Bruce Momjian <bruce@momjian.us> wrote:

...

Patch applied back to PG 19, thanks. I always thought that spacing was
odd.

Thanks for pushing!

I've marked the CF entry [1]https://commitfest.postgresql.org/patch/7054/ as "committed"

======
[1]: https://commitfest.postgresql.org/patch/7054/

Kind Regards,
Peter Smith.
Fujitsu Australia

#5Bruce Momjian
bruce@momjian.us
In reply to: Peter Smith (#4)
Re: DOCS QUESTION - space added within synopsis replaceable tag.

On Thu, Jul 30, 2026 at 10:10:16AM +1000, Peter Smith wrote:

On Thu, Jul 30, 2026 at 4:21 AM Bruce Momjian <bruce@momjian.us> wrote:

...

Patch applied back to PG 19, thanks. I always thought that spacing was
odd.

Thanks for pushing!

I've marked the CF entry [1] as "committed"

Oh, thanks, sorry I missed that. That old spacing sure was strange.

--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com

Do not let urgent matters crowd out time for investment in the future.