• Welcome to the Fantasy Writing Forums. Register Now to join us!

Anyone else published on Kindle?

ALB2012

Maester
So I have just published on Kindle but their forums seem inundated with people having various formatting issues. I did too which I have mostly fixed. However the forum users work around seems needlessly long winded and you need to know a good bit of HTML, which I don't.

I was wondering if anyone had any tips. I personally don't think its too bad and it wouldn't stop me buying a book unless it was awful but I know a good few people are whining. It seems every book I look at on kindle is different.
 
I've published a couple of short stories on Kindle. I export from OpenOffice (LibreOffice, now) to HTML, and then use the html2mobi perl script to convert the file (after I run it through a vim macro to clean up some of the utterly horrifying HTML output that *Office generates). Haven't really had any problems.

Then again, my day job is as a web developer, and I run Linux on all my machines, so I may be slightly above the average when it comes to technical know-how ;)
 

Veronica

Acolyte
There's a free guide for publishing to Kindle that I'd downloaded from Amazon before putting my first piece out there. Having gone through the Smashwords 'meatgrinder' with other works, I found the Kindle guidelines easier and more intuitive. The guide is "Building Your Book for Kindle," and while it references MS Word for the formatting, it should be easily translatable for the more tech-savvy who prefer other word processing programs.
 

Steerpike

Felis amatus
Moderator
I also exported to HTML from Libre Office, then just went through and manually removed all of the excess HTML tags and added a few of my own (for the cover, for example). Was simple.
 

ALB2012

Maester
I've published a couple of short stories on Kindle. I export from OpenOffice (LibreOffice, now) to HTML, and then use the html2mobi perl script to convert the file (after I run it through a vim macro to clean up some of the utterly horrifying HTML output that *Office generates). Haven't really had any problems.

Then again, my day job is as a web developer, and I run Linux on all my machines, so I may be slightly above the average when it comes to technical know-how ;)

Ok I understood up until "I've published a couple of short stories on Kindle." Then my "someone talking about programming" reflex switched on ( I live with a man into all that). I get the impression if you know programming its fine, those of us mortals who don't speak computer have to muddle by;)

If I ever understand I will keep in mind your advice. I use Open office too. Buying Scrivener next week. i just assumed if they ahd an upload software it wouldn't muck it up.
 

Telcontar

Staff
Moderator
What did you have to do to the LibreOffice HTML, Ben? I export to HTML and upload directly to KDP, and my books look fine. Never saw the need for an intermediate step.
 

ALB2012

Maester
I think it depends really. I see so many different formatting styles on kindle. After I fixed the weirdness it was ok. It isnt fully justifies as when I tried it looked damn strange. Going to leave it as it is for now and then upload again when I fiddle with it in scrivener for the printed copies
 
I use a program called Jutoh which allows me to take a single source and spit out LibreOffice, HTML, PDF, mobi, and eBook. I generate eBook for Nook/iTunes (and soon Kobo) and mobi for Kindle (Amazon will convert mobi to its latest format). Worked pretty well for my first book, we'll see how it works going forward.

Smashwords is a royal pain to work with. I hate that damn meatgrinder.
 

Steerpike

Felis amatus
Moderator
What did you have to do to the LibreOffice HTML, Ben? I export to HTML and upload directly to KDP, and my books look fine. Never saw the need for an intermediate step.

I tried that and mine wasn't consistent across devices. If you look at the HTML produced, even if it is filtered, you get all kinds of extraneous HTML code in the final product. I have found that removing all of that and using a minimal amount of HTML tags has led to a more consistent and predictable end product across various platforms.
 
What did you have to do to the LibreOffice HTML, Ben? I export to HTML and upload directly to KDP, and my books look fine. Never saw the need for an intermediate step.

The main reason is that I like simplifying the code before I do anything with it. In a few cases, the HTML causes weird hiccups in the output (excess spaces, weird indenting, that sort of thing). Sometimes, LibreOffice has decided that a particular piece of text is a different color than everything else (one of the chapters in my book, for some reason, gets exported with FONT COLOR tags all over it, and none of the others do). One time, I found this in the middle of a chapter:

