Is it possible to assign images for Table Of Contents in Sigil?

Status
Not open for further replies.

Arpeggio

Super Member
Registered
Joined
Sep 24, 2011
Messages
355
Reaction score
5
The titles for each chapter are colour jpeg graphics of the actual words in the title. Although I can make them into header tags then make them into the TOC, the entries in the TOC menu are blank with no text.

Is there a way to make images as TOC entries to display the title words in the TOC menu? The nearest thing on the instructions seems to be this, which is for text; http://web.sigil.googlecode.com/git/files/OEBPS/Text/links.html

So I guess the answer is probably “no”, in which case I will add the title again in actual text at the starting paragraph on each chapter using h4’s (h1, 2 and 3 seem to make the font bigger.) If anyone can say otherwise I’d be happy to hear.

I’m also going to make a table of contents within the actual book itself (as I have noticed my competitors do that.) Is this a simple case of “Create HTML Table of Contents” then dragging, dropping and arranging into the eBook? It looks so.

Many thanks,
 

Laer Carroll

Aerospace engineer turned writer
Super Member
Registered
Temp Ban
Joined
Sep 13, 2012
Messages
2,481
Reaction score
271
Location
Los Angeles
Website
LaerCarroll.com
You don't give us enough info to help you out. Why use images for chapter headings? Are they supposed to be extra artsy or something, maybe with flames coming off them, or water dripping from them?

You can override the default style of the headers like this, which is exactly what I did in my latest book.

<h2 style="">Chapter 33 - Title</h2>
<h3 style="">Subchapter name</h2>


In style you would use CSS keywords to specify various over-rides of the defaults. See the following link for more info on specific keywords.

http://www.w3schools.com/css/default.asp

Here are some actual examples.

<h2 style="text-align: center; text-indent:0; margin-top: 0; margin-bottom: 14pt;">Chapter 1 - Resurrection</h2>
<h3 style="text-align: center; text-indent:0; margin-top: 14pt; margin-bottom: 14pt;">Accident</h3>


Around everything I put a DIV command, this one in fact.

<div style="line-height:120%; text-align:justify; text-indent:1.5em; font-size:14pt; font-family:Times New Roman,Times,serif; color:#000000; background-color:#ffffff;">
EVERYTHING
</div>

The default paragraph style for Amazon .mobi/.prc and Barnes & Noble/Apple .epub is one line after each paragraph. To over-ride that I use this construction.

<p style="margin-bottom: 0;">Content of paragraph.</p>

For each of my six books I've used Sigil to create an epub first, then Calibre to create the .mobi/.prc for Amazon. It take literally one-two minutes to create the Amazon file.
 

Deleted member 42

If you're doing this for an ebook you plan to distribute via Amazon etc.

Be aware that while it's likely possible to accomplish what I think you want, it may not be in all the formats—I especially have doubts about Mobi.
 

Katie Elle

Banned
Joined
Mar 13, 2012
Messages
398
Reaction score
31
Location
New England Coast
An epub or mobi is going to have two tables of contents an NCX file which is what you're talking about when you say the "TOC menu" and an html TOC (I think the proper term is "inline table of contents" but everyone calls it an "html toc") which is what you mean when you say you're going to do them inside the book itself.

The "toc menu"/NCX is the toc.ncx file. I don't think you can do anything with the NCX and graphics or formatting because how it displays depends on the device or program you're using. Even if technically you can, it would be unwise to because I don't think there's any devices that would actually display it correctly. I found a pretty good blog post about NCX files and you can see how different kindle devices handle it completely differently.

The second is the html TOC, which is a text document that you can see in the body of the text as you page through and has html links to other parts of the text. This goes in the text folder as another page and you use html links. You can definitely style this one as it's just another page in your book.

I think your method is going to be to create it all. Then go into the toc.ncx and type the chapter titles as text only, then create an html TOC and you can use the graphics there and manually link to the chapter heads.

Once you have an epub, you should be able to convert it to mobi by opening it in the downloadable Kindle Previewer. That uses kindlegen directly and supports the most complete formatting settings that that Amazon devices can handle. It will also let you look at how your book looks various kindle models. If you're using color, you definitely want to look at that as it can be a really big deal. Some colors that may look vivid on the screen of an ipad or Kindle Fire will appear as a washed out grey on a regular e-ink kindle or Nook.
 

Arpeggio

Super Member
Registered
Joined
Sep 24, 2011
Messages
355
Reaction score
5
Thanks for the advice, sounds a little complicated, I will give it a try. Yes it's a design thing, which is why I'm in two minds whether it will work on smaller screens anyway (including the kindleDX's 9.7inch screen).
 

Laer Carroll

Aerospace engineer turned writer
Super Member
Registered
Temp Ban
Joined
Sep 13, 2012
Messages
2,481
Reaction score
271
Location
Los Angeles
Website
LaerCarroll.com
I've found Kindle Previewer has trouble converting epubs to .mobi/.prc in several ways. I use Calibre to do that job. The output file is also a fourth the size of the one created by Previewer.

[Previewer] will ... let you look at how your book looks various kindle models. If you're using color, you definitely want to look at that as it can be a really big deal. Some colors that may look vivid on the screen of an ipad or Kindle Fire will appear as a washed out grey on a regular e-ink kindle or Nook.

Absolutely. You may need to experiment with enhancing color images so that they look good both in color and grey-scale.
 

Laer Carroll

Aerospace engineer turned writer
Super Member
Registered
Temp Ban
Joined
Sep 13, 2012
Messages
2,481
Reaction score
271
Location
Los Angeles
Website
LaerCarroll.com
YES is the answer to your first question: Is there a way to make images as TOC entries? Here is how you would do it using Sigil and Calibre.

Create your chapters as you desired, using JPEGs instead of text for the chapter titles. You could probably use GIFs instead, maybe PNGs. They could have effects such as flashing, morphing, etc. Ridiculous, perhaps, but possible.

Create your table of contents. Inside it you would have links to the chapters.

Sigil

Use Sigil to create an .epub, including in it the ToC and the individual chapters. To make sure the result is what you desire, open the .epub in Adobe Digital Editions or the add-on for Firefox to read epubs. (Download it from the following link: https://addons.mozilla.org/en-us/firefox/addon/epubreader/ .)

Calibre

You would open the test.epub file with Calibre. Then select the option Convert Books -> Convert Individually and select your test file.

In the popped up window select the Table of Contents option. Select box labeled Force use of auto-generated Table of Contents.

Also select the MOBI Output option. Here you can specify the title of the ToC and choose to put the generated ToC at the beginning instead of the end of the .mobi file. These are optional steps; they are your choice.

Now click OK to create the .mobi file. When the rotating clock image stops you can open the file where Calibre put the resulting file.

Previewer

Open it in the Kindle Previewer and observe the results. There should be both a regular ToC and an NCX ToC.

A few details

You can create the individual chapters in Word, using the Insert Picture function to put your graphical title into the file. Then below it add whatever text you want. Save the document using the Filtered Web Page HTML file type.

My experience is that even this option does not get rid of all the Microsoft stuff from the .htm file. I use the MS Office HTML Filter program. It's likely available on your computer already, using Start -> All Programs -> Microsoft Office Tools -> Microsoft Office HTML filter 2.0. Otherwise download it from Microsoft at this link.

http://download.microsoft.com/download/office2000prem/msohtmf/2000/WIN98/EN-US/msohtmf2.exe

Sigil will add ?xml and !DOCTYPE lines to your .htm files. This is good.

If you MUST hand code your HTML files, they should look like this.

<html>
<head>
<title></title>
</head>
<body>
<div>
<p><img src="image001.jpg" /></p>
<p>Text of chapter.</p>
</div>
</body>
</html>
<html>
<head>
<title></title>
</head>
<body>
<div>
<h1>Table of Contents</h1>
<a href="chapter1.htm">Chapter 1 - Title</a>
</div>
</body>
</html>
 

Arpeggio

Super Member
Registered
Joined
Sep 24, 2011
Messages
355
Reaction score
5
Thanks again.

I write music method books and was considering making a print book into flowable eBook. This was largely due to being encouraged by seeing quite a few print books (by large publishers) that have been converted to kindle as simple page by page graphics with no flowable text at all. At first I thought this was audacious or an experiment. I know full well from looking at them they would not work on kindle and probably not on Kindle DX either so it must be only for the kindle on PC.

I am still skeptical and have seen a couple of negative reviews of these based on the small size, while 99% reviews are of the print version and not the kindle.

Since making this thread I have put this project on the shelf for now. I am working another book on things like techniques with no musical pieces, which will work even on small eReader screen. I will come back to this and use the advice here after I've done that, as the fixed layout out conversions I looked at still sell (although mine will only have the musical pieces as fixed, which is the basic concern).
 

Arpeggio

Super Member
Registered
Joined
Sep 24, 2011
Messages
355
Reaction score
5
Update:

I just got back to working the particular book in question. I spent the last half an hour messing around on Sigil but when I went to create the TOC I saw it was all already there, making me realize I already did it a few months back just before I was able to publish (having abandoned it in favour of doing something else more immediately important at the time).

I re-found this thread on google while searching for how to do it to remind myself how I did it, but I remembered how and basically all I did was make all the "text as graphics" into H1's and H2's for chapter headers and subheaders, then in the little "generate table of contents" window I just right clicked and renamed all unnamed blanks as the chapter names for all the H1's & 2's.
 
Last edited:

Laer Carroll

Aerospace engineer turned writer
Super Member
Registered
Temp Ban
Joined
Sep 13, 2012
Messages
2,481
Reaction score
271
Location
Los Angeles
Website
LaerCarroll.com
Very clever! Thanks for adding to the thread!

I haven't tested it out yet, but the good thing about it is that it may be a very general way to do this.

Anyone else tried it?
 

Arpeggio

Super Member
Registered
Joined
Sep 24, 2011
Messages
355
Reaction score
5
Very clever! Thanks for adding to the thread!

I haven't tested it out yet, but the good thing about it is that it may be a very general way to do this.

Anyone else tried it?

Thankyou Laer. It seemed logical knowing that images can be made into H tags in the same way text can. Originally I fumbled around with "Insert ID" (from the anchor tab) but that's just links on the eBook's content and nothing to do with the TOC. The eBook passes ePubChecker and Sigils Flight Crew.
 
Last edited:
Status
Not open for further replies.