Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 07-30-2020, 05:21 AM   #211
CalibUser
Addict
CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.
 
Posts: 201
Karma: 62362
Join Date: Jul 2015
Device: Sony
@thosp:

Quote:
Originally Posted by thosp View Post
Greetings,

When 'Sigil's Check Report came up AFTER I ran the ePub Tidy Tool, it asked me if I wanted to continue ... with these details - Incorrect XHTML: OEBPS/Text/Section0001.xhtml Line/Col 737,7 Opening and ending tag mismatch. - if I say yes, the following:

<p>“Problems everywhere. Whatever happened to ‘relaxing over the summer?’”</p>

is changed to:

<p>“Problems everywhere. Whatever happened to’re laxing over the summer?’”</p>
Thank you for reporting this issue. It was produced by some existing code in the plugin, so I am surprised that it was not reported previously.

I have corrected the error for Whatever happened to ‘relaxing over the summer? and have posted an updated version of the plugin in the first post of this thread.

However, I am not sure that this will resolve the issues with the "Opening and ending tag mismatch" as the tags have not changed in the html code you posted. I have not managed to get this error when testing this plugin....
CalibUser is offline   Reply With Quote
Old 10-09-2020, 10:48 AM   #212
Thasaidon
Hedge Wizard
Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.
 
Thasaidon's Avatar
 
Posts: 801
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
Hi
Thanks for the plugin I am using ePubTidy a lot. I find it very, very useful.

Very occasionally though I get it stopping and giving a message saying "the html is not well formed". This is in Sigil after I have run "Check if HTML is well Formed" and 'ePubCheck" and both have said there are no problems with the html.

The latest item to be flagged up as being a problem is <!—?p—>

A few of these code clips were created when I ran "Mend and Pretify" to tidy the code up.

KevinH and Diapdealer both say the code is correct and should not not be a problem and suggested I report it here.

Last edited by Thasaidon; 10-09-2020 at 10:50 AM. Reason: Typo
Thasaidon is offline   Reply With Quote
Advert
Old 10-09-2020, 10:14 PM   #213
Thasaidon
Hedge Wizard
Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.
 
Thasaidon's Avatar
 
Posts: 801
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
Update.

I jumped the gun a little in my previous post. The problematic string <!—?p—> is not valid. KevinH misread the dashes.
Thasaidon is offline   Reply With Quote
Old 10-10-2020, 05:11 AM   #214
CalibUser
Addict
CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.
 
Posts: 201
Karma: 62362
Join Date: Jul 2015
Device: Sony
@Thasaidon : Are you using the ePub3 format? The plugin is designed for the ePub2 format only. If this issue arises with an ePub2 format please would you post a snippet of the html section that produces this problem so that I can try to track it down.
CalibUser is offline   Reply With Quote
Old 10-10-2020, 07:46 AM   #215
Thasaidon
Hedge Wizard
Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.
 
Thasaidon's Avatar
 
Posts: 801
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
Quote:
Originally Posted by CalibUser View Post
@Thasaidon : Are you using the ePub3 format? The plugin is designed for the ePub2 format only. If this issue arises with an ePub2 format please would you post a snippet of the html section that produces this problem so that I can try to track it down.
In discussions with KevinH it seems it may be an artifact of what I did. I also was not looking for this to happen so did not make notes of what I did exactly.

It might be best if we left it for now. I will keep an eye open for when it happens again and will document what I did before I forget it. I have altered my workflow to suit.

To answer your question I ALWAYS use ePub2 format.

What is betting this does not happen for a long time, now.
Thasaidon is offline   Reply With Quote
Advert
Old 10-10-2020, 01:54 PM   #216
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,605
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Paste the following somewhere into a valid epub2 (and make sure it still validates after):

Code:
<!-- this is an html comment -->
Launch the ePubTidy plugin (lastest version) and make sure the file you added the above code to is selected on the left.

The default options for the plugin (first install of the plugin) are selected. Namely "Format HTML" and "Use in-built dictionary" are the only things checked on the right. Nothing changed under any of the other sections from the default.

Click the Process Text button;

I immediately get a Sigil warning that Incorrect XHTML/XML was detected "Are you sure you want to continue?" Choices are "Yes," "No," and "Details". Clicking the Details button shows "Incorrect XHTML: OEBPS/Text/Section0001.xhtml Line/Col 13,6 Expected '-', '[CDATA[', or 'DOCTYPE', but got '[a-zA-Z]'."

If I hit "Yes" to continue, the original code posted above gets changed to:

Code:
<!—this is an html comment—>
The double-hyphens were changed to emdashes and the spaces were removed from the comment.

Clicking "No" aborts the attempt to alter the html comment.
DiapDealer is offline   Reply With Quote
Old 10-10-2020, 10:12 PM   #217
Thasaidon
Hedge Wizard
Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.
 
Thasaidon's Avatar
 
Posts: 801
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
Quote:
Originally Posted by DiapDealer View Post
Paste the following somewhere into a valid epub2 (and make sure it still validates after):


If I hit "Yes" to continue, the original code posted above gets changed to:

Code:
<!—this is an html comment—>
The double-hyphens were changed to emdashes and the spaces were removed from the comment.

Clicking "No" aborts the attempt to alter the html comment.
Thank you. That has cracked it.

I often run ePubtidy several times to get rid of things as there are some things it does not get rid of in one go. I now know what to look out for.
Thasaidon is offline   Reply With Quote
Old 10-11-2020, 05:50 AM   #218
CalibUser
Addict
CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.
 
Posts: 201
Karma: 62362
Join Date: Jul 2015
Device: Sony
@Thasaidon: Thank you for notifying me about this error
@DiapDealer: Thank you for posting code that demonstrated this error.

