MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   Sigil has trashed more files (https://www.mobileread.com/forums/showthread.php?t=211363)

Toxaris 05-03-2013 02:28 AM

I agree with Hitch. Use heading styles (and other/own styles) in Word for structure. That will help tremendously. Styling I do in Sigil and my structure is already there in that case.

exaltedwombat 05-03-2013 07:10 AM

Quote:

Originally Posted by townsend (Post 2501316)
If I were in Code View, adding tags along the way, that would really put a wrench in my creative process.

Clicking on the p taskbar icon in Sigil when you want a new paragraph is comparable to pressing Enter in Word. The same for clicking h1 for a header. Shouldn't hold up your creative flow too much!

exaltedwombat 05-03-2013 07:13 AM

Quote:

Originally Posted by ghostyjack (Post 2500996)
That's basically what happended to me.

I was cleaning out messy Calibre code and replacing <p> tags with proper heading tags when I must have missed something and then it all disappears with an auto-clean.

The answer to that is, of course, don't enable auto-clean and restrict yourself to Pretty Print for manual tidying. And press Ctrl-S first!

Hitch 05-03-2013 03:49 PM

Quote:

Originally Posted by exaltedwombat (Post 2502126)
The answer to that is, of course, don't enable auto-clean and restrict yourself to Pretty Print for manual tidying. And press Ctrl-S first!

I have to say, it is not intuitive to me that Pretty Print would "clean" upon a switch from CV to BV. That's not something that I comprehended. After all, to my mind, that's not "open" or "save;" it's just a view switch. (Hmmm...I ponder, would it happen if you used the Preview from Code View? The PSO'D?).

I certainly have historically not set any type of auto-clean, but I see that in my latest upgrade to 0.7.1, it seems to be reset to auto-clean on open/save with PP. This certainly partly explains the issue, BUT....there's still something glitchy, because as I described, I never did have the opportunity to "manually clean" the missing tag. It was as I detailed, to the best of my recollection, and as it happened twice or so, I think I recall it reasonably well, given how many books have come since. ;-)

Hitch

Tex2002ans 05-03-2013 04:01 PM

Quote:

Originally Posted by Hitch (Post 2502693)
This certainly partly explains the issue, BUT....there's still something glitchy, because as I described, I never did have the opportunity to "manually clean" the missing tag. It was as I detailed, to the best of my recollection, and as it happened twice or so, I think I recall it reasonably well, given how many books have come since. ;-)Hitch

This just happened to me TWICE while I was working on a book yesterday. It occurred after I renamed some images. All of the code occurring after the renamed image -> end of file went poof. I didn't catch this until long after the image rename on a quality pass (luckily I just copied/pasted the missing code from a previous version).

I will have to keep a real eye out for this next time, to try to catch exactly when this "bug" is occurring, so I can supply exact test cases.

meme 05-04-2013 08:06 AM

Quote:

Originally Posted by Hitch (Post 2502693)
I have to say, it is not intuitive to me that Pretty Print would "clean" upon a switch from CV to BV. That's not something that I comprehended. After all, to my mind, that's not "open" or "save;" it's just a view switch. (Hmmm...I ponder, would it happen if you used the Preview from Code View? The PSO'D?).

I certainly have historically not set any type of auto-clean, but I see that in my latest upgrade to 0.7.1, it seems to be reset to auto-clean on open/save with PP. This certainly partly explains the issue,

After upgrading, it's best to check the cleaning options. With 0.7.2 if you have Open checked, then when you switch from Book View to Code View your code will be cleaned. This is because you are opening the code Book View created (Book View editing is provided by Qt, and Qt will not keep the same code layout you have in Code View).

Quote:

BUT....there's still something glitchy, because as I described, I never did have the opportunity to "manually clean" the missing tag. It was as I detailed, to the best of my recollection, and as it happened twice or so, I think I recall it reasonably well, given how many books have come since. ;-)
If you switch from Code View to Book View, then if the code is invalid, it should stop you from switching. Forcing the code to be valid before switching prevents losing text/tags.

The same should happen when saving an EPUB or opening an EPUB - you should be prompted that the file is invalid and that cleaning could cause data loss, although it will allow you to open/save an invalid file.

If, as has been suggested, you are not being prompted about invalid code when switching to Book View, then that's an issue. I haven't been able to reproduce it, but will try to look into it more to see how that might be possible.

I wonder if the prompt to manually or automatically clean should be removed anyway - so that if the code is invalid it will just refuse to switch to Book View. Though if the bug is that the prompt isn't triggering on an invalid file, it won't help much.

Hitch 05-04-2013 04:06 PM

Quote:

Originally Posted by meme (Post 2503326)
After upgrading, it's best to check the cleaning options. With 0.7.2 if you have Open checked, then when you switch from Book View to Code View your code will be cleaned. This is because you are opening the code Book View created (Book View editing is provided by Qt, and Qt will not keep the same code layout you have in Code View).

I have 0.7.1, and I thought I'd set it. Apparently not. Still, not intuitive to me. (Also, am I the only one who finds the Sigil Preferences on the edit menu weird? I mean, this isn't insurmountable, obviously...but I would never think to look for a program's defaults or preferences on the edit menu. Just me being whiny.)


Quote:

If you switch from Code View to Book View, then if the code is invalid, it should stop you from switching. Forcing the code to be valid before switching prevents losing text/tags.

The same should happen when saving an EPUB or opening an EPUB - you should be prompted that the file is invalid and that cleaning could cause data loss, although it will allow you to open/save an invalid file.
See....here's where I think we are having an issue. Sure, I agree; the program should not allow you to save bad code, or switch to BV with bad code. My problem is that I never got the chance to clean the bad code. Despite selecting "manual," all that happened was the PSO'D, and half my html file vaporized.

Quote:

If, as has been suggested, you are not being prompted about invalid code when switching to Book View, then that's an issue. I haven't been able to reproduce it, but will try to look into it more to see how that might be possible.

I wonder if the prompt to manually or automatically clean should be removed anyway - so that if the code is invalid it will just refuse to switch to Book View. Though if the bug is that the prompt isn't triggering on an invalid file, it won't help much.
No, no: that's not what I suggested (that I was not being prompted about invalid code when switching to BookView). What I said was, I was prompted, and when I selected "manual," the dreaded giant pink error message showed up and half my file disappeared--everything from the "error" to the EOF. Yes, I got the prompt, as far as I can recall; it's what happened after that that was problematic. I think it was as though it ignored the "manual" selection, and then rendered BV anyway, and in so doing, showed the (now) corrupted file. Does that make sense to you?

As far as recreating the issue...try having a paragraph with an opening header class and a closing p class, see if that does it, or, try a named paragraph class with some typos, like...forget the italics around a class name, or something like that. I know I had at least one of those errors. I think the "PSO'D" error was the opening a line with a header class and closing it with a paragraph class (or a closing span tag, instead), but...if I can recreate it, I'll send you the file.

Hitch

theducks 05-04-2013 06:32 PM

Quote:

Originally Posted by Hitch (Post 2503687)
I have 0.7.1, and I thought I'd set it. Apparently not. Still, not intuitive to me. (Also, am I the only one who finds the Sigil Preferences on the edit menu weird? I mean, this isn't insurmountable, obviously...but I would never think to look for a program's defaults or preferences on the edit menu. Just me being whiny.)


Hitch

I think this is a current Open Software standard.. It makes some sense, you are editing something :D

My e-mail (really old, Eudora 7) and News (NNTP) programs moved the options to the Tools menu :rolleyes: (Are Account Settings, Tools? :chinscratch:)

At least it make more sense to me than 'Files'


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

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.