TeX basics

Once you have installed the TeX distro, you can use an editor to create your document. Before you can actually start to create your document, let me introduce some more basic concepts.

The front-end

An editor for the TeX system is called front-end. In Windows, the distro had already installed the front-end TeXWorks; in Mac OS X, TeXWorks and TeXShop; while in Linux you installed Kile and Okular. A front-end is different from text editors like Microsoft Office Word or OpenOffice Writer. These are called “What You See Is What You Get” (WYSIWYG) editors. In these editor, what you see in the editor window is exactly how the final document will look like when saved, print or exported in PDF.

In a front-end for TeX, what you should expect is something like in the picture below. In the left window you can see the XeLaTeX code with some text in English. In the right window there is the document, compiled as a PDF. What the specific TeX engine does (in out case, the XeTeX engine) is to read the source code on the left window, called the source window, and typeset that code into a PDF document that is shown in the viewer window on the right.

Front-end in Mac OS X. Source window (left side, red) and viewer window (right side, blue).

The commands

In the source code, you can see several text strings starting with a backslash “”. A string that start with a backslash is called command in TeX. Usually, a command is constituted by the backslash, followed by the command itself and by curly brackets. Inside the curly brackets there may be the content on which the command has effect or a function of the command. As an example, the command \textit{text} set the content in the curly brackets “text” to be in italics font (the command \textit is a short form for “text in italics”): the result is text.


The XeTeX engine natively supports Unicode characters. This is an important feature for a typesetting system to be used in linguistics. Unicode text can be directly input in the source code, using system keyboard or third-parts keyboards as the SIL IPA keyboard.