Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 01-11-2016, 03:26 PM   #1
Camelot
Connoisseur
Camelot began at the beginning.
 
Posts: 53
Karma: 10
Join Date: Feb 2015
Device: Sony PRS-T1
anchor ids with display:none not works correctly

Hi,

When i have a long site with anchor ids, the links don't works correctly in book view.
No problem in code view.

Is this a bug in Qt (render problem), in Sigil, or PEBCAK?

I attached a test case.

Thanks.
Attached Files
File Type: epub Testcase.epub (18.2 KB, 158 views)
Camelot is offline   Reply With Quote
Old 01-11-2016, 03:42 PM   #2
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,684
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
This behavior is caused by the style that you've assigned to the link targets:

Code:
 <h2 class="hide" id="sigil_toc_id_13">Absenz</h2>
Code:
.hide {display:none;}
Basically, you've created links to invisibe = non-existing targets.

You might want to change this to:

from:

Code:
  <h2 class="hide" id="sigil_toc_id_13">Absenz</h2>

  <p><strong>Absenz</strong> · Abwesenheit · Defizit · Fehlen</p>
to:

Code:
  <p id="sigil_toc_id_13"><strong>Absenz</strong> · Abwesenheit · Defizit · Fehlen</p>
Doitsu is offline   Reply With Quote
Advert
Old 01-11-2016, 03:58 PM   #3
Camelot
Connoisseur
Camelot began at the beginning.
 
Posts: 53
Karma: 10
Join Date: Feb 2015
Device: Sony PRS-T1
Yes, but without <h>, i cannot creating a toc?
Camelot is offline   Reply With Quote
Old 01-11-2016, 04:10 PM   #4
MickiTee
Guru
MickiTee ought to be getting tired of karma fortunes by now.MickiTee ought to be getting tired of karma fortunes by now.MickiTee ought to be getting tired of karma fortunes by now.MickiTee ought to be getting tired of karma fortunes by now.MickiTee ought to be getting tired of karma fortunes by now.MickiTee ought to be getting tired of karma fortunes by now.MickiTee ought to be getting tired of karma fortunes by now.MickiTee ought to be getting tired of karma fortunes by now.MickiTee ought to be getting tired of karma fortunes by now.MickiTee ought to be getting tired of karma fortunes by now.MickiTee ought to be getting tired of karma fortunes by now.
 
MickiTee's Avatar
 
Posts: 860
Karma: 4097942
Join Date: Jun 2012
Location: London, UK
Device: Sony PRS-505, Pocketbook TL3, TL4, TL5
The following should work
<h2 class="hide" title="Absenz" id="sigil_toc_id_13"></h2>

This is what you have done in the file cover.xhtml in your attachment.
MickiTee is offline   Reply With Quote
Old 01-11-2016, 04:52 PM   #5
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,684
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
You could do the following:

1. Generate the TOC to have Sigil insert ids.

2. Select the Regular Expression mode and use the following regular expressions to copy ids to the paragraph tags (and to delete the headings):

Find:<h2 class="hide" id="(.*)">.*?</h2>\s*<p>
Replace:<p id="\1">

Once you've done that the link targets should also work in Book View mode. (At least it worked for the sample that you provided.)
Doitsu is offline   Reply With Quote
Advert
Old 01-12-2016, 11:04 AM   #6
Camelot
Connoisseur
Camelot began at the beginning.
 
Posts: 53
Karma: 10
Join Date: Feb 2015
Device: Sony PRS-T1
Thanks for your support.

I think, MickiTee’s version is better for me.
Camelot is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Epub does not display images correctly Amalthia Calibre 3 09-05-2011 06:44 AM
Another ePub does not display correctly. KjellM EPUBReader 7 07-16-2010 03:31 AM
How to get author/title to display correctly on Jetbook? Canuck_in_Japan Ectaco jetBook 2 06-09-2010 08:24 PM
Any ereader device display Thai correctly? bthoven Which one should I buy? 19 10-07-2009 02:00 AM
Getting Mobipocket authors to display correctly on Kindle geoelectric Amazon Kindle 31 02-14-2008 02:22 AM


All times are GMT -4. The time now is 01:49 PM.


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