Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 06-25-2023, 08:31 PM   #1
skunkworks
Member
skunkworks began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Mar 2023
Device: none
H1 too small

Using Styles in Word, chapter headings are set to 14pt, bold, centered, 12pt after. Text of book is 12pt. When converted, chapter headings (H1) appear smaller than book copy. What causes this behavior? It doesn't always happen, but this one poor problem child book is affected.
skunkworks is offline   Reply With Quote
Old 06-25-2023, 08:40 PM   #2
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,611
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Is it an epub that you converted to?
Go into the css stylesheet.
Look for the heading, usually h1, h2 or h3,
Change the font size by changing the value here... font-size: 2em;

We would need to see the original document to figure out why it does that. Obviously there is a wrong setting.
Karellen is offline   Reply With Quote
Advert
Old 06-25-2023, 09:21 PM   #3
skunkworks
Member
skunkworks began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Mar 2023
Device: none
Karellen,

Yes, it's an epub. In my zeal to post, I neglected to mention that. :-)

The HTML looks like this:
<h1 id="id_Toc525564898" class="block_12">Chapter 1</h1>

However, I don't see h1 in stylesheet.css. It is included below.
Spoiler:

.block_ {
display: block;
font-size: 1.29167em;
line-height: 1.2;
text-align: center;
text-indent: 0;
margin: 150pt 0 0;
padding: 0;
}
.block_1 {
display: block;
font-size: 1.29167em;
line-height: 1.2;
text-align: center;
text-indent: 0;
margin: 0;
padding: 0;
}
.block_2 {
display: block;
font-family: serif;
font-size: 0.75em;
text-align: center;
text-indent: 0;
margin: 0;
padding: 0;
}
.block_3 {
display: block;
font-size: 1.29167em;
line-height: 1.2;
text-indent: 21.6pt;
margin: 0;
padding: 0;
}
.block_4 {
color: #000;
display: block;
font-size: 0.83333em;
text-align: center;
text-indent: 0;
margin: 0;
padding: 0;
}
.block_5 {
color: #000;
display: block;
line-height: 1.2;
text-align: center;
text-indent: 0;
margin: 0;
padding: 0;
}
.block_6 {
display: block;
line-height: 1.2;
text-align: center;
text-indent: 0;
margin: 0;
padding: 0;
}
.block_7 {
display: block;
font-family: serif;
font-size: 0.75em;
text-indent: 0;
margin: 0;
padding: 0;
}
.block_8 {
color: #000;
display: block;
line-height: 1.2;
text-indent: 0;
margin: 0;
padding: 0;
}
.block_9 {
display: block;
line-height: 1.2;
text-align: justify;
text-indent: 0;
margin: 0;
padding: 0;
}
.block_10 {
display: block;
line-height: 1.2;
text-indent: 0;
margin: 0;
padding: 0;
}
.block_11 {
display: block;
line-height: 1.2;
text-indent: 21.6pt;
margin: 0;
padding: 0;
}
.block_12 {
display: block;
font-size: 0.83333em;
font-weight: bold;
page-break-after: avoid;
page-break-inside: avoid;
text-align: center;
text-indent: 0;
margin: 0 0 18pt;
padding: 0;
}
.block_13 {
display: block;
line-height: 1.2;
text-align: justify;
text-indent: 21.6pt;
margin: 0;
padding: 0;
}
.block_14 {
display: block;
font-weight: bold;
line-height: 1.2;
text-align: justify;
text-indent: 21.6pt;
margin: 0;
padding: 0;
}
.block_15 {
display: block;
line-height: 1.2;
text-align: justify;
text-indent: 21.6pt;
margin: 0;
padding: 0;
}
.block_16 {
display: block;
font-weight: bold;
line-height: 1.2;
text-align: justify;
text-indent: 21.6pt;
margin: 0;
padding: 0;
}
.block_17 {
display: block;
font-family: serif;
font-size: 0.75em;
text-align: justify;
text-indent: 21.6pt;
margin: 0;
padding: 0;
}
.block_18 {
display: block;
font-weight: bold;
line-height: 1.2;
text-align: justify;
text-indent: 0;
margin: 0;
padding: 0;
}
.block_19 {
display: block;
font-family: serif;
font-size: 0.75em;
text-align: justify;
text-indent: 0;
margin: 0;
padding: 0;
}
.block_20 {
display: block;
line-height: 1.2;
text-align: justify;
text-indent: 21.6pt;
margin: 0 0 10pt;
padding: 0;
}
.calibre {
display: block;
font-family: "Times New Roman", serif;
font-size: 1em;
padding-left: 0;
padding-right: 0;
margin: 0 5pt;
}
.calibre1 {
height: 24pt;
width: 134pt;
}
.calibre2 {
font-style: italic;
line-height: 1.2;
}
.calibre3 {
display: block;
line-height: 1.2;
margin: 0;
padding: 0;
}
.calibre4 {
font-weight: bold;
line-height: 1.2;
}
.calibre5 {
line-height: 1.2;
}
.calibre6 {
font-size: 1em;
line-height: normal;
vertical-align: super;
}
.text_ {
color: #00F;
line-height: 1.2;
text-decoration: underline;
}
.text_1 {
color: #808080;
line-height: 1.2;
}
.text_2 {
font-weight: bold;
line-height: 1.2;
text-decoration: underline;
}

