attempting epub conversion

20 views
Skip to first unread message

Bruce Yoshiwara

unread,
Dec 7, 2020, 2:27:04 PM12/7/20
to PreTeXt support
I am interested in checking out conversion to EPUB (even though it is not supported). I’ve copied what seemed relevant from the examples/epub directory, installed mathjax-node-page (I think), and run the build.sh script (after modifying a few paths). 
I do get a sampler.epub file (55.2 MB? in a tmp/scratch/epub subdirectory) which I can view in an E-book viewer on my computer. But the Chapter 3 A Bit of Math page does not show any of the math. And when I convert the epub file to a mobi file (326.6 kB), the many complaints include lines like, 
qt.svg: link #glyph0-1 is undefined!
So I probably do not have the right set-up in mathjax-node-page to get the conversion of math to svg images.
Running the script does include PTX warnings about needing to set baseurl and that xsl conversion alone is not sufficient to create an EPUB. I did set baseurl in my publication.xml file and tried xsltproc using pretext-epub.xsl, but the only obvious output was a mimetype file.
Another output, common to both running the build.sh and the xsltproc, was several lines that began with:
<?xml version="1.0" encoding="UTF-8"?>
followed by other stuff including <image ... /> tags for the images in the sampler. 
I tried inserting that stuff in a file image-list.txt  (which is a filename mentioned in a different warning message), but it had no evident effect on the sampler.epub file.

Rob Beezer

unread,
Dec 7, 2020, 3:13:49 PM12/7/20
to pretext...@googlegroups.com
Dear Bruce,

That sounds like good progress. It'll be tomorrow afternoon before I can provide much more detail. Also, image management is changing to be more robust and it is possible recent changes for testing are complicating matters temporarily. Finishing that is my second priority the next couple weeks.

pretext/pretext script should be the way to go now, not the bash build script. It has a "math" component (-c) that will build a file of representations, which can be used as a test of MathJax/SRE. I believe this is documented right now somewhere in the publisher file. Note this means *not* using matjax-node-page, which has been replaced by a custom script we include.

Sorry we are changing horses in the middle of the stream. A lot of work has gone into making this more reliable and I'm anxious to finish it up and get it documented as fully supported. So post here early when the going gets rough.

Not sure about a conversion to MOBI. Mitck K is keen to convert to Kindle.

Rob

Bruce Yoshiwara

unread,
Dec 7, 2020, 3:18:35 PM12/7/20
to PreTeXt support
Dear Rob,

Sounds good. 

The only reason I tried to convert to mobi is that I hear a Kindle can read the mobi format (but not epub).

Cheers.

Bruce

Rob Beezer

unread,
Dec 7, 2020, 5:25:42 PM12/7/20
to pretext...@googlegroups.com
I could easily make you an EPUB of the Sampler (in a day or two) that you could experiment with. Let me know if you'd like me to do that, and I'll ship it to you offline.

Rob

BRUCE YOSHIWARA

unread,
Dec 7, 2020, 6:50:21 PM12/7/20
to PreTeXt support
Dear Rob,

Thanks, but I can easily wait for your 2nd priority work changing the image management. 

Meanwhile I'll try to find documentation for using pretext script.

Cheers.

Bruce

--
You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/MTAwMDAyOS5iZWV6ZXI.1607379940%40quikprotect.


--
---------------------------------------------------------------------- 
byosh...@hotmail.com 
Twitter: @byoshiwara 
Blog: http://byoshiwara.blogspot.com/ 
Webpage: https://byoshiwara.github.io   

"The power of accurate observations is commonly called cynicism by those who haven't got it." -- George Bernard Shaw

----------------------------------------------------------------------

Mitch Keller

unread,
Dec 11, 2020, 3:31:06 PM12/11/20
to PreTeXt support
Just chiming in here a bit late to say that we have plans to support an EPUB file that can be uploaded to Amazon's Kindle Direct Publishing for successful conversion to their Kindle format, which an author could sell for $0.00 if they want to give it away for free. MOBI is not going to give ideal appearance on Kindle, so it's not worth much effort to do EPUB->MOBI conversions. The pretext/pretext script has some features in it already for building the Kindle-targeted EPUB file, but I need to get back to improving them.
Reply all
Reply to author
Forward
0 new messages