MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   Problem with TOC editor (https://www.mobileread.com/forums/showthread.php?t=60716)

alecE 10-28-2009 06:53 PM

Problem with TOC editor
 
I've converted a pdf to a fairly good epub using Sigil. I stole the chapter heading format from Feedbooks.

Initially I have:

<div class="bodychapter">
<h2><span class="chapterHeader"><span class="translation">Chapter</span><span class="count">1</span></span></h2>

<p>&nbsp;</p>

If the file is saved and an epub created the formatting works OK.

However, if I use the TOC editor to make the entries of the form "Chapter 1" (instead of the default "Chapter1" without spaces) then the chapter formatting is changed to:

<div class="bodychapter">
<h2>Chapter 1</h2>

<p>&nbsp;</p>
Thereby losing the formatting.

Am not sure if the problem resides with the TOC editor or (more probably) with my limited knowledge/understanding of html & css.

Any help much appreciated.

Valloric 10-28-2009 07:16 PM

Sounds like a bug. Please create an issue on the tracker with this information.

Whoa there for a minute. I just read your report more carefully.

So you are trying to change the text in the heading, but also trying to keep the existing HTML inside the heading tag? I'm sorry, that's just not possible. How would an algorithm know which parts of the new text should go into which of the old <span> tags? Can't be done, I'm sorry. Changing the heading text in the TOC editor will rewrite the contents of that heading tag.

You should just add a space in the Code View if you want to preserve the child elements.

alecE 10-29-2009 02:30 AM

Thanks Valloric, I understand;
As always, the solution was head-smackingly obvious - use the title="desired text" in the <hx> tag (or of course stop fiddling with fancy formatting in headings).

Thank you again for Sigil, it's superb.


All times are GMT -4. The time now is 06:42 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.