cl-cookbook icon indicating copy to clipboard operation
cl-cookbook copied to clipboard

Format problems in epub version of cookbook: Can not open in emacs nov.el

Open johanwiden opened this issue 3 years ago • 3 comments

I can read the epub version of the cookbook in Okular, but not in emacs nov.el. I wondered about that so I installed the freely available tool epubcheck (available at least in Ubuntu), https://github.com/w3c/epubcheck. It found one fatal error, and 139 non fatal errors. FATAL(RSC-016): common-lisp-cookbook.epub/ch031.xhtml(407,10): Fatal Error while parsing file: The element type "br" must be terminated by the matching end-tag "".

johanwiden avatar Aug 25 '22 14:08 johanwiden

Perhaps this project needs a set of (automatic) tests, at least sanity checks? One such test could be to build PDF and EPUB versions of the document and then run format checkers on them.

johanwiden avatar Aug 25 '22 15:08 johanwiden

I believe I solved the problem: There are two empty fields in metadata.txt: "identifier" and "publisher". If I remove these fields, and then generate the epub, then emacs nov.el can display the document.

Another, unrelated, bug: In README.md, the line Run gem install bundler -v 1.17.3 to install bundler. should be Run gem install bundler -v 2.1.4 to install bundler. (The version listed at the end of Gemfile.lock)

johanwiden avatar Aug 27 '22 09:08 johanwiden

Hi, thanks for the good pointers.

I fixed the missing metadata fields and reduced a little the number of non-fatal errors, but I was unable to try nov.el. Is this file good https://github.com/LispCookbook/cl-cookbook/releases/download/2022-08-30/common-lisp-cookbook.epub ?

vindarel avatar Aug 30 '22 09:08 vindarel

Yes, this file seems to work fine in nov.el. I looked at perhaps ten different sections. Thanks for fixing this!

Den tis 30 aug. 2022 kl 11:51 skrev vindarel @.***>:

Hi, thanks for the good pointers.

I fixed the missing metadata fields and reduced a little the number of non-fatal errors, but I was unable to try nov.el. Is this file good https://github.com/LispCookbook/cl-cookbook/releases/download/2022-08-30/common-lisp-cookbook.epub ?

— Reply to this email directly, view it on GitHub https://github.com/LispCookbook/cl-cookbook/issues/459#issuecomment-1231434394, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOF7OOX7UIEJHWFDE3NIRLV3XKQRANCNFSM57TNGOPA . You are receiving this because you authored the thread.Message ID: @.***>

-- Johan Widén, tel: +46705367346 Risvägen 5 A, 192 73 Sollentuna, SWEDEN

johanwiden avatar Oct 11 '22 08:10 johanwiden

Fixed thanks to your PR.

vindarel avatar Nov 29 '22 09:11 vindarel