Introduction to L A TEX

Similar documents
L A TEX Overview. Jiayi Liu. January 31, Colorado School of Mines

Helen Cameron. A Brief Overview of LATEX

Introduction to LaTeX. Paul Fodor Stony Brook University

Basic L A TEX. what is LaTeX?

Helen Cameron. A Brief Overview of LATEX

Introduction to Latex. A workshop by Dr. Ala Eshmawi

An Introduction to L A TEX

عمادة البحث العلمي جامعة الملك سعود

L A TEX From The Ground Up

L A T E X Workshop. Bijulal D & Anu Thomas Industrial Engineering and Operations Research Indian Institute of Technology

Introduzione a LaTex. Fabrizio Messina

L A TEX Tutorial. 1 Introduction. 2 Running L A TEX. J. E. Rice. May 2010

The basics of LaTeX. Cédric Buron. April 25, 2016

Intro to LATEX I. Aaron Erlich POLS/CSSS 510, Why LATEX? Programming Document Structure Floats Tables Lists Math

Introduction to L A T E X

COMS 6100 Class note

LaTeX. Information Literacy II EN(IL2) Course

Very Short Introduction to LaTeX

Assessments for CS students:

LaTeX A Tutorial. Mohsen Alimomeni, 2010

An introduction. C.D. Emmery & M.M. van Zaanen. October 22, Tilburg University

Using L A TEX Tom Edgar

Introduction to LATEX

Learning L A TEX. Patrick Lam

A Beginner s guide to L A TEX for CSCA67/MATA67. Kohilan Mohanarajan

Using LaTex and BibTex to Write Academic Documents. Ligang He Department of Computer Science University of Warwick

LAT E X week 2: Basics for Writing a Document

Introduction to LATEX

Research Method and Report Writing Lecture 4: An Introduction to L A TEX

David Helmbold, October 2005, Revised October 2007

What is LaTeX. Is a document markup language and document preparation system for the TeX typesetting program

Basics. Options. Commands

A Grasshopper s Approach to L A TEX

A quick guide to L A TEX

Introduction to L A TEX

Document Preparation Word Processors

L A TEX for Psychological Researchers

An introduction to L A TEX for students

Lecture 1: Short summary of LaTeX basics

Introduction to L A TEX beamer

COMP496/901: Academic Presentation and Writing Skills Using LaTeX

Dec. 27 th, 2010 University of Isfahan

Introduction to L A TEX

An Interactive Introduction to L A TEX. Part 2: Structured Documents & More. Dr John D. Lees-Miller. writel A TEX.

An Introduction to LATEX

A Short Introduction to L A TEX

A Brief Introduction to LaTeX

L A TEX Workshop. An Introduction to L A TEX. Rakesh Jana Research Scholar Department of Mathematics IIT Guwhati

L A TEX Workshop. Don Brower

simpletex Documentation

An Introduction to LATEX

The Name of the Game. An Introduction to LATEX. Why L A TEX? The Name of the Game

L A TEXInstallation and Introduction

L A TEX incollaboration

LATEX TYPESETTING SYSTEM. CAAM 519, CHAPTER 3

L A TEX. The Logo. Introduction to L A TEX. Overview. Primary Benefits. Kinds of Documents. Bill Slough and Andrew Mertz

Formatting with LaTeX

Outline. A Sneak Peek

L A TEXday, morning session Discovering L A TEX

Introduction to L A TEX

Introduction to L A T E X

LaTeX: Scientific Document Writing

EBESS and MESS Presents: Learn to LaTeX. Presented by Joshua Tambunan 13 February 2018

L A TEX for Psychological Researchers

Introduction to LaTex 2ε. Based on The Not So Short Introduction to LaTeX 2ε by Tobias Oetiker et al., April 2001

The AES Convention Paper LATEX class Adam H. Lewenberg (October 18, 2008) 1

Paul Gartside. March 2, 2013

A Very Brief Introduction to L A T E X MAT 3535

Workshop: A Simple Introduction to L A TEX

Introduction to LaTeX. Christoph Pickl

L A T E X Week 11, Other Document Classes

An Introduction to L A TEX

Introduction to L A TEX

Mikkel Madsen

Latex Tutorial. CIS400 Senior Design 9/5/2013

