Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s...

65
Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1 / 22

Transcript of Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s...

Page 1: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Introduction to Latex

Kartik Mandaville

Linux User’s Group Manipal

April 1, 2010

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1 / 22

Page 2: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Outline I

1 IntroductionLUG ManipalPoints To RememberAbout Latex

2 Getting StartedWhy ?Difference From Word ProcessorsLatex FilesLatex CommandsLayoutCompiling and Exporting to PDF

3 TypesettingBasicsMathsListsTables

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 2 / 22

Page 3: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Outline II

Including Code

4 PresentationsBeamer- example

5 References

6 Contact Information

7 Copying

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 3 / 22

Page 4: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Who are we?

Linux User’s Group Manipal

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 4 / 22

Page 5: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Who are we?

Linux User’s Group Manipal

Life, Universe and FOSS!!

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 4 / 22

Page 6: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Who are we?

Linux User’s Group Manipal

Life, Universe and FOSS!!

Believers of Knowledge Sharing

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 4 / 22

Page 7: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Who are we?

Linux User’s Group Manipal

Life, Universe and FOSS!!

Believers of Knowledge Sharing

Most technologically focused “group” in University

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 4 / 22

Page 8: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Who are we?

Linux User’s Group Manipal

Life, Universe and FOSS!!

Believers of Knowledge Sharing

Most technologically focused “group” in University

LUG Manipal is a non profit “Group” alive only on voluntary work!!

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 4 / 22

Page 9: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Who are we?

Linux User’s Group Manipal

Life, Universe and FOSS!!

Believers of Knowledge Sharing

Most technologically focused “group” in University

LUG Manipal is a non profit “Group” alive only on voluntary work!!

http://lugmanipal.org

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 4 / 22

Page 10: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Points To Remember!!!

If you have problem(s) don’t hesitate to ask

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 5 / 22

Page 11: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Points To Remember!!!

If you have problem(s) don’t hesitate to ask

Slides are based on Documentation so discussions are reallyimportant, slides are for later reference!!

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 5 / 22

Page 12: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Points To Remember!!!

If you have problem(s) don’t hesitate to ask

Slides are based on Documentation so discussions are reallyimportant, slides are for later reference!!

Please dont consider sessions as Class( Classes are boring !! )

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 5 / 22

Page 13: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Points To Remember!!!

If you have problem(s) don’t hesitate to ask

Slides are based on Documentation so discussions are reallyimportant, slides are for later reference!!

Please dont consider sessions as Class( Classes are boring !! )

Speaker is just like any person sitting next to you

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 5 / 22

Page 14: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Points To Remember!!!

If you have problem(s) don’t hesitate to ask

Slides are based on Documentation so discussions are reallyimportant, slides are for later reference!!

Please dont consider sessions as Class( Classes are boring !! )

Speaker is just like any person sitting next to you

Documentation is really important

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 5 / 22

Page 15: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Points To Remember!!!

If you have problem(s) don’t hesitate to ask

Slides are based on Documentation so discussions are reallyimportant, slides are for later reference!!

Please dont consider sessions as Class( Classes are boring !! )

Speaker is just like any person sitting next to you

Documentation is really important

Google is your friend

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 5 / 22

Page 16: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Points To Remember!!!

If you have problem(s) don’t hesitate to ask

Slides are based on Documentation so discussions are reallyimportant, slides are for later reference!!

Please dont consider sessions as Class( Classes are boring !! )

Speaker is just like any person sitting next to you

Documentation is really important

Google is your friend

If you have questions after this workshop mail me or come to LUGManipal’s forums

http://forums.lugmanipal.org

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 5 / 22

Page 17: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Latex - ?

LATEX is a typesetting system that is very suitable for producing scientificand mathematical documents of high typographical quality. It is alsosuitable for producing all sorts of other documents, from simple letters tocomplete books.

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 6 / 22

Page 18: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Why ?

It is free of cost. No need to buy any softwares !!!

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 7 / 22

Page 19: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Why ?

It is free of cost. No need to buy any softwares !!!

It is portable—sticks to the standard commands and everyone canread and exchange documents

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 7 / 22

Page 20: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Why ?

It is free of cost. No need to buy any softwares !!!

It is portable—sticks to the standard commands and everyone canread and exchange documents

Very useful for listing source codes

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 7 / 22

Page 21: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Why ?

It is free of cost. No need to buy any softwares !!!

It is portable—sticks to the standard commands and everyone canread and exchange documents

