"Insist on proper EPUB files. You will thank me for this"
....once you've found an e-book reader that works properly. Unfortunately there are a lot of bad ones out there.
Even just differentiating code from narrative by styling becomes a major logistical exercise - nevermind attempting some of the more complex typographical feats of daring-do which are run of the mill in technical books such as footnotes, callouts etc.