Am 27.07.25 um 21:57 schrieb Hans Hagen via ntg-context:
Hi Hraban,
If it works and adheres to the necessary structure, I’ll add it to the list of installable modules. I don’t judge usefulness.
We should appreciate efforts so indeed no judgements (unless of course something doesn't fit into context or is overloading or conflicting with existing functionality but that is hard to determine and we have no time to check code anyway.)
I’d use Pandoc to convert Markdown to ConTeXt, if it’s just one-time, like: pandoc -f markdown -t context --template=mytemplate.tex pandoc- example.md > example.tex
And if it is one-time then I suppose you do some cleanup and adaptation?
Yes, because I like clean, semantic code, and that’s not what you get from an automatic conversion. But if you don’t need more than Markdown offers, then the Pandoc-ConTeXt route is simple and usable.
(Make me wonder, does converting to e.g. xml or docbook give a more rich starting point? After all we can handle that.)
I guess Götz would vote for Asciidoc as the best source format. I don’t think another conversion makes sense. If you have clean XML sources (e.g. HTML), then of course it makes sense to use them. But either they already contain all the necessary metadata (see Massi’s projects how difficult that can get), or you must convert to ConTeXt and edit. That’s what I usually do with my docx2ctx workflow. If I control and carefully edit the source (docx/ods) document, I don’t need to edit the tex code afterwards. At least _I_ can’t do that with directly processing the XML in one of these word processor formats, they need too much cleanup. Keith told us at the meeting in Lutten how he converts from ODS to ePub and processes the HTML from that with ConTeXt. (It’s also in the upcoming journal.) At least that’s easier than parsing office XML.
Otherwise, Aditya’s filter module covers most cases of inclusion of text-based formats: https://github.com/adityam/filter
I found back some old m-markdown files (more a historic thing as i never was much into markdown apart from once speeding up and mem-fixing some third party lua code) so i'll add these to the distribution which then means that with the proposed new module users then have plenty possibilities. It reminds me that we need to follow up on the asciidoc presented at meetings in order to get the repertoire covered.
I once had the markdown module in my list and wondered where it went. ;) Hraban