One more conversion and I think I am done for the current push. There has
always been a middling attempt at a conversion to text. Yes, that's a little
crazy, but it has its uses. And the idea that a switch could produce Markdown.
Several more long sessions with my assistant and we have a very good start.
Dual-purpose, plain text and Markdown. Unicode characters, with an option
(publisher file) to use 7-bit ASCII. Available now with the pretext/pretext
script.
Of course, we cannot work miracles. Yet. You will get what you might expect.
For example, for an #image, the text conversion will use your #description
and/or #shortdescription. A promise of markdown is that you don't need a
renderer to read it. That may be true of our conversion's result, but we are
working on teh assumption that your output will be read with a renderer. So
there is a bit of generally-supported HTML about (images, cross-references) and
math/LaTeX is marked up for MathJax. Specification is CommonMark, plus "piped"
tables. Now an image will render, be sized properly, and if you have very
skinny margins it might snap to the edge, else it is centered.
Your renderer of choice *will* make a difference. I'm using "retext" (ReTeXt?)
on Linux, and have turned on its "WebEngine Renderer" - and that gets me MathJax
support (v2.7.9!). See attached.
My assistant suggests that you could put your entire book, as our Markdown
output, into your repository and it would be readable as folks browse your
book's repository online. Not GitHub Pages, nor
github.io, your repository at
github.com. Not saying that is a great idea, but it is tantalizing.
See
https://github.com/PreTeXtBook/pretext/pull/3051
and
Chapter 36: Conversion to Text and Markdown
https://pretextbook.org/doc/guide/html/text-markdown.html#text-markdown
Rob
PS @Sean - I have plans for all the templates implementing Markdown...