Omikhleia / markdown.sile

Native Markdown and Djot support for the SILE typesetting system
MIT License
39 stars 3 forks source link

Embedding Markdown/Djot in a surrounding inline context #116

Open Omikhleia opened 5 months ago

Omikhleia commented 5 months ago

Thoughts from https://github.com/sile-typesetter/sile/issues/1866#issuecomment-2151096275

Currently, the SIL case (Some SIL stuff \raw[type=markdown]{Some Markdown}) won't lead to a single paragraph (as the markdown/djot parsers generates a surrounding paragraph).

But likewise, we cannot have e.g. Some Djot stuff `Some Markdown stuff`{.markdown}

We need to do something different whether we are already in horizontal mode or not, and the underlying parser/inputter would likely need to restrict the possibilities to inline elements only.

Omikhleia commented 5 months ago

And on the YAML side (e.g. a resilient master document), one could want:

  title: Some _Djot_ mark-up

And that "title" metadata is an "inline-only" thing.

Omikhleia commented 1 month ago

... the underlying parser/inputter would likely need to restrict the possibilities to inline elements only.

It might actually need further restrictions, such as not allowing footnote calls, indirect images and links, as those are outside what's resolvable on an inline-only snippet.