04-24-2015, 04:56 PM | #931 |
Wizard
Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
|
The problem is that neither <p> </p> nor <p><br/></p> is "empty" - because they contain text - and that's generally what I see used for this purpose. It's another case of "easy for a human to recognize, but hard to automate removal." Factor in that there's usually a class attached to the P element in such cases (especially to force a nonzero height to hack around the fact that the latter example is often - correctly - discarded without being displayed), and this becomes a rabbit hole really fast.
|
04-24-2015, 06:07 PM | #932 | |
null operator (he/him)
Posts: 20,575
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Option to put 'added/replacement metadata jacket' at the back of the book. At one time I hacked Modify to do it, as I recall it was fairly simple to do (that I succeeded in doing it, is testament to that). Sadly I lost the hack but by then I'd become au fait with Sigil so now I move it manually. But I sometimes forget, so it would be nice to have the feature in the 'official' PI. I know of two other users who would appreciate it because they also lost my hack - yeah I know, bad config management practices BR |
|
04-24-2015, 06:27 PM | #933 |
Grand Sorcerer
Posts: 6,234
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
I have hacked in that way, as an additional option, so if you want it... (After reading a previous message from you, I should tell)
|
04-24-2015, 06:30 PM | #934 |
Wizard
Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
|
I know literally nothing about Calibre jackets, beyond having heard the term. If you (or someone else) can find the hack, I can look at splicing it in, but beyond that...
|
04-24-2015, 07:25 PM | #935 | |
null operator (he/him)
Posts: 20,575
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
But looks like Terisa de morgan has something. I don't think its my hack, and I suspect Terisa is a better hacker than moi, hopefully she will share her code with you. BR |
|
04-25-2015, 01:01 AM | #936 | |
Wizard
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
Quote:
I don't see that, so unless renderers are smart enough to suppress that redundancy.... UPDATA: actual explanation, based on my sample of 1 books where I have not manually removed such code: calibre defines the class as this .mbppagebreak { display: block; margin: 0 } so i'ts not going to do anything when applied in an empty div, except maybe cause a spurious line feed in some renderers Last edited by cybmole; 04-25-2015 at 01:12 AM. |
|
04-25-2015, 02:31 AM | #937 | |
Wizard
Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
|
Quote:
There's one feature I'd like to see, but there's too much involved for me to add it myself. iBooks requires that a certain XML file be present before it will honor certain font changes, and while I can manually add it easily enough, it'd be nice to autodetect the presence of embedded fonts and add it on the fly. Similarly, the ability to automagically run the "remove unused CSS rules and classes" during a cleanup would be useful. But then, while I'm wishing, I might as well wish for a magical module that analyzes the CSS, rescales the font sizes so that the main text is "medium", and performs other such optimizations. I guess I'll have to keep doing it myself, though; it's delicate work that requires skull sweat to handle correctly. At least I've got the indie author I'm doing formatting/editing work for set up with a proper template that spits out decent code when saved as HTML. It still needs some manual tweaking, but not a lot. |
|
04-25-2015, 02:52 AM | #938 | |
Wizard
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
Quote:
for me it's better done there , as I run if after manually removing unwanted front and back adverts/previews/reviews/other crud |
|
04-25-2015, 03:49 AM | #939 |
Grand Sorcerer
Posts: 6,234
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
I do the same than @cybmole, so remove css is not an option which would be necessary for me here. @Rev. Bob, I send you a PM with the small changes I've made for the jacket at the end of the book.
|
04-25-2015, 04:15 AM | #940 | |
Wizard
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
Quote:
then remove unused CSS then remove any explicit line heights ( as they prevent kobo sliders from working properly) then remove any explicit font-family declarations ( ditto - they block device overrides ) I don't think those latter 2 are valid auto tweaks either. for reading offline, I also remove all the <a> anchors ,unless book uses footnotes, as they confuse some readers if you accidentally tap them. the ones that refer back to a TOC are a nuisance, espeically if I've removed the not needed toc html page ! |
|
04-25-2015, 05:08 AM | #941 | |
Grand Sorcerer
Posts: 6,234
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Quote:
|
|
04-25-2015, 05:10 AM | #942 | |
Wizard
Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
|
Quote:
|
|
04-25-2015, 05:33 AM | #943 | |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
What you describe is definitely not by "my logic." I took you to mean that you didn't think reading systems rendered soft page breaks at all. Clearly you were talking about something else. Now I know. And yes, I do believe most reading systems are smart enough to suppress that kind of redundancy. Last edited by DiapDealer; 04-25-2015 at 05:37 AM. |
|
04-25-2015, 09:01 AM | #944 |
Wizard
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
I admit that before I checked the class definition, I assumed it would contain some page break directive, as the class name implied, and so I then assumed that said directive was not being honoured. Mea culpa x2
|
04-26-2015, 05:14 PM | #945 | |
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:
|
|
Tags |
modify epub |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Quality Check | kiwidude | Plugins | 1184 | 04-17-2024 06:17 PM |
[GUI Plugin] Open With | kiwidude | Plugins | 403 | 04-01-2024 08:39 AM |
[GUI Plugin] Manage Series | kiwidude | Plugins | 166 | 02-13-2024 11:31 AM |
Modify ePub plugin dev thread | kiwidude | Development | 346 | 09-02-2013 05:14 PM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |