Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 06-21-2024, 11:08 AM   #1
jwes
Enthusiast
jwes began at the beginning.
 
Posts: 42
Karma: 10
Join Date: Jul 2023
Device: none
Preview window not quite in sync with code window.

Open test.epub in Sigil and click on TITLE in the preview window. On my machine (windows 11, Sigil 2.2.0), it highlights 'AUTHOR' in the code window. It is only this file, all other files seem to work properly. If I rename the file, it works, so I assume there is a non-printing character in the file name, but I don't know how to see it.
Attached Files
File Type: epub test.epub (27.8 KB, 11 views)
jwes is offline   Reply With Quote
Old 06-21-2024, 11:30 AM   #2
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 707
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Misc
At the beginning of the file should be <?xml
In yours it is <?adxml

Just remove the unnecessary "ad".
BeckyEbook is offline   Reply With Quote
Old 06-21-2024, 12:36 PM   #3
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,638
Karma: 194783560
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Does Sigil not offer to fix the malformed file?
DiapDealer is offline   Reply With Quote
Old 06-21-2024, 12:50 PM   #4
jwes
Enthusiast
jwes began at the beginning.
 
Posts: 42
Karma: 10
Join Date: Jul 2023
Device: none
Quote:
Originally Posted by BeckyEbook View Post
At the beginning of the file should be <?xml
In yours it is <?adxml

Just remove the unnecessary "ad".
Thank you. Rename also changes this to xml. The last mystery is why doesn't Well-formed Check EPUB find it?
jwes is offline   Reply With Quote
Old 06-21-2024, 12:54 PM   #5
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,790
Karma: 5446592
Join Date: Nov 2009
Device: many
I am confused, what does this have to do with Preview syncing to CodeView?
The xml headersare stripped off before passing it through gumbo as gumbo does not handle them. What about the simple sanity check? Did it detect the error?
KevinH is online now   Reply With Quote
Old 06-21-2024, 01:13 PM   #6
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 37,137
Karma: 148321048
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Neither the simple check nor epubcheck flag adxml as an error. OTOH, epubcheck complains about the line in content.opf "<item id="TYPEWRITER_IN_THE_SKY.html" href="TYPEWRITER_IN_THE_SKY.html" media-type="text/html"/>" which IIRC, should be 'media-type="application/xhtml+xml"'

Mend and prettify does change adxml to xml.

If I change adxml to xml and the media type, the highlighting seems to work okay between preview and code view.

I do wonder why the OP is using adXML?
Attached Files
File Type: epub test.epub (27.5 KB, 1 views)

Last edited by DNSB; 06-21-2024 at 01:15 PM.
DNSB is online now   Reply With Quote
Old 06-21-2024, 01:24 PM   #7
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,790
Karma: 5446592
Join Date: Nov 2009
Device: many
Okay, The <?adxml is technically an xml ? pi ("processing instruction") which is ignored in modern xhtml.

Sanity check does count the number of xml declarations and could easily be made to check that count and report any error.

I will add that.
KevinH is online now   Reply With Quote
Old 06-21-2024, 01:59 PM   #8
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,790
Karma: 5446592
Join Date: Nov 2009
Device: many
Okay, in my internal build of Sigil I now have sanitycheck.py making sure that the xml declaration header is there, that it comes before any doctype, html, body, etc.

I will add this to a future release.

I just tested it against the op's test.epub and it does report a problem with that line. The xml header in the nav was just fine.

I am just not sure if this will help much given how simple the SanityCheck (Well Formed EPUB) check is in Sigil compared to the much much more thorough epubcheck.

This seems to be a rare type of failure.

Last edited by KevinH; 06-21-2024 at 02:02 PM.
KevinH is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Independent File Preview Window resizes when moving File Browser WIndow GregTheGrate Library Management 4 12-12-2023 07:02 AM
Delete Images in preview window / external script to customize code / shortcut abraum Editor 4 11-02-2021 10:44 AM
4.20 Code window and preview not syncing JSWolf Editor 7 07-07-2020 05:44 PM
Codeview & Preview window sync broken Springbok Sigil 51 08-06-2019 09:12 PM
Preview Window Zoom GrannyGrump Sigil 16 06-16-2013 10:23 PM


All times are GMT -4. The time now is 07:56 PM.


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