Most of the code examples don’t display nicely on the kindle currently and I was wondering if this was someone you plan to address.
The problem is that the only control we have to to say “wrap or don’t wrap”. If we don’t wrap, then we chop off long lines, If we do wrap, we render the code incorrect. And, if we wrap, we can’t control where the Kindle wraps, so we can’t do anything intelligent like add continuation characters.
It’s hard to know what to do.
Does sound difficult. Only thing I’d say is on kindle at least I’d rather see all the content even if the resulting code isn’t strictly correct, but that could just be me.
on task A when generating scaffolding for products, the code has a ‘' and when adding a row attribute to the description, the value to enter is missing in the kindle format, the kindle book seems to have more than formatting problems in the latest version. Earlier beta version didn’t have this problem as I am rereading the tasks having done the a few of them using the beta version of the book.
Conor, are you asking for content to be added to the book? I’m not certain what you mean by adding a row attribute to the description, as I don’t see anything about row attributes in Task A/Generating the Scaffold. I do see the \ character, and it appears that all of the code content in the PDF is also present on the Kindle, aside from a couple of characters being cut off on the right.
We are currently preparing an update of this book, which should be out this week. The code will now be wrapped so characters are not cut off, and all the content will be visible without the need to scroll horizontally. If there are formatting issues causing the problem, hopefully this will take care of it. If not, please let me know.
Thanks David for addressing my post and acting on the issue I highlighted.
Just to clarify. My original post didn’t request additional content but correction of existing content. There were two issues.
The ‘TaskA/Generating Scaffold’ command which contained (still in p2 edition just realeased) a typo ‘' this character is not part of the correct command [example of correct command is here http://guides.rubyonrails.org/getting_started.html Point 6 Creating a resource]
Wrapping of the text for the code examples, ‘adding a row description’ was another example where the loss of a few characters on the right of the page caused confusion for a neweby. This is fixed in the latest release.
Pragprog forums are a great resource and thanks for such great ebooks (rails/ruby), I am loving the updates!
Would it be possible to run a preprocessing phase when generating the mobi version where the code formatting would be changed, so the the ruby code itself wouldn’t be cut?
From a very quick scan of the code in the latest version of the book, the code is being wrapped correctly so its just point 1 from my above post which needs to be fixed, its a minor typo (‘') anyway which neweby’s [me] should be able to figure out.
I don’t think its realistic on a 6 inch kindle to have the ruby code without some wrapping/cutting. 9 inch model I guess wouldn’t very much wrapping/cutting of the code.