View Full Version : Question: converting lit to imp and keeping table of contents links etc


askyn
10-03-2008, 06:51 PM
Hi all /wave

Ive just bought a copy of the Bible from fictionwise for the 1150.

I de-drmed it etc, and then converted it over to imp for the 1150 to read.

Problem? .. ive lost the table of contents links etc. The table is still there but its just words ... no links to jump you to that part in the book.

PLEASE PLEASE ... someone suggest something for me to try or give me directions on what to do so that I can keep the table of contents functional!

This is obviously a HUGE book and with out the ability to jump around using something like a ToC it would be hit or miss on tring to get to were i want to read. ( the book when converted over has 7278 pages !!! eeek ! )

Also on a side note, this is one of the first books what ive converted ( granted only done a hand full ), that turned out DOUBLE the size of the original lit file ! (lit = 2614k .. imp = 6453k ( yep 6.4meg HUGE ) ). Anyone else had this happen?

If you can give me any help / suggestions ill forever be in your debt =)

nrapallo
10-03-2008, 07:54 PM
Hi,

Me again; I see it's you again. :rolleyes:

It's Ok. Let me start by saying "welcome" to the world of converting problems when using .lit as an input. :grin2:

Good questions. I've had similar issues before.

What you can try and do is:

1. Open the main .html file in a text editor and look for a tag like <a href="linkfile#name">
2. If the 'linkfile' above is the name of your .html filename, then remove it
i.e. do a search & replace for <a href="linkfile#name"> and replace with <a href="#name">
3. open the main .html in internet explorer or firefox and see if the links work now.

The double size problem may be an issue with the .opf file that gets created by lit2sb. The last entry in the <spine> section usually gets duplicated and if already exists in the <spine> section, then can be deleted.

Try these simple corrections and re-build the .opf into .imp.

If you need more help, just private message me.

askyn
10-03-2008, 08:04 PM
We have to stop meeting like this !!!

People will start to talk ~!!

thanks for the suggestions, ill give em a shot and see how it goes =)

askyn
10-03-2008, 08:24 PM
Just to be sure we are on the same page, here is a sample of what ill be changing:

change this:

<h1 class="c1" id="TOC">Contents</h1>
<br>

<p class="c2"><a href="NIV%20Preface.htm#_MAIN_RWTOC-1">Preface to
The New International Version</a></p>


to THIS:

<h1 class="c1" id="TOC">Contents</h1>
<br>

<p class="c2"><a href="#_MAIN_RWTOC-1">Preface to
The New International Version</a></p>

Is that correct? (ill be editing the file as you read =-) )

DaleDe
10-03-2008, 08:40 PM
You will also need <a name=TOC></a> entry in order for the jump to TOC to work.

askyn
10-03-2008, 09:14 PM
hmm .. were would i put that at?

not sure of the context here.

Would i put it in each line of the <a href ... ?

or were?

askyn
10-03-2008, 11:06 PM
Ok i got it converted so that the table of contents links are working now.

I used the convert lit gui to explode the file, then loaded the opf file into epublisher and used that to create the imp file.

It created ok and the toc works, only thing is that the imp book is 6.5meg vs the lit being 2.6meg

Using lit2sb it converted it to half closer to lit file size but the TOC doesnt work.

Strange, any way it seems that lit2sb has problems converting the toc links etc?

nrapallo
10-03-2008, 11:13 PM
You will also need <a name=TOC></a> entry in order for the jump to TOC to work.

hmm .. were would i put that at?

not sure of the context here.

Would i put it in each line of the <a href ... ?

or were?

Just place it at the beginning of your html were your TOC is located, after the <body> tag.

nrapallo
10-03-2008, 11:20 PM
Ok i got it converted so that the table of contents links are working now.

I used the convert lit gui to explode the file, then loaded the opf file into epublisher and used that to create the imp file.

It created ok and the toc works, only thing is that the imp book is 6.5meg vs the lit being 2.6meg

Using lit2sb it converted it to half closer to lit file size but the TOC doesnt work.

Strange, any way it seems that lit2sb has problems converting the toc links etc?

Just do the same thing you did above after exploding it with lit2sb, i.e. edit the .html to remove the filename (NIV%20Preface.htm) from before the # in <a href=> tags. Then using the resulting o_sb.opf, re-build the revised (working links) .imp.

I think this is a problem with eBook Publisher not understanding what to do when it sees the SAME filename used for that .html in <a href> tags. Different filenames of external files work, but not the current file. So it's not really ConvertLit or Lit2sb's fault.

About the size, ensure you have compression on in your .opf's Edition settings. If you don't know where to find it, just post the .opf used to create the .imp in a message here.

askyn
10-04-2008, 01:38 AM
nope found that part ok =)

ooh and just a fyi, epublisher didnt have any problem creating the links for the TOC... lit2sb did.

and at your suggestion / instruction I not only found the compression option but also enabled the option to underline links.

Now I not only have working links but can see were the links are etc =)

nrapallo
10-04-2008, 01:59 AM
In eBook Publisher, my defaults are set per the images below. Just set your preferences using File | Preferences... once and then you will always have them for New projects.

However, note that the .opf can (and will) override these settings, so double check when you use lit2sb.

nrapallo
10-04-2008, 02:04 AM
ooh and just a fyi, epublisher didnt have any problem creating the links for the TOC... lit2sb did.

eBook Publisher doesn't create the links, but has the problem understanding them. Yes, lit2sb created the links, but you should have been able to follow them if you had opened the .html in internet explorer/firefox (and tested them before editing out the linkname per above). ;)

Same conclusion though... :)