View Single Post
Old 05-30-2011, 04:31 PM   #50
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Quote:
Originally Posted by JSWolf View Post
There is a much better way to deal with the page template file. I do it all the time when there is one. I delete the file. No need for it. I remove the reference to it from the OPF file and I remove the reference to it from all the XML files. Then it is gone and gone forever. It was never needed in the first place. I've never see anyone do anything with it that you cannot do is CSS.
I guess it depends on your definition of "better". I've applied the exact same approach that Calibre does in its conversions. This means only one file has to be changed, rather than having to change every single html file in the epub that links to it if you were to delete it completely.

I am sure you are 100% correct in that css can do everything an xpgt file does, but if that css is not yet present then only removing the margins from the xpgt is the "safest" approach.

Either way, it doesn't resolve the request from Jackie, who is effectively after an automation of applying a page setup to the xpgt file rather than removing it. Yes this "could" be done in css instead, but not easily automated.
kiwidude is offline   Reply With Quote