Using fragment identifiers with Markdown docs

bowerbird bowerbird at aol.com
Fri Oct 24 18:51:59 EDT 2014


sean said:
>   It is useful to say things like
>   readme.md#how-to-install
>   So that a Markdown editor
>   could scroll to the right content.

yes. indeed, that's a useful feature
in many contexts, including ones
where no such id exists in the .html.

see:
>   
https://medium.com/@bbirdiman/lets-please-use-hashtag-terms-to-create-_arbitrary_-deep-links-f9185d5da2f0

a little bit of javascript can go a long way.

***

>   Do any such editors exist?

some of my tools have this type of sync functionality.

and even if none _do_ exist, they certainly _could_.

so i don't really see the usefulness of such a question.


>   MultiMarkdown (and others) already offer
>   automatic label generation (for HTML, LaTeX, others)
>   that allow "linking" within the output document.

unfortunately, however, there is some disagreement
on the format that is used for such automatic labels,
so neither users nor developers can depend on them.

does this sound like a familiar type of problem?

and is it any surprise the developers themselves
seem not to know about these inconsistencies?


>   I'm not aware of any editors that do this (directly)
>   on the raw text side, but MultiMarkdown Composer
>   (and others) offer the Table of Contents approach,
>   and Composer allows you to accurately synchronize
>   scrolling between the HTML and raw text, so internal
>   links can be used to navigate the document already.

more or less, kind of, yes. but not exactly that, not really.

but there's no reason such functionality can't be offered.

indeed, it's easy. john macfarlane asked, a while back,
how to do it, and i gave him the 4-point pseudo-code...

>   
https://pairlist6.pair.net/pipermail/markdown-discuss/2014-August/003110.html

-bowerbird



More information about the Markdown-Discuss mailing list