|
Some conversion tips
A common question that comes up is, what is the best format to save a document in if I want to make it into an ebook for my handheld. The answer is, it depends. If you want to have bold and italicized text or links and the like, then you need to use a format on your PC that will have that information. HTML the standard format used to represent WebPages can work well for this. If you just want to read a book on your handheld though, and you are not worried about bold letters or italics or links or anything like that, the answer becomes simpler. You should save it as a text file. The reason is because most converters can convert a text file directly. So, if you get a file saved into a text file format, you should be able to convert it for whatever reader you want to use on your handheld.
Keeping that in mind, the next question that comes up, is why, when people get a text file from someplace like the Gutenberg project and they try to convert it so they can read it on their handheld, it doesn't come out looking exactly like they expected. It comes out all choppy with the lines breaking at wild places. This is because the Gutenberg Project puts a paragraph/new line marker at the end of each line. This is so when the books are viewed the lines break where they did in the original book. When you move it to your handheld with a narrower screen the lines will get broken at the end of the screen and wherever there is a newline marker.
So what looked like this in a Gutenberg text...
"Prophetic," said the doctor, touching this picture
with his finger. "And now, Master Billy Bones, if that
be your name, we'll have a look at the colour of your
blood. Jim," he said, "are you afraid of blood?"
"No, sir," said I.
"Well, then," said he, "you hold the basin"; and with
that he took his lancet and opened a vein.
Will look something like this on your handheld....
"Prophetic," said the doctor, touching
this picture
with his finger. "And now, Master
Billy Bones, if that
be your name, we'll have a look at the
colour of your blood. Jim," he said,
"are you afraid of blood?"
"No, sir," said I.
"Well, then," said he, "you hold the
basin"; and with
that he took his lancet and opened a
vein.
You probably really want it to look something like this....
"Prophetic," said the doctor, touching
this picture with his finger. "And
now, Master Billy Bones, if that be
your name, we'll have a look at the
colour of your blood. Jim," he said,
"are you afraid of blood?"
"No, sir," said I.
"Well, then," said he, "you hold the
basin"; and with that he took his lancet
and opened a vein.
Or you may even want it to look more like a regular book like this....
"Prophetic," said the doctor,
touching this picture with his finger.
"And now, Master Billy Bones, if that
be your name, we'll have a look at the
colour of your blood. Jim," he said,
"are you afraid of blood?"
"No, sir," said I.
"Well, then," said he, "you hold
the basin"; and with that he took his
lancet and opened a vein.
Some people prefer the text to have no indent and lines between each paragraph like in the first example. Some people prefer no space between paragraphs and an indent at the beginning of each line like a normal book. You can have it whichever way you prefer. You just need to reformat it.
So, what you really want to do is change the text file so there are only new line characters at the end of each paragraph and let the editor/viewer that you are using decide where the line breaks should be. To do this you need to take the Guteberg text file and open it with a text editor that lets you replace/remove newline characters. I like to use VIM, but you can do it in Microsoft Word too if you want. These are the steps I take to get a project Gutenberg text reformatted for my handheld.
How to reformat a text file.
Step 1 - Open the gutenberg text file in your editor
Step 2 - Replace all double newlines with some text that won't be in the book.
I like to use something like azdbewq.
In Word, do a replace all. The newline is represented with ^p. So you will replace ^p^p with azdbewq.
In VIM you can just do a search and replace of newlines at the beginning of a line with :%s/^\n/azdbewq/g
Step 3 - Replace all the single newlines with a space
In Word replace ^p with a space.
In Vim you can do the search and replace with this command :%s/\n/ /g
Step 4 - Replace all instance of two spaces with one space.
This is optional, and sometimes, if text was centered or if there was a section of text that had been indented, this can mess up some other formatting, but I find as a general rule of thumb, getting rid of all the instances of two spaces makes the book better formatted and easier to read.
Step 5 - Repeat step 4 until there are now more instances of two spaces.
Just keep replacing two spaces with one space until the editor tells you it could not find two spaces.
Step 6 - Replace the text from step 2 with what you want.
If you want your book to be displayed with a line between each paragraph and no indent, you would use two newlines. If you want it to appear more like a book, you would use one newline followed by five spaces.
In Word, you would replace azdbewq with ^p^p or ^p followed by 5 spaces
In Vim you can use :%s/azdbewq/^M^M/g or :%s/azdbewq/^M /g where you get ^M by pressing ctrl-V and m all at the same time.
Step 7 - Resave your newly formatted file.
You should now be able to convert your file to an ebook with almost any ebook converter.
|
|