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

Latex

This document provides an introduction to LaTeX, including what LaTeX is, how to compile LaTeX documents, how to write math expressions and equations, LaTeX environments like itemize and enumerate lists, how to reference sections and formulas, and how to include figures. LaTeX allows writing documents with automatically formatted text and easy inclusion of math formulas. It compiles a text file into a formatted document and includes features like labeling for references and automatic numbering of sections, lists, and equations.

Uploaded by

Dwi Mayu
Copyright
© © All Rights Reserved
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)
33 views4 pages

Latex

This document provides an introduction to LaTeX, including what LaTeX is, how to compile LaTeX documents, how to write math expressions and equations, LaTeX environments like itemize and enumerate lists, how to reference sections and formulas, and how to include figures. LaTeX allows writing documents with automatically formatted text and easy inclusion of math formulas. It compiles a text file into a formatted document and includes features like labeling for references and automatic numbering of sections, lists, and equations.

Uploaded by

Dwi Mayu
Copyright
© © All Rights Reserved
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

LATEXcheatsheet

Renzo
April 13, 2007

What is LATEX?

LATEXis the way that nerdy mathematicians enjoy the most to write their math.
Although at the beginning it may seem an unexplicably complicated way of
doing things, after you acquire some famliarity it is extremely extremely convenient, as it allows you to:
1. Organize the format automatically.
2. Write formulas in a simple and effective way.
3. Make referencing automatic.
This is an example of a file containing a bit of info to get you guys started.

Compiling

With LATEXyou dont immediately see the output of what you write. You have to
write a text file that gives the computer instructions for what you want to see.
Then you compile the text file. This can be done with line base commands if you
like to be old fashioned, but nowadays there are a lot of TEX-text editors that
automate all these functions (LATEXshop for Mac, TeXnic Center for windows
for example, but many many others).
With ordinary writing, things are pretty much the same. The only difference
is that spacing is done automatically. So it doesnt matter if you put one space
between two words or lots of it, or if you just hit enter and go down a line.
To start a new paragraph what you need to do is skip a line.
Here is what you do if you want to write boldface, italic, or in this funky
style that I think is Cool.

Math

To write math you have some options. If you just want to put some math in a
text line, like a0 230 , then you just put your math between two dollar signs.

If something is more important, you may want to have it in a more central


fashion, then you sandwich it betwen pairs of dollar signs:

X
xn
i=0

n!

= ex

If you want to later reference your formula, then you do this:


Z
cos(x) = sin(x) + C

(1)

For a list of commands corresponding to math symbols, just use Google! Ill
try to put as many in as I can here, but I am sure Ill be missing some.

Environments

Writing math is just an example of a LATEXenvironment. Sandwiching with


dollars is just telling your computer: now you are in math mode. Most other
environments are simply recalled by telling the computer to begin and end them.
Here are a few examples:

4.1

Itemize

this is good
for lists.

4.2

Enumerate

1. this is good
2. for numbered lists.

4.3

Description

Sentence 1: I like this one


Sentence 2: because you can index your list however you want

4.4

Array

First off, arrays are in math mode, so always sandwich your command with
dollars.
Then, remember you need to specify what kind of delimiters you want and
the number of columns.
You separate entries with & , and rows with two backslashes.
Here is how it goes:
2

a1
b1
c1

a0
b0
c0

or if you want a delimiter only on one side:



x+y = 1
xy = 0
Another useful environment is for theorems. The handiest thing is to define
it in the preamble (the part at the very beginning of the document). LATEXkeeps
track of the numbering by itself.
Amazing Theorem 1 Traffic lights are very cool. When I see traffic lights I
think of

2
being irrational.
Amazing Theorem 2 (A deep result in number theory)
1+1=2
(true also in characteristic 2, except in that case it is usually stated as 1+1 = 0.)

Shortcuts

One of the cool feaures of LATEXis that if you use something a lot, you can create
a personalized command for it. I did this with LATEX. See how it is done in the
preamble! (Important, commands always start with a backslash!)

Referencing

LATEXautomatically numbers sections, subsections and so on and so forth, and


keeps track of the numbering. You can label sections, formulas etc by simply
putting a backslash label command in it. And then you can recall it with the
following command: as stated in section 1, referencing is really nice. You can
also note that formula (1) is in page 2 this way. Or that theorem 2 is truly
amazing!

Figures

For figures, you need first off to get yourself a pdf (or eps) file. Then you
include it in your text by using the syntax below. It is sometimes tricky to tell
LATEXwhere the figure should go, and most of the times LATEXwill decide not
3

to listen to you. The one thing you can try is use the commands [h],[t],[b] for
here, top, or bottom of the page (or combinations like [hb] = try to put
it here, but if you cant put it at the bottom of the page...)... however that only
increases the possibility - and does not guarantee - that LATEXmight listen to
you.

Figure 1: Snoopy is cool, and the sky is a torus...wow!

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy