Introduction to LATEX
©2006 by Harvey Gould
December 5, 2006
1 Introduction
TEX looks more difficult than it is. It is almost as easy as p. See how easy it is to make special symbols such as a, b, g, d, sinx, , l, We also can make subscripts Ax, Axy and superscripts, ex, ex2, and eab. We will use LATEX, which is based on TEX and has many higher-level commands (macros) for formatting, making tables, etc. More information can be found in Ref.[1].
We just made a new paragraph. Extra lines and spaces make no difference. Note that all formulas are enclosed by $ and occur in math mode.
The default font is Computer Modern. It includes italics, boldface, \textslslanted, and monospaced fonts.
2 Equations
Let us see how easy it is to write equations.
D= Si=1Nwi (xi - x̄)2 .
(1)
It is a good idea to number equations, but we can have a equation without a number by writing
P(x) = x-a ¾ b-a ,
(2)
and
g = 1 ¾ 2 \sqrt2p .
(2)
We can give an equation a label so that we can refer to it later.
E = -J Si=1Nsi si+1 ,
(2)
Equation2 expresses the energy of a configuration of spins in the Ising model.1
We can define our own macros to save typing. For example, suppose that we introduce the macros:
\newcommand\lb\langle \newcommand\rb\rangle Then we can write the average value of x as The result is
Литература
[1]Helmut Kopka and Patrick W. Daly, \textslA Guide to LATEX: Document Preparation for Beginners and Advanced Users, fourth edition, Addison-Wesley (2004).
[2]Some useful links are given at \url.
\small \noindent Updated 5 December 2006.