0% found this document useful (0 votes)
22 views

The First Use of Latex While Learning It

Its the basic codes needed to learn LaTex through demonstrations.. You need to download Latex from the website to write it. Its a must know software for college students studying Science and wishing to publish mathematical papers.
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)
22 views

The First Use of Latex While Learning It

Its the basic codes needed to learn LaTex through demonstrations.. You need to download Latex from the website to write it. Its a must know software for college students studying Science and wishing to publish mathematical papers.
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/ 12

The First Use of Latex While Learning It

List of Contents
1 Text Part
1.1 Font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.1 Font Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 Maths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2
2
2
4

2 Graphics Part

3 Defining
3.1 newcommand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2 renewcommand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7
7
7

4 Tables and Matrices

5 Boxes
5.1 Normal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2 Advanced . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9
9
9

6 color

10

Hello World in LATEX Document


Sary
May 28, 2014

Text Part

1.1
1.1.1

Font
Font Size

We experiment with style


Turns out its fun actually.
I have this in boldface
I have this in italic
I have this emphasized
Its flushed right.
This is used to

give gap
Fontsize

Fontsize

Fontsize

Fontsize

Fontsize
This is the set of natural numbers N
From preamble we have y = mx + 3
(x + 1)
[x + 1]
{x + 1}
$50.50 was spent last day
2


x2 + x + 3
2x + 2
x + x + 3


x+2

dy
dx x=0

d2 y
dx2 x=0

I have
1. speed
2. stamina
3. talent
I also have
power
high
low
energy
doggy huge
meow tiny
Not indenting
Indenting
Spacing
a
a
a
a
a
a

b
b
b
b
b
b

ab
3

>
>
>
>
>
>
>

x=rnorm(20, 1.1, 2.4)


epsilon=rnorm(20, 0, 1.8)
a=2.5
b=3
y=a+(b*x)+epsilon
data<-cbind(x,y)
data
x
y
[1,] 3.3019975 10.5501417
[2,] -0.3212579 1.8841905
[3,] 2.8453046 9.8698746
[4,] -0.3486842 -0.8780308
[5,] -2.3812394 -1.7281941

4x2 =
12
2
x =
3
x 1.732

WOW

(x) =

1.2

x:
0x<
x : () < x < 0

Maths

Lets look at the following equation we solve in LATEX. We want to solve for real values of x
in the following equation:
2x2 + 3(x 1)(x 2) = 0
Note that

3 6
=0
4 8
2x2 + 3(x 1)(x 2) = 2x2 + 3(x2 3x + 2)
= 2x2 + 3x2 9x + 6
= 5x2 9x + 6
5x2 9x + 6 = 0

Solving we have:


9+
81 120
x=
10
+
9 39i
=
10
x3 + y 3 = 0
Recall from previous day

The solution to

x2 + y 2 = 0

(1)

x3 + y 3 = 0

(2)

x = 5 is x = 25

Now suppose we want to evaluate the sum

n
X

i3 . We also have

i=0
2

sin tdt = 0
0

sin p sin qdpdq = 0


0

+++ 0

x +y z =3
x

n
x
2
2

1+
1+

2
1+

cos 90 = 0



n1
r1
5

2
1

a + bi

9 3 mod 6
9 3 (mod 6)
9 3 mod 6
9 3 (6)
Now to deal with matrices

Graphics Part

We can introduce .jpg/.pdf/.png/.gif images in our document after saving it in the same
directory.

Defining

3.1

newcommand

This is writing text

a2 + b 2 = c 2

cat
dog
rat
2 3
+
3 2

3.2

renewcommand

Has to be used before the use of the command.

4
x
f (x)

Tables and Matrices


1 2 3 4
1 4 9 16

Name Lap1 Lap2 Result


Sary
12s 13.5s Won on a very narrow margin as we can see
Gary
11s 15.5s Lost

Money
100
0

Table 4.1 1: Race Results

1 2
0 1

0 0
0 0

1
0
A=
0
0

1
0
A=
0
0

1

|A| = 0
0
f ormula

3
2

1
1
2
1
0
0

3
2

1
1

3
2

1
1

2 3
1 2
0 1

2
1
0
0

1.1.1

=1

1
0
0
0

2
1
0
0

3
2
1
1


1

0

0

0

2
1
0
0


3

2

1

1

Boxes

5.1

Normal

I can create basic boxes for text


like this
. Notice that theres a 2in wide
space with like this in the middle of it.
If I want to put a box around the text, I can use a frame box. The result looks
like this
.
I can also justify the text to the right within a box
like so or like so
We can also use quick versions of these. We can just do this or
this to create a quick box thats exactly the size of what we put in it.

5.2

Advanced

&&
I like using parbox to create
funny little boxes of text all
over my page.Aligned with
bottom
CURRENT LINE. Aligned with top.

Centered.

You probably got a few Overfull or


Underfull warnings when you typeCURRENT LINE set this. Sometimes narrow boxes
will do that; if youre happy with
the output, dont sweat it.
9

color

i am getting a hang of it
This is colourful :P

10

Wow its really blue

11

You might also like