Thread: Disapearing CSS
View Single Post
Old 03-25-2015, 08:45 AM   #54
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: 28,705
Karma: 205039118
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Turtle91 View Post
I "Generated the table of contents" then realized I had not imported the sgc-toc.css so I did that. Then "created HTML toc".
Now that's interesting. Perhaps there are certain conditions where the auto-generation of the sgc-toc.css file (when auto-creating an HTML toc) will unsuccessfully try to overwrite a pre-existing sgc-toc.css file (when it exists in an unsaved state).

Can I ask why you do that the way you do (importing a css file named sgc-toc.css)? If you want to use a template for the sgc-toc.css file, I suggest either 1) placing your template sgc-toc.css in your Sigil preferences directory: which will then automatically be added to your epub whenever generating an HTML toc ...

... or 2) saving your template css file under a name other than the name used by the the auto-generation routine. You can then link the new css file and remove the link to the sgc-toc.css file.

The first method seems custom tailored to your needs. That's exactly why, in fact, the ability to have a template sgc-toc.css in the Preferences directory (which gets autoimported) was added to the Create HTML ToC feature in the first place.

It doesn't excuse the bug, but I believe you're probably tempting fate by having a pre-existing sgc-toc.css file (in an unsaved state) in a Sigil epub when running a routine that also wants to create an sgc-toc.css file -- under certain situations that may be causing race conditions.

Last edited by DiapDealer; 03-25-2015 at 10:29 AM.
DiapDealer is offline   Reply With Quote