LaTeX. Information Literacy II EN(IL2) Course

Guide to using L A TEX

Introduction to L A TEX

An Introduction to L A T E X

Using L A T E X for scientific writing

VERY VERY SHORT GUIDE TO LATEX

Mikkel Madsen

An Introduction to. Rado Ivanov CIS400 Senior Design Tutorial September 18, 2014

GROUP ASSIGNMENT. L A TEX Assignment 1/3

Researcher Development Unit: Introduction to Latex

A Short L A TEX Introduction

Document Preparation Using L A TEX

Introduction to LAT E X

Forschungskolleg / ACSE Exercise 1 - LaTeX

An introduction to LATEX

GENERAL INFORMATION INSTRUCTIONS FOR MANUSCRIPT SUBMISSION

Introduction to L A TEX

What is T E X? T E X and L A T E X Document preparation tools. Setting and casting type. What Knuth was setting. Setting and casting type

Useful L A TEX Commands

L A TEX 101. John Gardner and Alex Yuffa. May 2, How does L A TEX work? Exercise... 4

How to get started in L A TEX

Academic Skills in Computer Science (ASiCS) II) Text Processing with Latex II.1) Introduction to Latex

Lecture 1. MA2730: Analysis I. Lecture slides for MA2730 Analysis I. Study and Assessment Components. MA L A TEX: topics for Lecture 1

PRISM Introduction to L A TEX

Getting started with Latex

Transcription:

Introduction to L A TEX Javier Larrosa UPC Barcelona Tech November 2, 2016 Observation: I have never studied L A TEX. I have learned just what I have needed and forgotten quickly Javier Larrosa (UPC Barcelona Tech) Slides Template November 2, 2016 1 / 30

L A TEX L A TEX (currently L A TEX 2ε) is a document preparation system The writer uses plain text as opposed to formatted text The source file (.tex) is compiled into an output file (such as.ps,.pdf,...) Free software Standard for scientific documents Environments: Linux: tex live Windows: MikTex MacOs: MacTex Web service: Overleaf.com, writelatex.com Javier Larrosa (UPC Barcelona Tech) Slides Template November 2, 2016 2 / 30

A first Example from the command line: $ pdflatex file.tex file.pdf Javier Larrosa (UPC Barcelona Tech) Slides Template November 2, 2016 3 / 30

Hello World %A hello world article \documentclass{article} \title{my first document} \date{\today} \author{javier Larrosa} \begin{document} \maketitle Hello World! \end{document} \documentclass[options]{class} options: 12pt, twoside, a4paper, twocolumn, landscape,... class: article, book, letter, beamer... Javier Larrosa (UPC Barcelona Tech) Slides Template November 2, 2016 4 / 30

Article \begin{document} \maketitle \begin{abstract} hello \end{abstract} \section{a} \subsection{b} bla, bla, bla, bla,bla, bla. \subsubsection{c} bla, bla, bla, bla, bla, bla... \end{document} Javier Larrosa (UPC Barcelona Tech) Slides Template November 2, 2016 5 / 30

Paragraphs The end of a paragraph is indicated leaving a blank line (the next paragraph will be indented by default) Non indent: \nonindent Line breaking: \newline Additional separation: \vspace{} Javier Larrosa (UPC Barcelona Tech) Slides Template November 2, 2016 6 / 30

Font modes You can write in plain text, \textbf{boldface}, \textit{italics}, \underline{underline}. There are many other options You can write in plain text, boldface, italics, underline. There are many other options Javier Larrosa (UPC Barcelona Tech) Slides Template November 2, 2016 7 / 30

Font sizes This is the standard size with respect to your document, this is {\small small size}, {\scriptsize smaller}, {\large large size}, {\Huge larger}. There are many other options. This is the standard size with respect to your document, this is small size, smaller, large size, larger. There are many other options. Javier Larrosa (UPC Barcelona Tech) Slides Template November 2, 2016 8 / 30

Commands Commands Instruction to do something special \name[optional options]{mandatory options} Some commands have a so-called *-form to modify their functionality Examples: \rule[lift]{width}{height} produces a black rectangle \section*{heading} omits numbering Javier Larrosa (UPC Barcelona Tech) Slides Template November 2, 2016 9 / 30

Environments Environments Treats differently the text within \begin{name}... \end{name} or {\name... } Examples: quote center Javier Larrosa (UPC Barcelona Tech) Slides Template November 2, 2016 10 / 30

Commands, Environments, Packages You can define your own commands and environments You can import them as packages \usepackage{hyperef} allows PDF metadata and to create links \usepackage[utf8]{inputenc} allows to encode special characters (non-english text) \usepackage[spanish]{babel} proper hyphenation, etc \usepackage{algorithm2e} allows to write pseudo-code \usepackage{beamerposter} allows to write posters... Javier Larrosa (UPC Barcelona Tech) Slides Template November 2, 2016 11 / 30

itemize environment That s a list: \begin{itemize} \item Hello \item Bye \end{itemize} And that is another: \begin{enumerate} \item first item \item second item \end{enumerate} That s a list: Hello Bye And that is another: 1 first item 2 second item Javier Larrosa (UPC Barcelona Tech) Slides Template November 2, 2016 12 / 30

Figures with Graphics Figures \begin{figure}[t] \includegraphics[height=3cm]{upc.png} \caption{upc logo.} \end{figure} Figure 1: UPC logo. Javier Larrosa (UPC Barcelona Tech) Slides Template November 2, 2016 13 / 30

Figures with Tables \begin{figure}[t] \begin{center} \begin{tabular}{ l c r } \hline 1 & 2 & 3 \\ \hline 4 & 5 & 6 \\ \hline 7 & 8 & 9 \\ \hline \end{tabular} \end{center} \caption{a table.} \end{figure} 1 2 3 4 5 6 7 8 9 Figure 2: A table. Javier Larrosa (UPC Barcelona Tech) Slides Template November 2, 2016 14 / 30

math environment (also $...$) Inline mathematics $p,q,r$ Greek letter $\alpha, \Alpha$ Op. $\cdot, \times, \bowtie$ Subscripts $x_i, x^i, X_{a_i}^{b_j}$ Quantifiers $\sum_{i=0}^n, \prod_i, \forall$ Inline mathematics p, q, r Greek letter α, β Ops.,, Subscripts x i, x i, X b j a i Quantifiers n i=0, i, Javier Larrosa (UPC Barcelona Tech) Slides Template November 2, 2016 15 / 30

equation environment (also $$...$$) Equations are numbered and centered $$ \phi({\cal X})=\sum_{i=1}^n f_i(x_i)$$ produces and φ(x ) = n f i (x i ) i=1 $$ \frac{a+b}{(c+d) 2 }= F(X)$$ produces a + b (c + d) 2 = F (X ) Javier Larrosa (UPC Barcelona Tech) Slides Template November 2, 2016 16 / 30

array environment The \emph{characteristic polynomial} $\chi(\lambda)$ of the $3 \times 3$~matrix \[ \left( \begin{array}{ccc} a & b & c \\ d & e & f \\ g & h & i \end{array} \right)\] is given by the formula \[ \chi(\lambda) = \left \begin{array}{ccc} \lambda - a & -b & -c \\ -d & \lambda - e & -f \\ -g & -h & \lambda - i \end{array} \right.\] The characteristic polynomial χ(λ) of the 3 3 matrix a b c d e f g h i is given by the formula χ(λ) = λ a b c d λ e f g h λ i. Javier Larrosa (UPC Barcelona Tech) Slides Template November 2, 2016 17 / 30

References L A TEXallows you to label many types of items (e.g. formulas, section, figures,...) for posterior reference in the item include \label{ident} in the text write \ref{ident} \begin{figure}[t] \includegraphics[height=1cm]{upc.png} \label{fig-upc} \caption{upc logo.} \end{figure}... in Figure \ref{fig-upc} we can see the UPC logo... Figure 3: UPC logo.... in Figure 18 we can see the UPC logo... Javier Larrosa (UPC Barcelona Tech) Slides Template November 2, 2016 18 / 30

Bibliographic databases and bibtex bibtex is an auxiliary program that automatically constructs a bibliography by searching in a database Databases are named name.bib The latex document must contain \bibliography{name.bib} optional \bibliographystyle{} Within the document cite as \cite{ident} Javier Larrosa (UPC Barcelona Tech) Slides Template November 2, 2016 19 / 30