Code:
He walked over to <SPAN LANGUAGE="xzz">the</SPAN> dresser and picked up the book.

Like, what in god's name is that SPAN doing there? In that case, all I did was go into the original ODT, delete that sentence, and type it back in, and that bit of code vanished when I exported it to HTML again. But LO/OO have all sorts of invisible formatting in them that, as far as I know, there's no way to see. That FONT COLOR thing drives me bonkers, because short of actually retyping the whole chapter in a new, clean ODT file, I have no idea how to make it stop generating those FONT COLOR tags. (Yes, I've tried resetting the color, changing it to red and then back to auto, etc.)

The script I wrote also takes care of certain menial things, like inserting pagebreak tags, putting in the TOC nav code, and so on. It's easier for it to do that if I strip out all the stupid crap first.

And there's also the fact that as a web developer, I find badly-generated HTML code to just be offensive on its face. ;)

Here's the vim script that I currently run my NIP through when I'm test-exporting it to MOBI:

Code:
" Strip any stupid left-aligning.
:%s/ ALIGN=LEFT//ge

" Get rid of all the useless inline styles.
:%s/margin-bottom: 0in;\? \?//ge
:%s/font-style: normal;\? \?//ge
:%s/font-weight: normal;\? \?//ge
:%s/text-decoration: none;\? \?//ge
:%s/ STYLE=""//ge
:%s/>\n		/>/ge
:%s/ HREF=".*writer8"//ge
:%s/\(<B>CONTENTS<\/B>\)/<a name="toc">\1<\/a>/ge
:%s/<FONT COLOR="#......">\(\_.\{-}\)<\/FONT>/\1/ge
:%s/<FONT FACE="Times New Roman, serif">\(\_.\{-}\)<\/FONT>/\1/ge
:%s/<SPAN>\(\_.\{-}\)<\/SPAN>/\1/ge
:%s/<SPAN>\(\_.\{-}\)<\/SPAN>/\1/ge
:%s/<SPAN>\(\_.\{-}\)<\/SPAN>/\1/ge
/<\/HEAD>
normal O<guide><reference type="toc" title="Table of Contents" href="#toc"></reference></guide>
:%s/\(Chapter\|Interlude:\)\n/\1 /ge
/About\nthe Author
normal J

" Replace # breaks with em dashes
:%s/>#/>\&mdash;\&mdash;\&mdash;/ge
:%s/#</\&mdash;\&mdash;\&mdash;</ge

" Ensure a page break.
:%s/^<\/DIV>$/<\/DIV>
<mbp:pagebreak \/>/ge

" Page break before the TOC section, too.
:%s/<\/P>\n<DIV/<\/P>
<mbp:pagebreak \/>
<DIV/g

" Replace high-Unicode chars with HTML entity references.
:%s/—/\&ndash;/ge
:%s/–/\&mdash;/ge
:%s/--/\&mdash;/ge
:%s/‘/\&lsquo;/ge
:%s/’/\&rsquo;/ge
:%s/“/\&ldquo;/ge
:%s/”/\&rdquo;/ge
:%s/\.\.\./\&hellip;/ge
:%s/é/\&eacute;/ge
:%s/ï/\&iuml;/ge

" Search for any other rogue characters.
/[^a-zA-Z 0-9!@#$%^&*()^I=";:\.,><\/?}|{	-]
 

Telcontar

Staff
Moderator
That is... bizarre. My html export is clean. What version are you using? Do you mess around with your styles a lot?
 

kennyc

Inkling
Yes, I've published two short stories and a collection of poetry. I just uploaded the Word Doc and it converted fine with one exception. One poem required indentation and I had to replace plain spaces with tabs (in the Word Doc) to get it converted properly. It was all quite straight-forward

I signed up at Smashwords publishing and for the life of me it is confusing as hell and I've done nothing with it at this point.
 

Robert Donnell

Minstrel
There is a free book on Amazon called "Building your book for Kindle" I used the steps in that that and it worked fine.

However you really do need to have several people look your work over for spelling, grammar, factual consistencies, etc before you publish. Then advertizing becomes your problem.
 
That is... bizarre. My html export is clean. What version are you using? Do you mess around with your styles a lot?

LibreOffice 3.5.4.2 Build ID: 350m1(Build:2). Installed with apt-get on Kubuntu 10.04.

I don't do much of anything with styles. I created a new doc and wrote the following sentence:

The quick brown fox jumps over the lazy dog.[enter]

Then, without doing anything else, I went to File > Save As and saved it as HTML. Here's the output:

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
	<TITLE></TITLE>
	<META NAME="GENERATOR" CONTENT="LibreOffice 3.5  (Linux)">
	<META NAME="CREATED" CONTENT="20120616;20202200">
	<META NAME="CHANGED" CONTENT="20120616;20230700">
	<STYLE TYPE="text/css">
	<!--
		@page { margin: 0.79in }
		P { margin-bottom: 0.08in }
	-->
	</STYLE>
</HEAD>
<BODY LANG="en-US" DIR="LTR">
<P STYLE="margin-bottom: 0in">The quick brown fox jumps over the lazy
dog.</P>
<P STYLE="margin-bottom: 0in"><BR>
</P>
</BODY>
</HTML>

I'm not sure why it felt compelled to put inline margin-bottom properties in the two P tags, rather than just make P default to margin-bottom: 0in in the style block. Anyway, with a whole bunch more text, it gets even worse.
 

Reaver

Staff
Moderator
Code:
" Strip any stupid left-aligning.
:%s/ ALIGN=LEFT//ge

" Get rid of all the useless inline styles.
:%s/margin-bottom: 0in;\? \?//ge
:%s/font-style: normal;\? \?//ge
:%s/font-weight: normal;\? \?//ge
:%s/text-decoration: none;\? \?//ge
:%s/ STYLE=""//ge
:%s/>\n        />/ge
:%s/ HREF=".*writer8"//ge
:%s/\(<B>CONTENTS<\/B>\)/<a name="toc">\1<\/a>/ge
:%s/<FONT COLOR="#......">\(\_.\{-}\)<\/FONT>/\1/ge
:%s/<FONT FACE="Times New Roman, serif">\(\_.\{-}\)<\/FONT>/\1/ge
:%s/<SPAN>\(\_.\{-}\)<\/SPAN>/\1/ge
:%s/<SPAN>\(\_.\{-}\)<\/SPAN>/\1/ge
:%s/<SPAN>\(\_.\{-}\)<\/SPAN>/\1/ge
/<\/HEAD>
normal O<guide><reference type="toc" title="Table of Contents" href="#toc"></reference></guide>
:%s/\(Chapter\|Interlude:\)\n/\1 /ge
/About\nthe Author
normal J

" Replace # breaks with em dashes
:%s/>#/>\—\—\—/ge
:%s/#</\—\—\—</ge

" Ensure a page break.
:%s/^<\/DIV>$/<\/DIV>
<mbp:pagebreak \/>/ge

" Page break before the TOC section, too.
:%s/<\/P>\n<DIV/<\/P>
<mbp:pagebreak \/>
<DIV/g

" Replace high-Unicode chars with HTML entity references.
:%s/–/\–/ge
:%s/—/\—/ge
:%s/--/\—/ge
:%s/‘/\‘/ge
:%s/’/\’/ge
:%s/“/\“/ge
:%s/”/\”/ge
:%s/\.\.\./\…/ge
:%s/é/\é/ge
:%s/ï/\ï/ge

" Search for any other rogue characters.
/[^a-zA-Z 0-9!@#$%^&*()^I=";:\.,><\/?}|{    -]

Well that's just great, Ben! Sharing your TOP SECRET subroutines on this forum!

Sorry old friend, but I have to initiate the Remote Shutdown Protocols.
 

boboratory

Minstrel
Google also has an open source project called Sigil...

The thing about Smashwords is that as bad as the Meatgrinder is, and it is, once you are through it, you're in a bunch of stores instead of fighting with each one individually...
 
Top