Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 07-13-2016, 07:32 AM   #1
erbilac
Junior Member
erbilac began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jul 2016
Device: Windows laptop / android phone
Theme TOC. Remember theme for each ebook

TL;DR/

could e-reader themes also theme the TOC? is it possible to assign a hotkey to swich themes or make Calibre automatically apply the last theme used on each ebook?

/TL;DR
--------------------------------------

I have just started playing with Calibre, I love it, but I cannot find the way to theme the TOC in the e-book reader.

My aim is to have an all black UI with light text over black background for all ebooks.

So I would like to create two themes, one entirely white (the unmodified one is OK) and one entirely black (including TOC, hidden or black TOC scrollbar, and other UI elements like toolbars if possible). Then, make the dark theme default, and when opening an ebook with special css (e.g. code with light background), switch to light theme and use external applications to invert colors.

Ideally, calibre should also automatically apply last theme used on each ebook and assign a hotkey to switch between themes.

I know that I could edit the stylesheet.css for each ebook, but, although I am not an expert, it seems that this is not an easy task because each ebook uses different names for code backgrounds and editing each ebook this way a tedious hit/miss job... Also, for the same reason, a user css style will not suit all ebooks... I might be wrong.
I would like to know what do you think is the best approach to what I want to do. Thanks
erbilac is offline   Reply With Quote
Advert
Old 07-13-2016, 01:04 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 21,024
Karma: 20776314
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab 2(RIP)
You can't style an EPUB2 TOC (NCX)

You could modify the template (see the FAQ on overrides at calibre-ebook.com) for the Inline TOC. That will not change any existing inline TOC automatically
theducks is offline   Reply With Quote
Old 07-27-2016, 05:21 AM   #3
erbilac
Junior Member
erbilac began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jul 2016
Device: Windows laptop / android phone
Thanks for your reply.
The template file inline_toc_styles.css seems to serve another purpose. I edited it in many different ways but it does not affect the look of the ebook viewer TOC. Maybe I am doing it wrong... not sure.

I checked the source code of calibre but I am finding it hard to locate the file I need to modify so that the default TOC is white on black. Any help appreciated
erbilac is offline   Reply With Quote
Old 07-27-2016, 05:30 AM   #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: 31,753
Karma: 8696042
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
viewer/toc.py
kovidgoyal is offline   Reply With Quote
Old 07-27-2016, 10:20 AM   #5
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 21,024
Karma: 20776314
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab 2(RIP)
The Viewers TOC is not an 'inline' TOC, that would be just another page of the book.

The TOC button in the viewer uses the NCX.
Kovid told you how to change the way the VIEWER displays the NCX (for all books)
theducks is offline   Reply With Quote
Advert
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Board Theme Xanthe Feedback 5 11-12-2013 09:47 PM
theme source for modern and sdk default theme gshank PocketBook Developer's Corner 6 07-18-2011 05:06 PM
Theme for Disability tanread PocketBook 2 06-17-2011 04:19 PM
Cleanmix Theme mystic PocketBook 12 01-01-2011 07:31 AM
Suggestion for Wiki: Split ebook stores by theme? Elfwreck Feedback 3 08-10-2009 03:31 PM


All times are GMT -4. The time now is 04:41 PM.


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