Quote:
Originally Posted by PhyrePhox
I'm a bit overwhelmed at the discussions here, and I've not been able to find a "how-to" guide that starts from a fundamental point
|
The first step is to learn xhtml (html with a few additional strictures) and css 2.0, which are really very easy. I picked up everything I needed to know by reading a few articles at
W3Schools and looking at ePubs I downloaded from here and feedbooks.
Quote:
|
I added these files to Calibre and let it do whatever to them to let them work on my Reader. I find that there is a full space after each line, hard hyphenations, and occasional blank pages. The TOC is empty, and the metadata appears weird, i.e. it's sorting by the author's first name.
|
Try ticking the 'Remove spacing between paragraphs' box on the 'Look and Feel' page of the conversion dialog. Calibre's automatic conversion system is the best of a bad lot but it needs a lot of work to produce truly acceptable output and it's highly dependent on the quality of the source.
Quote:
every line has it's own entry in the XHTML files, so I tried to remove all the
Code:
<p class="MsoPlainText">
lines for an entire paragraph, and compiled the epub. Then, calibre couldn't read it.
|
The paragraph tags aren't causing extra line-feeds, they're an essential part of the markup and you can't remove them. You need to take a look at the css styles and set the top and bottom margins of MsoPlainText to 0.
Quote:
|
I would like to build the TOC, or find it in the original lit and migrate it, but I can't seem to open the lit file with anything that runs on Mac. I know that Sony only sees the metadata if it's added in a certain way, do I need to jiggle the settings in Calibre's converter? Or, do I need to go Windows to fix this in the lit file beforehand?
|
Your best bet is to enable debug output in calibre - go to the 'Debug' panel of the conversion dialog and enter a folder for it to place debugging information. Calibre will then decode the lit and write out the html for you (several versions of it, corresponding to the various stages of the pipeline). Load the input html into Sigil and go to code view, find the css file (that Calibre will also have written out for you) and paste that code into the style section in the header. Search for the chapters and set the tags to a heading style (h1, h2 etc) and Sigil will automatically compile the ToC for you. Go to Book view, place the cursor before each chapter and press the Chapter Break button to tell Sigil where to split the file. You set the metadata in Sigil by using the Metadata Editor from the Tools menu. Then edit the css to clean up the errors in the source that are causing these linebreaks.
You can get halfway there if you just want to stick with Calibre. Set the metadata correctly for the lit file
before performing the conversion, and Calibre will use the corrected values for the ePub. Tick the checkbox I referred to earlier and tick the 'Preprocess input file...' box on the structure detection page. If it's still not picking up the chapters properly then you'll have to look at the debug output and work out an Xpath expression that will catch them.