Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 07-15-2014, 03:15 PM   #16
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
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.
eschwartz is offline   Reply With Quote
Old 07-15-2014, 03:42 PM   #17
martienne
.~^пиратка^~.
martienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshes
 
martienne's Avatar
 
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...?
martienne is offline   Reply With Quote
Old 07-15-2014, 03:50 PM   #18
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
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.
eschwartz is offline   Reply With Quote
Old 07-15-2014, 04:03 PM   #19
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
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;
}
in http://www.bibeln.se/stylesheets/bibeln.css
eschwartz is offline   Reply With Quote
Old 07-15-2014, 04:18 PM   #20
martienne
.~^пиратка^~.
martienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshes
 
martienne's Avatar
 
Posts: 238
Karma: 14000
Join Date: Sep 2009
Location: Ask NSA...
Device: Onyx Boox M92
Quote:
Originally Posted by eschwartz View Post
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.
Will check the options in the next convert!

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.
martienne is offline   Reply With Quote
Old 07-15-2014, 05:34 PM   #21
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
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.
eschwartz is offline   Reply With Quote
Old 07-15-2014, 05:54 PM   #22
martienne
.~^пиратка^~.
martienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshes
 
martienne's Avatar
 
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.
martienne is offline   Reply With Quote
Old 07-15-2014, 06:04 PM   #23
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
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" />
to
Code:
<link href="bibel_2000.css" rel="stylesheet" type="text/css" />
<meta http-equiv="content-type" content="text/html" charset="UTF-8" />
Spoiler:

css needs to be consistently renamed
char encoding seems to be just fine, it's just being declared wrongly as non-UFT-8.

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.
eschwartz is offline   Reply With Quote
Old 07-15-2014, 06:32 PM   #24
martienne
.~^пиратка^~.
martienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshes
 
martienne's Avatar
 
Posts: 238
Karma: 14000
Join Date: Sep 2009
Location: Ask NSA...
Device: Onyx Boox M92
Quote:
Originally Posted by eschwartz View Post
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" />
to
Code:
<link href="bibel_2000.css" rel="stylesheet" type="text/css" />
<meta http-equiv="content-type" content="text/html" charset="UTF-8" />
Spoiler:

css needs to be consistently renamed
char encoding seems to be just fine, it's just being declared wrongly as non-UFT-8.

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!
Thanks for the encouragement and the advice! I am trying to follow all of it.
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.
martienne is offline   Reply With Quote
Old 07-15-2014, 06:50 PM   #25
martienne
.~^пиратка^~.
martienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshes
 
martienne's Avatar
 
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.
martienne is offline   Reply With Quote
Old 07-15-2014, 07:06 PM   #26
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,119
Karma: 73448614
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
How is this for you?
Attached Files
File Type: epub Bibel2000.epub (71.6 KB, 195 views)
PeterT is offline   Reply With Quote
Old 07-15-2014, 07:18 PM   #27
martienne
.~^пиратка^~.
martienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshes
 
martienne's Avatar
 
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!
martienne is offline   Reply With Quote
Old 07-15-2014, 07:26 PM   #28
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by martienne View Post
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!
What bug? Perhaps Kovid could fix it.
eschwartz is offline   Reply With Quote
Old 07-15-2014, 07:45 PM   #29
martienne
.~^пиратка^~.
martienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshesmartienne can read faster than his screen refreshes
 
martienne's Avatar
 
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.
martienne is offline   Reply With Quote
Old 07-15-2014, 11:36 PM   #30
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
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.
eschwartz is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 04:17 PM.


MobileRead.com is a privately owned, operated and funded community.