title_body: How to make a basic ebook with chapters
upvoted_answer: Pandoc can convert from and to a large number of formats:
  
  
  It can read plain text, Markdown, CommonMark, PHP Markdown Extra, GitHub-Flavored Markdown, MultiMarkdown, and (subsets of) Textile, reStructuredText, HTML, LaTeX, MediaWiki markup, TWiki markup, Haddock markup, OPML, Emacs Org mode, DocBook, txt2tags, EPUB, ODT and Word docx
  it can write plain text, Markdown, CommonMark, PHP Markdown Extra, GitHub-Flavored Markdown, MultiMarkdown, reStructuredText, XHTML, HTML5, LaTeX (including beamer slide shows), ConTeXt, RTF, OPML, DocBook, OpenDocument, ODT, Word docx, GNU Texinfo, MediaWiki markup, DokuWiki markup, ZimWiki markup, Haddock markup, EPUB (v2 or v3), FictionBook2, Textile, groff man pages, Emacs Org mode, AsciiDoc, InDesign ICML, TEI Simple, and Slidy, Slideous, DZSlides, reveal.js or S5 HTML slide shows. It can also produce PDF output on systems where LaTeX, ConTeXt, or wkhtmltopdf is installed.
  It can create epub files with chapters see here for instructions.
  It runs on Linux, Windows &amp; OS-X
  It is free, gratis &amp; open source
  You can even point it at a URL and it will do a reasonable job of converting the online resource into an epub.
  
  
  If are ready to take a little more time on preparation then the python Sphinx document generator can produce EPUB format, organised into chapters, from a number of input formats, including plain text.
  
  
  Also free, gratis &amp; open source