34
Introduction to Beamer Tikz/PGF BibTeX Tips on Beamer, TikZ and BibTeX Fei Ye 1 and Moshe Cohen 2 1,2 Department of Mathematics Bar-Ilan University March 28, 2012 Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

  • Upload
    others

  • View
    24

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

Tips on Beamer, TikZ and BibTeX

Fei Ye 1 and Moshe Cohen 2

1,2Department of MathematicsBar-Ilan University

March 28, 2012

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 2: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

1 Introduction to BeamerThe preambleFramesSome tips

2 Tikz/PGFA simple templateMore basic examples“foreach” allows for some inline coding

3 BibTeXWhat it isHow to use it

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 3: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

Start to use LATEX

The American Mathematical Society (AMS) and many otherorganizations worldwide accept manuscripts in LATEX.

The best way to learn it is to start to use it. Examples:

homework

papers

official documents

\b e g i n{ i t e m i z e}\ i tem homework\ i tem p a p e r s\ i tem o f f i c i a l documents\end{ i t e m i z e}

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 4: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

LATEX: made to type-set math

You can write math in-line. For all xi ∈ A, there exists some c ∈ Zsuch that x2

i ≡ f (xi + c)2 mod p, with p prime.

For a l l $ x i\ i n\mathca l{A}$ , t h e r e e x i s t s some $ c\ i n\mathbb{Z}$ such t h a t $ x iˆ2\cong f ( x i+c ) ˆ2 \mod p $ , w i t h $p$ pr ime .

You can also separate equations, as in the following:

a2+b2 =

{c2 when c is the hyp. of a right triangle,∑n

i=1 ∆(εsin(α)i ) when this makes no sense.

(1)

\b e g i n{ e q u a t i o n}aˆ2+bˆ2=\b e g i n{ c a s e s}c ˆ2 & \ t e x t{when $ c $ i s t h e hyp . o f a r i g h t t r i a n g l e ,}\\\sum { i =1}ˆn\Delta (\ v a r e p s i l o n i ˆ{\ s i n (\ a lpha )}) & \ t e x t{when t h i s makes no

s e n s e } .\end{ c a s e s}\end{ e q u a t i o n}

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 5: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

The preambleFramesSome tips

The preamble

A LaTeX file always starts with \documentclass{}, follows by thepreamble where you may put your customized globalcommands, and arrived the body where you write yourcontent on. The body of a LaTeX file should be placedbetween \begin{document} and \end{document}.

A simple example:\d o c u m e n t c l a s s{beamer}%%%%%%%%%%%%%%%%%Preamble%%%%%%%%%%%%%%%\usetheme{Warsaw}\u s e c o l o r t h e m e{d o l p h i n}\ t i t l e {Tips on Beamer , Tikz and B i b t e x}%\ s u b t i t l e {Tips on LaTeX}\a u t h o r{F e i Ye \ i n s t {1} and Moshe Cohen \ i n s t {2}}\ i n s t i t u t e [ Bar−I l a n U n i v e r s i t y ]{\ i n s t {1 , 2} Department o f Mathematics\\

Bar−I l a n U n i v e r s i t y}\d a t e{\ c o l o r{b l u e}March 28 , 2012}

%%%%%%%%%%%%%%%%%Body%%%%%%%%%%%%%%%%%%%\b e g i n{document}. . . . . .\end{document}

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 6: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

The preambleFramesSome tips

Frames

The main input of beamer are frames.

Theorem (Author Year [Bol98])

Frames are back-bones of beamer slides.

This is a block [Kau83]

You can also use block environment for definitions, theorems, etc.

\b e g i n{ i t e m i z e}\ item<1−> The main i n p u t o f beamer a r e f r a m e s .\ item<2−> \b e g i n{theorem} Frames a r e back−bones o f beamer s l i d e s . \end{

theorem}\ item<3−> \b e g i n{b l o c k}{This i s a Block} b l o c k e n v i r o n m e n t f o r

d e f i n i t i o n s , theorems , e t c . \end{b l o c k}\end{ i t e m i z e}

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 7: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

The preambleFramesSome tips

Frames

The main input of beamer are frames.

Theorem (Author Year [Bol98])

Frames are back-bones of beamer slides.

This is a block [Kau83]

You can also use block environment for definitions, theorems, etc.

\b e g i n{ i t e m i z e}\ item<1−> The main i n p u t o f beamer a r e f r a m e s .\ item<2−> \b e g i n{theorem} Frames a r e back−bones o f beamer s l i d e s . \end{

theorem}\ item<3−> \b e g i n{b l o c k}{This i s a Block} b l o c k e n v i r o n m e n t f o r

d e f i n i t i o n s , theorems , e t c . \end{b l o c k}\end{ i t e m i z e}

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 8: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

The preambleFramesSome tips

Frames

The main input of beamer are frames.

Theorem (Author Year [Bol98])

Frames are back-bones of beamer slides.

This is a block [Kau83]

You can also use block environment for definitions, theorems, etc.

\b e g i n{ i t e m i z e}\ item<1−> The main i n p u t o f beamer a r e f r a m e s .\ item<2−> \b e g i n{theorem} Frames a r e back−bones o f beamer s l i d e s . \end{

theorem}\ item<3−> \b e g i n{b l o c k}{This i s a Block} b l o c k e n v i r o n m e n t f o r

d e f i n i t i o n s , theorems , e t c . \end{b l o c k}\end{ i t e m i z e}

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 9: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

The preambleFramesSome tips

Frames

The main input of beamer are frames.

Theorem (Author Year [Bol98])

Frames are back-bones of beamer slides.

This is a block [Kau83]

You can also use block environment for definitions, theorems, etc.

\b e g i n{ i t e m i z e}\ item<1−> The main i n p u t o f beamer a r e f r a m e s .\ item<2−> \b e g i n{theorem} Frames a r e back−bones o f beamer s l i d e s . \end{

theorem}\ item<3−> \b e g i n{b l o c k}{This i s a Block} b l o c k e n v i r o n m e n t f o r

d e f i n i t i o n s , theorems , e t c . \end{b l o c k}\end{ i t e m i z e}

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 10: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

The preambleFramesSome tips

Title bar for this particular frame

It’s as easy as beginning and ending each frame. Titles are easy,too.%\beg in{ f rame} <−− take out %\ f r a m e t i t l e{T i t l e bar f o r t h i s p a r t i c u l a r f rame}I t ’ s as e a s y as b e g i n n i n g and e n d i n g each frame . T i t l e s a r e easy , too .%\end{ f rame} <−− take out %

When you give a presentation using slides, try to keep the textshort.

You should explain in more detail as you speak.

Don’t just read what’s on the slides.

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 11: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

The preambleFramesSome tips

Title bar for this particular frame

It’s as easy as beginning and ending each frame. Titles are easy,too.%\beg in{ f rame} <−− take out %\ f r a m e t i t l e{T i t l e bar f o r t h i s p a r t i c u l a r f rame}I t ’ s as e a s y as b e g i n n i n g and e n d i n g each frame . T i t l e s a r e easy , too .%\end{ f rame} <−− take out %

When you give a presentation using slides, try to keep the textshort.

You should explain in more detail as you speak.

Don’t just read what’s on the slides.

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 12: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

The preambleFramesSome tips

Title bar for this particular frame

It’s as easy as beginning and ending each frame. Titles are easy,too.%\beg in{ f rame} <−− take out %\ f r a m e t i t l e{T i t l e bar f o r t h i s p a r t i c u l a r f rame}I t ’ s as e a s y as b e g i n n i n g and e n d i n g each frame . T i t l e s a r e easy , too .%\end{ f rame} <−− take out %

When you give a presentation using slides, try to keep the textshort.

You should explain in more detail as you speak.

Don’t just read what’s on the slides.

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 13: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

The preambleFramesSome tips

Title bar for this particular frame

It’s as easy as beginning and ending each frame. Titles are easy,too.%\beg in{ f rame} <−− take out %\ f r a m e t i t l e{T i t l e bar f o r t h i s p a r t i c u l a r f rame}I t ’ s as e a s y as b e g i n n i n g and e n d i n g each frame . T i t l e s a r e easy , too .%\end{ f rame} <−− take out %

When you give a presentation using slides, try to keep the textshort.

You should explain in more detail as you speak.

Don’t just read what’s on the slides.

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 14: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

The preambleFramesSome tips

Some tips

Print out handouts of your beamer by using\documentclass[handout]{beamer}.

Include a university logo by adding\pgfdeclareimage[height=0.5cm]{university−logo}{biu−logo−en.pdf} and\logo{\pgfuseimage{university−logo}} .

Include graphics: e.g. \ includegraphics [ scale =0.3]{biu−logo−en.pdf} .

Output:

If you encounter strange errors, then you may try\begin{frame}[ fragile ].

A beamer quickstart http://www.math.umbc.edu/

~rouben/beamer/quickstart.html

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 15: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

The preambleFramesSome tips

Some tips

Print out handouts of your beamer by using\documentclass[handout]{beamer}.

Include a university logo by adding\pgfdeclareimage[height=0.5cm]{university−logo}{biu−logo−en.pdf} and\logo{\pgfuseimage{university−logo}} .

Include graphics: e.g. \ includegraphics [ scale =0.3]{biu−logo−en.pdf} .

Output:

If you encounter strange errors, then you may try\begin{frame}[ fragile ].

A beamer quickstart http://www.math.umbc.edu/

~rouben/beamer/quickstart.html

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 16: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

The preambleFramesSome tips

Some tips

Print out handouts of your beamer by using\documentclass[handout]{beamer}.

Include a university logo by adding\pgfdeclareimage[height=0.5cm]{university−logo}{biu−logo−en.pdf} and\logo{\pgfuseimage{university−logo}} .

Include graphics: e.g. \ includegraphics [ scale =0.3]{biu−logo−en.pdf} .

Output:

If you encounter strange errors, then you may try\begin{frame}[ fragile ].

A beamer quickstart http://www.math.umbc.edu/

~rouben/beamer/quickstart.html

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 17: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

The preambleFramesSome tips

Some tips

Print out handouts of your beamer by using\documentclass[handout]{beamer}.

Include a university logo by adding\pgfdeclareimage[height=0.5cm]{university−logo}{biu−logo−en.pdf} and\logo{\pgfuseimage{university−logo}} .

Include graphics: e.g. \ includegraphics [ scale =0.3]{biu−logo−en.pdf} .

Output:

If you encounter strange errors, then you may try\begin{frame}[ fragile ].

A beamer quickstart http://www.math.umbc.edu/

~rouben/beamer/quickstart.html

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 18: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

The preambleFramesSome tips

Some tips

Print out handouts of your beamer by using\documentclass[handout]{beamer}.

Include a university logo by adding\pgfdeclareimage[height=0.5cm]{university−logo}{biu−logo−en.pdf} and\logo{\pgfuseimage{university−logo}} .

Include graphics: e.g. \ includegraphics [ scale =0.3]{biu−logo−en.pdf} .

Output:

If you encounter strange errors, then you may try\begin{frame}[ fragile ].

A beamer quickstart http://www.math.umbc.edu/

~rouben/beamer/quickstart.html

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 19: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

The preambleFramesSome tips

Using color

Unlike in a research paper, colors are useful (if not overdone)!

gray \ definecolor{gray}{rgb}{.5,.5,.5}

blue \ definecolor{blue}{rgb}{0,0,1}

red \ definecolor{red}{rgb}{1,0,0}

green \ definecolor{green}{rgb}{0,1,0}

green \ definecolor{darkgreen}{rgb}{0,.5,0}

yellow \ definecolor{yellow}{rgb}{1,1,.4}

gold \ definecolor{gold}{rgb}{.5,.5,.2}

purple \ definecolor{purple}{rgb}{.5,0,.5}

\def\gray{\color{gray}}

\def\blue{\color{blue}}

\def\red{\color{red}}

\def\green{\color{green}}

\def\darkgreen{\color{darkgreen}}

\def\yellow{\color{yellow}}

\def\gold{\color{gold}}

\def\purple{\color{purple}}

You can define your own using RGB by including two lines before\begin{document} and then using {\blue TEXT HERE} in the document.

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 20: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

A simple templateMore basic examples“foreach” allows for some inline coding

What is TikZ?

TikZ is a TeX package (use pgf as an engine) allow we drawnice 2D pictures.

A cool example:

Ft (x) F (x)

At A

BX

Bt

BT

BT

Figure: A simple commutativediagram by Stefan Kottwitz

\b e g i n{ t i k z p i c t u r e } [ f o n t=\t i n y ]\matr i x (m) [ m a t r i x o f math nodes

, row sep=3em , column sep=4em ,minimum width=2em ]

{F t ( x ) & F ( x ) \\ A t & A \\};\path[− s t e a l t h ]

(m−1−1) edge node [ l e f t ] {$\mathca l{B} X$} (m−2−1)

edge [ d o u b l e ] node [be low ] {$\mathca l{B} t $} (m−1−2)

(m−2−1. e a s t |−m−2−2) edge node [be low ] {$\mathca l{B} T$}

node [ above ] {$\ e x i s t s$} (m−2−2)

(m−1−2) edge node [ r i g h t ] {$\mathca l{B} T$} (m−2−2)

edge [ dashed ,−] (m−2−1);

\end{ t i k z p i c t u r e }

More cool examples:http://www.texample.net/tikz/examples/.

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 21: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

A simple templateMore basic examples“foreach” allows for some inline coding

What is TikZ?

TikZ is a TeX package (use pgf as an engine) allow we drawnice 2D pictures.

A cool example:

Ft (x) F (x)

At A

BX

Bt

BT

BT

Figure: A simple commutativediagram by Stefan Kottwitz

\b e g i n{ t i k z p i c t u r e } [ f o n t=\t i n y ]\matr i x (m) [ m a t r i x o f math nodes

, row sep=3em , column sep=4em ,minimum width=2em ]

{F t ( x ) & F ( x ) \\ A t & A \\};\path[− s t e a l t h ]

(m−1−1) edge node [ l e f t ] {$\mathca l{B} X$} (m−2−1)

edge [ d o u b l e ] node [be low ] {$\mathca l{B} t $} (m−1−2)

(m−2−1. e a s t |−m−2−2) edge node [be low ] {$\mathca l{B} T$}

node [ above ] {$\ e x i s t s$} (m−2−2)

(m−1−2) edge node [ r i g h t ] {$\mathca l{B} T$} (m−2−2)

edge [ dashed ,−] (m−2−1);

\end{ t i k z p i c t u r e }

More cool examples:http://www.texample.net/tikz/examples/.

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 22: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

A simple templateMore basic examples“foreach” allows for some inline coding

What is TikZ?

TikZ is a TeX package (use pgf as an engine) allow we drawnice 2D pictures.

A cool example:

Ft (x) F (x)

At A

BX

Bt

BT

BT

Figure: A simple commutativediagram by Stefan Kottwitz

\b e g i n{ t i k z p i c t u r e } [ f o n t=\t i n y ]\matr i x (m) [ m a t r i x o f math nodes

, row sep=3em , column sep=4em ,minimum width=2em ]

{F t ( x ) & F ( x ) \\ A t & A \\};\path[− s t e a l t h ]

(m−1−1) edge node [ l e f t ] {$\mathca l{B} X$} (m−2−1)

edge [ d o u b l e ] node [be low ] {$\mathca l{B} t $} (m−1−2)

(m−2−1. e a s t |−m−2−2) edge node [be low ] {$\mathca l{B} T$}

node [ above ] {$\ e x i s t s$} (m−2−2)

(m−1−2) edge node [ r i g h t ] {$\mathca l{B} T$} (m−2−2)

edge [ dashed ,−] (m−2−1);

\end{ t i k z p i c t u r e }

More cool examples:http://www.texample.net/tikz/examples/.

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 23: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

A simple templateMore basic examples“foreach” allows for some inline coding

A simple template

To use TikZ, we first need to add \usepackage{tikz} to the preamble.The following is example to plant TikZ picture in pdf byintegrating TikZ sources into TeX files.

x

y

y = x2

o

\b e g i n{ f i g u r e } [ htbp ]\ c en t e r i n g\b e g i n{ t i k z p i c t u r e } [ s c a l e =0.8 , domain

=−2:2]\draw [ b lue , −>] (−2, 0)−−(2, 0) node [

r i g h t ]{$ x $} ;\draw [ red , −>] p l o t ( 0 , \x ) node [ r i g h t

]{$ y $} ;\draw [ domain =−1:1] p l o t (\x , {\x∗\x})

node [ above ]{$ y=x ˆ2$} ;\draw ( 0 , 0) node [ below r i g h t ]{$ o $} ;\end{ t i k z p i c t u r e }\end{ f i g u r e}

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 24: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

A simple templateMore basic examples“foreach” allows for some inline coding

TikZ uses a grid system to create lines, circles, and other shapes.

(0, 0) Text Block

\b e g i n{ f i g u r e}\b e g i n{ c e n t e r}\b e g i n{ t i k z p i c t u r e }\draw ( 0 , 0 ) node [ l e f t ] {$(0 ,0) $} ;\draw ( 0 , 0 )−−(1,1)−−(2,0)−−(3,1)−−(4,0)−−(2,−1)−−c y c l e ;\draw ( 2 , 1 ) c i r c l e (3 pt ) ;\ f i l l [ c o l o r=g r e e n ] (5 ,− .5) r e c t a n g l e ( 7 , . 5 ) ;\draw ( 6 , 0 ) node {Text Block } ;\end{ t i k z p i c t u r e }\end{ c e n t e r}\end{ f i g u r e}

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 25: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

A simple templateMore basic examples“foreach” allows for some inline coding

The \foreach \x command lets you repeat several steps

\ f o r e a c h \x / \y i n {0/3 ,1/2 ,3/0}{\draw (\x ,\ y ) −− (\ x+1,\y+1) ;\draw [ c o l o r=white , l i n e width =10] (\ x+1,\y ) −− (\x ,\ y+1) ;\draw (\ x+1,\y ) −− (\x ,\ y+1) ;}

· · ·

· · ·

· · ·

i j

=

· · ·

· · ·

· · ·

i j

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 26: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

What it isHow to use it

What is BibTeX

BibTeX stands for a tool and a file format used to processreferences in LaTex

A BibTeX tool that I love very much is called JabRefhttp://jabref.sourceforge.net/.

BibTeX format consists of entries and tags: e.g.

@ a r t i c l e{A12 ,a u t h o r = ”A, B” ,T i t l e = {Something Great } ,p u b l i s h e r = {S p r i n g e r } ,Year = 2012 ,}

You can find bibtex formatted references online very easilyand store (e.g. through JabRef) the information in a fileyourfilename.bib. A bib file is like a database.

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 27: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

What it isHow to use it

What is BibTeX

BibTeX stands for a tool and a file format used to processreferences in LaTex

A BibTeX tool that I love very much is called JabRefhttp://jabref.sourceforge.net/.

BibTeX format consists of entries and tags: e.g.

@ a r t i c l e{A12 ,a u t h o r = ”A, B” ,T i t l e = {Something Great } ,p u b l i s h e r = {S p r i n g e r } ,Year = 2012 ,}

You can find bibtex formatted references online very easilyand store (e.g. through JabRef) the information in a fileyourfilename.bib. A bib file is like a database.

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 28: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

What it isHow to use it

What is BibTeX

BibTeX stands for a tool and a file format used to processreferences in LaTex

A BibTeX tool that I love very much is called JabRefhttp://jabref.sourceforge.net/.

BibTeX format consists of entries and tags: e.g.

@ a r t i c l e{A12 ,a u t h o r = ”A, B” ,T i t l e = {Something Great } ,p u b l i s h e r = {S p r i n g e r } ,Year = 2012 ,}

You can find bibtex formatted references online very easilyand store (e.g. through JabRef) the information in a fileyourfilename.bib. A bib file is like a database.

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 29: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

What it isHow to use it

How to use BibTeX

Change display style of the bibliography: \ bibliographystyle {} (put inpreamble). Some packages (e.g. bibunits, natbib etc.) cancreate more fancy styles.

To cite references: get the citation key and cite using \cite{A12}.Citation keys can be self-defined or automatically generated(if you use JabRef).

Generate bibliography: L-B-L-L. Put your bib file (e.g.bibliography.bib) in the same folder. Input the command\bibliography{bibliography} at the right place. Compile your LaTeX file

in the order: latex/pdflatex→bibtex→latex/pdflatex →latex/pdflatex.

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 30: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

What it isHow to use it

How to use BibTeX

Change display style of the bibliography: \ bibliographystyle {} (put inpreamble). Some packages (e.g. bibunits, natbib etc.) cancreate more fancy styles.

To cite references: get the citation key and cite using \cite{A12}.Citation keys can be self-defined or automatically generated(if you use JabRef).

Generate bibliography: L-B-L-L. Put your bib file (e.g.bibliography.bib) in the same folder. Input the command\bibliography{bibliography} at the right place. Compile your LaTeX file

in the order: latex/pdflatex→bibtex→latex/pdflatex →latex/pdflatex.

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 31: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

What it isHow to use it

How to use BibTeX

Change display style of the bibliography: \ bibliographystyle {} (put inpreamble). Some packages (e.g. bibunits, natbib etc.) cancreate more fancy styles.

To cite references: get the citation key and cite using \cite{A12}.Citation keys can be self-defined or automatically generated(if you use JabRef).

Generate bibliography: L-B-L-L. Put your bib file (e.g.bibliography.bib) in the same folder. Input the command\bibliography{bibliography} at the right place. Compile your LaTeX file

in the order: latex/pdflatex→bibtex→latex/pdflatex →latex/pdflatex.

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 32: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

What it isHow to use it

Obtaining bibliographies from MathSciNet

If you are on a departmental computer, you can access MathSciNetthrough the AMS: http://www.ams.org/mathscinet/

From here you can look up any published article or book.

Click the MR number to take you to the reference and “Selectalternative format” from the drop-down menu to choose “BibTeX”

Copy and paste into your .bib file, change the reference tag, anddelete (or comment out using %) the MRNUMBER line.

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 33: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

What it isHow to use it

Creating your .bib file

Open a new file in a TeX editor and save as bibliographyname.bib

If you read an article off arXiv.org, you can prepare your ownreference:@ u n p u b l i s h e d{KroMro ,

AUTHOR = {Kronheimer , P . B . and Mrowka , T . S .} ,TITLE = {Khovanov homology i s an unknot−d e t e c t o r } ,

NOTE = {a r X i v : 1 0 0 5 . 4 3 4 6} ,YEAR = {2010} ,a r c h i v e P r e f i x = arXiv ,

e p r i n t = 1 0 0 5 . 4 3 4 6 ,p r i m a r y C l a s s = math . GT,

}

Make sure you put this file in the same folder as your .tex file.

Keep this .bib file updated with every book and paper you read,and you will never have to look for the references!

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX

Page 34: Tips on Beamer, TikZ and BibTeXfacultysites.vassar.edu/mcohen/talks/CohenYeTexTips.pdfIntroduction to Beamer Tikz/PGF BibTeX The preamble Frames Some tips Frames The main input of

Introduction to BeamerTikz/PGF

BibTeX

What it isHow to use it

\ b i b l i o g r a p h y s t y l e{amsalpha}\ b i b l i o g r a p h y {11 D e c e m b e r B i b l i o g r a p h y}

Bela Bollobas, Modern graph theory, Graduate Texts inMathematics, vol. 184, Springer-Verlag, New York, 1998.

Louis H. Kauffman, Formal knot theory, Mathematical Notes,vol. 30, Princeton University Press, Princeton, NJ, 1983.

Fei Ye and Moshe Cohen Tips on Beamer, TikZ and BibTeX