small medium large xlarge

Generic-user-small
23 Jul 2011, 16:26
Colin Jack (11 posts)

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.

Dave_gnome_head_isolated_pragsmall
23 Jul 2011, 23:36
Dave Thomas (390 posts)

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.

Generic-user-small
26 Jul 2011, 09:43
Colin Jack (11 posts)

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.

Generic-user-small
23 Aug 2011, 12:05
Conor O'Dwyer (3 posts)

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.

Djk-headshot_pragsmall
29 Aug 2011, 18:55
David J. Kelly (9 posts)

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.

Generic-user-small
31 Aug 2011, 13:35
Conor O'Dwyer (3 posts)

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!

Me_pragsmall
31 Aug 2011, 15:25
Joao Alberto Vortmann (2 posts)

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?

Generic-user-small
31 Aug 2011, 16:06
Conor O'Dwyer (3 posts)

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.

You must be logged in to comment