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

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 06-05-2011, 12:26 AM   #1
BRGriff
Connoisseur
BRGriff began at the beginning.
 
Posts: 55
Karma: 12
Join Date: May 2011
Location: Deland, Florida
Device: Kindle 3
TOC font size

I have labored to remove all tags from my Gocomics and Arcamax comics downloads to allow me to maximize the screen area for viewing the comic image itself. I have succeeded in doing just that, getting only the strip .jpg and nothing else. That alone has enlarged the image greatly.

But the TOC link which appears at the top of each comic strip is taking up valuable screen space and precluding me from maximizing the image size even further.

How do I remove the TOC appearing at the top of each comic strip page, or alternatively, reducing the font size so it takes up less space?

If I had my way, I would do without a TOC , but I understand that is not an option for Mobi conversions.

Thank you
BRGriff is offline   Reply With Quote
Old 06-05-2011, 12:33 AM   #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: 26,436
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use the template_css variable in your recipe.
kovidgoyal is offline   Reply With Quote
 
Advertisement
Old 06-05-2011, 02:38 PM   #3
BRGriff
Connoisseur
BRGriff began at the beginning.
 
Posts: 55
Karma: 12
Join Date: May 2011
Location: Deland, Florida
Device: Kindle 3
I'm Confused!

Not like it comes as any big surprise, but I am confused. The calibre manual says to use extra_css instead of the template_css:
Quote:
#: The CSS that is used to style the templates, i.e., the navigation bars and
#: the Tables of Contents. Rather than overriding this variable, you should
#: use `extra_css` in your recipe to customize look and feel.
It doesn't seem to matter either way. The manual gives very little detail on using template_css and I do not know which variables to use or the proper syntac. I have tried researching the subject with no success. Can you point me to documentation on the subject?

I have also tried adding extra_css without success. I have looked at the input HTML and the sizing, underlining and coloration of the fonts for the TOC are done in the <p> and <span> sections of the html.

Right now I could use a free fish as nothing seems to be biting today!!!
BRGriff is offline   Reply With Quote
Old 06-05-2011, 02:43 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: 26,436
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Look at the source code of the BasicNewsRecipe class (see the further reading section in the UserManual)
kovidgoyal is offline   Reply With Quote
Old 06-05-2011, 02:59 PM   #5
BRGriff
Connoisseur
BRGriff began at the beginning.
 
Posts: 55
Karma: 12
Join Date: May 2011
Location: Deland, Florida
Device: Kindle 3
Dang Kovid, I ask for a fish and you throw me a minnow!!!

Oh well, I'll try baiting my hook with it and see if I get something this time around.
BRGriff is offline   Reply With Quote
Old 06-05-2011, 10:11 PM   #6
BRGriff
Connoisseur
BRGriff began at the beginning.
 
Posts: 55
Karma: 12
Join Date: May 2011
Location: Deland, Florida
Device: Kindle 3
I have been fishing all day boss but got not a single bite. I ate the minnow (since it seemed the only nourishment I am going to get for a while) and decided to lay down my pole for the day and get a beer or two or three. For those not understanding the fishing metaphor, Kovid believes in the maxim: "Give a man a fish and he will eat for a day. Teach a man to fish and he will eat for a lifetime." Somehow he believes I have the ability to figure this out. I have no idea what gave him that impression!!!

I read the the source code of the BasicNewsRecipe as you suggested but nothing jumped out at me. I thought I might need to import the metadata TOC to make the template_css work but that was of no use.

So here is what I have done so far:

1. Searched the forum for similar issues.
2. Read almost the entire calibre User Manual.
3. Done web research on Python template_css.
4. Done web research on CSS coding and style sheets.
5. Made modification to my recipe over 30 times in both the template_css and the extra_css.
6. "Debugged" the converted file and looked at the "input" toc.ncx, style.css and the html file. In the html, there are only the following tags: <div>, <p>, <span>, <a> and <blockquote> tags, all of which I have tried to change font size, color, decoration and font weight.

Eight hours later, I am no closer to the answer than I was in the beginning. None of the foregoing has made one iota of difference. In my reading, the calibre User Manual says:
Quote:
Then there is the metadata TOC. A metadata TOC is a TOC that is not part of the book text and is typically accessed by some special button on a reader. For example, in the calibre viewer, you use the Show Table of Contents button to see this TOC. This TOC cannot be styled by the book creator. How it is represented is up to the viewer program.
In light of the foregoing, I wonder if I am not just spinning my wheels trying to accomplish that which can not be done.

I am 90% finished with writing a recipe for Kindle users (.mobi) that will enhance the appearance and ease of reading comic strips on their device. I do not know if the code will work under Epub or any other format as I have no way to test it.

I am hoping Kovid or some other kind member of the forum will help me finish this project. I have undertaken due diligence and put in the time trying to figure this out, doesn't that entitle me to more than a minnow?
BRGriff is offline   Reply With Quote
Old 06-05-2011, 10:13 PM   #7
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: 26,436
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Ah you are generating output for the Kindle, then yes, there's nothing you can do. For non Kindle output, set extra_css to

extra_css = ' .calibre_navbar { display: none }'
kovidgoyal is offline   Reply With Quote
Old 06-05-2011, 10:15 PM   #8
BRGriff
Connoisseur
BRGriff began at the beginning.
 
Posts: 55
Karma: 12
Join Date: May 2011
Location: Deland, Florida
Device: Kindle 3
NOW you tell me!!! At least I learned a lot on the way. I will just have to work with the recipe given the limitation I can not modify the TOC which uses valuable screen space on my Kindle reader.

Last edited by BRGriff; 06-05-2011 at 11:09 PM.
BRGriff is offline   Reply With Quote
Old 06-06-2011, 09:14 PM   #9
BRGriff
Connoisseur
BRGriff began at the beginning.
 
Posts: 55
Karma: 12
Join Date: May 2011
Location: Deland, Florida
Device: Kindle 3
Sorry to be a pest!

I can not stop thinking that there must be some way to deal with the TOC font size, color and decoration. Obviously, the default calibre TOC.pyo or other html processor function defines the font size as 7, the color blue and the decoration as underline. It also assigns an "Untitled Article" tag with the same properties.

Before I go to any extensive efforts, I just want to throw this out. Can I create a CSS style sheet or a template for handling the TOC text and be able to call it from the recipe? I do not want to impose the limitations of the foregoing on ALL .mobi conversions, just the comics I download under that particular recipe. Remember, the ONLY text that would be available for the style sheet or template to act upon would be the TOC text.

Possible or not? If so, where do I begin?

BTW: With your prompting, I did try the extra_css = ' .calibre_navbar but instead of display: none; I had entered font weight, color, size and decoration. Alas, I was on the right track but on the wrong train!!!
BRGriff is offline   Reply With Quote
Old 06-06-2011, 09:23 PM   #10
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: 26,436
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Umm I'm utterly confused now. What do you mean when you say TOC? Post a screenshot.
kovidgoyal is offline   Reply With Quote
Old 06-06-2011, 09:58 PM   #11
BRGriff
Connoisseur
BRGriff began at the beginning.
 
Posts: 55
Karma: 12
Join Date: May 2011
Location: Deland, Florida
Device: Kindle 3
I misstated and accept full responsibility for your confusion. The Table of Contents (TOC) fond size, color and decoration are defined in the "input" file. The html code is the customary code for links: color blue, decoration underline. Calibre simply passes that through without modification. Let me try to rephrase my question.

Is there a possible way of taking the "input" file and either in the parsing or structuring process to use within the recipe a user defined CSS style sheet or template to modify the font size, color and decoration? I know it can not be done with "extra_css" on a mobi conversion. But can it be done with a user defined style sheet or template?

So very sorry for the confusion. If you are still confused, I will leave the subject alone and move on.
BRGriff is offline   Reply With Quote
Old 06-06-2011, 10:50 PM   #12
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: 26,436
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
you can define the postprocess_book function in your recipe to manipulate the input files after they have been downloaded, but doing so is not trivial.
kovidgoyal is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change font size and font style? butterbescotch Sigil 20 09-06-2013 09:22 PM
Is there a size limit for TOC.ncx? osnova Kindle Formats 10 10-21-2011 02:41 AM
TOC font size question michaelbr Sigil 5 12-07-2010 08:03 AM
Can't change font or font size in ereaders jmacg Sigil 30 10-23-2010 10:21 PM
PRS-300 Med font size too big, but small font size too small eli2k Sony Reader 4 05-28-2010 10:47 AM


All times are GMT -4. The time now is 08:14 PM.


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