> > However, this may be a case where it could help to control the Sphinx > extensions via Pandoc's extensions mechanism, e.g. '-f rst-sphinx' to get > the docutils behavior? > That's a good idea! At first I was reluctant to add extensions for things that are specific to a single input format, but it seems there are already some language-specific extensions so this should not be a problem. I am willing to try and implement the rest of them then. Here are the ones that I find relevant: - note - warning - seealso? - rubric - hlist - literal-include - glossary? - tabularcolumns? And roles: - term Let me know if there is more I should know about. Le jeudi 13 février 2020 11:37:20 UTC+1, latk a écrit : > > From the perspective of a Pandoc user, adding more Sphinx extensions would > be extremely useful. Most RST documents seem to target Sphinx, and many of > the extensions are also really convenient. > > However, this may be a case where it could help to control the Sphinx > extensions via Pandoc's extensions mechanism, e.g. '-f rst-sphinx' to get > the docutils behavior? > > On Thu, 13 Feb 2020 at 10:30, Lucas Escot > wrote: > >> Hello everyone, >> >> I just implemented the highlight directive >> >> to the pandoc rST reader. >> This allows one to specify the default language to use when highlighting >> literal blocks. >> It is especially useful when writing rST in a literate agda or literate >> haskell file, where it is undesirable to have to specify the language at >> every code block. >> >> .. highlight:: haskell >> >> From now on code will be highlighted as haskell:: >> >> data Tree = Leaf | Node Tree Tree >> >> An other exemple too show how terse using literal blocks becomes:: >> >> main :: IO () >> main = putStrLn "Hello World!" >> >> We can change the language at any point in the document. >> >> .. highlight:: python >> >> So this block contains python code:: >> >> def main(): >> print("OK") >> >> An we can still disable having a default language: >> >> .. highlight:: >> >> This directive comes from the Sphinx extended rST (which argueably is one >> of the most popular use case of rST out here, see readthedocs.io), >> this is why I am wondering *what is your stance on adding directives to >> the pandoc reader?* (which are not specified in the docutils reference) >> >> My opinion is that such an addition is quite reasonable, and most people >> use rST with sphinx and are therefore accustomed with said directive >> already. >> >> You can see my implementation here: https://github.com/flupe/pandoc >> >> If you all agree it can be merged, what is the process? Should I create >> an issue mentionning the problem or just make a PR? >> >> Best, >> Lucas >> >> -- >> You received this message because you are subscribed to the Google Groups >> "pandoc-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org . >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/pandoc-discuss/9e025799-6d50-40a9-b8ab-a075437cb2b9%40googlegroups.com >> >> . >> > -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/ef12ef00-1ff4-4b45-81fc-c8bfb2262efe%40googlegroups.com.