Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 04-04-2020, 12:34 PM   #1
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,251
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Entering metadata comments as HTML list

I was recently trying to enter Comments metadata for a short story anthology as an unordered list. I typed the following simple code directly in the 'HTML source' box
Code:
<ul><li>Story one</li><li>Story two</li><li>Story three</li></ul>
When I go back to 'Normal view' everything is visually OK but if I go back to the 'HTML source' box the simple code has transformed itself to this:
Code:
<ul><li style="margin-left: 0px; margin-bottom: 0px; margin-top: 12px; margin-right: 0px; text-indent: 0px">Story one</li>
<li style="margin-left: 0px; margin-bottom: 0px; margin-top: 0px; margin-right: 0px; text-indent: 0px">Story two</li>
<li style="margin-left: 0px; margin-bottom: 12px; margin-top: 0px; margin-right: 0px; text-indent: 0px">Story three</li></ul>
I'm not sure how long this has been happening, because I haven't bought any other anthologies recently. I really don't like these unwanted style="" attributes. It clutters up the epub's OPF file and it doesn't look as neat as it used to when I view the Comments on my Kobo's book details page, either, because each line is double-spaced.

I was wondering whether there's anything at all I can do about it?
jackie_w is offline   Reply With Quote
Old 04-04-2020, 12:41 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,301
Karma: 27111240
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
use the GUI controls to insert lists, see the markup they produce and copy that in your source HTML editing.
kovidgoyal is online now   Reply With Quote
Advert
Old 04-04-2020, 01:55 PM   #3
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,251
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by kovidgoyal View Post
use the GUI controls to insert lists, see the markup they produce and copy that in your source HTML editing.
If I type in all te stories, one per line, then select and use the GUI control for unordered list I also get all the style="" stuff:
Code:
<ul><li style="margin-bottom: 0px; margin-right: 0px; margin-top: 0px; margin-left: 0px; text-indent: 0px">Story one</li>
<li style="margin-bottom: 0px; margin-right: 0px; margin-top: 0px; margin-left: 0px; text-indent: 0px">Story two</li>
<li style="margin-bottom: 0px; margin-right: 0px; margin-top: 0px; margin-left: 0px; text-indent: 0px">Story three</li></ul>
Is there no way of ending up with simple <li> tags without any attributes at all?
jackie_w is offline   Reply With Quote
Old 04-04-2020, 11:35 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,301
Karma: 27111240
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
those are inserted by Qt's annoyingly bad rich text editor. But I suppose I can strip them out again https://github.com/kovidgoyal/calibr...241d4e79e2e7b2
kovidgoyal is online now   Reply With Quote
Old 04-05-2020, 07:45 AM   #5
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,251
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by kovidgoyal View Post
those are inserted by Qt's annoyingly bad rich text editor. But I suppose I can strip them out again https://github.com/kovidgoyal/calibr...241d4e79e2e7b2
I've tried this out in run from source. It appears to be working well for me. Thank you very much for looking at this Hope you're all well in Mumbai.
jackie_w is offline   Reply With Quote
Advert
Old 04-05-2020, 07:55 AM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,301
Karma: 27111240
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by jackie_w View Post
I've tried this out in run from source. It appears to be working well for me. Thank you very much for looking at this Hope you're all well in Mumbai.
Yes we are well. it's a hotspot, and there have been some confirmed cases half a km down the road, but so far no closer.
kovidgoyal is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about regex and html comments Vortex Calibre 1 09-22-2018 05:49 AM
Searching in comments for html-tags Kuhnke Calibre 1 05-23-2017 09:33 PM
Posible but at html comments Terisa de morgan Library Management 8 07-05-2016 07:22 AM
Comments in Metadata-dialog: Icons in normal view missing, changes in HTML not saved ikarus1969 Calibre 3 11-06-2013 02:40 PM
Metadata Comments Field - How to best tweak the html? Chris_Snow Library Management 5 08-13-2013 02:58 AM


All times are GMT -4. The time now is 05:19 AM.


MobileRead.com is a privately owned, operated and funded community.