This template shows how you can use the apa6 package to write a manuscript in the style of the sixth edition of the Publication Manual of the American Psychological Association, which is widely used in the social sciences.
The template includes an example bibliography that shows how to automatically generate APA-style citations and bibliography entries. Please see the apa6 package documentation for more information.
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.