1CWL File Specification 0.1:
2
3Completion modes:
4	Kile supports three completion modes, which use their own cwl files:
5	- (La)TeX mode
6	- Dictionary mode
7	- Abbreviation mode
8
9Call of completion:
10	When completion is called with a shortcut or in auto mode, Kile must separate words, so that some restriction had to be made about the already typed prefix. If the prefix is to be analyzed as valid, the completion box will open, otherwise not.
11	- (La)TeX mode: all prefixes must start with a backslash, followed by letters, possibly with a trailing star
12	- Dictionary mode: letters, digits and underscore are valid characters
13	- Abbreviation mode: letters, digits and underscore are valid characters
14	Once the completion box is opened, there are no further restrictions. All characters are valid from this moment on.
15
16Naming scheme of the cwl file:
17	- If the commands in the file belong to a class the name is class-foo.cwl, if they belong to different classes the name is class-foo,bar.cwl.
18	- In any other case it belongs to a package and should therefore have the same name than the package (package foo -> foo.cwl)
19
20File syntax:
21	- There are only two types of content, comments and text.
22	- Comments start with a #, everything after # is ignored till the end of the line.
23	- Everything else is text.
24
25File content:
26	- The files should have a small header including your name (email address is not needed), the date, and a link where the package or the class file can be downloaded.
27	  For example the header of textcomp.cwl:
28		# textcomp package
29		# tbraun 04/27/2006
30		# URL: http://www.ctan.org/tex-archive/help/Catalogue/entries/textcomp.html
31	- All commands given must have a description what to insert in the empty brackets:
32		-- \label{key} and not \label{}
33		-- \includegraphics[options]{name}
34		-- \footnotetext[number]{text} and so on
35	- All commands means all commands. So please add all possible combinations, including mandatory options and all optional options in all possible combinations.
36	  This list can be quite long but all users will appreciate the completeness.
37	  For example (taken from class-beamer.cwl):
38		  \begin{frame}
39		  \begin{frame}<overlay specification>
40		  \begin{frame}<overlay specification>[<default overlay specification>]
41		  \begin{frame}<overlay specification>[<default overlay specification>][options]
42		  \begin{frame}<overlay specification>[<default overlay specification>][options]{title}
43		  \begin{frame}<overlay specification>[<default overlay specification>][options]{title}{subtitle}
44		  \begin{frame}[<default overlay specification>]
45		  \begin{frame}[<default overlay specification>][options]
46		  \begin{frame}[<default overlay specification>][options]{title}
47		  \begin{frame}[<default overlay specification>][options]{title}{subtitle}
48		  \begin{frame}[<default overlay specification>][options]{title}{subtitle}
49		  \begin{frame}[options]
50		  \begin{frame}[options]{title}
51		  \begin{frame}[options]{title}{subtitle}
52		  \begin{frame}[options]{title}{subtitle}
53		  \begin{frame}{title}
54		  \begin{frame}{subtitle}
55		  \end{frame}
56	- Only include the \end{env} command once, but all combinations with \begin{env}{}[]<>...
57	- If you declare an environment in which the \item command is valid you have to suffix the \begin{...} declaration with \item, like in latex-document.cwl  \begin{itemize}\item.
58	- A starred version of a command must also be added
59		  \circle{diameter}
60		  \circle*{diameter}
61
62Getting assistance:
63	- You can see some examples under http://projects.kde.org/projects/extragear/office/kile/repository/revisions/master/show/src/data/complete/tex
64	- If in doubt don't hesitate to mail to kile-devel@lists.sourceforge.net and ask, we will be glad to help you :)
65
66The Kile development team
67