Thread: LRF output
View Single Post
Old 08-16-2008, 09:06 AM   #728
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
Quote:
Originally Posted by llasram View Post
HTML – excellent choice. I would actually recommend going the extra mile and saving your books as full EPUB books.
I chose HTML because it is device-independent and easy to modify (I spend a lot of time formatting and spell-checking my e-books). I am not so sure whether I want to move to a format which is primarily intended for e-books. I'll do some research about EPUB format and see.

Quote:
Hmm. That’s weird. I just tested with my firmware-updated 505 and it totally ignores the ‘Author.reading’ metadata. I vaguely remember it working before I updated the firmware,
Me too. So it is apparently a bug in the firmware. No problem, I was just wondering if it is a bug in Calibre.

Quote:
I’m not able to reproduce this one with a minimal example. Could you open a ticket with a file reproducing the error?
Will open a ticket for all issues. I just wanted to make sure opening ticket is the right thing to do with these questions - my previous tickets were mostly discarded for various reasons.

Quote:
That regexp is only applied to the tag name, so the ‘p id=’ portion will never match.
I see. I think this would be a nice feature. Will create a ticket for it and see what happens.

Quote:
Default behavior is to add all link-targets to the lrf-toc – see the option ‘--no-links-in-toc’.
Thanks.

So maybe my TOC-creating issues are actually not a result of one specific header not getting detected but a result of NO header getting detected and instead creating TOC from the links - those links that I put in my HTML-TOC:
Code:
<h2 id="contents">
<ol>
  <li><a href="#chapter-1">Chapter 1</a></li>
  ...
</ol>
I will check this. It seems plausible to me.


Quote:
If I understand this correctly, there are two issues going on here. [...]
Actually, it was meant as an observation of a strange inconsistency:

A) I have a chapter in my e-book:
Code:
<h2 id="chapter-10">Chapter 10</h2>
<p>Something or whatever.</p>
This chapter appears in the LRF-TOC (either due to chapter detection or due to links being added, see above). But the behavior in the Reader differs depending on
--force-page-break-before-tag=h2
: If the option is used, LRF-TOC item works as expected. If the option is not used, LRF-TOC item actually links to one page before the chapter (if the chapter starts at page 123, link from LRF-TOC takes me to page 122). It is seemingly impossible to get two chapters on one page.

B) I have a footnote in my e-book in the semantically correct form:
Code:
<ol><li id="note-1"><p>Text for footnote 1</p></li></ol>
I couldn't get the links in the text to work correctly at all, no matter what options I tried. Maybe it got fixed in the newer versions of Calibre - when I found the workaround, I never bothered to try again.

C) I have a footnote in the form:
Code:
<ol><li><p id="note-1">Text for footnote 1</p></li></ol>
Multiple footnotes can be on one page and all links to them function correctly (take me to the page with the footnote) - compare it to A) where I need to put each chapter on a separate page.

I understand now why I never got a page break before the footnote, so that's not an issue anymore.

Quote:
Well ideally for each ticket you would create a minimal HTML input file which re-creates the described error.
The problem with this approach is that with earlier releases of Calibre I found that some of the errors only appear with the full book, not with a minimal example. I will try to do it, but I am afraid I might need to upload the whole book - maybe even with the original texts, to be certain.

The good news is that I can demonstrate all of these issues with one book :-)

I'll see about opening those tickets. Thanks for the answer.
pepak is offline   Reply With Quote