[go: up one dir, main page]

0% found this document useful (0 votes)
54 views4 pages

A Sample L TEX Article

dfhttp://stackoverflow.com/questions/351574/where-can-i-find-information-about-javascript-engine-internalsfvfs

Uploaded by

gns5824
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views4 pages

A Sample L TEX Article

dfhttp://stackoverflow.com/questions/351574/where-can-i-find-information-about-javascript-engine-internalsfvfs

Uploaded by

gns5824
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

AT X Article A Sample L E John Doe December 19, 2013

Abstract
A A This a sample L TEXdocument that explains some of the L TEXcommands

Introduction

A L TEX is a markup language designed and implemented by Leslie Lamport, based on Donald A E. Knuths typesetting language TEX. The markup in the source le of a L TEX document my

appear somewhat challenging, but the compiled result of the document is certainly a pleasing rendering of the mark-up material.

A L TEX was built on TEXs foundation. An article is divided into logical units, including

an abstract, various sections and subsections, theorems, and a bibliography. The logical units
A are typed independently of one another. Once all the units have been typed, L TEX controls A the placement and formating of these elements. L TEX automatically numbers the sections,

theorems, and equations in your article, and builds the cross-references. If any changes is made to the article, it automatically renumbers its various parts and rebuilds the cross-references.

A A Packages are extensions of L TEX. L TEX commands, as a rule, start with a backslash (\) A and tells L TEXto do something special. For example, in the instruction A \emph{instructions to \LaTeX} , \emph is a L TEX command. Another kind of instruction

is called an environment. For example, the commands \begin{flushright} and \end{flushright} enclose a flushright environmenttexts that are typed inside this environment are right justied (lined up against the right margin) when typeset.

Typing Text

A The following keys are used to type text in a L TEX source le:

a-z + =

A-Z * /

0-9 ( ) [ ]

You may also use the following punctuation marks: , ; . ? ! : -

and the spacebar, and the Return (or Enter) key.

A There are thirteen special keys that are mostly used in L TEX instructions:

&

{ }

"

If you need to use them in your document, there are commands available for typesetting these special characters. For example, $ is typed as \$, the underscore ( ) is typed as \_, and % is typed as \%, whereas a is typed as \"{a}, and @ is simply typed @.

A A In a L TEX source le, each comment line begins with %. L TEX will ignore everything on

the line after the % character.

A The document class, declared by the command \documentclass{..}, in a L TEX source A le controls how the document will be formatted. L TEX, by default, fully justies the text

by placing a certain size space between wordsthe interword space and a somewhat larger space between sentencesthe intersentence space. To force an interword space, you can use the \ command (the symbol indicates a blank space). The (tilde) command also forces an

interword space, but with a dierence: it keeps words together on the same line. It is called a tie or non-breakable space.

A When L TEX encounters a period, it must decide whether or not it indicates the end of a

sentence. It uses the following rule: A period following a capital letter (e.g., A.) is interpreted

as being part of an abbreviation or an initial and will be followed by an interword space; otherwise, it signies the end of a sentence and will be followed by an intersentence space. If this rule causes problems in your document, you can follow the period with \ to force an interword space, or precede the period with \@ to force an intersetence space.

A In a L TEX document source le, left double quotes are typed a (two left single quotes)

and right double quotes are type as (two right single quotes). The left single quote key is usually in the upper-left or upper-right corner of the keyboard, and shares a key with the tilde (~) key.

A In a L TEX command that requires an argument, the argument follows the name of the

command and is placed between { and }. Command names are case sensitive. The command \\ (\newline is another form) breaks a line. You can use the \\ command and specify an appropriate amount of vertical space, for example \\[1in]. Note that this command uses square brackets rather than braces because the argument is optional. The distance/spacing may be given in points(pt), centimenters(cm), or inches(in). To force a page break, use \newpage.

Typing Math

In addition to the keys listed above, you need the keys |, <, and > to type mathematical formulas. (| is the shifted \ key on many keyboards).

There are two kinds of math formulas and environments: 1. Inline math environments open and close with $ or open with \( and close with \). 2. Displayed math environments open with \[ and close with \]. Other forms of the displayed environment are \begin{equation*} ... \end{equation*} and \begin{equation} ... \end{equation}.
A Within the math environment, L TEXuses its own spacing rules and completely ignores the

number of white spaces typed with two exceptions: 1. Spaces that delimit commands (e.g., in $\infty a$, the space is not ignored; in fact, \inftya$ is an error)

2. Spaces in the arguments of commands that temporarily revert to text mode (\mbox and \text are such commands). In text mode, many spaces equal one space; whereas, in math mode, spaces are ignored (unless they terminate a command). To asjust the spacing in a typeset document, use a spacing command. The same formula may be typeset dierently depending on whether it is inline or display. For example, math
n 2 i=1 i

is inline math. The following is the same expression as displayed


n

i2 .
i=1

Math symbols are invoked by commands inside a math formula or environment. The math symbols are organized into tables in Appendix A of textbook. Some commands (e.g. \sqrt) need arguments enclosed in braces ({ and }). For example, to typeset To typeset
n

x2 y 2 , type $\sqrt{x^{2} y^{2}}$.

x2 y 2 , type $\sqrt[n]{x^{2} y^{2}}$. Some commends need more than one sin x + tan x

arguments. For example to typeset cos2 x type \[ \frac{\sin x}{\cos^{2} x + \tan x} \] \frac is the command; sin x and cos2 x + tan x are the arguments.

Theorem 1 This is the Pythagorean Theorem. It says x2 + y 2 = z 2 . Denition 1 Earth is where life is possible. (1)

References

A Michael Downes Short Math Guide for L TEX, AMS, 2002

A George Gratzer, First Steps in L TEX, Springer-Verlag, New York, 1999

You might also like