Very useful for listing source codes

You can use the editor of your choice. You can even use MicrosoftWord !!

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 7 / 22

Page 22: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Why ?

It is free of cost. No need to buy any softwares !!!

It is portable—sticks to the standard commands and everyone canread and exchange documents

Very useful for listing source codes

You can use the editor of your choice. You can even use MicrosoftWord !!

It is simply the best package for documents containing mathematics

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 7 / 22

Page 23: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Why ?

It is free of cost. No need to buy any softwares !!!

It is portable—sticks to the standard commands and everyone canread and exchange documents

Very useful for listing source codes

You can use the editor of your choice. You can even use MicrosoftWord !!

It is simply the best package for documents containing mathematics

Professionally crafted layouts are available, which make a documentreally look as if “printed.”

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 7 / 22

Page 24: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Difference From Word Processors

LATEX files are portable while .doc files vary from system to system

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 8 / 22

Page 25: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Difference From Word Processors

LATEX files are portable while .doc files vary from system to system

Choosing fonts is easier in Word

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 8 / 22

Page 26: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Difference From Word Processors

LATEX files are portable while .doc files vary from system to system

Choosing fonts is easier in Word

Typesetting is better (atleast Mathematical)

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 8 / 22

Page 27: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Difference From Word Processors

LATEX files are portable while .doc files vary from system to system

Choosing fonts is easier in Word

Typesetting is better (atleast Mathematical)

Its not WYSIWYG ( ? )

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 8 / 22

Page 28: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

LATEX Files

The input for LaTeX is a plain ASCII text file.

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 9 / 22

Page 29: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

LATEX Files

The input for LaTeX is a plain ASCII text file.

Whitespaces(?) are treated uniformly as “space” by LaTeX. Severalconsecutive whitespaces are treated as a single space.

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 9 / 22

Page 30: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

LATEX Commands

LATEX commands are case - sensitive and start with \, then have aname consisting of only letters.

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 10 / 22

Page 31: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

LATEX Commands

LATEX commands are case - sensitive and start with \, then have aname consisting of only letters.

Command names are terminated by a space or a non-letter

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 10 / 22

Page 32: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

LATEX Commands

LATEX commands are case - sensitive and start with \, then have aname consisting of only letters.

Command names are terminated by a space or a non-letter

Optional parameters are given in “[ ]”

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 10 / 22

Page 33: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

LATEX Commands

LATEX commands are case - sensitive and start with \, then have aname consisting of only letters.

Command names are terminated by a space or a non-letter

Optional parameters are given in “[ ]”

Some commands

{\LaTeX} gives LATEX

\today gives April 1, 2010

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 10 / 22

Page 34: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Layout

\documentclass[options]{class} instructs LATEX to typeset thedocument accordingly

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 11 / 22

Page 35: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Layout

\documentclass[options]{class} instructs LATEX to typeset thedocument accordingly

Article, Report, Book etc are the classes available. This ppt is madeby using Beamer class

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 11 / 22

Page 36: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Layout

\documentclass[options]{class} instructs LATEX to typeset thedocument accordingly

Article, Report, Book etc are the classes available. This ppt is madeby using Beamer class

Various Packages are available like graphics. \usepackage{}

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 11 / 22

Page 37: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Layout

\documentclass[options]{class} instructs LATEX to typeset thedocument accordingly

Article, Report, Book etc are the classes available. This ppt is madeby using Beamer class

Various Packages are available like graphics. \usepackage{}Each document starts with \begin{document} and ends with\end{document}

Examples

\documentclass[11pt,twoside,a4paper]{article}\usepackage{graphics}

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 11 / 22

Page 38: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Compiling

latex <filename>.tex - this creates a dvi file

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 12 / 22

Page 39: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Compiling

latex <filename>.tex - this creates a dvi file

dvipdf <filename>.dvi - this creates a pdf

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 12 / 22

Page 40: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Compiling

latex <filename>.tex - this creates a dvi file

dvipdf <filename>.dvi - this creates a pdf

evince <filename>.pdf - Evince(?), Use any pdf viewer

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 12 / 22

Page 41: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Basics

Typesetting is the ordering of letters for visual display

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 13 / 22

Page 42: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Basics

Typesetting is the ordering of letters for visual display

Leaving a empty line starts a new paragraph

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 13 / 22

Page 43: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Basics

Typesetting is the ordering of letters for visual display

