title_body: Best platform and format for eBook on software/programming I am totally new to eBooks / digital publishing.
  
  I want to publish a book on a software/programming topic. It makes zero sense for it to be paperback, because I want readers to be able to copy and paste code from the book to their software editors. I also would like to include animated GIFs in the eBook, so it's more interactive, etc.
  
  Given the above requirements, does anyone have a recommendation for which platform to publish to and which format to publish the eBook in? I here a lot of people use MS Word to write the eBook and export to PDF. But I don't think PDF supports GIFs, so I think I am looking for something else.
  
  It's 2018, I want to publish an eBook with GIFs/animations!
  
  If someone could add the following tags to this question:
  
  gif, animation
  
  that'd be great...
upvoted_answer: I suggest you of using LaTeX for such work. LaTeX handles multiple types of documents, text and media environments (complex equations as well as images, videos, plots, program source code (you can find packages to provide syntax highlight)), languages. You can also meaningfully use a Version Control System with its source code (like Git). And the end, you can export your book as PDF, PostScript, or other formats.
  
  There are compilers and integrated editors for every major desktop operating system, for example, various Linux Distributions, Windows, or even macOS.