bookbook icon indicating copy to clipboard operation
bookbook copied to clipboard

Possible syntax for alternate label specification from multimarkdown

Open mpacer opened this issue 7 years ago • 3 comments

Alternatively, you can include an optional label of your choosing to help disambiguate cases where multiple headers have the same title:

Overview [MultiMarkdownOverview]

from Multimarkdown syntax guide

I'm pretty sure the trailing hashes are optional. it's just after any heading, you could place an alternate label in the brackets.

This will probably be a better solution for long file section headers with spaces than having to put their entirety down and converting to -.

Not sure how that should work for the top level reference and file names though…I'm thinking if we can figure out a nice way to do even have alternate labels for those it would be useful in order to avoid needing to have someone put a complete path when they're in different directories.

mpacer avatar Aug 08 '16 16:08 mpacer

Reference-style links use a second set of square brackets, inside which you place a label of your choosing to identify the link:

This is [an example][id] reference-style link.
You can optionally use a space to separate the sets of brackets:

This is [an example] [id] reference-style link.
Then, anywhere in the document, you define your link label like this, on a line by itself:

[id]: http://example.com/  "Optional Title Here"

So you can give an id to something.

Carreau avatar Aug 08 '16 17:08 Carreau

Also, apparently this kind of already exists within nbconvert, though it fails to perform properly:

https://github.com/jupyter/nbconvert/issues/11

mpacer avatar Aug 18 '16 01:08 mpacer

Aha, so here's where this seems to be discussed in terms of pandoc's interpretation of header labels (referred to as header identifiers pulling from the HTML idiom rather than the LaTeX):

http://pandoc.org/MANUAL.html#header-identifiers

Unfortunately, it looks like that actually violates the standard markdown syntax based on what you're saying @Carreau

Headers can be assigned attributes using this syntax at the end of the line containing the header text:

{#identifier .class .class key=value key=value}

mpacer avatar Aug 23 '16 17:08 mpacer