title_body: Format for ebook that contains code What's a good format for making an ebook that contains code. Is markdown a good option or is there something better available? I may want to convert it to ePub/Mobi and PDF later.
  
  Is it a good idea to add custom styles to markdown files? Would these styles play well with softwares like pandoc?
  
  What other options do I have?
  
  Edit
  
  The book is about prolog and will contain mainly these types of structure:
  
  
  Headings- h1, h2, h3 ...
  Paragraphs
  Tables (without headers)
  Indented Text
  Code Snippets
  Big example code blocks which may contain text and code or just code (ranging from 15 to +100 lines). I need these parts to look different from code snippets.
upvoted_answer: Embedding code in EPUB can be accomplished with pure HTML and CSS. The &lt;code&gt; tag and monospace attribute will bring you most of the way. See https://github.com/oreillymedia/HTMLBook for a lot of detail.