Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 08-22-2022, 10:06 AM   #61
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,966
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by DNSB View Post
Too much work to do that without deleting information that is needed to display the book as intended. My way is a minimum of work and does not affect the way the book is displayed.

Would I prefer to do a full rip and replace? Yes. Do I want to spend the time needed? Considering the person reading most of the Vellum created books is my wife and she does not care about the CSS or any other internals of the file? If it looks good on her screen, she's happy.
The way the book looks is terrible. There's a useless embedded font. The chapter headers is too small and lightweight and takes up too much space on screen. Every paragraph has no indent and a paragraph space. My way is fairly easy and it fixes it so it has no paragraph space, indents, and the chapter header is easier to see and does not waste so much screen space. Plus, this is one of the easiest Vellum created eBooks to fix.
  1. Dump the media query CSS and link the existing CSS which drops the code for the missing CSS
  2. Delete the embedded font
  3. Dump any unwanted HTML
  4. Dump the div with the header class
  5. Clean up the chapter header code
  6. put in the correct h1 code in CSS for the chapter header
  7. Replace the margin in the class used with p with a text-indent
  8. Done

It looks worse then it really is.

Quote:
To put it mildly. I prefer to use the RemoveInlineStyles tool to do the cleanup and then go from there.
I would also have a look at the inline CSS. If most of it is the same, it can be S/R and the code added to the CSS. Then see what's left and if there's not too much left, do the same thing with the leftovers.
JSWolf is offline   Reply With Quote
Old 08-22-2022, 10:16 AM   #62
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
You guys boggle me.

I flatly REFUSE to do "work" on a book that I bought for recreation. No, nope, nyet, nix, NOT gonna do it. More power to ya...I love y'all, but not this girl.

Hitch
Hitch is offline   Reply With Quote
Old 08-22-2022, 10:30 AM   #63
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,966
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Hitch View Post
You guys boggle me.

I flatly REFUSE to do "work" on a book that I bought for recreation. No, nope, nyet, nix, NOT gonna do it. More power to ya...I love y'all, but not this girl.

Hitch
I get it. You can't do it.

And now for some good news. Mobi is dead!
JSWolf is offline   Reply With Quote
Old 08-22-2022, 10:32 AM   #64
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by JSWolf View Post
I get it. You can't do it.

And now for some good news. Mobi is dead!
Oh, I could do it. I simply refuse. Too much of this 6/days/week.

MOBI: Well, it doesn't have access to the store, via WiFi, etc.

Not sure that really counts as DEAD, does it?

Hitch
Hitch is offline   Reply With Quote
Old 08-22-2022, 02:29 PM   #65
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,966
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Hitch View Post
Oh, I could do it. I simply refuse. Too much of this 6/days/week.

MOBI: Well, it doesn't have access to the store, via WiFi, etc.

Not sure that really counts as DEAD, does it?

Hitch
Are you now allowed to create an ePub eBook and totally ignore Mobi?
JSWolf is offline   Reply With Quote
Old 08-22-2022, 03:03 PM   #66
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by JSWolf View Post
Are you now allowed to create an ePub eBook and totally ignore Mobi?
Oh, god, yes, Jon. We've been required to do that for, what, a year now? You haven't even been able to upload a reflowable mobi since...I think it's June of 2021. Maybe even 2020, but June of one of those, lol. 2021, I think.

BUT...here's the thing. That does not mean that I ignore the reality that KCR and other lower-end, less-advanced eInk eReaders are out there. We still use MQs, especially around images.

:-) BUT, we give our customers (typically, this is, you understand) two ePUBs. One ePUB optimized "4Amazon" and one that's for all the other vendors/retailers.

Hitch
Hitch is offline   Reply With Quote
Old 08-22-2022, 09:55 PM   #67
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,380
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by JSWolf View Post
The way the book looks is terrible. There's a useless embedded font. The chapter headers is too small and lightweight and takes up too much space on screen. Every paragraph has no indent and a paragraph space. My way is fairly easy and it fixes it so it has no paragraph space, indents, and the chapter header is easier to see and does not waste so much screen space. Plus, this is one of the easiest Vellum created eBooks to fix.
Interesting. You must be seeing different Vellum books from what I see. As I mentioned, I put my version of body, p and .subsq. Though last time I looked, the original CSS did not indent every paragraph. When I look at the text files, the first paragraph of the text has <p class="first first-in-chapter first-full-width">, sadly when I look at the CSS, there is no first, first-in-chapter for first-full-width in the CSS so removing undefined classes changes that first paragraph's p tag to <p> which means the text-indent: 0; is going to apply. The subsequent paragraphs getting indented by 1.5em.

The chapter header cleans up when I remove the embedded font, yet another automated procedure.

I actually went back and checked 23 Vellum created ebooks. Neither the 2 variants of the Vellum stylesheets caused all the paragraphs to indent and have extra spacing.

