View Single Post
Old 07-08-2014, 01:22 PM   #20
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,844
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by eschwartz View Post
If you prefer Sigil because of the featureset and way of doing things, . If you are avoiding calibre editor because you're afraid it will munge the styles, that's a shame, because it doesn't.
Maybe I don't know how to use it. Watch the .mobi file I attach; with it, I used the following css stylesheet:

Spoiler:

h1.title {
display: table;
text-align: center;
text-indent: 0;
font-size: 1.8em;
padding: 0.5em;
margin: 35% auto 0;
border-top: 3px solid black;
border-bottom: 3px solid black;
}

h2 {
font-size: 1em;
font-weight: bold;
text-align: right;
padding-top: 0;
margin: 0 0 3.5em;
}

.chapterHeader {
display: block;
position: relative;
height: 2.3em; /*2.25*/
border-bottom: 3px solid black;
margin: 0 0 1em;
background: white;
}

.chapterHeader .translation {
float: left;
padding: 0 0 0 5px;
margin: 0em 0 0 -0.2em;
font-size: 1.4em;
background: white;
}

.chapterHeader .count {
font-size: 1.8em; /*1.6* 1.4 */
padding-right: 0.2em;
position: relative;
top: 0.125em; /*0.14*/;
}

h2 + p {
text-indent: 0;
}

h3.section_title {
text-align: center;
}

p {
margin-top: 0;
margin-bottom: 0;
text-indent: 1em;
text-align: justify;
}

p.noindent {
text-indent: 0em;
}

sup {
font-size: 60%;
line-height: 50%;
}

div.verse {
padding: 1.0em;
}

span.dropcap {
font-size: 4em;
font-weight: bold;
float: left;
margin: -0.2em 0.125em -0.2em 0em;
text-indent: 0em;
}

.gap {
margin-bottom: 1em;
}

hr.sep {
margin: 2em 0 0.75em 0;
text-indent: 0;
width: 30%;
background-color: black;
color: black;
}

.note {
margin-left: 1.5em;
text-indent: -1.5em;
}

.asterism:after {
display: block;
text-indent: 0;
text-align: center;
font-size: 1.6em;
margin-top: 2.5em;
-webkit-transform: rotate(180deg);
content: "⁂"; /* ∴ ※ */;
}

div.aboutauthor {
text-align: left;
margin: 0 0 1em;
}

div.also {
text-align: left;
padding-top: 5%;
}

.author {
font-size: 1.3em;
font-weight: bold;
text-indent: 0;
text-align: center;
padding: 5% 0 0; margin: 0;
}

div.sgc-toc-title {
font-size: 1.6em;
font-weight: bold;
margin-bottom: 1em;
text-align: center;
}

div.sgc-toc-level-1 {
margin-left: 0em;
text-align: left;
}


And this is how it looks in my Kindle:

Click image for larger version

Name:	screen_shot-31557.gif
Views:	314
Size:	35.4 KB
ID:	125097

After loading that .mobi in the last version of Calibre and after converting it to .epub, I got the following css stylesheet:

Spoiler:
.aboutauthor {
display: block;
text-align: left;
margin: 0 0 1em
}
.aboutauthor1 {
display: block
}
.author {
display: block;
font-size: 1.25em;
font-weight: bold;
line-height: 1.2;
text-align: center;
text-indent: 0;
padding: 5% 0 0;
margin: 0
}
.calibre {
display: block;
font-size: 1em;
line-height: 1.2;
padding-left: 0;
padding-right: 0;
margin: 0 5pt
}
.calibre1 {
font-weight: bold
}
.calibre2 {
display: block;
text-align: justify;
text-indent: 1em;
margin: 0
}
.calibre3 {
font-style: italic
}
.calibre4 {
display: block;
list-style-type: disc;
margin-bottom: 1em;
margin-right: 0;
margin-top: 1em
}
.calibre5 {
display: list-item
}
.calibre6 {
display: block;
font-size: 1em;
font-weight: bold;
line-height: 1.2;
padding-top: 0;
text-align: right;
margin: 0 0 3.5em
}
.calibre7 {
font-size: 0.75em;
line-height: 1.2;
vertical-align: super
}
.calibre8 {
line-height: 1.2
}
.chapterHeader {
background: white;
display: block;
height: 2.3em;
position: relative;
border-bottom: black solid 3px;
margin: 0 0 1em
}
.count {
font-size: 1.2em;
line-height: 1.2;
padding-right: 0.2em;
position: relative;
top: 0.125em
}
.dropcap {
float: left;
font-size: 4em;
font-weight: bold;
text-indent: 0;
margin: -0.2em 0.125em -0.2em 0
}
.gap {
display: block;
text-align: justify;
text-indent: 1em;
margin: 0 0 1em
}
.noindent {
display: block;
text-align: justify;
text-indent: 0;
margin: 0
}
.note {
display: block;
text-align: justify;
text-indent: -1.5em;
margin: 0 0 0 1.5em
}
.note1 {
display: block;
text-align: justify;
text-indent: -1.5em;
margin: 0 0 1em 1.5em
}
.sep {
background-color: black;
color: black;
display: block;
height: 2px;
text-indent: 0;
width: 30%;
border: currentColor inset 1px;
margin: 2em 0 0.75em
}
.sgc-toc-level {
display: block;
margin-left: 0;
text-align: left
}
.sgc-toc-title {
display: block;
font-size: 1.375em;
font-weight: bold;
line-height: 1.2;
margin-bottom: 1em;
text-align: center
}
.title {
display: table;
font-size: 1.5em;
font-weight: bold;
line-height: 1.2;
text-align: center;
text-indent: 0;
padding: 0.5em;
border-top: black solid 3px;
border-bottom: black solid 3px;
margin: 35% auto 0
}
.translation {
background: white;
float: left;
font-size: 1.25em;
line-height: 1.2;
padding: 0 0 0 5px;
margin: 0 0 0 -0.2em
}
.verse {
display: block;
padding: 1em
}
.pcalibre:after {
-webkit-transform: rotate(180deg);
content: "⁂";
display: block;
font-size: 1.6em;
margin-top: 2.5em;
text-align: center;
text-indent: 0
}


And it looks in ADE of the following way:

Click image for larger version

Name:	Image2.png
Views:	312
Size:	91.1 KB
ID:	125096

As you can see, not only the Calibre css stylesheet is much complicated (and also the html files, all of them have more classes and <span> tags than the original files) but also the results are different from the original ebook.

BUT, if you unpack the .mobi I attach with KindleUnpack (MobiUnpack) you'll have an .epub with exactly the same original css stylesheet and the resulting epub looks as:

Click image for larger version

Name:	Image1.png
Views:	302
Size:	90.3 KB
ID:	125095

Of course, as I said before, maybe I get those results because I don't know how to use Calibre to get a perfect conversion with clean .html and .css files.

Regards
Rubén
Attached Files
File Type: mobi El signo de los cuatro - Arthur Conan Doyle.mobi (1.12 MB, 216 views)
RbnJrg is online now   Reply With Quote