Book Template for Amazon KDP and Google Play (e-book and PDF)
This template allows you a quick start creating books with LaTeX that you can directly publish on Amazon or Google as e-book or printed edition. Check out the accompanying book "Better Books with LaTeX" for step-by-step instructions for this template: https://amzn.to/2AEtMpK
LaTeX ePub / eBook Template
This document shows how you can get ePub/eBook-like formatting in LaTeX with the memoir document class. You can't yet export directly to ePub from writeLaTeX, but you can export to PDF. To get ePub, you can download the LaTeX source from writeLaTeX and run it through a format conversion tool, such as htlatex to get HTML, and then go from HTML to ePub with a tool like Sigil or Calibre. See this thread on Stack Overflow for more advice.
Template for Ebook-Reader
This template makes easy to generate PDF file to read it on Ebook-Reader. In fact I'd trained it on Kindle, so perhaps it would be reasonable to correct the margins if needed.
The main problem with PDF's on 6-inches screens is lack of PDF-reflow function, or this function working badly. Why not just generate the PDF file well-fitted to the screen?