hendricius / the-sourdough-framework

Open source book dedicated to helping you to make the best possible sourdough bread at home.

Home Page:https://breadco.de/book

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ebook does not work on Kobo

cedounet opened this issue · comments

As reported on discord:
Kobo Libra H2O and original Kobo H2O from 2014 do not display the ebook correctly.

Hello @sha1sum and others with a Kobo reader.

AS discussed if you could test each commit on https://github.com/hendricius/the-sourdough-framework/tree/kobo and let me know if that breaks and which one breaks it?

The makefile has been modified so simply running make will build an epub for you.

There is nothing funky in it right now... but still gettihg errors from epubcheck

Thanks in advance,

C

I just gave a test to commit 6620ccc the book already can't be opened in my Kobo ereader. The only text in the epub is (verified with SumatraPDF / Calibre):

If you’re a hobby brewer, you’ll know that it’s important to keep your
beer at certain temperatures to allow the different amylases to convert
the contained starches into sugar. This test, called the Iodine Starch Test,
involves mixing iodine into a sample of your brew and checking the
color.

Thanks very much @Apostolique . That is super useful... this is a tool problem, we need to start with.

5f22332 really has the minimum... if that one fails then we need to report a bug to tex4ht folks.

This one worked!

It looks like there's an issue in \usepackage{sourdough}

Adding that line back by itself prevents kobo from reading the book.

I was also able open in kobo with this tex4ebook.cfg:

\Preamble{xhtml}
\ConfigureToc{loc}{\HCode{<span class="lofToc">}}{\ }{}{\HCode{</span><br />}}
\begin{document}
\Configure{DocumentLanguage}{en}
\Configure{OpfScheme}{URI}
\Configure{UniqueIdentifier}{https://the-bread-code.io}
\Configure{AddCss}{book-ebook.css}
\Configure{CoverMimeType}{image/jpeg}
\CoverMetadata{cover/cover-page.jpg}
\EndPreamble

I don't actually see the cover in kobo though. Not sure if that's intended.

Note that I didn't include:

\renewcommand\listofflowcharts{%
\chapter*{\listoflocname}%
\TableOfContents[loc]%
}

I guess that depends on the sourdough package? It refused to compile with it.

Ok added some more... none of my code in sourdough.sty just packages right now. Let me know if that works, if not we need to find the culprit.

Latest 07c8ec9 shows no error/warning with epubcheck... I take it as a sign. 😸

Ok, I was able to figure it out. Turns out the issue was with \usepackage{enumitem} (btw this line was there twice for some reason). I removed both lines that had that package.

I compiled the book from the main branch with no other changes and my kobo was able to read it.

It was here for a reason though, (at least the first time) the interesting bit is that I explicitly escaped a command for tex4ht. I will make a new branch which would be nice if you could test it.

PS: stating the obvious but breaking the pdf is not an option.

@Apostolique tentative work-around at https://github.com/hendricius/the-sourdough-framework/tree/fix-kobo let me know if that works.

Also if you can get an MWE that generates an epub working but does not on Kobo, I am sure @michal-h21 would appreciate it.

@cedounet yes, it would be nice. We have some basic support for enumitem, but it is of course possible that you use some options that break TeX4ht somehow.

I am making the book from the fix-kobo branch now. Will let you know.

@cedounet @Apostolique the fix-kobo branch's epub worked great on my Kobo! Some of the pages take a while to change depending on what's on the page, but I haven't had a true freeze and the content looks reasonably good!

image

image

Awesome! Thanks very much. Did you test both colour and black&white ?

I just used the build_ebook target, so whichever that uses. Let me see if I can bake everything.

That would be the colour version you can do build_bw_ebook now or simply bake if you also want the pdfs.

c

I'm still getting an error when attempting to make bake:

Output written on book_sans_serif.pdf (167 pages, 61206628 bytes).
SyncTeX written on book_sans_serif.synctex.gz.
Transcript written on book_sans_serif.log.
Latexmk: Getting log file 'book_sans_serif/book_sans_serif.log'
Latexmk: Examining 'book_sans_serif/book_sans_serif.fls'
Latexmk: Examining 'book_sans_serif/book_sans_serif.log'
Latexmk: Found input bbl file 'book_sans_serif/book_sans_serif.bbl'
Latexmk: Log file says output to 'book_sans_serif.pdf'
Latexmk: Bibliography file(s) form .bcf file:
  ./references.bib
Latexmk: All targets () are up-to-date
Latexmk: Undoing directory change

make: *** [bake] Error 2

That would be the colour version you can do build_bw_ebook now or simply bake if you also want the pdfs.

c

There seems to be no build_bw_ebook target.

Oh I see it's just not exposed to the outer makefile

@cedounet yeah it's way, way faster than the color on the Kobo!

Oh I see it's just not exposed to the outer makefile

Yeah sorry, so used to native builds myself.

on the error messages, looks like the build went fine but make isn’t happy about something else.

There are graphics / images that are unreadable. Flowcharts overflow the bounds of my device, for example, for flowchart 4 and 5 I can only see something like this:
image
image

Figure 5.1 is unreadable on my Kobo. The image is too blurry.