11-04-2010, 11:33 AM | #1 |
Addict
Posts: 202
Karma: 10802
Join Date: Sep 2010
Device: Kindle Paperwhite, iPhone 5, iPad Air, Nexus 7
|
[Quick Tip] - copying from plain text
You will notice that copying content from a plain text file and then pasting it into Sigil causes a bit of a mess. What happens is it puts <p>..</p> tags around each line! This means each new line has a blank line.
Consider the following text from a plain text / ASCII document: Code:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras scelerisque, nunc et bibendum tempus, enim lectus sodales urna, id sodales metus erat eget velit. Nulla facilisi. Cras diam turpis, scelerisque et fringilla sit amet, adipiscing quis ipsum. Aenean enim felis, lobortis in auctor faucibus, dapibus ut metus. Praesent sed arcu at lorem luctus tempus non nec purus. Aenean tristique, quam at tristique luctus, magna enim auctor leo, ac blandit neque felis id nunc. Sed eget tortor nec lectus tristique facilisis eget ut mauris. Nunc vitae faucibus nisi. Quisque auctor nulla in quam fermentum sed vehicula nulla commodo. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam eu diam in mauris malesuada sollicitudin. Scenario 1: You want to maintain fixed width Not always a good idea with eBooks. If you happen to be reading on a small screen device such as a mobile and have a large font causing the end of each line to be cut off, the text will not flow nicely. However in some cases, text is formatted in fixed width for a reason, aesthetic or otherwise. If you want to maintain this formatting, follow these steps: 1) Switch to Code or Split View. 2) Hit Ctrl-H or go to Edit | Replace. 3) "<br />" replace with "". 4) "<p>" replace with "". 5) "</p>" replace with "<br />". The result should look exactly like your plain text format! Scenario 2: Get rid of word wrap/fixed-width but keep blank lines between paragraphs This is much more suited for ebooks, flows well and caters for font size changes. But breaks the formatting/width size of the original source. 1) Switch to Code or Split View. 2) Hit Ctrl-H or go to Edit | Replace. 3) "<p>" replace with "". 4) "</p>" replace with "". 5) "<br />" replace with "<br /><br />" Last edited by neonbible; 11-04-2010 at 11:44 AM. |
11-04-2010, 11:35 AM | #2 |
Addict
Posts: 202
Karma: 10802
Join Date: Sep 2010
Device: Kindle Paperwhite, iPhone 5, iPad Air, Nexus 7
|
Just thinking about it, not sure if getting rid of <p> tags is bad practice?
|
Advert | |
|
11-05-2010, 01:23 AM | #3 |
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
|
11-05-2010, 03:59 PM | #4 |
Addict
Posts: 202
Karma: 10802
Join Date: Sep 2010
Device: Kindle Paperwhite, iPhone 5, iPad Air, Nexus 7
|
I think if you save it as an epub after, it will automatically put in the <p> tags.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
convert plain text to other formats ? | Joebill | Other formats | 6 | 05-10-2010 11:10 PM |
Using MS Word to quick-reformat text | steven522 | Ectaco jetBook | 1 | 02-26-2010 11:02 AM |
Quick tip for ANY hack on a Kindle | Rootman | Kindle Developer's Corner | 2 | 12-05-2009 09:04 PM |
A java/Groovy program to convert plain text into pdf for eslick | dracodoc | 1 | 04-12-2009 09:29 AM | |
Quick Tip: Make A Windows Instructional Video | Bob Russell | Lounge | 1 | 02-13-2005 07:23 AM |