<xref> vs <command> formatting in the docs

Поиск
Список
Период
Сортировка
Искать

<xref> vs <command> formatting in the docs

От:
ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Дата:
Hi Hackers,

While looking at making more SQL into links, I
noticed that  loses the monospace formatting of , and
can't itself be wrapped in .  This becomes particularly
apparent when you have one link that can be an  next to another
that's ... because it's actually
referring to a specific variant of the command.

By some trial and error I found that putting  inside the
 tag propagates the formatting to the  contents.
We already do this with  for (most of) the client and
server applications.  Is this something we want to do consistently for
both?

- ilmari
-- 
"The surreality of the universe tends towards a maximum" -- Skud's Law
"Never formulate a law or axiom that you're not prepared to live with
 the consequences of."                              -- Skud's Meta-Law


Re: <xref> vs <command> formatting in the docs

От:
Alvaro Herrera <alvherre@2ndquadrant.com>
Дата:
On 2020-Jun-21, Dagfinn Ilmari Mannsåker wrote:

> While looking at making more SQL into links, I
> noticed that  loses the monospace formatting of , and
> can't itself be wrapped in .

Ouch.

> By some trial and error I found that putting  inside the
>  tag propagates the formatting to the  contents.
> We already do this with  for (most of) the client and
> server applications.  Is this something we want to do consistently for
> both?

Looking at the ones that use , it looks like manpages are
not damaged, so +1.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


Re: <xref> vs <command> formatting in the docs

От:
ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Дата:
Вложения:
Alvaro Herrera  writes:

> On 2020-Jun-21, Dagfinn Ilmari Mannsåker wrote:
>
>> While looking at making more SQL into links, I
>> noticed that  loses the monospace formatting of , and
>> can't itself be wrapped in .
>
> Ouch.
>
>> By some trial and error I found that putting  inside the
>>  tag propagates the formatting to the  contents.
>> We already do this with  for (most of) the client and
>> server applications.  Is this something we want to do consistently for
>> both?
>
> Looking at the ones that use , it looks like manpages are
> not damaged, so +1.

Attached are two patches: the first adds the missing  tags,
the second adds  to all the SQL commands (specifically anything
with 7).

I'll add it to the commitfest.

- ilmari
-- 
- Twitter seems more influential [than blogs] in the 'gets reported in
  the mainstream press' sense at least.               - Matt McLeod
- That'd be because the content of a tweet is easier to condense down
  to a mainstream media article.                      - Calle Dybedahl

Re: <xref> vs <command> formatting in the docs

От:
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Дата:
On 2020-06-21 18:57, Dagfinn Ilmari Mannsåker wrote:
> Attached are two patches: the first adds the missing  tags,
> the second adds  to all the SQL commands (specifically anything
> with 7).

I have committed the first one.

I have some concerns about the second one.  If you look at the diff of 
the source of the man pages before and after, it creates a bit of a 
mess, even though the man pages look okay when rendered.  I'll need to 
think about this a bit more.

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


Re: <xref> vs <command> formatting in the docs

От:
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Дата:
On 2020-07-10 17:05, Peter Eisentraut wrote:
> On 2020-06-21 18:57, Dagfinn Ilmari Mannsåker wrote:
>> Attached are two patches: the first adds the missing  tags,
>> the second adds  to all the SQL commands (specifically anything
>> with 7).
> 
> I have committed the first one.
> 
> I have some concerns about the second one.  If you look at the diff of
> the source of the man pages before and after, it creates a bit of a
> mess, even though the man pages look okay when rendered.  I'll need to
> think about this a bit more.

I asked about this on a DocBook discussion list.  While the general 
answer is that you can do anything you want, it was clear that putting 
markup into title elements requires more careful additional 
customization and testing, and it's preferable to handle appearance 
issues on the link source side.  (See also us dialing back the number of 
xreflabels recently.)  This is also the direction that DocBook 5 appears 
to be taking, where you can put linkend attributes into most inline 
tags, so you could maybe do .  This 
doesn't work for us yet, but the equivalent of that would be 
.

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.

(This also implies that the already committed 0001 patch should be 
reverted.)

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


Re: <xref> vs <command> formatting in the docs

От:
Peter Eisentraut <peter.eisentraut@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  vs.  formatting in the documentation

    SQL commands are generally marked up as , except when a link
    to a reference page is used using .  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  in the  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  inside the ; the DTD doesn't allow
    this.  DocBook 5 would allow the  to have the linkend
    attribute itself, but we are not there yet.

    So to solve this for now, convert the s to  plus
    .  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
    .  In cases where we just want the link and don't
    specifically care about the generated link text (typically phrased
    "for further information see ") 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


Re: <xref> vs <command> formatting in the docs

От:
Bruce Momjian <bruce@momjian.us>
Дата:
On Sat, Oct  3, 2020 at 04:57:34PM +0200, Peter Eisentraut wrote:
> 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  vs.  formatting in the documentation

Thanks, this is a big step forward.

-- 
  Bruce Momjian          https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee



FAQ