![]() |
#1 |
Enthusiast
![]() Posts: 46
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.
|
![]() |
![]() |
![]() |
#2 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 730
Karma: 2296998
Join Date: Jan 2017
Location: Poland
Device: Various
|
At the beginning of the file should be <?xml
In yours it is <?adxml Just remove the unnecessary "ad". |
![]() |
![]() |
![]() |
#3 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 27,758
Karma: 198099188
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Does Sigil not offer to fix the malformed file?
|
![]() |
![]() |
![]() |
#4 |
Enthusiast
![]() Posts: 46
Karma: 10
Join Date: Jul 2023
Device: none
|
|
![]() |
![]() |
![]() |
#5 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,925
Karma: 5449552
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? |
![]() |
![]() |
![]() |
#6 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 38,433
Karma: 152905840
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? Last edited by DNSB; 06-21-2024 at 01:15 PM. |
![]() |
![]() |
![]() |
#7 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,925
Karma: 5449552
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. |
![]() |
![]() |
![]() |
#8 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,925
Karma: 5449552
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. |
![]() |
![]() |
![]() |
|
![]() |
||||
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 |