skiadas / md2ptx

1 stars 2 forks source link

Possibility of using unified and mdast? #3

Open oscarlevin opened 12 hours ago

oscarlevin commented 12 hours ago

Just wanted to throw it out there that I'm going to be trying to use the unified framework for translating LaTeX to pretext. Assuming that I am successful, that would probably make converting other unist format conversions easy. So the workflow would be to parse markdown to a mdast, then convert the AST to a xast with proper pretext elements and attributes, and then stringify the resulting xast. The first and third steps are automatic, and the middle step would be very similar to what would happen for translating a latex-AST to xast.

Whether I can figure out how to do the middle step is yet to be seen.

skiadas commented 12 hours ago

That sounds promising! Does there need to be a more specialized version for xast for PreTeXt, or would there be any benefits to such a thing?

oscarlevin commented 11 hours ago

That's a good question. I'm not sure yet whether there would be benefits. I'm curious whether other XML specifications have done anything like this (well, other than HTML, obviously).