Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 05-28-2013, 02:48 AM   #1
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
About Tidy

Hi

Most of the time, I never use Tidy. The last time, I chose to select Tidy, it slightly overdid it for my taste. There are the two points I did not like:

1 - it creates sgc styles for some images.

I mean: it's working, but I don't like it. For some images, I have to use individual settings like (style="width:28.2%; margin-left:0.5em;") and I find handy to leave these settings within the image definition (in the text). It's working everywhere, so do we have to forcibly move these settings to the head?

2 - it spoils my dropcaps display.

I chose to have two spans to define one dropcap. One contains a block and for this reason should not be mixed with the other. But Tidy happily mixes both of them within the same span and, doing so, ruins the display.

So, is there a way to modify Tidy settings so that these two points do not appear again?
roger64 is offline   Reply With Quote
Old 05-28-2013, 06:40 AM   #2
abeonis
eBook DIYer
abeonis began at the beginning.
 
abeonis's Avatar
 
Posts: 111
Karma: 10
Join Date: Oct 2012
Location: Europe
Device: K4, KF HD 8.9, Readium
Salut Roger,
Is there a reason why you must use Tidy?
I never uset it for the same reasons. I don't like the changes.
abeonis is offline   Reply With Quote
Advert
Old 05-28-2013, 06:47 AM   #3
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Hi

I used it when I was looking for the reason of a bug. I try to understand. It can't be THAT bad.

I found this, but I do not know how to proceed to change settings.
http://tidy.sourceforge.net/docs/quickref.html

There I found in the XHTML section a boolean merge-spans which seems to solve the second point above in the first post. Looking now for the first one... Maybe join-styles?

This does not mean I know where to apply these new settings...

(edit)
It seems there should (or could) be somewhere a Tidy configuration text file named TiDyCFG.ini which includes all the non-default settings. When I install Sigil on my computer, where is HTML TIDY?

There is also the possibility with Linux to install a package named tidy dated March 2009 (see lower down its configuration) but I guess it already has been installed with Sigil?

A proposal: Optimize the use of Tidy with Sigil.

Another thing about it. It seems that presenting Html Tidy as a black and white option (take it or leave it), Sigil does not provide its users with the full effectiveness they could get from it. Say, this tool has plenty of nice features BUT for some of us a few terrible ones (and each one of us may have its own different "black sheep"). It's a pity not to use all the nice features just because some few do not fit with our needs. It seems better to try to adapt this tool to our own needs, by filling up properly its configuration file. It does not look so complicated, even if , admittedly, it would be an "advanced" option.
Attached Thumbnails
Click image for larger version

Name:	Tidy-configuration.png
Views:	245
Size:	47.4 KB
ID:	106368  

Last edited by roger64; 05-28-2013 at 12:27 PM. Reason: configuration file
roger64 is offline   Reply With Quote
Old 05-29-2013, 12:17 AM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,131
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
I do not let Tidy make changes. I dislike sgc styles and will not allow them.
JSWolf is offline   Reply With Quote
Old 05-29-2013, 12:35 AM   #5
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Many people feel like you because the way Sigil makes use of Tidy is just: "one size fits all". It gives you no choice. And, as a consequence, if you are put off by some particular feature (say, the creation of "sgc" styles), you are put off by the whole of Tidy.

It should not be this way, but it seems, according to PeterT, that Tidy is hard-coded within Sigil and that Sigil makes absolutely no use of the genuine -and extended- configuration options of Tidy.

So what many people dislike is NOT the real Tidy, its the use of Tidy made by Sigil which is a totally different thing. I think Tidy deserves better, and it would be about time to provide Sigil users access to its configuration options.

Last edited by roger64; 05-29-2013 at 02:26 AM.
roger64 is offline   Reply With Quote
Advert
Old 05-29-2013, 09:26 AM   #6
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Forgive me if I am wrong. This is a proposal.

For what I can read from the man tidy (see red arrow), and if this is relevant to the integrated Tidy we have within Sigil, it seems that it would be enough for Sigil to create some permanent tidyconfig.ini (or any other name) file and to document its creation in its code. Normally, this file would stay blank ( or contain all the configuration options currently enacted...).

However, if need be, the user could write its own configuration options on this file (or just modify some pre-set values).
Attached Thumbnails
Click image for larger version

Name:	man tidy.png
Views:	201
Size:	47.1 KB
ID:	106396  

Last edited by roger64; 05-29-2013 at 10:48 AM.
roger64 is offline   Reply With Quote
Old 05-29-2013, 10:17 AM   #7
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
You might put this in as an enhancement request at the Sigil site at:
http://code.google.com/p/sigil/

It might not be quite as simple as it seems since it is possible some of these options could conflict with some other code or the way the program accomplishes certain things.

Sigil is coded in some version of C, which is not the same kind of language as Python. It is much easier to add things to Calibre which is written in Python than it is for Sigil. I am not a programmer, but the above is my understanding.
mrmikel is offline   Reply With Quote
Old 05-29-2013, 10:37 AM   #8
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
@mrmikel

Thanks for your advice. I'll probably do it, but I wished first to take advice of people more knowledgeable than me on coding matters. I am not AT ALL a programmer, so I walk on tiptoes...

But as a user, I think it would definitely be an improvement.

Last edited by roger64; 05-29-2013 at 10:40 AM.
roger64 is offline   Reply With Quote
Old 05-29-2013, 10:45 AM   #9
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
If I were them, I would be a little hesitant. It is hard enough to eliminate bugs now, and if they had 20-30 variations of Tidy added, it might make it even harder. But it would be nice to have more options for cleaning if it were reliable and that I think is the crux of the matter.

It is easy for the regex guys to do this stuff, but I spend all my energy on pdf origin documents that substitute a for o and scramble parts of sentences in paragraphs around. Not so much energy left for the misnamed "regular" expressions.
mrmikel is offline   Reply With Quote
Old 05-29-2013, 11:16 AM   #10
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Quote:
Originally Posted by mrmikel View Post
If I were them, I would be a little hesitant. It is hard enough to eliminate bugs now, and if they had 20-30 variations of Tidy added, it might make it even harder. But it would be nice to have more options for cleaning if it were reliable and that I think is the crux of the matter.
Now, the Sigil offer for Tidy is "take it or leave it". This is a little misleading because Tidy is conceived to be a -very- flexible tool. As far as Tidy is concerned, it has been widely tested for many years and I think it does not have many bugs left.

But OTOH, opening all the configuration options could nevertheless, as you wisely put it, trigger some new bugs.

And yes, maybe, it would be possible to begin carefully with a middle ground, opening for example some controversial cleaning options (sgc styles somewhere?), and if successful, to add some more for each new version of Sigil.

Last edited by roger64; 05-29-2013 at 11:26 AM.
roger64 is offline   Reply With Quote
Old 05-30-2013, 03:52 AM   #11
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Hi

"Enhancement proposal" sent.
roger64 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
html tidy Notjohn Sigil 41 02-11-2013 09:09 AM
Please turn Tidy off by default JSWolf Sigil 75 05-13-2012 11:03 AM
Tidy use and issue DaleDe Sigil 7 06-19-2011 07:22 PM
tidy still helping me - sigh... bobcdy Sigil 2 12-19-2010 07:14 PM
HTML Tidy problems pdurrant Sigil 2 04-08-2010 07:38 AM


All times are GMT -4. The time now is 07:21 AM.


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