Frequent users of LaTeX typically use the same preamble for every document they use. Usually they fine-tuned the preamble to their likings. When starting a new document it is convenient if Kile would start with this user-defined LaTeX document right away. Templates allow you to accomplish this.
To create a new template, you must first either open a Tex/LaTeX file, or start a file of your own. Any Kile user who is continuously writing the same type of document can take advantage of using Kile to create templates of their own. Kile can generate a template from an existing document by open the desired document and selecting File->Create Template from Document.
When create a new document by selecting a template from File->New, certain character combinations will be replaced by data such as: your name or the character encoding your are using. These variables can be configured in Settings->Configure Kile. Modify the Template Variables to your wishes.
If you are designing your own template it is useful to known which characters combinations are replaced by which template variables:
$$AUTHOR$$ : this string will be replaced by the author variable.
$$DOCUMENTCLASSOPTIONS$$ : this string will be replaced by the documentclass options variable. Typically this is used as follows: \documentclass[$$DOCUMENTCLASSOPTIONS$$]{article}.
$$INPUTENCODING$$ : if the inputencoding variable is set to, say, latin1 this string is replaced by \input[latin1]{inputenc}.
To start a customized template of own, the easiest way to create a new template is to start a wizard, then add commands to the editor on the right. Once you have your document set up how you would like:
Save your file
Go to Settings
Choose Create template from document
Make any corrections necessary to template
Enter a name for your new template
Click OK to add your template to the menu
Next time you start up a new document, you will be able to choose from your customized template instead of the standard letter, report, book, etc.
A template can be created from any file. If you are looking for an easy way to configure a template, go find one you like on the internet and follow the same steps listed in the section called “Create a template from the wizard”.