06-10-2024, 04:28 PM | #1 |
Resident Curmudgeon
Posts: 76,337
Karma: 136006010
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
How's this for one heck of a messy chapter header?
I think this is a Vellum made messterpiece. It's one heck of a mess of code. This is why Vellum needs to go away forever.
Code:
<div id="chapter-37" class="element-bodymatter" role="doc-chapter" epub:type="chapter"> <div class="heading heading-container-single heading-size-full heading-format-full heading-without-image"> <div class="heading-contents"> <div class="title-subtitle-block"> <div class="element-number-block"> <div class="element-number case-upper">THIRTY-SEVEN</div> </div> <div class="title-block"> <h1 class="element-title case-upper">DANNER</h1> </div> <h2 class="element-subtitle case-upper">FEBRUARY 1943</h2> </div> </div> </div> <div class="text" id="chapter-37-text"> <div class="alignment-block"> <div class="text-block"> <p class="alignment-block-content alignment-block-content-center">Dachau, Germany</p> </div> </div> |
06-10-2024, 05:10 PM | #2 |
Bibliophagist
Posts: 40,426
Karma: 156982136
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
How does this affect those who do not spend their reading time looking at the code? Does it make the ebook unreadable for them? Would they notice any difference if you cleaned up and minimalized the code?
|
Advert | |
|
06-10-2024, 05:20 PM | #3 |
Wizard
Posts: 1,353
Karma: 6794938
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Yea, I agree with JSWolf. It's excessive. Reminds me of this little beauty (see image)
@DNSB who cares. It's a little post about excessive code. Roll with it. Maybe you don't feel the need to look at stuff like this and immediately want to clean it up, others like me get caught up in some OCD thing and dive right in. I find it somewhat cathartic. Attachment 195405 |
06-10-2024, 05:41 PM | #4 |
Grand Sorcerer
Posts: 6,388
Karma: 12117217
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
@DNSB, in this case (please, don't repeat this...), I agree with JSWolf. It's something I see a lot in the books (I don't read the code but I like to clean it and set it as I like), and I simplify inmediately.
|
06-10-2024, 08:46 PM | #5 |
Fanatic
Posts: 502
Karma: 2267928
Join Date: Nov 2015
Device: none
|
That is inevitable. HTML was designed for man pages, not for books, so it has no concept of a heading.
|
Advert | |
|
06-11-2024, 05:13 PM | #6 |
Grand Sorcerer
Posts: 11,451
Karma: 230178176
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
|
Heh. As long as it looks the way I want on my ereader, I don't care how messy the code is. I have far too many books to bother with simplifying the code just for simplicity's sake; if I did that, I would have no time to read at all. I just fix anything that wouldn't look the way I want, and leave the rest alone. Too many books and not enough time. YMMV, of course.
|
06-11-2024, 06:00 PM | #7 |
Resident Curmudgeon
Posts: 76,337
Karma: 136006010
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
There are a number of us on MR who do dive into the eBook code, So those of us who do would see that mess.
|
06-11-2024, 06:03 PM | #8 |
Resident Curmudgeon
Posts: 76,337
Karma: 136006010
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
06-11-2024, 06:08 PM | #9 |
Resident Curmudgeon
Posts: 76,337
Karma: 136006010
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I would clean up that mess of divs as well and be left with just three lines for the chapter headers formatted to what I like.
|
06-12-2024, 01:50 AM | #10 |
Bibliophagist
Posts: 40,426
Karma: 156982136
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Personally, I would open the book in Sigil and run my collection of saved searches and plugins—the majority of my saved searches are Vellum specific and yes, I would end up with something like:
Code:
<body> <div role="doc-chapter" epub:type="chapter"> <h2 class="chapnum">DANNER</h1> <p class="trifecta">FEBRUARY 1943</p> <p class="center2">Dachau, Germany</p> ... ... </div> <body> If Jon whinged about InDesign, Scrivener, Jutoh, etc. as often as he whinges about Vellum, it might be more palatable. Instead, he endlessly grumbles about Vellum. I used a quick Google search "jswolf vellum site:mobileread.com" and it comes up with a <expletive deleted> larger number of hits than a similar search for InDesign. I have to agree that a Vellum produced ebook is not clean and simple code. OTOH, I believe that those of us who look at the code are a very small minority and the overwhelming majority will simply enjoy reading the book. On the gripping hand, Vellum has remained very consistent over several versions making the cleanup task very automatable so a task that once took me 10-15 minutes now takes about 2-3 minutes. |
06-13-2024, 12:49 PM | #11 |
the rook, bossing Never.
Posts: 12,329
Karma: 90943357
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
|
06-13-2024, 12:53 PM | #12 | |
the rook, bossing Never.
Posts: 12,329
Karma: 90943357
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
Quote:
|
|
06-13-2024, 06:05 PM | #13 |
Bibliophagist
Posts: 40,426
Karma: 156982136
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Most automated document creation/conversion programs create very ugly code when you look under the covers.
One job I'm looking at taking on for the next couple of weeks is an author whose book rights reverted but the publisher supplied 4 of the books as PDF and 3 as fixed layout ePubs straight from InDesign. What they want is to have them in Word/LO Writer format so the books can be edited and republished. Thankfully, they understand the limitations of what I am willing to do for the amount they can afford to offer. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Header fails to recognize chapter progress - bug? | Skydog | Kobo Reader | 2 | 04-06-2022 11:16 PM |
Is there a way to show chapter name as header on every page? | Dragan Tanevski | ePub | 10 | 10-28-2015 04:27 PM |
Image as Header for Chapter | Peter21 | Sigil | 43 | 12-07-2013 03:31 PM |
Using images to make chapter header fonts in Kindle (opinions?) | Stodder | Kindle Formats | 1 | 05-18-2011 01:58 AM |
Strange chapter header issue? | bfollowell | Kindle Formats | 27 | 04-05-2011 06:58 PM |