Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Markdown Admonition Support #2610

Open
dcode opened this issue Dec 31, 2015 · 10 comments
Open

Add Markdown Admonition Support #2610

dcode opened this issue Dec 31, 2015 · 10 comments

Comments

@dcode
Copy link

dcode commented Dec 31, 2015

I'd like to see support for the Python Markdown extension for admonitions (docs]. This may be related to #223, but that issue is quite old. The transformation to HTML can follow the same model as the existing Python module. For LaTeX, and this can work for from DocBook too, create a minibox environment.

@Skrylar
Copy link

Skrylar commented Jan 30, 2016

Tossing a +1 on this one. One of the reasons I still use asciidoc[tor.rb], since admonition blocks aren't available (even though bibliography support is better in pandoc.)

@jgm
Copy link
Owner

jgm commented Jan 31, 2016

It's not too hard to add admonition support to stock pandoc with
a filter.

+++ Skrylar [Jan 30 16 04:26 ]:

Tossing a +1 on this one. One of the reasons I still use
asciidoc[tor.rb], since admonition blocks aren't available (even though
bibliography support is better in pandoc.)


Reply to this email directly or [1]view it on GitHub.

References

  1. Add Markdown Admonition Support #2610 (comment)

@anayrat
Copy link

anayrat commented Aug 24, 2016

👍

1 similar comment
@tcmaps
Copy link

tcmaps commented Mar 15, 2017

+1

@Wolf-SO
Copy link

Wolf-SO commented Jun 29, 2017

It's not too hard to add admonition support to stock pandoc with
a filter.

@jgm How could such a filter look like?

@jgm
Copy link
Owner

jgm commented Jun 29, 2017 via email

@daamien
Copy link
Contributor

daamien commented Oct 22, 2017

https://github.com/chdemko/pandoc-latex-admonition

@ManuelSelva
Copy link

ManuelSelva commented Jul 15, 2021

Hi, I also would like to have admonition support. The reason for that is that I use things like

!!! question "Question 1"

I tried the pandoc-latex-admonition filter mentioned above but it has no effect when generating latex document from markdown ones with admonition triple exclamation mark. Does any one successfully did that ?

@mb21
Copy link
Collaborator

mb21 commented Jul 15, 2021

Just to give an update what's currently already possible in pandoc.

  1. use pandoc-native divs and spans, like e.g.:
::: Warning ::::::
This is a warning.

::: Danger
This is a warning within a warning.
:::
::::::::::::::::::
  1. you can modify what they get converted to by writing a pandoc filter.

@ManuelSelva
Copy link

Thank you for the answer.
In my previous comment I forgot to mention my complete scenario : I am currently using triple question marks in markdown file converted to webpages using mkdocs. And this results in a super nice rendering. Now I want to be able to generate also a pdf file from the same markdown file.

I am not familiar at all with pandoc and I don't know what "pandoc-native divs and spans" are, but my question is can I achieve the "website + pdf" rendering goal as I described above ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants