Jump to content
Storyist Forums

Chapters and how they're displayed on Kindle


Eleni

Recommended Posts

Hi Eleni,

 

If you're comfortable editing HTML and CSS, you can edit the margin-top value for the h1 style in the main.css file.

 

 

h1 {
   margin-top: 20px;
   margin-bottom: 12px;
   text-align: left;
}

 

If you do, make sure to test your content on all Kindle devices. Kindle's CSS support changed significantly between Kindle 1 and Kindle Fire.

 

-Steve

Link to comment
Share on other sites

Hi Steve:

 

I have noodled around with CSS before on Wordpress, and the file looks pretty straightforward. I've also seen your video about saving the intermediate files during an export, but it's not working for me. After my first export, I made the changes on a text editor and saved it as a css file. It added some extra code, so I downloaded a CSS editor and got out a clean CSS file. I then exported the storyist file again using kindlegen, this time without ticking the intermediate file box. I checked my CSS file to ensure it kept my changes, which it did. When I went to look at the story on the the Kindle Previewer, I didn't notice any changes. I tried various px sizes, going all the way up to 80px. Can you see where I'm going wrong here?

Link to comment
Share on other sites

Hi Eleni,

 

I then exported the storyist file again using kindlegen, this time without ticking the intermediate file box. I checked my CSS file to ensure it kept my changes, which it did. When I went to look at the story on the the Kindle Previewer, I didn't notice any changes. I tried various px sizes, going all the way up to 80px. Can you see where I'm going wrong here?

 

Storyist doesn't pick up changes to intermediate files made outside of Storyist. If you change the intermediate files, you'll need to run kindlegen from the command line. To do this:

 

1) Open a terminal window.

2) Change (cd) the current folder to the folder containing the toc.opf file.

3) This command: /kindlegen toc.opf -o

 

is the path to the folder in which you keep kindlegen, e.g. ~/Tools

 

is the name of the mobi (Kindle) file you want kindlegen to create for you.

 

-Steve

Link to comment
Share on other sites

Hi Steve:

 

I appreciate all your help, but I can't get this to work. Here's what I typed;

 

 

Where the mobi file is located:

 

Eleni-Mullers-MacBook-Pro:~ elenitsamuller$ /Users/elenitsamuller/Desktop/Unison

 

Then i put in this code:

 

~/Macintosh HD/Applications/Writing/kindlegen toc.opf -o Unison

 

 

Then this response followed:

 

-bash: /Users/elenitsamuller/Desktop/Unison: is a directory

 

Nothing happened. I'm not sure what I did wrong here.

 

Eleni

Link to comment
Share on other sites

Hi Eleni,

 

You simply forgot to put the brackets (if this is the name of the symbols < and >). Your command line needs to end in <Unison>

 

As a tip, if you want to be sure that you have the right path to kindlegen, you just need to drag and drop the kindlegen program into the command line in terminal window.

Or, an even simpler way to rebuild a mobi file from toc.opf is to install the Kindle Previewer 2.4

 

 

Adrian

Link to comment
Share on other sites

Hi Adrian:

 

Thanks for your response. I'm aware of the drag and drop feature of the terminal. I first tried the code without the brackets and got a syntax error. I went to a site where I read a little about CSS and there were no brackets on the command line.

 

This is what I tried again today:

 

Dragged folder containing the toc.opf file to the terminal. I then typed in the following code:

 

<~/Applications/Writing>/kindlegen toc.opf -o <Unison2>

The directory where the program is located is correct, and I've tried every combination I could think of. How can I rebuild a mobi file using the previewer. I thought its only purpose was to see how your book will appear on various Kindle models.

Link to comment
Share on other sites

The code line seems correct, I don't know why it doesn't work.

 

Not really, with Kindle Previewer you could have converted an epub file to mobi format, for instance. The new version (2.4) that was launched not very long ago lets you do the repackaging stuff simply by opening an opf file. You'll see from the interface, just click the "Open book" link, point to the opf file and boom! your new mobi file is done.

Link to comment
Share on other sites

  • 2 weeks later...

I've got all the other formatting issues taken care of except for this one. I'd appreciate any help as I still can't get the chapter to start on the middle of the page on my Kindle. This is my last hurdle!

Link to comment
Share on other sites

I did it!

 

Thanks for your help. It was easier to click and drag Kindlegen and the OPF file and then hit enter. For some reason I made it more complicated. I just have to tweak the top margins as I used 12em. Is there an ideal number, so it will look uniform on all Kindles? Thanks again for all the help!

 

Eleni

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...