Leaving a empty line starts a new paragraph

\\for a newline

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 13 / 22

Page 44: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Basics

Typesetting is the ordering of letters for visual display

Leaving a empty line starts a new paragraph

\\for a newline

\newpage for a new page

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 13 / 22

Page 45: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Basics

Typesetting is the ordering of letters for visual display

Leaving a empty line starts a new paragraph

\\for a newline

\newpage for a new page

Use escape sequences for special characters

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 13 / 22

Page 46: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Maths using LATEX

All inline(?) Mathematical Equations start with $ and with $

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 14 / 22

Page 47: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Maths using LATEX

All inline(?) Mathematical Equations start with $ and with $

Rest start with $$ and end with $$

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 14 / 22

Page 48: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Maths using LATEX

All inline(?) Mathematical Equations start with $ and with $

Rest start with $$ and end with $$

Some examples

$z=\frac{x}{y}$ gives z = xy

$z=\sqrt{x} $ gives z =√

x

$ \lim {n to \infty} \sum {k=1}n̂ \frac{1}{k2̂} = \frac{\pi2̂}{6}$gives limn→∞

∑nk=1

1k2 = π

2

6

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 14 / 22

Page 49: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Lists

Two types of lists - Unordered(?) and Ordered(?)

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 15 / 22

Page 50: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Lists

Two types of lists - Unordered(?) and Ordered(?)

Unordered - Itemize and Ordered - Enumerate

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 15 / 22

Page 51: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Lists

Two types of lists - Unordered(?) and Ordered(?)

Unordered - Itemize and Ordered - Enumerate

Various options are available to customize

Example

1 First

firstsecond

2 Second

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 15 / 22

Page 52: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Tables

Start and end with \begin{tabular}{} and \end{tabular}

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 16 / 22

Page 53: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Tables

Start and end with \begin{tabular}{} and \end{tabular}Use | for a vertical line and \hline

Sample Table

\begin{tabular}{|l|l|} \hline Semester&GPA \\

\hlineFirst&10\\\hlineSecond&10\\\hline \end{tabular}

Semester GPA

First 10

Second 10

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 16 / 22

Page 54: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Including Code

Use listings package

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 17 / 22

Page 55: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Including Code

Use listings package

\lstinputlisting[language=C++,firstline=2,lastline=10]{4.cpp}

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 17 / 22

Page 56: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Including Code

Use listings package

\lstinputlisting[language=C++,firstline=2,lastline=10]{4.cpp}For more info, Google “listings package latex”

Example

using namespace s t d ;c l a s s B;c l a s s A{

i n t a ;s t a t i c i n t count ;pub l i c :

void s e t a ( i n t =0);

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 17 / 22

Page 57: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Presentations using Beamer

Use Beamer class

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 18 / 22

Page 58: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Presentations using Beamer

Use Beamer class

Select Theme by \usetheme{}

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 18 / 22

Page 59: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Presentations using Beamer

Use Beamer class

Select Theme by \usetheme{}Each slide in a \begin{frame} and ends with \end{frame}

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 18 / 22

Page 60: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Beamer - Example

Example

\documentclass{beamer}

\usetheme{Madrid}

?

\begin{frame}

Hello World !!!

\end{frame}

?

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 19 / 22

Page 61: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

References

The Not So Short Introduction to LATEX2ε by Tobias Oetiker

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 20 / 22

Page 62: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

References

The Not So Short Introduction to LATEX2ε by Tobias Oetiker

A Beamer Tutorial in Beamer by Charles T. Batts

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 20 / 22

Page 63: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

References

The Not So Short Introduction to LATEX2ε by Tobias Oetiker

A Beamer Tutorial in Beamer by Charles T. Batts

http://www.latex-project.org/

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 20 / 22

Page 64: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Contact Information

Kartik [email protected]

http://kar2905.wordpress.com

Linux User’s Group Manipalhttp://lugmanipal.org

http://forums.lugmanipal.org

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 21 / 22

Page 65: Introduction to Latex - WordPress.com · Introduction to Latex Kartik Mandaville Linux User’s Group Manipal April 1, 2010 Kartik Mandaville (LUG Manipal) Latex April 1, 2010 1

Copying

Creative Commons Attribution-Noncommercial-No Derivative Works 2.5India License

http://creativecommons.org/licenses/by-nc-nd/2.5/in/

Kartik Mandaville (LUG Manipal) Latex April 1, 2010 22 / 22