Last edited by theducks; 06-25-2023 at 11:17 PM. Reason: OP did not use spoilers on log
skunkworks is offline   Reply With Quote
Old 06-25-2023, 10:02 PM   #4
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,611
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
So, the h1 is styled by class="block_12"

block_12 is styled as...

.block_12 {
display: block;
font-size: 0.83333em;
font-weight: bold;
page-break-after: avoid;
page-break-inside: avoid;
text-align: center;
text-indent: 0;
margin: 0 0 18pt;
padding: 0;
}


So you need to change 0.83333em to something bigger than the body text.

Personally, I would remove all the "font-size" throughout the stylesheet except for where it is used to be different from the body text, like in headings or footnotes. And then round those to whole or single decimal numbers eg 1em, 1.5em etc.

What type of book is it? I don't know how complex your ebook is, but 32 classes could be considered a bit much for a standard type novel.
Karellen is offline   Reply With Quote
Old 06-25-2023, 10:39 PM   #5
skunkworks
Member
skunkworks began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Mar 2023
Device: none
Thank you, Karellen. So that I can hopefully learn from your largesse, how can I tell in the next ebook which block is H1?

The novel is not at all complicated. There are only two font sizes used: 12 and 14. I have no idea why all those classes were generated. If italics are considered another class, we have only three classes. Yikes. It's gone rogue!
skunkworks is offline   Reply With Quote
Advert
Old 06-25-2023, 11:01 PM   #6
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,611
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Quote:
Originally Posted by skunkworks View Post
Thank you, Karellen. So that I can hopefully learn from your largesse, how can I tell in the next ebook which block is H1?

The novel is not at all complicated. There are only two font sizes used: 12 and 14. I have no idea why all those classes were generated. If italics are considered another class, we have only three classes. Yikes. It's gone rogue!
This is your heading...
<h1 id="id_Toc525564898" class="block_12">Chapter 1</h1>

The <h1> tag is pretty easy to find in the xhtml pages as you have discovered.
The class attribute in the <h1> opening tag indicates that value "block_12" is styling the heading. It may be a different value in your next book.
You then go to your css page, and find that same class, "block_12" in this case, and modify it.
You should also check each heading to ensure that they are all using the same class. I have a suspicion some may be different, judging by the size of that stylesheet you posted.

It's best that you don't specify a font size for the body of the novel. Let the user set that to their own personal preference in the ereader settings. Which is why I suggested removing the font sizes.
Karellen is offline   Reply With Quote
Old 06-25-2023, 11:32 PM   #7
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,720
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@skunkworks - perhaps, you're applying a template to your Word document that has a lot of redundant styles. I ran into similar problem with calibre conversions when one of my collaborators decided to combine their various templates into one and then apply it to the document we were working on. Daft idea, which they backed-out of after a short while.

