![]() |
#16 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,796
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
@MistaPrime,
There is a solution to your problem. Don't convert. Use the Calibre eBook editor to edit the HTML and make it into an eBook. It's not all that hard to do. Do you know how to do it? |
![]() |
![]() |
#17 | |
Member
![]() Posts: 11
Karma: 10
Join Date: Jul 2019
Device: EPUB
|
Quote:
Is it the "Edit Book" icon in the top right corner? Doesn't it have to be already in ePub format? |
|
![]() |
Advert | |
|
![]() |
#18 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,796
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
![]() |
![]() |
#19 |
Member Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 805
Karma: 2091358
Join Date: May 2019
Device: Kindle Oasis 1st Gen, PB Era
|
Sigil definitely can edit html files. I have not used the Calibre editor but I seem to remember someone posting questions about it somewhere and html came into the equation, so my vague, hazy recollection is that you CAN edit html files with the calibre editor.
|
![]() |
![]() |
#20 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,745
Karma: 30237526
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
You can use the calibre Book Editor independently of Library Management
On Windows you can get at it via the Start panel, viz: And from there you can import an HTML file BR |
![]() |
Advert | |
|
![]() |
#21 | |||
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,391
Karma: 169098492
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Quote:
If you had downloaded the stylesheets associated with that page and placed them in the HTML archive, the footnote class would have been preserved and used. Edit: I tested this by using Firefox's Save Page As on Legislative Summary of Bill C-99: An Act to amend the Citizenship Act, saving the result as a .zip file which I imported into calibre and then converted to epub. See the snippet of the epub open in PageEdit attached as an image. Notice the footnotes references are superscripted. The exact stylesheet structure was not preserved due to calibre's love of flattening stylesheets but the intent was preserved. Quote:
Good luck! |
|||
![]() |
![]() |
#22 | |
Member
![]() Posts: 11
Karma: 10
Join Date: Jul 2019
Device: EPUB
|
Quote:
Maybe the competency you should question is your own reading comprehension. The request is not debating if a class is being associated with CSS or not. The class I mentioned could have been associated with a JS for all we care, used or not used. What is in question here is the repeated request to keep a class regardless of it's use. Calibre ads classes, but what if someone wants to keep a class for an unknown use? Rather than having to edit the HTML on thousands of imports, Calibre could simply exclude one class from being removed. Even if that class is associated with any CSS or JS. That to me is a pretty reasonable request. I didn't have to listen to you questioning my competency or another user assuming that I am getting paid by a client. Thanks for the help really, but keep your derogatory assumptions to yourself and work on your reading comprehension. |
|
![]() |
![]() |
#23 |
Member
![]() Posts: 11
Karma: 10
Join Date: Jul 2019
Device: EPUB
|
JSWolf, Bookstooge, BetterRed, thank you guys. I will definitely look into Sigil, perhaps it can ommit the removal of classes.
Thank you, I really appreciate the help and generous support of this community. It has exceeded my expectations. I will definitely try to give back by helping others on here once I figure out more on how this works. |
![]() |
![]() |
#24 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,079
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Been there (my first HTML was in 2000), when CSS had not been invented.
Take time and get your head wrapped in the CSS concept. For most ebooks, it is really simple. I learned by reversing early Baen Webscriptions. Basically: design IT. Control IT (from a single place. The CSS). Use (reference) IT through out your document. Code:
/*CSS most simple */ body {} h3 {} p {} /*add if used in your doc */ sup {} sub {} blockquote {} Need an exception to the basic rule. add class="except-name" to the tag on the document the CSS gets an entry (these always start with/have a dot in the CSS ) Code:
.except-name { } Calibre you turn it on from the Editors view menu, It will appear at the bottom, and may need to be resized to be of use as it does not seem to detach. Sigils version: you use the Flashlight Icon to activate the Inspector on the selected block. Even Firefox has it for decoding web page code (ctrl-shift-C) ![]() The whole point is to control each style (look) from a single place, rater than multiple places. |
![]() |
![]() |
#25 |
Member
![]() Posts: 11
Karma: 10
Join Date: Jul 2019
Device: EPUB
|
The request is pretty simple, no need to assume that someone doesn't know what CSS does. Maybe I should have formulated the request differently.
Assume you are an Android developer which will make an app for ePUBS. That app will do things with the ePUB such as animations. And that app will depend on classes in the HTML, there is no CSS. CSS is not relevant. Your HTML has classes already and you want to keep those classes, at least one class. But you have thousands of HTML files that you cannot edit. How do you tell Calibre to not remove that one class? From what I understand that option is not available in Calibre. Calibre seems to remove all classes it thinks are not necessary. You are out of luck if you think that one class is necessary and Calibre doesn't think so. Would it be difficult to introduce that option into Calibre? Just a field where you enter a class name, and based on that field Calibre doesn't remove that class. Am I the first one to request this feature? It seems reasonable to keep a class in an ePUB and I can think of millions of reasons why someone would want to keep a class. |
![]() |
![]() |
#26 | |
Member
![]() Posts: 11
Karma: 10
Join Date: Jul 2019
Device: EPUB
|
Quote:
At this point I think I need to start a new thread. I gotta re-phrase the request in the next topic. This will be the title: CSS not relevant, forget about CSS or JS. How to tell Calibre to keep a class, without editing HTML. Pretty simple request really. I can think of a million reasons why someone would want to keep a class in the HTML once converted into EPUB. What if you are an app developer for Android who wants to animate specific words when the app is viewing the ePUB? You would need classes to be kept after conversion. Calibre removes all classes that are not used by the file's stylesheets. I can think of a million reasons why someone would want to keep a class and not mention it in the stylesheets. As a matter of fact I have made in the past a webapp which had classes only for when the pages were viewed by it's Android app. The classes are used only in the app, not in stylesheets or in the JS of the page. There are millions of HTML pages, and examples where a class is not used by CSS stylesheet. I am sure someone could add that to Calibre, just one field that says this: Input class name here which you do not want to be removed during conversion. I can't believe I am the first user offering that suggestion, I am sure others have struggled with this. |
|
![]() |
![]() |
#27 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,379
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I cant think of a single reason to keep useless classes in HTML, let alone a million. And no calibre is not going to do that. If you wish to annotate HTML with metadata use the data-* attributes, its what they are for, and calibre will not touch them.
|
![]() |
![]() |
#28 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,379
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Oh and since you seem to be determined to argue for the sake of arguing, here is how you actually fix your problem, which IIRC was to get superscripts to display aligned. Add the following to the extra CSS option in the calibre conversion options under Look & feel
Code:
.footnote { vertical-align: super } |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Pseudo classes to be deleted as unused classes | Leonatus | Sigil | 2 | 09-23-2018 09:12 AM |
docx to epub - obsolete classes for italic and bold | krbo | Conversion | 2 | 01-09-2014 05:44 AM |
CSS classes on Android epub readers | MarleneW | ePub | 7 | 05-13-2012 04:57 PM |
txt to Epub - adding classes with textile | Nareshkendel | Conversion | 4 | 11-23-2011 05:30 PM |
Why, During ePub to ePub Conversion does Calibre changes existing CSS classes? | JSWolf | Conversion | 7 | 08-06-2011 07:32 PM |