<pre> is disastrous.
On many devices, the text will go flying off the edge of the screen.
Or if you're trying to read on a small/skinny device, like a cellphone, the linebreaks make it impossible to read.
Some of this <pre> discussion happened way back in:
but it hasn't been brought up on MobileRead in a very long time...
I remember <pre> used to be discussed often in the olden days, but I can't find those topics now.
Everyone probably collectively agreed how awful it was and hasn't brought it up since.
- - -
Side Note: And I swear I wrote a post on "code blocks" + syntax highlighting in ebooks... maybe that was in a personal email/rant I did to Hitch
years ago.
There was this one programming ebook where I argued replacing every block with SVG and/or high-resolution PNGs generated directly from the source code... using something like
LaTeX's minted to go from:
- raw code
- -> custom-sized PDF
- -> SVG or PNG.
This would allow you to generate line numbers and have much more complicated layout/breaks, without the need for Javascript or CSS3 overflows or any of that stuff (that wouldn't work on 99% of ereaders).
Not very Accessible, but at least it would be readable on nearly everything.
(Pinch/zoom on PNGs and/or perfectly laid-out+crisp text SVGs.)
(Reminds me of that 2014 topic on
SVG Charts/Tables.)