![]() |
#1 |
Member
![]() 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.
|
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Member
![]() 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:
Last edited by theducks; 06-25-2023 at 11:17 PM. Reason: OP did not use spoilers on log |
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#5 |
Member
![]() 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! |
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,611
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Quote:
<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. |
|
![]() |
![]() |
![]() |
#7 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 |
![]() |
![]() |
![]() |
#8 | |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,016
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Quote:
|
|
![]() |
![]() |
![]() |
#9 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
|
|
![]() |
![]() |
![]() |
#10 |
Member
![]() Posts: 19
Karma: 10
Join Date: Mar 2023
Device: none
|
|
![]() |
![]() |
![]() |
#11 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#12 |
Member
![]() Posts: 19
Karma: 10
Join Date: Mar 2023
Device: none
|
Thanks again. Quite informative!
|
![]() |
![]() |
![]() |
#13 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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!
|
![]() |
![]() |
![]() |
#14 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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!
![]() |
![]() |
![]() |
![]() |
|
![]() |
||||
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 |