07-15-2014, 03:15 PM | #16 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
You should fix the encoding so it is saved as utf-8 and then it will stop giving you problems... (for linux, I'd use the "iconv" command.)
I don't know about the indents, but check how they are formatted. Spaces? CSS? Regarding pagebreaks, that is a restriction of the EPUB/AZW3 specs. New files create pagebreaks. I don't know where you might want to put them. If it was a Jewish bible, I'd put them at the Parshiyos. But if you want to split them up so they won't crash things, you will have to put them somewhere. Last edited by eschwartz; 07-15-2014 at 03:20 PM. |
07-15-2014, 03:42 PM | #17 |
.~^пиратка^~.
Posts: 238
Karma: 14000
Join Date: Sep 2009
Location: Ask NSA...
Device: Onyx Boox M92
|
Thanks so much for all the support eschwartz!
Ok, I'm changing to UTF-8. I got the impression that I should use ISO-8859-1, but this is getting boring with all the charset isues. I did a trial convert with Genesis only (that is, Creation up until the death of Joseph). So I agree; that's where I'd put a page break. After that is Exodus (Moses etc). But Calibre is putting a page break for every chapter. A chapter is just a page or so of normal text. There are 50 chapters in Genesis, so I've got to figure out how to stop this page break! It's not there in the HTML or the CSS. The indentation is made with CSS margin-left: 2.5em; Maybe Calibre ignores anything to do with Margins...? |
07-15-2014, 03:50 PM | #18 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Also check your conversion options.
Headers which create ToC navigation links are assumed chapter headers and get pagebreaks added. The text is divided with <h2>. Remove it from Structure Detection. Last edited by eschwartz; 07-15-2014 at 03:56 PM. |
07-15-2014, 04:03 PM | #19 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
regarding the poetry indents:
The website css has: Code:
div.poetry { padding-left: 1em; margin-bottom: .8em; } |
07-15-2014, 04:18 PM | #20 | |
.~^пиратка^~.
Posts: 238
Karma: 14000
Join Date: Sep 2009
Location: Ask NSA...
Device: Onyx Boox M92
|
Quote:
I don't quite understand what to do with the H2. H2 is coming in the HTML which I don't want to touch. All I've done with that is to change the charset. Structure Detection is in the conversion dialogue, in Calibre, I hope? The thing that I can't change, is the HTML. Basically, I am trying just to get the CSS right, then it's just a matter of cut&paste the HTML for each book in the bible, i.e. 66 times. I keep a local copy of the CSS which I modified a bit. Also I need to figure out how to tweak the conversion, so the EPUb or PDF comes out looking identical to my HTML/CSS... But I can't and won't mess with the HTML, it's too slippery can of worms. This was meant to be a really quick little job.. Last edited by martienne; 07-15-2014 at 04:23 PM. |
|
07-15-2014, 05:34 PM | #21 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
It's pretty simple. You aren't changing anything. You are just editing the conversion options to STOP telling calibre to make a pagebreak at every <h2>
(Structure Detection is the setting in the conversion dialog that controls detection of chapters based on xpath.) As it is, when you convert, calibre says "hey, <h2> tags! I should add a pagebreak (even though the original doesn't have one) and split the file here!" which in this case, you don't want. |
07-15-2014, 05:54 PM | #22 |
.~^пиратка^~.
Posts: 238
Karma: 14000
Join Date: Sep 2009
Location: Ask NSA...
Device: Onyx Boox M92
|
Thanks I really appreciate it! Ok, I'll look for that in the conversion settings. Gosh there are a lot of settings!
I am working on it... just a bit slow and keep running off to do other things. I pasted my HTML and CSS in pastebin if anyone else has the time to have a go! UTF-8 didn't work, it displayed the diamond shapes with a question mark in, rather than the Swedish characters. I normally use UTF-8 for Russian... I switched back to Latin 1. I think it looks great now, in a browser. So it's just a matter of how to convert to a nice epub. It's in Swedish, but you should have no problem seeing that it is the book of Genesis from the Bible. HTML: http://pastebin.com/3237wi40 CSS: http://pastebin.com/ixSeGJDd Just put them in the same folder, anything ending with HTML is fine for the HTML file. The CSS file must be called bibeln.css. Open the HTML file in browser. Last edited by martienne; 07-15-2014 at 06:02 PM. |
07-15-2014, 06:04 PM | #23 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
It looked much better after I switched (in "bibel_2000.html")
Code:
<link href="bibeln.css" rel="stylesheet" type="text/css" /> <meta http-equiv="content-type" content="text/html" charset="ISO-8859-1" /> Code:
<link href="bibel_2000.css" rel="stylesheet" type="text/css" /> <meta http-equiv="content-type" content="text/html" charset="UTF-8" /> Spoiler:
Also, you have an unused style block in the header of the html. You could get rid of that... although it's pure code aesthetics. Not bad... not bad at all! Last edited by eschwartz; 07-15-2014 at 06:10 PM. |
07-15-2014, 06:32 PM | #24 | |
.~^пиратка^~.
Posts: 238
Karma: 14000
Join Date: Sep 2009
Location: Ask NSA...
Device: Onyx Boox M92
|
Quote:
But as you can tell I'm not very fast and not experienced... I changed the names as you suggested. I'm sure there is plenty of junk in the code! I already removed miles of CSS to make the file more manageable. What's left is stuff I don't dare delete. I'll try to get rid of the duplication in the HTML header! With UTF-8 I am getting this, even after changing encoding to Swedish in the browser. Last edited by martienne; 07-15-2014 at 06:54 PM. |
|
07-15-2014, 06:50 PM | #25 |
.~^пиратка^~.
Posts: 238
Karma: 14000
Join Date: Sep 2009
Location: Ask NSA...
Device: Onyx Boox M92
|
I found it! I had edited the HTML file in Dreamweaver.
It was saved as ANSI. I needed to open the HTML file in Notepad and save as UTF-8. The charset problem is solved now. But I can't get rid of that pagebreak, and there is an issue with the "poetry" bits as well. Margin top and left don't come out right.. Last edited by martienne; 07-15-2014 at 07:00 PM. |
07-15-2014, 07:06 PM | #26 |
Grand Sorcerer
Posts: 12,263
Karma: 74007256
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
|
How is this for you?
|
07-15-2014, 07:18 PM | #27 |
.~^пиратка^~.
Posts: 238
Karma: 14000
Join Date: Sep 2009
Location: Ask NSA...
Device: Onyx Boox M92
|
Hurrah, I've got it!
There is a slight compilation bug in Calibre that messes up the generation of the epub, but SIGILL can create a really beautiful epub that looks EXACTLY like the HTML. Picture coming! |
07-15-2014, 07:26 PM | #28 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
|
07-15-2014, 07:45 PM | #29 |
.~^пиратка^~.
Posts: 238
Karma: 14000
Join Date: Sep 2009
Location: Ask NSA...
Device: Onyx Boox M92
|
First, my picture. I am VERY pleased! Thank you eschwartz! I can't give you any more karma but you deserve a ton!
The suspected bug was with that "poetry" section, i.e. the indented sections, visible in the picture " Ada och Silla, lyssna till mig" etc. When generating in Calibre, the section is not indented at all, AND, the preceeding line (in the picture "Lemek sade till sina hustrur", just above the indented section, is pushed UP so that there is no space between the preceeding paragraph and the text. The space is even less than normal row spacing. But when saving this HTML to epub in Sigil, the problem does not occur. I need to figure out two more things 1) How to add the title of the book at the beginning of each book. I.e. "The Book of Genesis" in nice big fonts. It doesn't come through in the HTML, but I can do that manually, it's just one row. How to format it though? I am having no joy with H1. 2) How to add a forced page break at the end of each bible book, so there is a new page after Genesis, before Exodus begins. Ok I think I've got it! This is Exodus, i.e. Second book of Moses using my existing CSS template. Last edited by martienne; 07-15-2014 at 08:24 PM. |
07-15-2014, 11:36 PM | #30 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
I would use Genesis.html, Exodus.html, Leviticus.html, Numbers.html, Deuteronomy.html -- this will automatically provide forced pagebreaks.
Have you gotten the titles working? If not, I could try offering some suggestions. |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Why use html formatting with kindle? | kateharp | Amazon Kindle | 30 | 06-18-2011 10:37 AM |
Best example of HTML formatting for Kindle??? | delphidb96 | Amazon Kindle | 13 | 02-15-2011 06:22 AM |
Troubleshooting HTML formatting for K3 | SmeagolRO | Amazon Kindle | 1 | 11-29-2010 12:56 PM |
HTML formatting | MarcusStringer | ePub | 17 | 04-06-2010 11:23 AM |
HTML formatting | john folkard | Calibre | 1 | 08-18-2009 10:15 AM |