View Single Post
Old 10-07-2011, 08:41 AM   #6
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,778
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Wyndham View Post
Hi citac,

I hope I didn't mislead you, but I used the term "apply template" very loosely and did not mean (for example) as used to apply a template (properly) in Dreamweaver.

I have an HTML file which contains all the header information correctly set out and I then copy and paste this to the (new) file/document.

I usually work on several documents at a time, as Notepadd++ can do this quite easily provided your PC has enough memory (etc).

1) Apply template to each file (copy and paste from example document)
2) Copy text to be removed if no longer needed
e.g. <H1 CLASS="western">
<P CLASS="western" STYLE="margin-bottom: 0.35cm">
<P CLASS="western">
<FONT FACE="Calibri, sans-serif">
<FONT SIZE=3>
etc
3) Select CTRL-H to bring up the Find/Replace dialog, enter text to find and choose replace in all open documents. Check out the drop down arrows on the replace box to quickly find text to replace with.

e.g. <P CLASS="western" STYLE="margin-bottom: 0.35cm"> replaced by <P>

------

This is a slowish task, but can significantly reduce the size of some documents and does result in a clean(er) HTML file which imports nicely into Calibre.

If there is a better way of doing this I'd love to hear about it.


Hope this was helpful
Template file or 'code snippet' would be what I would call that.

I also have NP++ and copy code from my (notes and) 'tips' file into working documents

I did note your example above Used uppercase P tags ...
I believe lower case tags (the opening and closing tag must MATCH case) are the xhtml standard now.
theducks is online now   Reply With Quote