A Simple Example

Hello from TEX! This is a short example of a (plain-)TEX source file. It containts a few macros, the words which start with a backslash, ‘\’. The first two macros, for example, \parindent and \parskip, set the size of the indent at the start of a paragraph and the vertical spacing between paragraphs, respectively. I am sure you can guess what some of the other macros do!

This is a the start of a new paragraph; a new paragraph is begun by leaving a blank line in the source file. Since TEX is good at type-setting mathematics, here is an equation, y = mx + c, and another:

\frac{dy}{dx} = ∫_{0}^{∞}f(x) dx.  (1)

Notice that the ‘d’s are not italicised — many publications get this wrong, particularly american publications — and the fine control over the spacing: a small horizontal skip has been added before the ‘dx’ on the right, as is traditional; in addition I have decided to reduce the default horizontal spacing inserted by TEX after the integral sign, by using the ‘\!’ macro.