Conversions to text and Markdown

16 views
Skip to first unread message

Rob Beezer

unread,
Jul 17, 2026, 10:47:52 PM (13 days ago) Jul 17
to prete...@googlegroups.com
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...
markdown.png

Sean Fitzpatrick

unread,
Jul 19, 2026, 9:12:12 AM (12 days ago) Jul 19
to PreTeXt development
I'm betting that PS is anticipating the predictable question from me about markdown-flavoured Jupyter. 

I still haven't had a chance to test the new conversion. Busy keeping my kids from hitting each other... Flying tomorrow and then I hope things settle down a bit.

--
You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDA0eU40djRQcE0.1784342866%40pnsh.
Reply all
Reply to author
Forward
0 new messages