View Single Post
Old 06-08-2020, 10:43 PM   #10
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 681
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
I used the plugin to import an HTML file exported from Word as "web page, filtered".


Sample HTML para:


<p class=MsoNormal style='margin-top:6.0pt;margin-right:0cm;margin-bottom:6.0pt;
margin-left:0cm;text-indent:36.0pt'><span style='font-size:18.0pt;letter-spacing:
-.2pt;font-style:normal'>And yet, despite his distinguished ancestry, despite
his celebrated historical novels, and despite his glorious Boer </span><span
style='font-size:18.0pt;letter-spacing:-.1pt;font-style:normal'>War record,
Conan Doyle is best known to the world for </span><span style='font-size:18.0pt;
letter-spacing:-.25pt;font-style:normal'>having created Sherlock Holmes.</span></p>



Output in epub:

<p class="Normal sgc-4"><span class="sgc-1">And yet, despite his distinguished ancestry, despite his celebrated historical novels, and despite his glorious Boer</span> <span class="sgc-2">War record, Conan Doyle is best known to the world for</span> <span class="sgc-3">having created Sherlock Holmes.</span></p>

p.sgc-4 {
margin-top: 0.5em;
margin-right: 0;
margin-bottom: 0.5em;
margin-left: 0;
text-indent: 36.0pt
}
span.sgc-3 {
font-size: 1.5em;
letter-spacing: 0em;
font-style: normal
}
span.sgc-2 {
font-size: 1.5em;
letter-spacing: 0em;
font-style: normal
}
span.sgc-1 {
font-size: 1.5em;
letter-spacing: 0em;
font-style: normal
}



For an entire book, there were about 300 styles created, many identical as above or only differing by "letter-spacing". The 3 styles here I assume were rounded down from the small letter spacing (-.2pt, -.1pt, -.25pt) in the source. Would have been nice if then they were combined into a single style.

After wasting a few hours trying to clean that up in Sigil, I went back to the source HTML and deleted all the letter-spacing styling with a text editor and reimported.
Now there was a manageable number of styles; though again, several were identically defined.

I suggest that the importer just ignore all letter-spacing formatting. Or at least, have that as a default option, though I've never seen any ebook where letter spacing was appropriate in body text. And ideally, merge styles with identical definitions.

Last edited by AlanHK; 06-09-2020 at 02:11 AM.
AlanHK is offline   Reply With Quote