Perhaps you could post a sample of the CSS that is giving you every paragraph indented and with extra space between paragraphs?

All things considered, I will simply continue with my quick and dirty automate list that does 95% of the work for me and keeps my wife happy. Happy wife, happy life is rather true.

Spoiler:

Code:
body {
    font-family: Palatino, serif;
    font-weight: normal;
    font-style: normal;
}

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

p.subsq {
    text-indent: 1.5em;
}

p, li {
    hyphens: auto;
    adobe-hyphenate: auto;
    -webkit-hyphens: auto;
    -webkit-hyphenate-limit-lines: 2;
    -webkit-hyphenate-limit-after: 4;
    -webkit-hyphenate-limit-before: 4;
}
DNSB is offline   Reply With Quote
Old 08-22-2022, 10:51 PM   #68
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by DNSB View Post
Code:
    -webkit-hyphenate-limit-after: 4;
    -webkit-hyphenate-limit-before: 4;
Complete Side Note: In English, Hyphenation should be set to 2/3 (Left/Right / CSS's Before/After).

If you want to know the typographically correct numbers for each language, the best place to look is the table at:

If you want a summary of more Hyphenation info, definitely check out my recent posts in:

Complete Side Note #2: LibreOffice 7.4 was just released a few days ago, and they finally implemented a lot of this CSS4 Hyphenation stuff!

See the LibreOffice 7.4 Release Notes > New Typographic Settings.

It's cool to see these hyphenation enhancements finally being implemented in major programs after all these years.

Last edited by Tex2002ans; 08-22-2022 at 10:56 PM.
Tex2002ans is offline   Reply With Quote
Old 08-23-2022, 05:14 AM   #69
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,966
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by DNSB View Post
Interesting. You must be seeing different Vellum books from what I see. As I mentioned, I put my version of body, p and .subsq. Though last time I looked, the original CSS did not indent every paragraph. When I look at the text files, the first paragraph of the text has <p class="first first-in-chapter first-full-width">, sadly when I look at the CSS, there is no first, first-in-chapter for first-full-width in the CSS so removing undefined classes changes that first paragraph's p tag to <p> which means the text-indent: 0; is going to apply. The subsequent paragraphs getting indented by 1.5em.

The chapter header cleans up when I remove the embedded font, yet another automated procedure.

I actually went back and checked 23 Vellum created ebooks. Neither the 2 variants of the Vellum stylesheets caused all the paragraphs to indent and have extra spacing.

Perhaps you could post a sample of the CSS that is giving you every paragraph indented and with extra space between paragraphs?

All things considered, I will simply continue with my quick and dirty automate list that does 95% of the work for me and keeps my wife happy. Happy wife, happy life is rather true.

Spoiler:
Code:
body {
    font-family: Palatino, serif;
    font-weight: normal;
    font-style: normal;
}

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

p.subsq {
    text-indent: 1.5em;
}

p, li {
    hyphens: auto;
    adobe-hyphenate: auto;
    -webkit-hyphens: auto;
    -webkit-hyphenate-limit-lines: 2;
    -webkit-hyphenate-limit-after: 4;
    -webkit-hyphenate-limit-before: 4;
}
This is the CSS code I change or delete.

Code:
/*
 * The Standoff
 * Stylesheet generated by Vellum
 */

@font-face {
    font-family: Quicksand;
    font-weight: 400;
    font-style: normal;
    src: url("../fonts/00001.ttf");
}
p.subsq {
    margin-top: 0.7em;
    orphans: 2;
}
p, li {
    hyphens: auto;
    adobe-hyphenate: auto;
    -webkit-hyphens: auto;
    -webkit-hyphenate-limit-lines: 2;
    -webkit-hyphenate-limit-after: 4;
    -webkit-hyphenate-limit-before: 4;
}
body {
    font-family: Palatino, serif;
    font-weight: 400;
    font-style: normal;
}
span.smallcaps {
    font-variant-numeric: normal;
    font-variant: small-caps;
    font-variant-alternates: normal;
    font-variant-position: normal;
    font-variant-east-asian: normal;
    letter-spacing: 0.04em;
    font-variant-ligatures: none;
}
.heading {
    margin-bottom: 2em;
}
p.alignment-block-content-left {
    text-align: left;
}
@font-face, p (with the hyphen code), body, and heading all get deleted. p.subsq gets changed to text-indent: 1.2em;. The letter-spacing in the smallcaps code goes. And any instance of text-align: left; also goes.

I also remove unused CSS. I add in my body and my h1 code. I remove unused divs and spans. That's all I need to do in most cases.
JSWolf is offline   Reply With Quote
Old 08-23-2022, 11:47 AM   #70
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,380
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by JSWolf View Post
This is the CSS code I change or delete.

Spoiler:
Code:
/*
 * The Standoff
 * Stylesheet generated by Vellum
 */

@font-face {
    font-family: Quicksand;
    font-weight: 400;
    font-style: normal;
    src: url("../fonts/00001.ttf");
}
p.subsq {
    margin-top: 0.7em;
    orphans: 2;
}
p, li {
    hyphens: auto;
    adobe-hyphenate: auto;
    -webkit-hyphens: auto;
    -webkit-hyphenate-limit-lines: 2;
    -webkit-hyphenate-limit-after: 4;
    -webkit-hyphenate-limit-before: 4;
}
body {
    font-family: Palatino, serif;
    font-weight: 400;
    font-style: normal;
}
span.smallcaps {
    font-variant-numeric: normal;
    font-variant: small-caps;
    font-variant-alternates: normal;
    font-variant-position: normal;
    font-variant-east-asian: normal;
    letter-spacing: 0.04em;
    font-variant-ligatures: none;
}
.heading {
    margin-bottom: 2em;
}
p.alignment-block-content-left {
    text-align: left;
}


@font-face, p (with the hyphen code), body, and heading all get deleted. p.subsq gets changed to text-indent: 1.2em;. The letter-spacing in the smallcaps code goes. And any instance of text-align: left; also goes.

I also remove unused CSS. I add in my body and my h1 code. I remove unused divs and spans. That's all I need to do in most cases.
I grabbed the sample of The Standoff by Scott Blade from Amazon and looked at it's code. Perhaps you should have included the p entry between the @fontface and p.subsq entries? I'm still curious as how that gives you indents on every paragraph? While the margin-top in the subsequent paragraphs style would give a space between paragraphs since there is no text indent specified, I can't see your indent and paragraph space complaint. While I prefer an indent and no space, space and no indent is a valid choice. As for removing unused or undefined code, Delete unused stylesheet selectors and cssUndefinedClasses do a decent job of cleanup.

Spoiler:
Code:
p {
    margin-bottom: 0px;
    text-indent: 0px;
    margin-top: 0px;
    text-align: justify;
}
The code I replace the body, p and p.subsq with is below:
Code:
body {
  display: block;
  font-size: 1em;
  margin: 0 0 0 0;
  padding: 0 0 0 0;
  text-indent: 0;
  widows: 1;
  orphans: 1;
}

p {
  margin: 0 0 0 0;
  padding: 0.1em 0 0 0;
  margin-block-end: 0em;
  }

p.subsq {
  text-indent: 1.25em;
}


I must thank you for bring yet another variant of Vellum stylesheets to my attention.

Edit: And just perhaps if we wish to continue this discussion, it should be moved to a new thread in a more relevant forum.

Last edited by DNSB; 08-23-2022 at 11:50 AM.
DNSB is offline   Reply With Quote
Old 08-23-2022, 01:32 PM   #71
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,966
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by DNSB View Post
I grabbed the sample of The Standoff by Scott Blade from Amazon and looked at it's code. Perhaps you should have included the p entry between the @fontface and p.subsq entries? I'm still curious as how that gives you indents on every paragraph? While the margin-top in the subsequent paragraphs style would give a space between paragraphs since there is no text indent specified, I can't see your indent and paragraph space complaint. While I prefer an indent and no space, space and no indent is a valid choice. As for removing unused or undefined code, Delete unused stylesheet selectors and cssUndefinedClasses do a decent job of cleanup.

Spoiler:
Code:
p {
    margin-bottom: 0px;
    text-indent: 0px;
    margin-top: 0px;
    text-align: justify;
}
The code I replace the body, p and p.subsq with is below:
Code:
body {
  display: block;
  font-size: 1em;
  margin: 0 0 0 0;
  padding: 0 0 0 0;
  text-indent: 0;
  widows: 1;
  orphans: 1;
}

p {
  margin: 0 0 0 0;
  padding: 0.1em 0 0 0;
  margin-block-end: 0em;
  }

p.subsq {
  text-indent: 1.25em;
}


I must thank you for bring yet another variant of Vellum stylesheets to my attention.

Edit: And just perhaps if we wish to continue this discussion, it should be moved to a new thread in a more relevant forum.
The original code is as you say. But I've edited it to put in indents and remove paragraph spaces.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
AZW3 files have different font size Buhaj47 Conversion 8 12-23-2021 11:40 PM
How to increase the font of the printed .PDF file from .MOBI file? MGadAllah Calibre 3 01-30-2021 06:08 PM
How to update meta information for an ebook file? lifanxi Calibre 2 10-27-2010 10:22 AM
ttc font file can't be put into font folder droople Sigil 2 08-21-2010 10:05 AM
File System Information Adam B. iRex 0 10-29-2008 08:46 AM


All times are GMT -4. The time now is 09:55 AM.


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