I have made a quick correction to the plugin in the first post of this thread so that comments in the form <!-- this is an html comment --> will not corrupt the ePub. I will need to update the error reporting facility at a later date as each piece of commented code will cause the following errors to be reported:

Replaced a series of short/long hyphens with one long hyphen 2
Replaced <space><long hypen><space> with one long hyphen 2
CalibUser is offline   Reply With Quote
Old 10-16-2020, 01:12 AM   #219
Thasaidon
Hedge Wizard
Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.
 
Thasaidon's Avatar
 
Posts: 801
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
New Buglet?

Hi Calibuser

The bad penny has turned up again.

I was running ePubTidy and got the message

Quote:
Incorrect XHTML: OEBPS/Text/chap001.xhtml Line/Col 15,12 Entity 'nbsp' not declared.
This time I investigated carefully and foumd that a line conaining the following was the problem.

<p><br/></p>

The line number in the message was two lines away from the actual problem.

The line <p class="ptextctr"><br/></p> does not cause the message to pop up.

The well formed html check and ePubcheck pass both of the above strings with no problems.
Thasaidon is offline   Reply With Quote
Old 10-16-2020, 07:29 AM   #220
CalibUser
Addict
CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.
 
Posts: 201
Karma: 62362
Join Date: Jul 2015
Device: Sony
@Thasaidon I put <p><br/></p> into an otherwise empty Sigil ePub and ran the ePubTidy plugin but I did not get any error messages. The plugin inserted &nbsp; into the line as expected to obtain:

<p>&nbsp;<br/></p>

&nbsp; is inserted to ensure that this gives a blank line in Sony readers.

Perhaps another part of your epub is the source of this error? Please try running the plugin on a Sigil ePub that contains only the line <p><br/></p> to check whether this still causes the issue.
CalibUser is offline   Reply With Quote
Old 10-16-2020, 08:47 AM   #221
Thasaidon
Hedge Wizard
Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.
 
Thasaidon's Avatar
 
Posts: 801
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
Quote:
Originally Posted by CalibUser View Post
Perhaps another part of your epub is the source of this error? Please try running the plugin on a Sigil ePub that contains only the line <p><br/></p> to check whether this still causes the issue.
I have investigated further. It idefinitely seens to be the problem. I added a number of these lines to a test ePub I used for something else. The epub threw up no problems before the addittion.

I then ran Mend and Pretify followed by ePubtody. It worked but inserted no breakibg spaces into the lines.

I removed the no breaking spaces and ran ePubtidy and it worked again. I then exited Sigil without saving.

I will send you a copy of the ePub to play with. This needs more than I can give it
Attached Files
File Type: epub [Title here] - Unknown.epub (3.4 KB, 218 views)
Thasaidon is offline   Reply With Quote
Old 10-16-2020, 11:20 AM   #222
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,735
Karma: 5446592
Join Date: Nov 2009
Device: many
I took a peek at your problem epub. The issue is not with the plugin. The issue is that your xhtml file is missing the proper DOCTYPE header which provides the DTD info that defines named entities.

Without that DOCTYPE there are no named entities of any kind defined anyplace (except for the basic xml named entities for <, >, &, etc.

This made the named entity & n b s p ; (skip the added spaces) undefined and therefore an error under epub2. With the proper DOCTYPE then adding a nbsp is just fine.

(Aside: Under epub3, there is a different DOCTYPE required and no named entities are defined at all meaning only numeric entities are allowed.)


So by simply editing your file (or Mending it with Sigil) and adding the following DOCTYPE info immediately after the xml declaration header, everything should be just fine:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
The complete top of the file should look like the following:

Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
Hope this helps.
KevinH is offline   Reply With Quote
Old 10-16-2020, 09:11 PM   #223
Thasaidon
Hedge Wizard
Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.
 
Thasaidon's Avatar
 
Posts: 801
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
Thank you Kevin.

Another thing learned.

A day without learning something is a day wasted. (most times)

I will look for that in future.
Thasaidon is offline   Reply With Quote
Old 10-17-2020, 04:55 AM   #224
CalibUser
Addict
CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.
 
Posts: 201
Karma: 62362
Join Date: Jul 2015
Device: Sony
@Kevin: Thanks for spotting the error in the heading - I did not notice that as the cause of the issue.
CalibUser is offline   Reply With Quote
Old 11-20-2020, 12:41 PM   #225
thosp
Member
thosp began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Dec 2014
Device: laptop & tablet
Quote within a quote mishandling?

In a blank Sigil epub file I pasted a text code file that included --

SOURCE

<p>"You’d go nuts," Blake commented. "It’d be nice, sitting around like that with nothing to do, but after two weeks, you’d go off your rocker. Thomas Wolfe, I think it was, said ‘You can’t go home again.’"</p>

And got this --

RESULT

<p>"You’d go nuts," Blake commented. "It’d be nice, sitting around like that with nothing to do, but after two weeks, you’d go off your rocker. Thomas Wolfe, I think it was, said ‘You can’t go home again.’</p>

<p>"</p>

This also happens when the quote within a quote is at the beginning of the paragraph.
thosp is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tidying Up My Kindle selectortone Calibre 2 07-17-2013 10:35 AM
developping a Plugin for Presentation files abdlink Plugins 4 04-15-2013 11:27 AM
Plugin to fix fb2 files oviksna Plugins 3 01-28-2013 08:53 AM
Tidying Up My Library JayLaFunk Library Management 2 09-20-2011 09:12 AM
Calibre 0.7.50 can't see plugin files mb_webguy Calibre 5 04-29-2011 03:41 AM


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


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