Improve <xref> vs. <command> formatting in the documentation
authorPeter Eisentraut <peter@eisentraut.org>
Sat, 3 Oct 2020 14:16:51 +0000 (16:16 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Sat, 3 Oct 2020 14:40:02 +0000 (16:40 +0200)
commit9081bddbd75e4e8994ca243c820ca63387bd33f7
treea9e9f66b96fa16067375262a99a39e4b9a501254
parent1a9388bd0fefccc81430192d0b2c87938bb62d38
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.

Reported-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Discussion: https://www.postgresql.org/message-id/flat/87o8pco34z.fsf@wibble.ilmari.org
92 files changed:
doc/src/sgml/backup.sgml
doc/src/sgml/catalogs.sgml
doc/src/sgml/config.sgml
doc/src/sgml/ddl.sgml
doc/src/sgml/dml.sgml
doc/src/sgml/ecpg.sgml
doc/src/sgml/extend.sgml
doc/src/sgml/logical-replication.sgml
doc/src/sgml/maintenance.sgml
doc/src/sgml/monitoring.sgml
doc/src/sgml/mvcc.sgml
doc/src/sgml/perform.sgml
doc/src/sgml/plpgsql.sgml
doc/src/sgml/postgres-fdw.sgml
doc/src/sgml/queries.sgml
doc/src/sgml/ref/abort.sgml
doc/src/sgml/ref/alter_aggregate.sgml
doc/src/sgml/ref/alter_domain.sgml
doc/src/sgml/ref/alter_foreign_table.sgml
doc/src/sgml/ref/alter_group.sgml
doc/src/sgml/ref/alter_index.sgml
doc/src/sgml/ref/alter_materialized_view.sgml
doc/src/sgml/ref/alter_role.sgml
doc/src/sgml/ref/alter_statistics.sgml
doc/src/sgml/ref/alter_table.sgml
doc/src/sgml/ref/alter_trigger.sgml
doc/src/sgml/ref/alter_type.sgml
doc/src/sgml/ref/alter_user.sgml
doc/src/sgml/ref/analyze.sgml
doc/src/sgml/ref/begin.sgml
doc/src/sgml/ref/close.sgml
doc/src/sgml/ref/cluster.sgml
doc/src/sgml/ref/copy.sgml
doc/src/sgml/ref/create_aggregate.sgml
doc/src/sgml/ref/create_cast.sgml
doc/src/sgml/ref/create_database.sgml
doc/src/sgml/ref/create_foreign_table.sgml
doc/src/sgml/ref/create_function.sgml
doc/src/sgml/ref/create_index.sgml
doc/src/sgml/ref/create_language.sgml
doc/src/sgml/ref/create_materialized_view.sgml
doc/src/sgml/ref/create_operator.sgml
doc/src/sgml/ref/create_procedure.sgml
doc/src/sgml/ref/create_role.sgml
doc/src/sgml/ref/create_table.sgml
doc/src/sgml/ref/create_table_as.sgml
doc/src/sgml/ref/create_transform.sgml
doc/src/sgml/ref/create_trigger.sgml
doc/src/sgml/ref/create_type.sgml
doc/src/sgml/ref/create_user.sgml
doc/src/sgml/ref/create_view.sgml
doc/src/sgml/ref/createdb.sgml
doc/src/sgml/ref/createuser.sgml
doc/src/sgml/ref/declare.sgml
doc/src/sgml/ref/delete.sgml
doc/src/sgml/ref/drop_group.sgml
doc/src/sgml/ref/drop_language.sgml
doc/src/sgml/ref/drop_owned.sgml
doc/src/sgml/ref/drop_role.sgml
doc/src/sgml/ref/drop_table.sgml
doc/src/sgml/ref/drop_user.sgml
doc/src/sgml/ref/dropdb.sgml
doc/src/sgml/ref/dropuser.sgml
doc/src/sgml/ref/end.sgml
doc/src/sgml/ref/explain.sgml
doc/src/sgml/ref/fetch.sgml
doc/src/sgml/ref/grant.sgml
doc/src/sgml/ref/lock.sgml
doc/src/sgml/ref/postgres-ref.sgml
doc/src/sgml/ref/prepare.sgml
doc/src/sgml/ref/prepare_transaction.sgml
doc/src/sgml/ref/psql-ref.sgml
doc/src/sgml/ref/reassign_owned.sgml
doc/src/sgml/ref/refresh_materialized_view.sgml
doc/src/sgml/ref/reindexdb.sgml
doc/src/sgml/ref/revoke.sgml
doc/src/sgml/ref/rollback.sgml
doc/src/sgml/ref/rollback_to.sgml
doc/src/sgml/ref/savepoint.sgml
doc/src/sgml/ref/select.sgml
doc/src/sgml/ref/select_into.sgml
doc/src/sgml/ref/set_role.sgml
doc/src/sgml/ref/set_session_auth.sgml
doc/src/sgml/ref/start_transaction.sgml
doc/src/sgml/ref/vacuumdb.sgml
doc/src/sgml/sepgsql.sgml
doc/src/sgml/tsm-system-rows.sgml
doc/src/sgml/tsm-system-time.sgml
doc/src/sgml/user-manag.sgml
doc/src/sgml/xaggr.sgml
doc/src/sgml/xfunc.sgml
doc/src/sgml/xplang.sgml