tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: "Anthony J. Bentley" <anthony@anjbe.name>
To: tech@mandoc.bsd.lv
Subject: docbook2mdoc and [sub]section links
Date: Sun, 19 May 2019 23:50:38 -0600	[thread overview]
Message-ID: <9061.1558331438@desktop.ajb.soy> (raw)

Hi,

Instances of .Sx that docbook2mdoc(1) generates in text don't match the
case of the actual section name. The Sx's printed text (and, in HTML
output, the href of the hyperlink) will come from the section's id in
the DocBook source, which is not correct.

For example, here's a sample from the DocBook source of fonts(7):

  <para>
  This document describes the support for fonts in X11R&relvers;.
  <xref linkend='Installing_fonts' xrefstyle='select: title'/> is aimed at the
  casual user wishing to install fonts in X11R&relvers; the rest of the
  document describes the font support in more detail.
  </para>
  (snip)
  <sect1 id='Installing_fonts'>
  <title>Installing fonts</title>

And the result currently in xenocara:

  This document describes the support for fonts in X11R6.
  .Sx Installing_fonts
  is aimed at the
  casual user wishing to install fonts in X11R6 the rest of the
  document describes the font support in more detail.
  (snip)
  .Sh INSTALLING FONTS

The Sx line should match its Sh, "INSTALLING FONTS".

A related problem is with <sect3>. docbook2mdoc(1) generates Sy in Pp
for the tag. While dissatisfying, I don't know what better solution
there could be at the moment. But since this can't be treated as a
normal section cross reference, docbook2mdoc(1) should not create Sx
for references to <sect3>.

An example:

  <para>
  All that remains is to tell the X server about the existence of the
  new font directory; see <xref linkend='Setting_the_servers_font_path'
  xrefstyle='select: title'/> below.
  </para>
  (snip)
  <sect3 id='Setting_the_servers_font_path'>
  <title>Setting the server's font path</title>

becoming:

  .Pp
  All that remains is to tell the X server about the existence of the
  new font directory; see
  .Sx Setting_the_servers_font_path
  below.
  (snip)
  .Pp
  .Sy Setting the server's font path

-- 
Anthony J. Bentley
--
 To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv

             reply	other threads:[~2019-05-20  5:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-20  5:50 Anthony J. Bentley [this message]
2019-05-20 17:45 ` Ingo Schwarze

Reply instructions:

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

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

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9061.1558331438@desktop.ajb.soy \
    --to=anthony@anjbe.name \
    --cc=tech@mandoc.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).