![]() |
#1 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Apr 2018
Device: Kindle
|
Copying text in Kindle omits line breaks
Using Sigil, I'm writing a book containing program listings which look great. I convert to AZW3 using Calibre. The problem is when I try to copy and paste the code out of Kindle, there are no line breaks. My XHTML and CSS code is as follows:
<div class="codecont"> <p class="codein">Passg = R6Class("Passg",<br/> public = list(<br/> isCrazy = FALSE,<br/> seatAssigned = 0,<br/> seatTaken = 0<br/> )<br/> )</p> </div> p.codein1 { /*display: inline;*/ display: block; margin: 0; padding:0; border-width: 1em; white-space: pre-wrap; font-size: 0.9em; font-family :"Lucida Console";} .codecont { display: block; font-size: 0.790588em; width: auto; border-top: gray solid 0.1em; border-right: gray solid 0.1em; border-bottom: gray solid 0.1em; border-left: gray solid 0.8em; margin: 10px; line-height: 80%; padding: 0.2em 0.6em; |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,055
Karma: 91577715
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
I assume that you wish to publish this as a Kindle book or you would not be going to the trouble of trying to make it work.
Extracting text from an e-book can cause problems, especially for things like software that must not be changed in the process. Also not everyone will have Kindle for PC or Mac. Those using a Kindle e-reader or tablet to read your book will need another way to obtain the sample. I think that you will be better off having an author website that you reference in your book where you can have the code samples available for download by readers. That would also be a good place to advertise your books and yourself as an author. This topic might be a better ft for the Kindle Formats forum. That is where the coding and publishing of Kindle books is discussed. |
![]() |
![]() |
Advert | |
|
![]() |
Tags |
kindle sigil line break |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Line breaks on Kindle, no line breaks on 4 PC | Siavahda | Kindle Formats | 0 | 10-20-2012 05:50 AM |
Find/Replace bogus line breaks in Text editor, w/Regular Expression | scubaddictions | Conversion | 15 | 07-21-2011 08:52 AM |
Weird line breaks on Kindle?!? | echthemoderate | Kindle Formats | 0 | 06-14-2011 10:44 PM |
Kindle 3 PDF Conversion Line Breaks | mvnjpy | Calibre | 3 | 09-26-2010 09:36 PM |
Tool for removing line breaks in text documents | kahn10 | Sony Reader | 9 | 08-22-2010 10:05 PM |