# Chapter 8. Special Tags in LATEX

## Using the LATEX Tag Library

LATEX has thousands of tags for symbols and special characters. The easiest way to insert these tags is to use the sidebar menu, to the left of the editor window.

The following types are available:

• Most Frequently Used

• Relation

• Operators

• Arrows

• Miscellaneous Math

• Miscellaneous Text

• Delimiters

• Greek

• Special Characters

• Cyrillic Characters

• User Defined

The tooltips of the icons show the LATEX commands and additionally needed packages.

Pressing Shift and clicking a symbol will result in $\symbolcmd$ being inserted. Similarly, pressing Ctrl inserts it in curly brackets.

If you insert a command which requires a package which is not included in your LATEX document, you will see a warning message in the logview window.

The first list of symbols holds the Most Frequently Used symbols. Inserted symbols will be added to this list, for quick and easy reference. The ordering of the symbols will not be changed upon addition of new symbols, instead a reference counter is incremented. If the number of items exceeds 30 items, the item with the lowest count is removed.

The User Defined symbol list can hold your own symbols. To create your own symbols you need the program gesymb and the file definitions.tex from the kile source package. Additionally you need a LATEX compiler (what a surprise) and dvipng (version 1.7 or later). The procedure is that you create a LATEX file with \input{definitions}, which makes the commands listed below available, and let gesymb mysymbols.tex user (which calls LATEX and dvipng) create the icons. After copying them to \$HOME/.kde/share/apps/kile/mathsymbols/user/ and restarting kile you can use your own symbols.

The following commands are defined in definitions.tex:

• \command[\optarg]{\symbol}: Include the symbol \symbol in the symbol list, the optional argument \optarg specifies the command which kile should insert. If it is not given the command in the mandatory argument is used.

• \mathcommand[\optarg]{\symbol}: Same as above, except that the command in the mandatory argument is inserted in math mode.

• \pkgs[arg]{pkg}: Declare that the command given in this line needs the LATEX package pkg with the optional argument arg. This command has to be in front of the \command command and overrides any package specification by the neededpkgs enviroment.

• \begin{neededpkgs}[pkgs-args]{pkgs} ... \end{neededpkgs}: Has the same effect as above, but for all enclosed commands.

An example for completeness is given here:

\documentclass[a4paper,10pt]{article}
\usepackage{amssymb}
\input{definitions}
%
\begin{document}
\pagestyle{empty}
%
\begin{neededpkgs}{amssymb}
\mathcommand{\surd}
\pkgs{amsmath}\mathcommand[\ddddot{}]{\ddddot{a}}
\mathcommand{\angle}
\end{neededpkgs}
\command{\"A}
\mathcommand{\exists}
\mathcommand[\stackrel{}{}]{\stackrel{abc}{=}}

%\begin{neededpkgs}[russian,koi8-r,T2C,]{babel,inputenc,fontenc,mathtext}
%
%   \end{neededpkgs}
% this would need to include the packages
% \usepackage{mathtext}
% \usepackage[T2C]{fontenc}
% \usepackage[russian]{babel}
% \usepackage[koi8-r]{inputenc}
%  just to explain the format
\end{document}