From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx.stare.cz (ns.stare.cz [79.98.77.229]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTP id d0425779 for ; Mon, 13 Mar 2017 04:56:29 -0500 (EST) Received: from www.stare.cz (localhost [127.0.0.1]) by www.stare.cz (OpenSMTPD) with ESMTP id a1d1bd61 for ; Mon, 13 Mar 2017 10:56:27 +0100 (CET) Date: Mon, 13 Mar 2017 10:56:27 +0100 From: Jan Stary To: discuss@mdocml.bsd.lv Subject: Re: Links into HTML page would be great Message-ID: <20170313095627.GA97043@www.stare.cz> References: <8ffc686a-f898-4952-ae6f-3b8881469f17@thomas-guettler.de> <20170312180832.GE69791@athene.usta.de> <20170312193940.GA91520@athene.usta.de> <0dbf9b44-499d-dabc-f759-17c5a0f2f6da@thomas-guettler.de> X-Mailinglist: mdocml-discuss Reply-To: discuss@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0dbf9b44-499d-dabc-f759-17c5a0f2f6da@thomas-guettler.de> User-Agent: Mutt/1.7.1 (2016-10-04) On Mar 13 10:42:08, guettliml@thomas-guettler.de wrote: > http://man.openbsd.org/OpenBSD-current/man5/ssh_config.5#ServerAliveInterval Thank you Ingo! Anyway, in my firefox, http://man.openbsd.org/OpenBSD-current/man5/ssh_config.5 displays the synopsis as SYNOPSIS ~/.ssh /config /etc/ssh /ssh_config Only after I make the font smaller than 100% (with Crtrl + -) it becomes SYNOPSIS ~/.ssh/config /etc/ssh/ssh_config Why is that? Could it be besause of the hardwired width? (Or is it a firefox bug to not recompute the relative widths (ex)?)

SYNOPSIS

~/.ssh/config

/etc/ssh/ssh_config
In lynx it displays fine. Jan > > Am 12.03.2017 um 20:39 schrieb Ingo Schwarze: > > Hi, > > > > Ingo Schwarze wrote on Sun, Mar 12, 2017 at 07:08:32PM +0100: > > > Thomas Guettler wrote on Tue, Feb 28, 2017 at 03:33:00PM +0100: > > > > > > it would be great if you could create a link which points to this: > > > > http://man.openbsd.org/OpenBSD-current/man5/ssh_config.5#ServerAliveInterval > > > > > You have a point. > > > > > > I have no clue how nroff works. I guess it is not easy to implement. > > > > > You may be wrong, it is likely not difficult. > > > > It turns out to be even easier than i anticipated. > > > > Here is a proof-of-concept patch that i just installed on man.openbsd.org. > > For now, it only does .Cm, merely because that's what Thomas used as > > his example, and also because it is one of the macros where this is > > useful. > > > > If people speak up here who like that, or if i come to the > > conclusion that i like it myself (which seems likely), > > i will probably add support for some more macros, probably > > .Ev .Fl .Ic .Ms .Dv .Li .No .Er .Sy .Em , > > do some polishing (for example making sure the tag contains no > > invalid characters), then commit it in a few days. > > > > The two macros .Fn and .Fd are slightly more tricky and may need > > a bit of deliberation, but are probably feasible, too. > > > > At first, i was a bit worried because what exactly such a tagging > > facility will tag may not be completely stable over time. But then > > it occurred to me that really isn't a big deal. I mean, even if > > some external deep links sometimes go dead due to algorithmic changes, > > we are not worse off than right now. Even if those links are never > > updated, they still point to the right page, only to the beginning > > of it. > > > > Yours, > > Ingo > > > > > > Index: mdoc_html.c > > =================================================================== > > RCS file: /cvs/src/usr.bin/mandoc/mdoc_html.c,v > > retrieving revision 1.148 > > diff -u -p -r1.148 mdoc_html.c > > --- mdoc_html.c 3 Mar 2017 13:55:06 -0000 1.148 > > +++ mdoc_html.c 12 Mar 2017 19:23:54 -0000 > > @@ -46,6 +46,7 @@ struct htmlmdoc { > > void (*post)(MDOC_ARGS); > > }; > > > > +static const char *cond_id(const struct roff_node *); > > static char *make_id(const struct roff_node *); > > static void print_mdoc_head(MDOC_ARGS); > > static void print_mdoc_node(MDOC_ARGS); > > @@ -496,6 +497,22 @@ make_id(const struct roff_node *n) > > return buf; > > } > > > > +static const char * > > +cond_id(const struct roff_node *n) > > +{ > > + if (n->child != NULL && > > + n->child->type == ROFFT_TEXT && > > + (n->prev == NULL || > > + (n->prev->type == ROFFT_TEXT && > > + strcmp(n->prev->string, "|") == 0)) && > > + (n->parent->tok == MDOC_It || > > + (n->parent->tok == MDOC_Xo && > > + n->parent->parent->prev == NULL && > > + n->parent->parent->parent->tok == MDOC_It))) > > + return n->child->string; > > + return NULL; > > +} > > + > > static int > > mdoc_sh_pre(MDOC_ARGS) > > { > > @@ -549,7 +566,7 @@ mdoc_fl_pre(MDOC_ARGS) > > static int > > mdoc_cm_pre(MDOC_ARGS) > > { > > - print_otag(h, TAG_B, "c", "Cm"); > > + print_otag(h, TAG_B, "ci", "Cm", cond_id(n)); > > return 1; > > } > > > > -- > > To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv > > > > -- > Thomas Guettler http://www.thomas-guettler.de/ > -- > To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv > -- To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv