slides latex

195
 Intro  Basics  Lists  Equations  Tables  Figures  Bibliography  Slides  Other documents  L A T E X and R  CV A not so short introduction to L A T E X Hugo Andr´es Gu ti´ er re z Ro ja s Hanwen Zhang Communication Skills for Statisticians Faculty of Statistics Univer sidad Sa nt o Tom´ as 2014 c All Rights Reserve d - Andr´ es Guti´ errez & Hanwen Zhang  A not so sho rt introdu ction to L A T E X

Upload: mpc9315970

Post on 04-Nov-2015

13 views

Category:

Documents


0 download

DESCRIPTION

Curso latex

TRANSCRIPT

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    A not so short introduction to LATEX

    Hugo Andres Gutierrez RojasHanwen Zhang

    Communication Skills for Statisticians

    Faculty of StatisticsUniversidad Santo Tomas

    2014

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Contents

    1 Intro

    2 Basics

    3 Lists

    4 Equations

    5 Tables

    6 Figures

    7 Bibliography

    8 Slides

    9 Other documents

    10 LATEX and R

    11 CV

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Contents

    1 Intro

    2 Basics

    3 Lists

    4 Equations

    5 Tables

    6 Figures

    7 Bibliography

    8 Slides

    9 Other documents

    10 LATEX and R

    11 CV

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Contents

    1 Intro

    2 Basics

    3 Lists

    4 Equations

    5 Tables

    6 Figures

    7 Bibliography

    8 Slides

    9 Other documents

    10 LATEX and R

    11 CV

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Contents

    1 Intro

    2 Basics

    3 Lists

    4 Equations

    5 Tables

    6 Figures

    7 Bibliography

    8 Slides

    9 Other documents

    10 LATEX and R

    11 CV

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Contents

    1 Intro

    2 Basics

    3 Lists

    4 Equations

    5 Tables

    6 Figures

    7 Bibliography

    8 Slides

    9 Other documents

    10 LATEX and R

    11 CV

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Contents

    1 Intro

    2 Basics

    3 Lists

    4 Equations

    5 Tables

    6 Figures

    7 Bibliography

    8 Slides

    9 Other documents

    10 LATEX and R

    11 CV

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Contents

    1 Intro

    2 Basics

    3 Lists

    4 Equations

    5 Tables

    6 Figures

    7 Bibliography

    8 Slides

    9 Other documents

    10 LATEX and R

    11 CV

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Contents

    1 Intro

    2 Basics

    3 Lists

    4 Equations

    5 Tables

    6 Figures

    7 Bibliography

    8 Slides

    9 Other documents

    10 LATEX and R

    11 CV

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Contents

    1 Intro

    2 Basics

    3 Lists

    4 Equations

    5 Tables

    6 Figures

    7 Bibliography

    8 Slides

    9 Other documents

    10 LATEX and R

    11 CV

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Contents

    1 Intro

    2 Basics

    3 Lists

    4 Equations

    5 Tables

    6 Figures

    7 Bibliography

    8 Slides

    9 Other documents

    10 LATEX and R

    11 CV

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Contents

    1 Intro

    2 Basics

    3 Lists

    4 Equations

    5 Tables

    6 Figures

    7 Bibliography

    8 Slides

    9 Other documents

    10 LATEX and R

    11 CV

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    What LATEX is not?

    According to Davidian and Luca LATEX is not:

    A word processor like MS Word or Pages.

    A WYSIWYG software (What You See Is What You Get).

    Dependent of a specific operating system.

    A software for typesetting math.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    What LATEX is not?

    According to Davidian and Luca LATEX is not:

    A word processor like MS Word or Pages.

    A WYSIWYG software (What You See Is What You Get).

    Dependent of a specific operating system.

    A software for typesetting math.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    What LATEX is not?

    According to Davidian and Luca LATEX is not:

    A word processor like MS Word or Pages.

    A WYSIWYG software (What You See Is What You Get).

    Dependent of a specific operating system.

    A software for typesetting math.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    What LATEX is not?

    According to Davidian and Luca LATEX is not:

    A word processor like MS Word or Pages.

    A WYSIWYG software (What You See Is What You Get).

    Dependent of a specific operating system.

    A software for typesetting math.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    What LATEX is?

    According to Davidian and Luca LATEX is:

    A powerful language for typesetting math, chemistry, musicsheets, etc.

    The standard typesetting language used by major publishers ofbooks in the sciences (e.g., Springer, CRC Press, Wiley, etc.).

    The standard typesetting language used by most journals inthe sciences (e.g., Journal of the American StatisticalAssociation, Biometrics, etc.).

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    What LATEX is?

    According to Davidian and Luca LATEX is:

    A powerful language for typesetting math, chemistry, musicsheets, etc.

    The standard typesetting language used by major publishers ofbooks in the sciences (e.g., Springer, CRC Press, Wiley, etc.).

    The standard typesetting language used by most journals inthe sciences (e.g., Journal of the American StatisticalAssociation, Biometrics, etc.).

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    What LATEX is?

    According to Davidian and Luca LATEX is:

    A powerful language for typesetting math, chemistry, musicsheets, etc.

    The standard typesetting language used by major publishers ofbooks in the sciences (e.g., Springer, CRC Press, Wiley, etc.).

    The standard typesetting language used by most journals inthe sciences (e.g., Journal of the American StatisticalAssociation, Biometrics, etc.).

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    What LATEX is?

    According to me LATEX is:

    The standard typesetting language used by the Faculty ofStatistics in USTA and its Book Collection on AppliedStatistics.

    The standard typesetting language used by the journal of theFaculty of Statistics (Revista Comunicaciones en Estadstica).

    A must-learn language for the student of statistics, economicsand related disciplines who want to get enrolled in a graduateprogram.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    What LATEX is?

    According to me LATEX is:

    The standard typesetting language used by the Faculty ofStatistics in USTA and its Book Collection on AppliedStatistics.

    The standard typesetting language used by the journal of theFaculty of Statistics (Revista Comunicaciones en Estadstica).

    A must-learn language for the student of statistics, economicsand related disciplines who want to get enrolled in a graduateprogram.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    What LATEX is?

    According to me LATEX is:

    The standard typesetting language used by the Faculty ofStatistics in USTA and its Book Collection on AppliedStatistics.

    The standard typesetting language used by the journal of theFaculty of Statistics (Revista Comunicaciones en Estadstica).

    A must-learn language for the student of statistics, economicsand related disciplines who want to get enrolled in a graduateprogram.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Why should we use LATEX?

    In this class we encourage the use of this language because:

    The author focuses mainly in what he must write (thecontent).

    The output is pretty nice and the quality of text, tables,equations, etc is outstanding.

    It is free and used by leading professionals in the world.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Why should we use LATEX?

    In this class we encourage the use of this language because:

    The author focuses mainly in what he must write (thecontent).

    The output is pretty nice and the quality of text, tables,equations, etc is outstanding.

    It is free and used by leading professionals in the world.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Why should we use LATEX?

    In this class we encourage the use of this language because:

    The author focuses mainly in what he must write (thecontent).

    The output is pretty nice and the quality of text, tables,equations, etc is outstanding.

    It is free and used by leading professionals in the world.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Why should we use LATEX?

    In this class we encourage the use of this language because:

    It is multi-platform and portable (the same file could becompiled in Windows, Mac, UNIX, LINUX, and even in theinternet).

    You can AUTOMATICALLY cross-reference equations, tables,figures, bibliography.

    The statistical software R speaks easily with LATEX. Thestatistical reports then are written straightforwardly.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Why should we use LATEX?

    In this class we encourage the use of this language because:

    It is multi-platform and portable (the same file could becompiled in Windows, Mac, UNIX, LINUX, and even in theinternet).

    You can AUTOMATICALLY cross-reference equations, tables,figures, bibliography.

    The statistical software R speaks easily with LATEX. Thestatistical reports then are written straightforwardly.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Why should we use LATEX?

    In this class we encourage the use of this language because:

    It is multi-platform and portable (the same file could becompiled in Windows, Mac, UNIX, LINUX, and even in theinternet).

    You can AUTOMATICALLY cross-reference equations, tables,figures, bibliography.

    The statistical software R speaks easily with LATEX. Thestatistical reports then are written straightforwardly.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Process

    Remember that LATEXis not a WYSIWYG typesetting software. Thefollowing steps are behind the process of the final document:

    A .tex file (main file) needs to be created. This file containsboth the necessary commands that allow to compile thedocument and the content of the document.

    That file is compiled resulting in a .PDF or .PS file thatcontains the final document.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Process

    Remember that LATEXis not a WYSIWYG typesetting software. Thefollowing steps are behind the process of the final document:

    A .tex file (main file) needs to be created. This file containsboth the necessary commands that allow to compile thedocument and the content of the document.

    That file is compiled resulting in a .PDF or .PS file thatcontains the final document.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Structure of the main file

    Basically, the .tex file contains:

    The preamble, where you call the necessary packages andwrite the proper commands in order to get a clean compilingprocess.

    The document body, where you only care about writing whatyou wanted to write at first (text, figures, equations, tables,etc.)

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Structure of the main file

    Basically, the .tex file contains:

    The preamble, where you call the necessary packages andwrite the proper commands in order to get a clean compilingprocess.

    The document body, where you only care about writing whatyou wanted to write at first (text, figures, equations, tables,etc.)

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Warning

    Note that LATEX is case-sensitive and if you make a mistake in thepreamble or in the document body, you will get an error and thefinal document will not be displayed.

    This symbol % is used to comment the main file. Every commandin the main file begins with this symbol \.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Structure of an article

    \documentclass[12pt]{article}

    \usepackage[english]{babel}

    \usepackage[latin1]{inputenc}

    \title{My First Paper}

    \author{My name}

    \date{\today}

    \begin{document}

    \maketitle

    \begin{abstract}

    This paper gives an introduction to \LaTeX.

    \end{abstract}

    \section{My first section}

    \subsection{My first sub-section}

    \subsubsection{My first sub-sub-section}

    \end{document}

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Structure of an article

    1 \documentclass[12pt]{article}

    Inside [ ] you must write the options of the document. Inthis case, we want to set the size font to 12pt.

    2 \usepackage[english]{babel}

    \usepackage[latin1]{inputenc}

    The first line allows your documents to be typeset in alanguage other than english (in this case english).The second line allows you to write automatically accents(tildes).

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Structure of an article

    3 \title{}

    The title of your paper.

    4 \author{}

    Your name.

    5 \date{\today}

    Date when you compiled the file by last time.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Structure of an article

    6 \begin{document}

    One of the most important instructions. This one initializes thedocument.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Structure of an article

    7 \maketitle

    This command generates a proper title for your article.

    8 \begin{abstract}

    Your first abstract of your first article.

    \end{abstract}

    The abstract gives a brief review of the whole paper.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Structure of an article

    9 \section{My first section}

    \subsection{My first sub-section}

    \subsubsection{My first sub-sub-section}

    The body of the document is organized in sections, sub-sections andsub-sub-sections.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Structure of an article

    10 \end{document}

    One of the most important instructions. This one finishes the doc-ument.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Taking advantage from LATEX

    Users of MS Word find a lot of difficulties when it comes to cretelists. It seems that one can be lost in trying to do a simple list. LATEXusers will find the environment for creating lists very convenient.

    LATEX allows you to nest the list up to four levels. There are threesimple kinds of list environment to create lists: itemize, enumerate,and description.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Environments

    1 itemize creates non-numbered lists.

    2 enumerate creates numbered lists.

    3 description creates non-numbered definitions.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Environments

    1 itemize creates non-numbered lists.

    2 enumerate creates numbered lists.

    3 description creates non-numbered definitions.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Environments

    1 itemize creates non-numbered lists.

    2 enumerate creates numbered lists.

    3 description creates non-numbered definitions.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Taking advantage from LATEX

    LATEX is an environment-driven language. This way, everything youwant to put in the document will need to respect the rules of thislanguage. To me, the first and most important rule is: Begin with\begin{} and do not forget to end with \end{}.

    As a rule of thumb, you always end what you begin.

    \begin{document}

    ...

    \end{document}

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Itemize

    The basic structure of this bulleted list is as follows:

    \begin{itemize}

    \item My first item.

    \item My second item.

    \item My thrid item.

    \end{itemize}

    Note that the command \item allows you to start with a new bulletin the list.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Itemize

    My first item.

    My second item.

    My thrid item.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Enumerate

    The basic structure of this bulleted list is as follows:

    \begin{enumerate}

    \item My first item.

    \item My second item.

    \item My thrid item.

    \end{enumerate}

    Note that the command \item allows you to start with a new num-bered item.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Enumerate

    1 My first item.

    2 My second item.

    3 My thrid item.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Description

    The basic structure of this bulleted list is as follows:

    \begin{description}

    \item[First definition] My first item.

    \item[Second definition] My second item.

    \item[Third definition] My thrid item.

    \end{description}

    Note that the command \item allows you to start with a new num-bered item.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Description

    First definition My first item.

    Second definition My second item.

    Third definition My third item.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Customization

    \hfill \\ allows you to begin a definition from a new line in yourtext.

    \begin{description}

    \item[First definition] \hfill \\

    My first item.

    \item[Second definition] \hfill \\

    My second item.

    \end{description}

    First definitionMy first item.

    Second definitionMy second item.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Customization

    Consider the following code:

    \begin{enumerate}[\bfseries Exerc{i}se 1:]

    \item My first item.

    \item My second item.

    \item My thrid item.

    \end{enumerate}

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Customization

    Exercise 1: My first item.

    Exercise 2: My second item.

    Exercise 3: My thrid item.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Customization

    Within the enumerate environment, you can modify the style of thecounters. For example, consider the following instruction:

    [\bfseries Exerc{i}se 1:]

    Note that the command [] allows to define different options in-side the environment. Also, \bfseries makes bold the font ofthe counter. The text of the counter is replaced by the wordExerc{i}se and finally, the counter itself is defined to be arabicfollowed by a colon.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Customization

    In LATEXthere are two declarations that changes the style of a text1) the series: it can be \mdseries or \mdseries and 2) the family:it can be \rmfamily, \sffamily or \ttfamily. Now, try this:

    [\mdseries Exerc{i}se 1:]

    [\mdseries \ttfamily Exerc{i}se 1:]

    [\rmfamily Exerc{i}se a:]

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Customization

    Why should we need to write Exerc{i}se, insteadof Exercise?

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Customization

    To begin the list in a different number other than 1. :

    \begin{enumerate}

    \setcounter{enumi}{4}

    \item My fifth element

    \end{enumerate}

    5 My fifth element

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Classwork

    1 Create a nested list of your most likely actors and actresses(in order of importance). Consider different bullets for filmsand TV shows. Separate your list into local and foreign. Givedetails of movies or TV shows where actors have been part of.

    2 Define and describe: random variable, probability anddistribution function.

    3 Formulate and write three exercises to practice what you havelearned today.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Classwork

    1 Create a nested list of your most likely actors and actresses(in order of importance). Consider different bullets for filmsand TV shows. Separate your list into local and foreign. Givedetails of movies or TV shows where actors have been part of.

    2 Define and describe: random variable, probability anddistribution function.

    3 Formulate and write three exercises to practice what you havelearned today.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Classwork

    1 Create a nested list of your most likely actors and actresses(in order of importance). Consider different bullets for filmsand TV shows. Separate your list into local and foreign. Givedetails of movies or TV shows where actors have been part of.

    2 Define and describe: random variable, probability anddistribution function.

    3 Formulate and write three exercises to practice what you havelearned today.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Equations and math

    In this section we focus on the beauty of LATEX when generatingequations and symbols. Now, you will see how this language over-takes (exceeds, surpasses and beats) common word processors byfar!

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    The required package

    The package amsmath provides a large number of useful symbols formathematical (and related stuff) writing.

    \usepackage{amsmath}

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    The greek alphabet

    If you study statistics, it is imperative for you to memorise the fol-lowing symbols:

    \alpha \nu \beta \xi

    \Gamma \gamma \Delta \delta \Pi pi \pi

    \epsilon \rho \zeta \Sigma \sigma \eta \tau

    \Theta \theta \upsilon \iota \phi \kappa \chi

    \Lambda \lambda \Psi \psi \mu \Omega \omega

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Common symbols

    To write fractions, we use \frac{}{} and dfrac{}{}.

    For example, the syntax \frac{x}{y} gives xy , and

    \dfrac{x}{y} givesx

    yExponential and logarithm functions are obtained with \expand \ln.

    For example, 5\exp\{-5x\} gives 5 exp{5x}.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Common symbols

    One single dot is obtained by \ldot and \cdot.

    Dots are obtained by \ldots and \cdots.

    The summatory and productory are very common in thestatistical theory.

    For example

    \sum_{i=1}^na_i+\sum b_i+\prod_{j=1}^mc_j

    gives the expression

    ni=1

    ai +

    bi +mj=1

    cj

    .

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Common symbols

    The integral operator can be obtained with \int.

    For example,

    \int \ldots \int f(x_1,\cdots,x_k)dx_1\cdots dx_k=1

    gives the expression. . .

    f (x1, , xk)dx1 dxk = 1

    .

    \frac{\partial F_X(x)}{\partial x}=f_X(x)

    gives the expression

    FX (x)

    x= fX (x)

    .

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Detexify web

    How to write a mathematical symbol when you dont knowthe proper syntax?

    Just draw the symbol in the web of Detexify

    Select the right symbol and copy the code in LATEX

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Detexify web

    How to write a mathematical symbol when you dont knowthe proper syntax?

    Just draw the symbol in the web of Detexify

    Select the right symbol and copy the code in LATEX

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Detexify web

    How to write a mathematical symbol when you dont knowthe proper syntax?

    Just draw the symbol in the web of Detexify

    Select the right symbol and copy the code in LATEX

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Power and indices

    The caret ^ character is used to raise something (like power ina polynom).

    The underscore _ is for lowering.

    Use { } when more than one expression is raised or lowered.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Power and indices

    For example,

    (a_n+b_{n+1})^2=a_n^2+b_{n+1}^2+2a_nb_{n+1}

    results in the following expression:

    (an + bn+1)2 = a2n + b

    2n+1 + 2anbn+1

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Nested power and indices

    For more complex situations, just write the expression inside of^{...} and _{...}. For example,

    \omega^{r_{i,j}+1}_{m_i+n_j}

    gives the following expression:

    ri,j+1mi+nj

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Mathematical environment

    Note that math symbols and equations are different than text. So,a different environment must be used to properly write equations.

    The math environment has a very simple form: $...$.

    Observe the difference between y (y) and y ($y$).

    Using $$...$$ yields a centered expression.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Mathematical environment

    For example, if you type:

    The sum between $x=2$ and $y=3$ is

    $$x+y=5$$

    Then, the following expression is shown:

    The sum between x = 2 and y = 3 is

    x + y = 5

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    The equation environment

    This environment is used to write math seriously:

    \begin{equation}\label{EQ_name}

    ...

    \end{equation}

    Within this environment we can enumerate andcross-reference equations.

    If we dont need to enumerate the equation, the appropriatesyntax is:

    \begin{equation*}

    ...

    \end{equation*}

    Use \ref{EQ_name} to call the corresponding equation.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Reference

    For example, type this:

    \begin{equation}\label{Prob}

    \int_{-\infty}^{infty}f(x)dx=1

    \end{equation}

    (\ref{Prob}) remains if $f(x)$ is a density function.

    Gives:

    f (x)dx = 1. (1)

    (??) remains if f (x) is a density function.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    The align environment

    This environment allows us to align several equations.

    Each line will be counted as a different equation, and eachequation will be enumerated.

    Use \notag to remove enumeration.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    The align environment

    For example,

    \begin{align}

    x&=2\\

    y&=4\notag

    \end{align}

    gives the following expression:

    x = 2 (2)

    y = 4

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    The cases environment

    We can use this environment to write functions or any expressioninvolving cases. For example, it is useful to write discrete probabilityfunctions. Cases environment must be typed inside of an equationenvironment, $...$ or $$...$$.

    Pr(Y = y) =

    {(nx

    )py (1 p)ny for y = 0, 1, . . . , n

    0 otherwise(3)

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    The cases environment

    Consider the following code:

    \begin{equation}

    f(x)=

    \begin{cases}

    x&\text{if $x>2$}\\

    x+1&\text{else}

    \end{equation}

    \end{cases}

    that results in the following expression:

    f (x) =

    {x if x > 2

    x + 1 else(4)

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Matrices

    As you should know, matrices are very common and useful in math-ematics, statistics and related disciplines.

    Different elements in a row are separated by & (ampersandsymbol) and the rows are separated by \\

    The matrix environment must be typed inside of an equationenvironment, $...$ or $$...$$.

    A =

    (2 31 0

    )

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Matrices

    \begin{equation}

    A=

    \begin{pmatrix}

    2 & 3\\

    1 & 0

    \end{pmatrix}

    \end{equation}

    gives the expression

    A =

    (2 31 0

    )(5)

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Classwork

    Remember the following rules when writing math:

    Equations are sentences composed by subject, verb and,predicate.

    You must make sure than the former parts of a sentence arepresent in your equation.

    Respect the grammar: do not forget punctuation marks inyour entire paper! Even equations must respect grammar (ifneed, use colon, semicolon and period).

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Classwork

    Remember the following rules when writing math:

    Equations are sentences composed by subject, verb and,predicate.

    You must make sure than the former parts of a sentence arepresent in your equation.

    Respect the grammar: do not forget punctuation marks inyour entire paper! Even equations must respect grammar (ifneed, use colon, semicolon and period).

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Classwork

    Remember the following rules when writing math:

    Equations are sentences composed by subject, verb and,predicate.

    You must make sure than the former parts of a sentence arepresent in your equation.

    Respect the grammar: do not forget punctuation marks inyour entire paper! Even equations must respect grammar (ifneed, use colon, semicolon and period).

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Classwork

    Reproduce the following expressions:

    xt |xt1, , x1, z tn (jt)

    n/(n 2) + a(jt)0 +

    jti=1

    xti (6)

    f (x|z,x) = f (xk+1|xk , , x1, z,x) f (xT |xT1, , x1, z,x)

    =

    [(n+12 )npi(n2 )

    ]Tk Tt=k+1

    [h(jt)

    ]1 Tt=k+1

    (1 +

    e2tn

    ) n+12

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Classwork

    Reproduce the following expressions:

    xt |xt1, , x1, z tn (jt)

    n/(n 2) + a(jt)0 +

    jti=1

    xti (6)

    f (x|z,x) = f (xk+1|xk , , x1, z,x) f (xT |xT1, , x1, z,x)

    =

    [(n+12 )npi(n2 )

    ]Tk Tt=k+1

    [h(jt)

    ]1 Tt=k+1

    (1 +

    e2tn

    ) n+12

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Tables

    Tables are very important to report results of analysis or representideas in a simpler form. We use the environment tabular inside ofthe environment table to create a table.

    As you should know, a table is an array composed by rows andcolumns.

    Note that a table is different from a matrix, because we can cus-tomize it. You can insert horizontal lines, vertical lines, text, head-ers, etc.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Tables

    We use \\ to separate different rows and & to separatedifferent elements in a row (similar to the writing of a matrix).

    We use c, l or r to indicate that each column is centred,aligned to the left or right.

    We use \hline to inset a horizontal line between rows.

    We use \cline to inset a horizontal line between determinedcolumns.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Tables

    Consider the following nice table.

    Coefficient Estimation Standard error

    1 0.5 0.232 -1.5 0.43

    Tabla 1 : A very interesting table

    Did you notice the label?

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Structure of a table

    Consider the following code generating the previous table:

    \begin{table}

    \label{Table1}\centering

    \begin{tabular}{c|cc}\hline

    Coefficient & Estimation & Standard error\\\hline

    $\theta_1$ &0.5 &0.23\\

    $\theta_2$ &-1.5 &0.43\\\hline

    \end{tabular}

    \caption{A very interesting table}

    \end{table}

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Merging rows and columns

    Sometimes we need to merge columns or rows. To do so, we mustuse the package multirow.

    The usage is:

    To merge columns:\multicolumn{number of columns}{justification}{text}

    To merge rows:\multirow{number of rows}{*}{text}

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Merging rows and columns

    Consider the following table: it merges both columns and rows.

    CoefficientEstimation

    Bayesian Classic

    1 0.5 0.432 -1.5 -1.43

    Tabla 2 : A very tricky table

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Merging rows and columns

    The previous table was created with the following code:

    \begin{table}

    \label{Table1}\centering

    \begin{tabular}{|c|cc|} \hline

    \multirow{2}{*}{Coefficient} &\multicolumn{2}{c|}

    {Estimation} \\ \cline{2-3}

    &Bayesian&Classic\\ \hline

    $\theta_1$&0.5&0.43\\

    $\theta_2$&-1.5&-1.43\\ \hline

    \end{tabular}

    \caption{A very tricky table}

    \end{table}

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Classwork

    Call the multirow package and reproduce the following table:

    Density Link function Name

    Binomiallog{/(1 )} Logit

    1() ProbitPoisson log Log

    Tabla 3 : Selected GLM families and corresponding link functions.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Shorcut

    Yeah right!!!Doing tables in LATEX is a littletricky!!!

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Using Excel2Latex

    We used to write and customise our tables in MS Excel. There isa complement called Excel2Latex that allows you to export thetable that you create the tables in Excel and translate them to LATEXcode.

    http://www.ctan.org/tex-archive/support/excel2latex/

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Using Excel2Latex

    Before doing anything you must call the booktabs package. Then:

    Install the complement.

    Create your table.

    Select your table.

    Go to format and click on export table to LATEX.

    Copy the code and paste it in LATEX.

    Enjoy.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Using Excel2Latex

    Before doing anything you must call the booktabs package. Then:

    Install the complement.

    Create your table.

    Select your table.

    Go to format and click on export table to LATEX.

    Copy the code and paste it in LATEX.

    Enjoy.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Using Excel2Latex

    Before doing anything you must call the booktabs package. Then:

    Install the complement.

    Create your table.

    Select your table.

    Go to format and click on export table to LATEX.

    Copy the code and paste it in LATEX.

    Enjoy.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Using Excel2Latex

    Before doing anything you must call the booktabs package. Then:

    Install the complement.

    Create your table.

    Select your table.

    Go to format and click on export table to LATEX.

    Copy the code and paste it in LATEX.

    Enjoy.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Using Excel2Latex

    Before doing anything you must call the booktabs package. Then:

    Install the complement.

    Create your table.

    Select your table.

    Go to format and click on export table to LATEX.

    Copy the code and paste it in LATEX.

    Enjoy.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Using Excel2Latex

    Before doing anything you must call the booktabs package. Then:

    Install the complement.

    Create your table.

    Select your table.

    Go to format and click on export table to LATEX.

    Copy the code and paste it in LATEX.

    Enjoy.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Figures in LATEX

    Firstly, we load the package graphicx.

    We use the commando\includegraphics[options]{file name} in theenvironment figure to insert images.

    In options we specify the size, width, height and othersfeatures.

    We can insert images in format .jpg and .eps (EncapsulatedPostScript).

    For simplicity, we paste the image file in the same folder asthe .tex file.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Figures in LATEX

    The following instructions

    \begin{figure}

    \centering

    \includegraphics[scale=0.45]{densidad_Weibull.eps}

    \caption{The Weibull distribution density.}

    \label{fig1}

    \end{figure}

    produce the following figure

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    0 1 2 3 4

    0.0

    0.5

    1.0

    1.5

    2.0

    x

    yWeibull(3,0.5)Weibull(1,1)Weibull(2,1)

    Figure 1 : The Weibull distribution density.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Figures in LATEX

    The following instructions

    \begin{figure}

    \centering

    \includegraphics[width=3cm,height=8cm]{densidad_Weibull.eps}

    \caption{The Weibull distribution density.}

    \label{fig1}

    \end{figure}

    produce the figure

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    0 1 2 3 4

    0.

    00

    .5

    1.

    01

    .5

    2.

    0

    x

    y

    Weibull(3,0.5)Weibull(1,1)Weibull(2,1)

    Figure 2 : The Weibull distribution density.c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Figures in LATEX

    In order to insert a image in format .jpg, we need to introduce thedimensions of the file in options.

    The following instructions

    \begin{figure}

    \centering

    \includegraphics[bb=0 0 1200 1200, scale=0.15]{Votar.jpg}

    \caption{We will vote.}

    \end{figure}

    produce the following figure

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Figure 3 : We will vote.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Figures in LATEX

    We can insert figures with more that one image using the packagesubfigure. For example

    \begin{figure}[h]

    \centering

    \subfigure[Weibull density.]{

    \includegraphics[scale=0.25]{densidad_Weibull.eps}}

    \subfigure[F density.]{

    \includegraphics[scale=0.25]{densidad_F.eps}}

    \caption{Two important densities.}

    \end{figure}

    produce the following figure

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    0 1 2 3 4

    0.0

    0.5

    1.0

    1.5

    2.0

    x

    y

    Weibull(3,0.5)Weibull(1,1)Weibull(2,1)

    (a) Weibull density.

    0 1 2 3 4 5

    0.0

    0.2

    0.4

    0.6

    0.8

    1.0

    x

    y

    F(2,2)F(2,5)F(10,5)F(10,10)

    (b) F density.

    Figure 4 : Two important densities.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Figures in LATEX

    We can also combine a table with figures with the package espfig,the following instruction

    \begin{table}[h!]

    \centering\caption{Four interesting densities}

    \begin{tabular}{|c|c|} \hline

    Weibull density & Beta density \\

    \epsfig{file=densidad_Weibull.eps,scale=0.15}

    & \epsfig{file=densidad_beta.eps,scale=0.15} \\ \hline

    F density & Binomial density \\

    \epsfig{file=densidad_F.eps,scale=0.15}

    & \epsfig{file=densidad_binomial.eps,scale=0.15} \\\hline

    \end{tabular}

    \end{table}

    produce the following table with figures.c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Figures in LATEX

    Tabla 4 : Four interesting densities

    Weibull density Beta density

    0 1 2 3 4

    0.0

    0.5

    1.0

    1.5

    2.0

    x

    y

    Weibull(3,0.5)Weibull(1,1)Weibull(2,1)

    02

    4

    x

    f(x)

    0.01 0.12 0.23 0.34 0.45 0.56 0.67 0.78 0.89

    Beta(0.5,1)Beta(0.5,0.3)

    0.0

    1.0

    2.0

    x

    f(x)

    0.01 0.12 0.23 0.34 0.45 0.56 0.67 0.78 0.89

    Beta(2,1)Beta(2,3)

    F density Binomial density

    0 1 2 3 4 5

    0.0

    0.2

    0.4

    0.6

    0.8

    1.0

    x

    y

    F(2,2)F(2,5)F(10,5)F(10,10)

    0.00

    0.05

    0.10

    0.15

    0.20

    0.25

    x

    f(x)

    0 1 2 3 4 5 6 7 8 9 10

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Bibliographic standards

    The correct writing of the bibliography is very important inessays, articles, books or any scientific documents.

    We use the bibliographic references to

    1 resume the background of the investigation.2 cite results that we need in our investigation.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Bibliographic standards

    The correct writing of the bibliography is very important inessays, articles, books or any scientific documents.

    We use the bibliographic references to

    1 resume the background of the investigation.2 cite results that we need in our investigation.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Bibliographic standards

    The correct writing of the bibliography is very important inessays, articles, books or any scientific documents.

    We use the bibliographic references to1 resume the background of the investigation.

    2 cite results that we need in our investigation.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Bibliographic standards

    The correct writing of the bibliography is very important inessays, articles, books or any scientific documents.

    We use the bibliographic references to1 resume the background of the investigation.2 cite results that we need in our investigation.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Bibliographic standards

    There are many different bibliographic styles such as Harvard, Chicago,Turabian, APA (America Psychological Association), AMA (Ameri-can Medical Association), ACS (American Chemical Society).

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Bibliographic standards

    Author - year format.

    One of the most used styles.

    Journals that use this format include: JASA, Journal ofForecasting, American Statistician, Biometrika.

    For example, Zhang & Gutierrez (2010) claim that ...

    In the bibliography list, the references are in alphabetical order(according to the last name of the first author).

    In case that you cite more than one reference of some authors,the order is chronological.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Bibliographic standards

    Author - year format.

    One of the most used styles.

    Journals that use this format include: JASA, Journal ofForecasting, American Statistician, Biometrika.

    For example, Zhang & Gutierrez (2010) claim that ...

    In the bibliography list, the references are in alphabetical order(according to the last name of the first author).

    In case that you cite more than one reference of some authors,the order is chronological.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Bibliographic standards

    Author - year format.

    One of the most used styles.

    Journals that use this format include: JASA, Journal ofForecasting, American Statistician, Biometrika.

    For example, Zhang & Gutierrez (2010) claim that ...

    In the bibliography list, the references are in alphabetical order(according to the last name of the first author).

    In case that you cite more than one reference of some authors,the order is chronological.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Bibliographic standards

    Author - year format.

    One of the most used styles.

    Journals that use this format include: JASA, Journal ofForecasting, American Statistician, Biometrika.

    For example, Zhang & Gutierrez (2010) claim that ...

    In the bibliography list, the references are in alphabetical order(according to the last name of the first author).

    In case that you cite more than one reference of some authors,the order is chronological.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Bibliographic standards

    Author - year format.

    One of the most used styles.

    Journals that use this format include: JASA, Journal ofForecasting, American Statistician, Biometrika.

    For example, Zhang & Gutierrez (2010) claim that ...

    In the bibliography list, the references are in alphabetical order(according to the last name of the first author).

    In case that you cite more than one reference of some authors,the order is chronological.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Numeric format

    Journals as Pattern Analysis & Applications, StatisticalMethodology and Statistics use reference citations in the textidentified by numbers in parenthesis or square brackets.

    For example: This result was first demonstrated by Fisher in1943 (see [2]).

    In the bibliography list, the references may be displayed inorder of appearance or in alphabetical order.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Numeric format

    Journals as Pattern Analysis & Applications, StatisticalMethodology and Statistics use reference citations in the textidentified by numbers in parenthesis or square brackets.

    For example: This result was first demonstrated by Fisher in1943 (see [2]).

    In the bibliography list, the references may be displayed inorder of appearance or in alphabetical order.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Numeric format

    Journals as Pattern Analysis & Applications, StatisticalMethodology and Statistics use reference citations in the textidentified by numbers in parenthesis or square brackets.

    For example: This result was first demonstrated by Fisher in1943 (see [2]).

    In the bibliography list, the references may be displayed inorder of appearance or in alphabetical order.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Alternative format

    Journals as Significance use the reference citations insuperscript.

    For example: see Buckland et al.1 for further details.

    In the bibliography list, the references may be displayed inorder of appearance or in alphabetical order.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Alternative format

    Journals as Significance use the reference citations insuperscript.

    For example: see Buckland et al.1 for further details.

    In the bibliography list, the references may be displayed inorder of appearance or in alphabetical order.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Alternative format

    Journals as Significance use the reference citations insuperscript.

    For example: see Buckland et al.1 for further details.

    In the bibliography list, the references may be displayed inorder of appearance or in alphabetical order.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Bibliographic standards

    The basic rule for citing bibliographic references is:

    Every item included in the bibliography must be cited in thedocument.

    Every citation in the document must be in the bibliography.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Bibliographic standards

    The bibliographic references we could cite include

    1 Books

    2 Articles published in journals

    3 Doctoral or masters thesis

    4 Conference proceedings

    5 Technical reports

    6 Technical manual

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Bibliographic standards

    The bibliographic references we could cite include

    1 Books

    2 Articles published in journals

    3 Doctoral or masters thesis

    4 Conference proceedings

    5 Technical reports

    6 Technical manual

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Bibliographic standards

    The bibliographic references we could cite include

    1 Books

    2 Articles published in journals

    3 Doctoral or masters thesis

    4 Conference proceedings

    5 Technical reports

    6 Technical manual

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Bibliographic standards

    The bibliographic references we could cite include

    1 Books

    2 Articles published in journals

    3 Doctoral or masters thesis

    4 Conference proceedings

    5 Technical reports

    6 Technical manual

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Bibliographic standards

    The bibliographic references we could cite include

    1 Books

    2 Articles published in journals

    3 Doctoral or masters thesis

    4 Conference proceedings

    5 Technical reports

    6 Technical manual

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Bibliographic standards

    The bibliographic references we could cite include

    1 Books

    2 Articles published in journals

    3 Doctoral or masters thesis

    4 Conference proceedings

    5 Technical reports

    6 Technical manual

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Bibliographic standards

    What information do we need to include in a bibliographic reference?

    When we cite a book, the basic information are title, authors,year of publication, publisher, edition.

    In the case of an article, we need to include title, authors,journal, year of publication, volume, number and pages.

    In the case of a thesis, we need to include title, authors,educational institute, year and type (doctoral or master)

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Bibliographic standards

    What information do we need to include in a bibliographic reference?

    When we cite a book, the basic information are title, authors,year of publication, publisher, edition.

    In the case of an article, we need to include title, authors,journal, year of publication, volume, number and pages.

    In the case of a thesis, we need to include title, authors,educational institute, year and type (doctoral or master)

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Bibliographic standards

    What information do we need to include in a bibliographic reference?

    When we cite a book, the basic information are title, authors,year of publication, publisher, edition.

    In the case of an article, we need to include title, authors,journal, year of publication, volume, number and pages.

    In the case of a thesis, we need to include title, authors,educational institute, year and type (doctoral or master)

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Bibliographic standards

    When we cite a conference proceeding, we need to includetitle, authors, name of the conference, year of publication,organization or publisher, among others.

    In the case of a technical report, we need to include title,authors, year of publication and institution.

    In the case of a technical manual, we need to include title,authors, year of publication and the organization.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Bibliographic standards

    When we cite a conference proceeding, we need to includetitle, authors, name of the conference, year of publication,organization or publisher, among others.

    In the case of a technical report, we need to include title,authors, year of publication and institution.

    In the case of a technical manual, we need to include title,authors, year of publication and the organization.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Bibliographic standards

    When we cite a conference proceeding, we need to includetitle, authors, name of the conference, year of publication,organization or publisher, among others.

    In the case of a technical report, we need to include title,authors, year of publication and institution.

    In the case of a technical manual, we need to include title,authors, year of publication and the organization.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Bibliography in LATEX

    The structure in LATEX is as following:

    \begin{thebibliography}{9}

    \bibitem{Nieto2005} Nieto, F. H. (2005). Modeling

    bivariate threshold autoregressive processes in the

    pressence of missing data,

    \textit{Communications in Statistics: Theory and Methods}

    \bibitem{Carli1995} Carlin, B.P. and Chib, S. (1995).

    Bayesian model choice via Markov chain Montecarlo methods,

    \textit{Journal of the Royal Statistical Society Series B},

    \textbf{57}, 473-484.

    \end{thebibliography}

    produce the following bibliography

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Bibliography in LATEX

    Nieto, F. H. (2005). Modeling bivariate thresholdautoregressive processes in the pressence of missing data,Communications in Statistics: Theory and Methods

    Carlin, B.P. and Chib, S. (1995). Bayesian model choice viaMarkov chain Montecarlo methods, Journal of the RoyalStatistical Society Series B, 57, 473-484.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Bibliography in LATEX

    To cite one of the references, we use \cite{Name}. For example,

    This algorithm was firstly proposed by \cite{Nieto2005}

    produces

    This algorithm was firstly proposed by [?]

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    For more flexible and more organised bibliography writing, we useBIBTEX.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    BibTex

    The usage of BibTex provides a unified format forbibliographical references and is particularly useful when wehave a big number of references.

    All you need to do is1 Create a file of all references with extension .bib2 Save the file in the same folder of the file .tex3 Include the references with the instruction

    \bibliography{Name} and\usepackage[full]{harvard}in the tex document.

    4 Specify the bibliographic style with \bibliographystyle{}5 Run BibTex and then run tex as usual.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    BibTex

    When you need to cite a reference, distinguish between\cite{} and \citeasnoun{}.

    When the reference forms part of the sentence, you use\citeasnoun{}, otherwise you use \cite{}.

    Use \nocite{*} if you want the complete list of references,even those not cited in the document.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Beamer

    Beamer is specially designed to create presentations in LaTex.

    With Beamer you can reproduce easily complicated equationsand have many styles for animation and presentation.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Beamer

    The usage of Beamer is as follows

    \documentclass[12pt]{beamer}

    \mode{\usetheme{Antibes}}

    \usecolortheme{dove}

    \title{}

    \author{}

    \begin{document}

    \frame{\titlepage}

    \begin{frame}[option]

    \frametitle{Name}

    \end{frame}

    \end{document}

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Beamer

    Visit http://deic.uab.es/~iblanes/beamer_gallery/for different themes.

    Some common color themes are albatross, beaver, beetle,crane, dolphin, dove, fly, lily, orchid, seahorse, whale andwolverine

    In the option of \begin{frame}, we can use t (top), c(center) or b (bottom) to specify the ubication of text.

    You can use different colors in the presentation, for example,\textcolor{red}{Text in red} prodeces Text in red.

    The block exampleblock and alertblock environment isuseful when we want to highlight some content.

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Beamer

    \begin{block}{Funny theorem}

    This is important!

    \end{block}

    \begin{exampleblock}{Not so funny theorem}

    This is very important!

    \end{exampleblock}

    \begin{alertblock}{Not funny at all}

    Pay attention!

    \end{alertblock}

    produce the following

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Beamer

    Funny theorem

    This is important!

    Not so funny theorem

    This is very important!

    Not funny at all

    Pay attention!

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Animation in presentations

    The basic instruction for animation is \pause introducing a pausein the text. For example

    $$\int_0^3 f(x)dx\pause=\int_0^2f(x)dx\pause

    +\int_2^3 f(x)dx\pause=1$$

    produces 30

    f (x)dx

    =

    20

    f (x)dx +

    32

    f (x)dx = 1

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Animation in presentations

    The basic instruction for animation is \pause introducing a pausein the text. For example

    $$\int_0^3 f(x)dx\pause=\int_0^2f(x)dx\pause

    +\int_2^3 f(x)dx\pause=1$$

    produces 30

    f (x)dx =

    20

    f (x)dx

    +

    32

    f (x)dx = 1

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Animation in presentations

    The basic instruction for animation is \pause introducing a pausein the text. For example

    $$\int_0^3 f(x)dx\pause=\int_0^2f(x)dx\pause

    +\int_2^3 f(x)dx\pause=1$$

    produces 30

    f (x)dx =

    20

    f (x)dx +

    32

    f (x)dx

    = 1

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Animation in presentations

    The basic instruction for animation is \pause introducing a pausein the text. For example

    $$\int_0^3 f(x)dx\pause=\int_0^2f(x)dx\pause

    +\int_2^3 f(x)dx\pause=1$$

    produces 30

    f (x)dx =

    20

    f (x)dx +

    32

    f (x)dx = 1

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Animation in presentations

    We can give different colours to specific parts using \color forequation and \textcolor for text

    $$\color{red}{\int_0^3f(x)dx}\pause=\color{purple}

    {\int_0^2f(x)dx}\pause+\color{green}{\int_2^3f(x)dx}

    \pause=\color{1}$$

    produces 30

    f (x)dx

    =

    20

    f (x)dx +

    32

    f (x)dx = 1

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Animation in presentations

    We can give different colours to specific parts using \color forequation and \textcolor for text

    $$\color{red}{\int_0^3f(x)dx}\pause=\color{purple}

    {\int_0^2f(x)dx}\pause+\color{green}{\int_2^3f(x)dx}

    \pause=\color{1}$$

    produces 30

    f (x)dx =

    20

    f (x)dx

    +

    32

    f (x)dx = 1

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Animation in presentations

    We can give different colours to specific parts using \color forequation and \textcolor for text

    $$\color{red}{\int_0^3f(x)dx}\pause=\color{purple}

    {\int_0^2f(x)dx}\pause+\color{green}{\int_2^3f(x)dx}

    \pause=\color{1}$$

    produces 30

    f (x)dx =

    20

    f (x)dx +

    32

    f (x)dx

    = 1

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Animation in presentations

    We can give different colours to specific parts using \color forequation and \textcolor for text

    $$\color{red}{\int_0^3f(x)dx}\pause=\color{purple}

    {\int_0^2f(x)dx}\pause+\color{green}{\int_2^3f(x)dx}

    \pause=\color{1}$$

    produces 30

    f (x)dx =

    20

    f (x)dx +

    32

    f (x)dx = 1

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Animation in presentations

    Another basic instruction is \onslide{text}, where in we specify the order of appearen of text. For example,

    In \onslide{text}, text will be visible from step 3onwards

    In \onslide{text}, text will be visible to step 3

    In \onslide{text}, text will be visible from step 2 tostep 3

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Animation in presentations

    The most common usage of \onslide is as follows

    Probability density function\\

    \onslide{$f(x)\geq0$}\\

    \onslide {$P(X=x)=0$}\\

    \onslide {$P(1

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Animation in presentations

    The most common usage of \onslide is as follows

    Probability density function\\

    \onslide{$f(x)\geq0$}\\

    \onslide {$P(X=x)=0$}\\

    \onslide {$P(1

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Animation in presentations

    The most common usage of \onslide is as follows

    Probability density function\\

    \onslide{$f(x)\geq0$}\\

    \onslide {$P(X=x)=0$}\\

    \onslide {$P(1

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Animation in presentations

    The following instruction

    Probability density function\\

    \onslide{$f(x)\geq0$}\\

    \onslide{$P(X=x)=0$}\\

    \onslide{$P(1

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Animation in presentations

    Probability density functionf (x) 0

    P(X = x) = 0

    P(1 < X < 2) = 21 f (x)dx

    f (x) = F (x)x

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Animation in presentations

    Probability density functionf (x) 0P(X = x) = 0

    P(1 < X < 2) = 21 f (x)dx

    f (x) = F (x)x

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Animation in presentations

    Probability density functionf (x) 0P(X = x) = 0

    P(1 < X < 2) = 21 f (x)dx

    f (x) = F (x)x

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Animation in presentations

    Probability density functionf (x) 0

    P(X = x) = 0

    P(1 < X < 2) = 21 f (x)dx

    f (x) = F (x)x

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Animation in presentations

    The instruction \only is useful to make replacemenet. For ex-ample,

    Probability density function\\

    \only{$f(x)\geq0$}

    \only{$P(X=x)=0$}

    \only{$P(1

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Animation in presentations

    The instruction \only is useful to make replacemenet. For ex-ample,

    Probability density function\\

    \only{$f(x)\geq0$}

    \only{$P(X=x)=0$}

    \only{$P(1

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Animation in presentations

    The instruction \only is useful to make replacemenet. For ex-ample,

    Probability density function\\

    \only{$f(x)\geq0$}

    \only{$P(X=x)=0$}

    \only{$P(1

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Animation in presentations

    We can show the items of itemize and enumerate progressively.

    \begin{itemize}

    \item Property 1

    \item Property 2

    \item Property 3

    \end{itemize}

    gives

    Property 1

    Property 2

    Property 3

    c All Rights Reserved - Andres Gutierrez & Hanwen Zhang A not so short introduction to LATEX

  • Intro Basics Lists Equations Tables Figures Bibliography Slides Other documents LATEX and R CV

    Animation in presentations

    We can show the items of itemize and enumerate prog