![]() |
#31 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 682
Karma: 4568205
Join Date: Jan 2010
Location: Sweden
Device: Kobo Forma
|
Quote:
![]() ![]() In this case the challenge was to have one sort of space between the two lines, and another between the second line _if_ it got split up on two lines on the device, within the same h#. Your example did all that. Jon's didn't. Your new example is shifting the goal post by moving the second line outside the header. You don't get a correct toc now, without adding other stuff. But, it's yet another example of how one can do "two chapter lines", so it's still helpful. ![]() Last edited by patrik; 05-03-2019 at 11:20 AM. |
|
![]() |
![]() |
![]() |
#32 | |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,311
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
|
|
![]() |
![]() |
![]() |
#33 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,123
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#34 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,123
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#35 | ||
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,311
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
Quote:
The example is designed to show how to do multiple lines with a single <h?> tag, how the proper use of display:block works, and that by using it properly the auto TOC functions work just fine. It is NOT designed to show all the different styling possibilities like font-variant - I just like small caps and it works on my devices so I use it... I'm not going to filter my advice just because some, IMO inferior ![]() If you note the "/* (however you want to style it) */" at the top of the CSS section you could deduce that the OP could style it.....wait for it.... however they want to style it. Cheers, |
||
![]() |
![]() |
![]() |
#36 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,581
Karma: 11380098
Join Date: Aug 2010
Location: NE Oregon
Device: Kobo Sage, Pocketbook Era, Kobo Forma, Kindle Oasis 2
|
So I tried Turtle91's method for chapter number and title and it worked great! No troubles on ADE, iBooks or Kindle. Many thanks!
BUT, I ran the epub through Kepubify and loaded the kepub on my Kobo Aura One and it didn't work there. What happened was the h2 styling was mostly ignored and the span honored. Both chunks of text displayed at 1.4em font size, bold and left-aligned. The look I was trying to achieve was with the chapter number RIGHT aligned (not bold) and the chapter title LEFT aligned (bold), mimicking the print book. But in the kepub, I got both showing LEFT aligned and at the font size and weight set for the chapter title. This is the CSS. It validated. So did the epub before Kepubifying it. Code:
{ font-size: .96em; font-weight: normal; font-style: normal; text-align: right; text-indent: 0; margin-top: 18%; margin-bottom: 15%; } h2 span { display: block; font-size: 1.4em; font-weight: bold; text-align: left; margin-top: 2em; } Code:
<h2>CHAPTER 1<span>Chapter Title</span></h2> The look in the kepub is readable, just not nice looking. I was able to make it work for kepub, by assigning spans and classes to both chapter number and title and styling accordingly, that solution works across the board, ADE, iBooks, Kindle, Kobo kepub, but it's NOT elegant. So did I do anything wrong here that prevented it from working as kepub or is it a Kobo thing? Or possibly a Kepubify issue? |
![]() |
![]() |
![]() |
#37 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,802
Karma: 168802811
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Code:
<div> <h2 class="leftie"><span class="biggun">Chapter Title</span></h2> <h2 class="rightie">Chapter 1</h2> </div> <div style="clear: both;"></div> .leftie { float: left; } .rightie { float: right; } h2 { font-size: 1em; font-weight: normal; font-style: normal; margin-top: 2em; margin-bottom: 2em; } .biggun { font-size: 1.4em; font-weight: bold; } |
|
![]() |
![]() |
![]() |
#38 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,581
Karma: 11380098
Join Date: Aug 2010
Location: NE Oregon
Device: Kobo Sage, Pocketbook Era, Kobo Forma, Kindle Oasis 2
|
I suppose I could try with both lines left or a traditional centered alignment for both. But the left/right thing works beautifully and exactly as I wanted it to look everywhere BUT kepub. And it's a look I've encountered in more than one book. I don't *have* to mimic the print style, but I like to come close when I can.
I'd still want chapter number to be smaller than chapter title, and I'm not convinced that will convert to kepub successfully just by changing to a more traditional alignment, but I will try it just to see. Who knows, maybe it was the alignment that threw off the kepub? Sent from my iPad using Tapatalk |
![]() |
![]() |
![]() |
#39 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,123
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#40 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,123
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#41 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,311
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
...says the opinion police....twice!!
![]() |
![]() |
![]() |
![]() |
#42 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,581
Karma: 11380098
Join Date: Aug 2010
Location: NE Oregon
Device: Kobo Sage, Pocketbook Era, Kobo Forma, Kindle Oasis 2
|
Quote:
You are missing the point. I'm looking to retain the feel of the vintage print title style. And what I'm asking is why the simple h2 span code works everywhere but kepub. And whether there is a way to make the h2 span also work in kepub. I may scrap trying to mimic print for this book, but I personally don't mind screen space used around chapter heads. Paper got wasted in print books for chapter headers and I wasn't bugged by that! It'd be kind of boring if every ebook looked the same. Sent from my iPad using Tapatalk |
|
![]() |
![]() |
![]() |
#43 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,304
Karma: 78876004
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
I wonder if there might be any applicable guidelines in https://github.com/kobolabs/epub-spe...ster/README.md especially regarding the use of em measurements
Sent from my moto g(7) power using Tapatalk |
![]() |
![]() |
![]() |
#44 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,581
Karma: 11380098
Join Date: Aug 2010
Location: NE Oregon
Device: Kobo Sage, Pocketbook Era, Kobo Forma, Kindle Oasis 2
|
Quote:
I think you may have found it! This seems like it might be the issue: Quote:
I sure liked the simplicity of h2 span, but I think I'd rather have a book that, when converted to kepub, looks the same as it would in ADE, Kindle and iBooks. Sent from my iPad using Tapatalk |
||
![]() |
![]() |
![]() |
#45 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,123
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Don't do things that don't work. 18% and 15% space around a chapter title does not work for an eBook. Having offset text (like in a blockquote) be smaller doesn't always work. Having the main text be smaller then 1em doesn't work. Having large left/right margins doesn't work. Embedding a font just because it was the font used in the pBook doesn't work (there are cases where it does work, but in most cases it doesn't work). Graphics have to be of high resolution or they may not work. Do not a graphics of text just because it's easier then created the code as that doesn't work. You have to create your eBook so it works as an eBook and no as thought it was a pBook. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with Chapter seperators (lines underneath chapter headings) | indieauthor83 | Sigil | 9 | 06-23-2017 06:01 AM |
Next chapter in the saga of poor ebook formatting | Joques | General Discussions | 140 | 05-13-2015 05:31 PM |
xpath to insert chapter breaks - but chapter name cut off ? | Rob557 | Conversion | 2 | 03-06-2014 06:59 AM |
Formatting Chapter Breaks? | NVash | Calibre | 3 | 12-09-2010 05:09 AM |
Formatting error causes a whole chapter to be unreadable | kjturner71 | Kobo Reader | 3 | 11-08-2010 04:50 PM |