mmarkdown / mmark

Mmark: a powerful markdown processor in Go geared towards the IETF
https://mmark.miek.nl
Other
480 stars 45 forks source link

subfigures #1

Closed miekg closed 6 years ago

miekg commented 6 years ago

Subfigures in mmark are sorta supported by prefixing a paragraph with F>. This is a bit annoying. The scholary markdown (discontinued) solution seems better:

Do this? http://scholarlymarkdown.com/Scholarly-Markdown-Guide.html#floating-env

miekg commented 6 years ago

There is a good discussion here https://github.com/lierdakil/pandoc-crossref/issues/20 It defines a block that gives you a Subfigure env. I don't particular care about subfigures per se, but currently there is no way to wrap a figure into something or add a caption.

miekg commented 6 years ago

And this: https://github.com/jgm/pandoc/issues/3177

Defines a block, with !--- as the delimiters

!--- {#foo .right}
![my image](img.jpg)
![second image](img2.jpg)
!---

Which we could re-use, but also allow for single images:

!---
![GitHub Logo](/images/logo.png)
!---
Figure: this is an image

Where Figure makes it captionFigure in the AST and we basically do the same thing as for codeblocks. Other stuff can be put in there as well (crap in, crap out). We do have to optional Title in the ![Alt text](/path/to/img.jpg "Optional title") image as well to consider.

But I think it is worth while to implement this

miekg commented 6 years ago

PR sent: https://github.com/gomarkdown/markdown/pull/100

mb21 commented 6 years ago

Note that we're still involved in a discussion in how to best implement jgm/pandoc#3177. Feel free to participate :-)

Also, the !--- syntax for pandoc native divs was not implemented, but instead:

::: myClass
![GitHub Logo](/images/logo.png)
:::
miekg commented 6 years ago

Thanks for the ping. Note that this isn't like the native div syntax, it's really wrapping images and making them a block level element so classes and other attributes can be added easily, i.e. referencing an image.

On Tue, 11 Sep 2018, 10:39 Mauro Bieg, notifications@github.com wrote:

Note that we're still involved in a discussion in how to best implement jgm/pandoc#3177 https://github.com/jgm/pandoc/issues/3177. Feel free to participate :-)

Also, the !--- syntax for pandoc native divs was not implemented, but instead http://pandoc.org/MANUAL.html#divs-and-spans:

::: myClass GitHub Logo :::

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mmarkdown/mmark/issues/1#issuecomment-420212123, or mute the thread https://github.com/notifications/unsubscribe-auth/AAVkWzymFxOldODB6wPGxlBvPY2nTYgrks5uZ4TJgaJpZM4Vn2gT .

miekg commented 6 years ago

This has been included in mmark