discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Kristaps Dzonsons <kristaps@bsd.lv>
To: discuss@mdocml.bsd.lv
Subject: Re: Linking in mdoc(7)
Date: Mon, 09 Mar 2015 16:36:36 +0100	[thread overview]
Message-ID: <54FDBE04.9030108@bsd.lv> (raw)
In-Reply-To: <54FD9156.2010201@bsd.lv>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Replying to myself with an example...

Here's an example of `Ix' and `Lkx' at work:

http://kristaps.bsd.lv/gsl-test.7.html

It's a rendering of the following:

% texi2mdoc ~/src/gsl-1.16/doc/gsl-ref.texi | \
  mandoc -Thtml >gsl-test.7.html

In this you can see the menu items (`Lkx') pointing to arbitrary nodes
(`Ix': chapters, sections, subsections, etc.).  I use `Lkx' instead of
`Sx' because I give the nodes a unique namespace to separate them from
the `Sh' heading, which may share the same name.

For example, the (x)_n symbol is as follows:

http://kristaps.bsd.lv/gsl-test.7.html#index-NodePochhammer_Symbol

This is a sub-sub-sub-section.  Earlier, I was trying to do this with
`Sx', but it would only nest to `Ss' while texinfo goes much deeper.
Moreover, the menu item name is sometimes different from the node
identifier, which wouldn't work with `Sx'.

Something that you don't see in this manual which would be (and now
is) possible is topical indexing.  I would basically build up a set of
`Ix' entries for each index entry (e.g., @cindex), with a unique
namespace prefix, e.g., the concept index for "foo bar" would be
"CPIndexfoo bar" or something.  When Texinfo asks that I print the
concept index list, I simply sort the entries and output a list of
`Lkx' entries to the respective locations in the page, e.g., `Lkx
"CPIndexfoobar" "foo bar"'.  These will jump back smartly to the indices.

P.S., be gentle on the GSL page.  It's one of the heavier users of
texinfo semantics, so there are still glitches, e.g., the function
declarations are un-pretty.
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJU/b4EAAoJEMT2SUY9XBESeOEP/0BTo/De+p13B4kpjGLI4PG+
n8ulB0qlvAvbdFDKUFcPEt1yKU8jCLorKS7R9X0rTHlBfdEDMZ+P+Krp15SHea0n
NgbI+nvje4x6r0RRmswwM3pqajiPsNWSMTOQ24TNVMwmNHgIqtuYkSZWIfleGnws
bmeN/32qlM22YjTld7qO2B893gPd/rXv9LrGlqFezJ14co6nmeVRJxsV0dtP5pBY
xPC8PKw6E+LZhYpykhMN7fPoSDbjA+OPj0mrUugUZVDzPJYNG0s1GEFqQniATqRU
Dtnw7MSoz4gqi5LvJNe5I3JNskKCKMm8FOwHySRV+CYLQ+WjfytTptF0w5DnRKSw
d5JKhxM4+eCxAOKKxrFQcXNdkHLBrMg+ZMdlSTbzqAPzmqh+bnt1DYqhjNezAqva
ne1PqdlV70I4E8kScX/EG3otbaKFZH4fxjkyoi3l6GdxnX+0CN2rk0FBlJT4Hxzz
wHery7gqsPY6yww/X1E0ba8hEfcUVQA/1YW2VzwNeG1EyTLmwJi6j0GIPjsO1NTl
1UzviYALFCmndhoQcJWLqDsFz5hBbCSgm7slyVRLAMUZIpYboZMqXXpt8H9d+qLc
TTtv2kJCCrqgXNt3gh6xJuo5yo/0Gbsapkg41/O5ZOPa+PnrL7dm+g+gMTqjduOR
iQIeqzolgQOjXtGoDoiX
=NAB2
-----END PGP SIGNATURE-----
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

  reply	other threads:[~2015-03-09 15:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <sfid-H20150308-171308-+043.19-1@spamfilter.osbf.lua>
2015-03-08 16:12 ` Kristaps Dzonsons
2015-03-09  6:29   ` Thomas Klausner
2015-03-09  6:38     ` Anthony J. Bentley
2015-03-09  8:46       ` Kristaps Dzonsons
2015-03-09 11:12         ` Joerg Sonnenberger
2015-03-09 11:34           ` Kristaps Dzonsons
2015-03-09 11:09   ` Steffen Nurpmeso
2015-03-09 11:46     ` Ingo Schwarze
2015-03-09 12:25       ` Kristaps Dzonsons
2015-03-09 15:36         ` Kristaps Dzonsons [this message]
2015-03-10 16:30           ` Steffen Nurpmeso
2015-03-11  8:05             ` Kristaps Dzonsons
2015-03-11  8:15               ` Anthony J. Bentley
2015-03-11 10:07               ` Steffen Nurpmeso
2015-03-09 13:11       ` Steffen Nurpmeso

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=54FDBE04.9030108@bsd.lv \
    --to=kristaps@bsd.lv \
    --cc=discuss@mdocml.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).