Because calibre can convert anything to everything it has to adopt an LCD approach. If you want to preserve your word template style names etc you could use the Sigil DOCX plugin (requires a map of Word styles to CSS styles) or the Epub-tools Add-on for Word.

BR
BetterRed is online now   Reply With Quote
Old 06-26-2023, 06:53 AM   #8
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,016
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Quote:
Originally Posted by skunkworks View Post
Thank you, Karellen. So that I can hopefully learn from your largesse, how can I tell in the next ebook which block is H1?

The novel is not at all complicated. There are only two font sizes used: 12 and 14. I have no idea why all those classes were generated. If italics are considered another class, we have only three classes. Yikes. It's gone rogue!
Your original Word doc has not proper paragraph styles for headings and body text.
Quoth is offline   Reply With Quote
Old 06-26-2023, 03:28 PM   #9
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: 79,745
Karma: 145864619
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 skunkworks View Post
Using Styles in Word, chapter headings are set to 14pt, bold, centered, 12pt after. Text of book is 12pt. When converted, chapter headings (H1) appear smaller than book copy. What causes this behavior? It doesn't always happen, but this one poor problem child book is affected.
You are best to clear all styles from your Word document and restyle everything properly.
JSWolf is offline   Reply With Quote
Old 06-26-2023, 03:47 PM   #10
skunkworks
Member
skunkworks began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Mar 2023
Device: none
Quote:
Originally Posted by JSWolf View Post
You are best to clear all styles from your Word document and restyle everything properly.
Is that accomplished by selecting all text, then choosing "Normal"?
skunkworks is offline   Reply With Quote
Old 06-26-2023, 04:44 PM   #11
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,016
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
If a document was very messed up with direct formatting I'd copy and paste to a text editor (Notepad++ on Windows, KATE or anything on Linux). Then open a new blank document and copy /paste into it.

Then edit the default paragraph style. Normally all four margins and all four padding should be zero, but a first line indent should be to taste. Outline level = body text

Next find the headings and select a heading paragraph style. Edit it to taste (the style, not the heading). Outline level 1, 2 or 3. Apply to all headings. Make sure no auto numbering.

Have the Style browser and Outline browser windows open.

Now you can click on any heading in the Outline and select the next paragraph (first after a heading). Give it a new Paragraph style with maybe no first line indent and a non-zero top margin. Apply that to all first paragraphs after headings and breaks (though a 3rd style might be used for those).

Only apply bold to headings and only in the style, never direct.

The only direct formatting EVER at most is Italic words, superscript and subscript.

Do not use bullets or numbers for lists. Instead create a list-like paragraph style and type in first character.

Don't use Web style block-quotes. Create a more indented paragraph style. A poem or song may need:
Optionally a very first line style
Verse first line style (adds top margin)
Verse body style
Verse last line style (adds bottom margin)
Optionally a very last line style

Last edited by Quoth; 06-26-2023 at 04:50 PM.
Quoth is offline   Reply With Quote
Old 06-26-2023, 04:52 PM   #12
skunkworks
Member
skunkworks began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Mar 2023
Device: none
Thanks again. Quite informative!
skunkworks is offline   Reply With Quote
Old 06-26-2023, 05:45 PM   #13
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: 79,745
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
@Quoth, well said!
JSWolf is offline   Reply With Quote
Old 06-27-2023, 07:45 AM   #14
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,016
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
I did use to teach this stuff!
Quoth is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
keeping small images small in an epub krommenaas Editor 3 01-17-2021 04:17 AM
Why so small? r2d256 Calibre 2 12-14-2014 09:27 PM
I Heart Ed Small squirli Self-Promotions by Authors and Publishers 0 08-13-2012 02:23 PM
How Small A Book Can Be? Nathan Campos Writers' Corner 16 02-25-2011 04:45 AM
PRS-300 Med font size too big, but small font size too small eli2k Sony Reader 4 05-28-2010 09:47 AM


All times are GMT -4. The time now is 10:42 PM.


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