pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: <xref> vs <command> formatting in the docs
Date: Sat, 3 Oct 2020 16:57:34 +0200
Message-ID: <e3a8253e-81aa-e972-e974-ec6fdf7286bd@2ndquadrant.com> (raw)
In-Reply-To: <e0786f80-f641-4330-cd7d-c309a68399e5@2ndquadrant.com>
References: <20200621153038.GA2296@alvherre.pgsql>
	<87lfkgnypi.fsf@wibble.ilmari.org>
	<631ac57a-e4aa-a3a7-2b0d-0a84974c2205@2ndquadrant.com>
	<e0786f80-f641-4330-cd7d-c309a68399e5@2ndquadrant.com>

On 2020-09-25 07:38, Peter Eisentraut wrote:
> So, based on that, I think the patch proposed here is not the right one,
> and we should instead be marking up the link sources appropriately.

I have committed a fix for this:

    Improve <xref> vs. <command> formatting in the documentation

    SQL commands are generally marked up as <command>, except when a link
    to a reference page is used using <xref>.  But the latter doesn't
    create monospace markup, so this looks strange especially when a
    paragraph contains a mix of links and non-links.

    We considered putting <command> in the <refentrytitle> on the target
    side, but that creates some formatting side effects elsewhere.
    Generally, it seems safer to solve this on the link source side.

    We can't put the <xref> inside the <command>; the DTD doesn't allow
    this.  DocBook 5 would allow the <command> to have the linkend
    attribute itself, but we are not there yet.

    So to solve this for now, convert the <xref>s to <link> plus
    <command>.  This gives the correct look and also gives some more
    flexibility what we can put into the link text (e.g., subcommands or
    other clauses).  In the future, these could then be converted to
    DocBook 5 style.

    I haven't converted absolutely all xrefs to SQL command reference
    pages, only those where we care about the appearance of the link text
    or where it was otherwise appropriate to make the appearance match a
    bit better.  Also in some cases, the links where repetitive, so in
    those cases the links where just removed and replaced by a plain
    <command>.  In cases where we just want the link and don't
    specifically care about the generated link text (typically phrased
    "for further information see <xref ...>") the xref is kept.

Let me know if I missed something or further changes are needed.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (7+ messages)  latest in thread

Message-ID: <e3a8253e-81aa-e972-e974-ec6fdf7286bd@2ndquadrant.com>
Permalink:  ../e3a8253e-81aa-e972-e974-ec6fdf7286bd@2ndquadrant.com/
Also on:    postgresql.org/message-id/e3a8253e-81aa-e972-e974-ec6fdf7286bd@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: peter.eisentraut@2ndquadrant.com, ilmari@ilmari.org, alvherre@2ndquadrant.com
  Subject: Re: <xref> vs <command> formatting in the docs
  In-Reply-To: <e3a8253e-81aa-e972-e974-ec6fdf7286bd@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox