04-16-2022, 10:00 PM | #1 |
Wizard
Posts: 1,103
Karma: 4911876
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
<h2 title="xx">
Hello,
When a chapter heading has a chapter name as well as a chapter number, I normally use something like this. (You can guess what the classes do without the css code) PHP Code:
PHP Code:
Could someone tell me where I am going wrong? Thanks. |
04-16-2022, 11:15 PM | #2 |
Well trained by Cats
Posts: 29,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Did you regenerate the TOC after making that change?
(it does work for me the last time I did that in Sigil) |
Advert | |
|
04-16-2022, 11:22 PM | #3 | |
Well trained by Cats
Posts: 29,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Tried with Sigil 1.9.2 (and prior) and it works I think you found a weak spot |
|
04-16-2022, 11:31 PM | #4 | |
Wizard
Posts: 1,103
Karma: 4911876
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Quote:
I have been trying to use this on and off for the last few weeks and I couldn't figure out where my mistake was. I thought it was a epub v3.0 function only, but (I think it was) @KevinH confirmed it should work in v2.0 also. (And yes, I did refresh and regenerate the TOC. Usually I blank it, save/exit the toc editor, then back in and regenerate.) Hopefully @kovidgoyal might be able to look at the issue. Thanks again @theducks |
|
04-17-2022, 12:36 AM | #5 |
Running with scissors
Posts: 1,552
Karma: 14325282
Join Date: Nov 2019
Device: none
|
Another Sigil user here. A possible trick that might be useful.
I also use the title= thing. Code:
<h2 title="One - The storm">One <span>The storm</span></h2> Code:
h2 span, h1 span { display: block; } I think it was turtle91 who shared this trick. Last edited by hobnail; 04-17-2022 at 12:40 AM. |
Advert | |
|
04-17-2022, 12:37 AM | #6 |
Well trained by Cats
Posts: 29,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
You are welcome.
For now, why not use Sigil's TOC tool? (it only works on H# tags) (I use both, but prefer some of the options that Calibre offers for odder cases) |
04-17-2022, 05:47 AM | #7 | |
Resident Curmudgeon
Posts: 74,015
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
04-17-2022, 07:11 PM | #8 | ||
Wizard
Posts: 1,103
Karma: 4911876
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Quote:
Quote:
h1 is on the title page (thought I could probably get rid of that) h2 is used for the parts of the book which are split into days - "Day 1- Contact" and h3 is used for the chapters in "Day 1" Just to confirm that my issue is with the creation of the TOC which omits the title="" portion of the heading. |
||
04-17-2022, 10:08 PM | #9 |
Wizard
Posts: 1,071
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
I'm not very good with complicated CSS, so I usually try and keep it simple and only use title to have something appear in the TOC
Code:
<h1 title="Cover"</h1> ..... <h1>1 <br/>*"The Country of Lost Borders</h1> ... Cover 1 The Country of Lost Borders 2 The Country of More Lost Borders etc. Simple minded, but works for me |
04-17-2022, 11:05 PM | #10 | |
Running with scissors
Posts: 1,552
Karma: 14325282
Join Date: Nov 2019
Device: none
|
Quote:
What phossler is doing with a br would also give you two lines but you'd still need to put a span around the part you want styled differently. I don't understand what that asterisk and double quote does. Does it suppress the br so it doesn't show up in the table of contents? |
|
04-18-2022, 12:26 AM | #11 |
Wizard
Posts: 1,103
Karma: 4911876
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
No, its just a silly typo-o.
By the time I noticed it was already quoted in other posts, so I left it as is. I meant to write this, and have no clue what sequence of silly blunders added that extra line PHP Code:
|
04-18-2022, 05:00 AM | #12 |
creator of calibre
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
04-18-2022, 06:26 AM | #13 | |
Wizard
Posts: 1,103
Karma: 4911876
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Quote:
I'll test and provide feedback once it is released. |
|
04-18-2022, 12:27 PM | #14 |
Running with scissors
Posts: 1,552
Karma: 14325282
Join Date: Nov 2019
Device: none
|
I tested and phossler's trick of using a br in the h1 works. I was wondering if the br would get pulled into the nav.xhtml but with sigil but it does not. Likewise with the span, so that makes sense, it strips out any formatting stuff.
So now I'm wondering why I thought the way I'm doing it was better; I'd still need the span for formatting if I want the chapter title or number formatted different. The thread were I saw this was several years ago so I don't remember the details. |
04-18-2022, 01:02 PM | #15 | |
Well trained by Cats
Posts: 29,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
The space before the BR is preferred as it does not obviously displace the next line (really a sore thumb when left-justified) Note:I am not submitting books for publication in other formats, where this trick might bomb ugly |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Having "title Sort" always matching "title" | Ansem_93 | Library Management | 3 | 02-21-2021 05:48 PM |
Remove "Author" from "Title" field | ctop | Library Management | 0 | 02-25-2020 10:19 PM |
Use "short" instead of "full" title for title sort & renaming? | wolpi | Library Management | 2 | 08-04-2016 05:25 PM |
Aura Books not listed by title but just "<title> - <number> - <series>" | qee4q | Kobo Reader | 12 | 05-10-2015 04:37 PM |
A warning for Linux users: slow "Add Books", "Unknown" title and Author | rolgiati | Library Management | 8 | 07-24-2013 04:36 PM |