discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Robert Mustacchi <rm@fingolfin.org>
To: Ingo Schwarze <schwarze@usta.de>, discuss@mandoc.bsd.lv
Subject: Re: Cross references to specific sections in other manual pages
Date: Tue, 26 Feb 2019 16:51:53 -0800	[thread overview]
Message-ID: <1265f743-e3dd-14c6-a2e1-62e4f359a9f2@fingolfin.org> (raw)
In-Reply-To: <20190219223541.GC95454@athene.usta.de>

Hi Ingo,

Thanks for your reply, apologies this wasn't nearly as prompt as yours.

On 2/19/19 14:35 , Ingo Schwarze wrote:
> So far, it wasn't implemented because the focus has been on
> consolidating, on simplifying the language, and only to a much
> lesser degree on adding features.  Intentionally so: a programmer
> should only be allowed to add one new thing (adding complexity)
> after first having made ten things simpler.  Otherwise, the
> software will inevitably sprawl away from perfection instead of
> converging towards it.

Makes sense. I appreciate the tension there.

>> I'm not sure if this is something that should
>> be elevated into its own macro.
> 
> I think the simple, obvious syntax
> 
>   For more information, see
>   .Xr libproc 3LIB LOCKING .
> 
> is probably fine and unlikely to cause problems with backward
> compatibility, but i'm not absolutely convinced yet.

I thought about something similar as well, but I hadn't convinced myself
that it made sense or that someone wouldn't end up being upset with
however one phrased to see what we put there.

>> If folks think it might be useful, I'm
>> happy to take a look at implementing it.
> 
> Whoa, watch out what you promise!  :-D
> 
> Implementing it involves:
> 
>  - syntax tree modeling
>  - modification of the mdoc parser
>  - modification of the mdoc validator
>  - checking tree output mode (likely fine as-is)
>  - modification of the mdoc terminal formatter
>  - making sure PostScript and PDF output dont't break
>  - modification of the mdoc HTML formatter
>  - checking that mandoc.css still works (likely fine as-is)
>  - modification of the mdoc markdown formatter
>  - modification of the mdoc man formatter
> 
> and that is only the mandoc part.  Then, the same thing needs to be
> done for groff as well, because with respect to language definition
> changes, mandoc and groff are supposed to march in lock-step.

I'll admit, the groff part was the part of the list that I didn't expect.

> Note that input syntax considerations are not even the most tricky
> part here.  What counts is making the *output* as useful as possible
> across a wide range of output devices (before telling poeple that
> they can start using it if they want to).  Some years ago, preliminary
> steps were missing to make the output useful, which is another
> reason why it wasn't worked on earlier.  Now, a useful HTML rendering
> has become possible:
> 
>   For more information, see the
>   <a href="$WWWSITE/libproc.3LIB#LOCKING">LOCKING</a>
>   section in libproc(3LIB).
> 
> In terminal output, it is far less useful because we still have no
> way to somehow invoke "man -s 3LIB libproc" when you see libproc(3LIB)
> in a terminal, and much less to invoke "man -O tag=LOCKING -s 3LIB libproc"
> where you see "LOCKING section in libproc(3LIB)".  But we are a step
> closer now: at least the syntax
> 
>   man -O tag=LOCKING -s 3LIB libproc
> 
> to open the target manual page in a terminal *at the desired place*
> is now implemented and tested (in OpenBSD) and will be contained in the
> next portable mandoc release - but it is a lot of typing and not easy to
> shorten (without causing compatibility issues), which severly limits the
> usefulness of such links in the terminal.

That's interesting. Will the next portable release be announced here?
I'd like to make sure we're able to test that in illumos whenever it
makes sense.

> PDF would in principle support hyperlinks, but the mandoc PDF
> formatting engine is *very* far away from becoming able to generate
> hyperlinks, and trying to teach it hyperlinks at this point might
> looks like a task for a suicide squad to me.
> 
> So, read this as a hopeful reply, but don't necessarily regard it as
> an easy or short-term target...
> 
> The best way to get it moved ahead is probably proposing a SIMPLE and
> convenient way to follow .Xr links from a rendered manual page in a
> terminal window - simple both in the sense of avoiding undue complication
> of the implementation and in the sense of ease of use.  Once we have
> that, i absolutely see how your feature request is becoming really
> useful.
> 
> In the meantime, simply write
> 
>   For more information, see the LOCKING section in
>   .Xr libproc 3LIB .
> 
> without any markup on "LOCKING"; the all caps already makes it stand
> out without additional markup.

I'll make sure to clean up some of the older markup and standardize on
that going forward. The different constraints and complications make
sense. I do agree, that it's not clear if it'll end up being worthwhile
or not. Depending on time, I may poke at it a little bit and see if it's
worth panning out or if it explodes in complexity and thus isn't worthwhile.

Thanks again,
Robert
--
 To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv

  reply	other threads:[~2019-02-27  0:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-18  0:09 Robert Mustacchi
2019-02-19 22:35 ` Ingo Schwarze
2019-02-27  0:51   ` Robert Mustacchi [this message]
2019-02-27 13:57     ` 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=1265f743-e3dd-14c6-a2e1-62e4f359a9f2@fingolfin.org \
    --to=rm@fingolfin.org \
    --cc=discuss@mandoc.bsd.lv \
    --cc=schwarze@usta.de \
    /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).