Database Entries: article bibsource = {dblp computer science bibliography, http://dblp @article{dblp:journals/stp/dijkstraf89, author = {Edsger W. Dijkstra and W. H. J. Feijen}, title = {The Linear Search Revisited}, journal = {Structured Programming}, volume = {10}, number = {1}, pages = {5--9}, year = {1989}, timestamp = {Thu, 03 Jan 2002 12:26:55 +0100}, biburl = {http://dblp.uni-trier.de/rec/bib/journals/stp/d } Javier Larrosa (UPC Barcelona Tech) Slides Template November 2, 2016 20 / 30

Database Entries: conference article @inproceedings{dblp:conf/acm/papadimitriouak12, author = {Christos H. Papadimitriou and Leonard M. Adleman and Richard M. Karp and Donald E. Knuth and Robert E. Tarjan and Leslie G. Valiant}, title = {An Algorithmic View of the Universe}, booktitle = {{ACM} Turing Centenary Celebration, {ACM-TURING California, USA, June 15-16, 2012}, pages = {13:1}, year = {2012}, crossref = {DBLP:conf/acm/2012t}, url = {http://doi.acm.org/10.1145/2322176.2322189} } Javier Larrosa (UPC Barcelona Tech) Slides Template November 2, 2016 21 / 30

Bibtex usage from the command line $ pdflatex file.tex $ bibtex file $ pdflatex file.tex $ pdflatex file.tex Overleaf Overleaf takes care of the bibliography automatically. You only have to add the bibliography database to the overleaf project. Javier Larrosa (UPC Barcelona Tech) Slides Template November 2, 2016 22 / 30

Some useful packages algorithm2e beamer beamerposter Javier Larrosa (UPC Barcelona Tech) Slides Template November 2, 2016 23 / 30

algorithm2e \begin{algorithm}[h] \SetKwProg{Fn}{Function} {is}{end} \Fn{Search $(X,a)$}{ \KwData{$X$ is a vector, and $a$ is an element} \KwResult{$i$ s.t. $X[i]==a$, $-1$ if $a$ is not in $X$} \BlankLine \For{$i\leftarrow 0$ \KwTo $X.length()-1$}{ \lif{$x[i]==a$}{\return $i$} } \Return $-1$;} \end{algorithm} 1 Function Search (X, a) is Data: X is a vector, and a is an element Result: i such that X [i] == a, 1 if a is not in X 2 for i 0 to X.length() 1 do 3 if X [i] == a then return i; 4 end 5 return 1; 6 end Javier Larrosa (UPC Barcelona Tech) Slides Template November 2, 2016 24 / 30

basic instruction blocks \If{}{} \Else{}{} \For{}{} \ForEach{}{} \While{}{} \Return{} You can define your own Javier Larrosa (UPC Barcelona Tech) Slides Template November 2, 2016 25 / 30

algorithm2e: line-version instruction blocks \If{$A$}{$B$} \lif{$a$}{$b$} 1 if A then 2 B 3 end 4 if A then B; Javier Larrosa (UPC Barcelona Tech) Slides Template November 2, 2016 26 / 30

algorithm2e You can easily change the aspect of your algorithms: C Python Pseudo-code Multiligual support lined/unlined numbered/unnumbered lines may be labeled and referenced in the text Javier Larrosa (UPC Barcelona Tech) Slides Template November 2, 2016 27 / 30

algorithm2e There are several environments that produce different caption titles: algorithm function procedure *-version for double column Javier Larrosa (UPC Barcelona Tech) Slides Template November 2, 2016 28 / 30

beamer documentclass beamer The beamer documentclass allows easy slides generation frames: \begin{frame}{title}... \end{ frame} Javier Larrosa (UPC Barcelona Tech) Slides Template November 2, 2016 29 / 30

beamer \documentclass{beamer} \mode<presentation> { \usetheme{madrid} \usecolortheme{default} \usefonttheme{default} \setbeamertemplate{navigation symbols}{} \setbeamertemplate{caption}[numbered] } Javier Larrosa (UPC Barcelona Tech) Slides Template November 2, 2016 30 / 30