Showing posts with label ePub. Show all posts
Showing posts with label ePub. Show all posts

Reading scientific pages on Kindle

When reading science (math) pages, the large screen (2K or 4K) is the best,
but I would like to have the whole library of papers in my pocket on Kindle.

I can send via email a PDF of any page to Kindle, but the PDF reading on a small Kindle device is awful. 

The same on Kindle Scribe might be a bit better, but in the end, I want font-scalable ePub.

Let's take an example from the following Wikipedia page as it has nice mathematics:

https://en.wikipedia.org/wiki/Spherical_coordinate_system


Pretty much every tool I have tried does convert HTML but fails to convert the math,

in-line LaTEX math seems to work fine, 



but the vector-graphic .svg does not:




I do have to consider that MAYBE it is the viewer that does not display Vector Graphics (.svg)!

Here is a list of tools I have tried:

WebToEpub Chrome extension

  • Shows tables nicely
  • shows images nicely
  • converts LaTEX math YES
  • SVG NO, shows them as "?", it might be the viewer's problem, I tried a few
    • Calibre E-book viewer
    • Kindle 7-inch 2022
    • Apple Books
    • Apple Preview - does not open ePub

EpubPress

  • Creates a table of Contents with each Web page included, useless if converting a single page
  • fails to convert table borders
  • converts LaTEX fine
  • drops (does not display) the Vector Graphics (.svg) 

dotEpub

  • in the non-immerse mode, you can view the first few images only
  • results in an error on Apple books
  • fails to convert table borders
  • converts LaTEX math YES
  • on Kindle: SPELLS OUT the SVG formula, not good.
  • in Calibre E-book viewer shows SVG nicely!


Summary 

  1. Use print-to-PDF and view it in MacOS Preview on a big screen
  2. If you read a long MATH and NO-image page, use dotEpub and read in the Calibre E-book viewer
  3. If you want images, but you do not care for SVG math, WebTOEpub is best.
Sorry, no winning here.


View Kindle Scribe on Amazon: https://amzn.to/4db51Q7


As an Amazon Associate I earn from qualifying purchases.

How to write a Math or Data Science eBook?


When studying, I like to take notes, usually, I do it on my Blog, but often I use Jupyter notebooks which I commit to GitHub. If I am writing a paper I use Google Docs. Having my writing in 3 different places is not optimal. 
On top of that, using math formulas complicates things as it is not supported everywhere.

Example of a formula written using LaTeX:

$$ LogLoss = - \frac{1}{n} \sum_{i=1}^{n}
( y_i \cdot log(\hat{y_i}) + ( 1 - y_i ) \cdot \log(1 - \hat{y_i}) ) $$

So, how should I write a Math, or a Data Science, eBook?

First, publishing papers as PDF is most common, I read tons of them, but they are hard to digest unless you print them, or view them on a big screen. I do not want to sit in front of the computer any longer than I already do.  I like using Kindle reader, so an eBook format is much more user-friendly. I can set font sizes, and spacing, take notes, etc. The PDFs on Kindle are a really bad experience. Also, I would like to distribute my papers over the Amazon Kindle store (for free or not). Not everyone has a university or a work subscription to access papers on ieee.org, sciencedirect.com, proquest.com, etc.




Below, I will investigate different approaches and hopefully, come to a good conclusion.

How to send documents to Kindle:
  • Every Kindle account has an associated (secret) email, you can attach a file to it and it will show in your Kindle.
  • Make sure the file name is human-readable!
  • HTML (export from Jupyter Lab) sent to Kindle:
    • PRO:
      • it is readable, good for text-only pages
    • CON:
      • LaTeX is not converted to math formulas
      • Images are missing
  • PDF (of the same HTML) sent to Kindle:
    • PRO:
      • images show up
      • LaTeX formulas show up
      • good enough to publish a "paper"
    • CON:
      • still the problem with PDF in general -- no font size adjustment
  • ePUB (of the same HTML) sent to Kindle:
    • conversion is done with convertio.co
      • PRO
        • font adjustable
        • plots included
      • CONS:
        • missing images
        • LaTeX not converted to math formulas 
    • conversion with  calibre-ebook.com

Is Blogger (Blogspot) good for writing papers and articles?

Pro:
  • searchable 
  • easy to manage and edit
  • use of tags (labels) for finding related articles
  • support for LaTeX math notation
Cons: 
  • No good ways to "clean" export to ePub, PDF, or Markdown
    • I could write embedded JavaScript in Blogger that creates "print" version of article text only

Using Jupyter Notebook

Pro:

  • inline and current code (Julia, Python)
  • incline and current plots 
  • export to HTML, PDF, Markdown with pandoc.org/
Cons
  • no spellcheck while writing (Grammarly)
    • conda install -c conda-forge jupyterlab-spellchecker
  • GitHub Diff is garbage

How to install brew?

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

How to install pandoc? 

[see reference 5]
brew install pandoc


[see reference 1]


Using Markdown

Pros:

  • GitHub diff is readable


Using Google Docs

Pros:

  • Available on all devices, online and offline


[see reference 2]



References

  1. https://towardsdatascience.com/transform-jupyter-notebook-to-an-ebook-ef3a9d32ac4f
  2. https://workspace.google.com/marketplace/app/autolatex_equations/850293439076
  3. https://tug.org/mactex/mactex-download.html
  4. https://nbconvert.readthedocs.io/en/latest/install.html#installing-tex
  5. https://pandoc.org/installing.html



As an Amazon Associate I earn from qualifying purchases.

#book: ebooks


Having been a long-time user of Kindle and Nook, I end up using Google Books most of the time, here are some reasons:

  • Amazon Kindle does not support ePub which is a most common format
  • Barnes and Noble Nook does not allow to upload new books to the cloud and from there to the Nook via WiFi
  • Only Google Books allow reading the text using the Android system voice (TTS)
  • For Google Books adding newly purchased books is as simple as clicking "Upload files"



To manage my eBooks I use:


As an Amazon Associate I earn from qualifying purchases.

ebooks


Having been a long-time user of Kindle and Nook, I end up using Google Books most of the time, here are some reasons:

  • Amazon Kindle does not support ePub which is a most common format
  • Barnes and Noble Nook does not allow to upload new books to the cloud and from there to the Nook via WiFi
  • Only Google Books allow reading the text using the Android system voice (TTS)
  • For Google Books adding newly purchased books is as simple as clicking "Upload files"



To manage my eBooks I use:


As an Amazon Associate I earn from qualifying purchases.

apt quotation..