| 13 Jul 2021 |
Jan Tojnar | so not actual footnotes [link][^1]? | 01:01:41 |
ryantm | Oh, that's a thing in some extension? | 01:02:33 |
Jan Tojnar | In reply to @ryantm:matrix.org Maybe we could avoid "footnote" link magic, but aggregating the "footnote" links across the whole set of documents. that would be pretty simple by concating the link target definitions to each md file | 01:03:06 |
Jan Tojnar | extras would just be ignored | 01:03:16 |
Jan Tojnar | In reply to @ryantm:matrix.org Oh, that's a thing in some extension? yeah, pandoc supports it | 01:03:25 |
ryantm | I just meant the one like this:
[Link][1]
⋮
[1]: http://b.org
| 01:03:37 |
Jan Tojnar | you can even use strings instead of numbers | 01:03:49 |
ryantm | Right. | 01:03:57 |
ryantm | So there could be ones for all the NixOS options, and all the common manpages. | 01:04:24 |
ryantm | Though I guess NixOS options might be xrefs? | 01:04:48 |
Jan Tojnar | yeah, xref work for options for now | 01:05:35 |
Jan Tojnar | I think I still like {manpage}`foo(5)` more compared to something like [][foo(5)], which would still need us to fill in the link text | 01:07:53 |
Jan Tojnar | so we would need some way to annotate the anchors that they are manpages | 01:08:34 |
Jan Tojnar | Or write [`foo(5)`][foo(5)] which is IMO even worse for writers than the MyST role. | 01:10:05 |
Jan Tojnar | Something like [](man:foo(5) would bring best of both worlds, I feel, but it is non-standard. | 01:12:34 |
Jan Tojnar | * Something like [](man:foo(5)) would bring best of both worlds, I feel, but it is non-standard. | 01:12:41 |
Jan Tojnar | * Something like [](man:foo(5)) would bring best of both worlds – easily processable yet simple to type, but it is non-standard. | 01:13:53 |
Jan Tojnar | * Something like [](man:foo(5)) would bring best of both worlds – easily processable yet simple to type. But it is non-standard. | 01:14:44 |
Jan Tojnar | For others reading this, the PR: https://github.com/NixOS/nixpkgs/pull/130047 | 02:06:18 |
David Arnold | In reply to @jtojnar:matrix.org Or write [`foo(5)`][foo(5)] which is IMO even worse for writers than the MyST role. Have we considered
[`foo(5)`][]
[`foo(5)`]: http://b.org
? | 11:08:40 |
David Arnold | That's how I would intuitively write it, probably even with a MyST role in place. | 11:13:55 |
David Arnold | Maybe aome sort of pre-processor will do that has some sort of mapping for the actual links and adds the last link line. | 11:15:21 |
David Arnold | * Maybe some sort of pre-processor will do that has some sort of mapping for the actual links and adds the last link line. | 11:15:56 |
David Arnold | * Maybe some sort of pre-processor would do that has some sort of mapping for the actual links and adds the last link line. | 11:16:09 |
David Arnold | * Have we considered
```markdown
[`foo(5)`][]
⋮
[`foo(5)`]: http://b.org
```
? | 11:17:56 |
Jan Tojnar | David Arnold: Interesting, did not realize that the implicit link names were already part of the original Markdown. | 12:30:37 |
Jan Tojnar | Though linking by “form” feels kind of backwards to me – the empty link text being filled in from the link target automatically is intuitive for me; magically guessing link target from link label feels weird. Granted, I was never fan of reference-style links. | 12:30:40 |
Jan Tojnar | In reply to @blaggacao:matrix.org Maybe some sort of pre-processor would do that has some sort of mapping for the actual links and adds the last link line. This syntax would currently require concating all md files with the mapping (just like the [][foo(5)] syntax) but resolving would be slightly cleaner – just replace the Str "[", Code …, Str "][]" sequence in AST by Code … (for the links that did not resolve). | 12:34:43 |
bryan | Jan Tojnar: what you ask for is what happens with no syntax whatsoever, isn't it? :) A bare url is automatically converted to a link? | 12:48:50 |
Jan Tojnar | bryan: not sure I understand – we would have manpage references and the mapping would contain URLs only for some of them | 12:51:28 |