Introduction to L A TEX

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

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

Introduction to L A TEX

1 Obtaining LyX and L A TEX

Learning L A TEX. Patrick Lam

Introduction to LaTeX. Paul Fodor Stony Brook University

Assessments for CS students:

Getting started with Latex

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

Become a L A TEX Guru

L A TEX for Psychological Researchers

Learn how to [learn] LATEX

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

Introduction to L A TEX

Math 235: Introduction to LaTeX

A quick guide to L A TEX

Getting Started with L A T E X for a Technical Document or Thesis

Introduction to L A TEX

An Interactive Introduction to L A TEX

Basic L A TEX. what is LaTeX?

L A TEX for Psychological Researchers

Introduction to L A TEX

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

A Grasshopper s Approach to L A TEX

David Helmbold, October 2005, Revised October 2007

Introduzione a LaTex. Fabrizio Messina

Appendix B: Latex survival guide

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

Very Short Introduction to LaTeX

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

VERY VERY SHORT GUIDE TO LATEX

Simple Math. Adam Dishaw 2011 September 21. Suppose you want to include some math in your documents. Just follow these basics steps:

LaTeX A Tutorial. Mohsen Alimomeni, 2010

An Introduction to LATEX

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

LAT E X week 2: Basics for Writing a Document

Guide to using L A TEX

L A TEXday, morning session Discovering L A TEX

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

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

An Introduction to L A TEX

Introduction to Latex. A workshop by Dr. Ala Eshmawi

An Interactive Introduction to L A TEX. Part 1: The Basics. John Lees-Miller. writel A TEX

Dec. 27 th, 2010 University of Isfahan

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

GROUP ASSIGNMENT. L A TEX Assignment 1/3

Introduction to LAT E X

L A T E X Tutorial. Wanmin Liu August. Department of Mathematics The Hong Kong University of Science and Technology

L A TEX minicourse. dstowell, mag, sar, scannell,... September Typeset by FoilTEX

MATLAB for the Sciences

Introduction to LATEX

Introduction to L A TEX

An introduction to L A TEX for students

An introduction to TeX. And other options for producing documents containing mathematics

Introduction to LAT E X

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

Introduction to MCS 220 and L A TEX

LearningLatex. % This file walks you through some basic things with LaTex % Thanks to Patrick Lam and Maya Sen for letting me borrow their materials

Using L A TEX Tom Edgar

Outline. Installing LaTeX. Opening TeXShop. Intro to LaTeX. Intro to LaTeX interface Working with text Tabbing and tables Figures Math and equations

L A TEX examples. a b c a b c b b a c b c c b a. This table was typeset with the following commands.

An Introduction to L A TEX

A brief introduction to L A TEX

Introduction to LATEX

L A TEX From The Ground Up

L A TEXInstallation and Introduction

Introduction to L A T E X

An Introduction to LATEX

COMP496/901: Academic Presentation and Writing Skills Using LaTeX

Lecture 1: Short summary of LaTeX basics

Workshop P. Stallinga 16-X-2012

Basics. Options. Commands

Aalborg October 2014

Introduction to L A TEX

Typesetting with TEX

How to L A TEX. George Wong, David Mykytyn. 6 October 2016

Latex Tutorial. CIS400 Senior Design 9/5/2013

Helen Cameron. A Brief Overview of LATEX

My LaTeX Document. July 7, Introduction 2

Environments, Equations, and Tables

Using L A TEX. A numbered list is just that a collection of items sorted and labeled by number.

Began as TeX, in 1982 (Knuth). Purely a typesetting tool. LaTeX added macros, maintaining TeX as it s typesetting engine (Lamport).

Mingxi Liu Energy & Resources Group University of California, Berkeley CONTENTS

Getting Started with L A TEX

Mikkel Madsen

How to get started in L A TEX

2. Unlock the Customization Features: The Edit Button Click the "Edit" button on the Dashboard Home Page to unlock the customization features.

WHAT IS L A TEX? LaTeX (pronounced lay-tek or lah-tek ) is a language created for the purpose of typesetting text and mathematical formulas.

LATEX Workshop. Yi Liu Chen SUNY Geneseo PRISM Math Club. February 6, Wordmark Reversed Geneseo Wordmark Style Guide 4

An Introduction to L A TEX

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

A Short L A TEX Introduction

Introduction to L A TEX Part II

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

Helen Cameron. A Brief Overview of LATEX

simpletex Documentation

Presentation of Scientific Results

LATEX Seminar Week 2 Jonathan Blair & Evan Ott. Document classes, basic math formatting, basic pictures, tables and matrices

Introduction to L A TEX

Introduction to L A TEX Part II

Transcription:

Introduction to L A TEX Yuval Carmel Ben-Gurion University June 30, 2009 Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 1 / 40

Introduction L A TEX is not a word processor! Word, for instance, is a WYSIWYG - What you see is what you get. L A TEX is WYSIWYM - What you see is what you mean. What you can do in L A TEX is: Generate papers for journals and conferences Control and organize large documents Generate complex math formulas Manage bibliographies, references and indexes Support endless number of fonts and styles Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 2 / 40

Some examples: organize large documents Document is actually a project, consist of few files. Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 3 / 40

Some examples: tables Fruits Summer Autumn Winter Spring Apple Pear Watermelon Grapes Orange Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 4 / 40

Some examples: complex math formulas Automatic numbering: y = 0 βx 2 2π arcsin( x (1) π )dx E = mc 2 (2) Avoid numbering, ident and provide array of equations: N 1 1 2 X n e j2πkn ft N n=0 1 N = 1 N N 1 n=0 N 1 n=0 X n e j2πkn ft 2 N 1 X n 2 n=0 e j2πkn ft 2 Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 5 / 40

Start writing in L A TEX Install MiKTeX Install Ghostscript Install either TeXnicCenter or LEd Start writing! Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 6 / 40

Start writing in L A TEX Setting the document: L A TEX code \documentclass{article} \begin{document} Hello world! \end{document} And the result is: Result Hello world! Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 7 / 40

I have a comment to make... L A TEX code \documentclass{article} \begin{document} Hello world! %But I have a comment to make! \end{document} And the result is: Result Hello world! Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 8 / 40

Files, files, files It is time to save the text into a file! Simple L A TEX file extension is *.tex ps dvips edit (save as.tex) tex compile (latex file.tex) dvi convert (e.g: dvipdf file.dvi) dvipdf pdflatex pdf Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 9 / 40

Files, files, files Common file types: *.tex - document description file (text). *.bib - bibliography information (text). *.dvi - document description file (binary), can be converted to ps/pdf or be preview using YAP. *.ps - description language of documents. *.pdf - evolution of *.ps files, commonly used. *.bst - BibTeX style description file (text). *.sty - document style description file (text). Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 10 / 40

Document with class! The \documentclass[options]{class} sets some basic document properties. class: options: article - for journals (no chapters, just sections) report - used for thesis (chapters allowed) book, letter and additional custom made... 11p - or any other value, set the font size a4paper - set the page size onecolumn, twocolumn - split (or not) the text into 2 columns Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 11 / 40

I have a package for you L A TEX allows adding additional packages. Those packages enriches the L A TEX fonts, symbols and possibilities. For instance: \usepackage{slashbox} allows: Y X 0 1 0 1/3 1/3 1 0 1/3 Where in regular L A TEX, this table slash is not supported. Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 12 / 40

Some order L A TEX has a simple way to make the document be in order, there are: \part{} - everything but a letter class \chapter{} - books and reports \section{} - everything but a letter class \subsection{} - everything but a letter class \subsubsection{} - everything but a letter class \paragraph{} - everything but a letter class \subparagraph{} - everything but a letter class Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 13 / 40

Some order - example: L A TEX code \section{introduction} \subsection{sub Introduction} \section{another Introduction} \section*{just Introduction} \subsection{sub Just Introduction} Result 1 Introduction 1.1 Sub Introduction 2 Another Introduction Just Introduction 2.1 Sub Just Introduction Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 14 / 40

Shopping list L A TEX code \begin{itemize} \item Item 1. \begin{itemize} \item List 2, Item 1 \end{itemize} \item Item 2. \end{itemize} Result Item 1. List 2, Item 1 Item 2. Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 15 / 40

Shopping list, what else do we have in the basket? On top of bullets, one can have: enumerate: 1 enumerate 2 enumerate (too) description: description 1. description description 2. description too list: same label: First item in the list same label: Second item in the list Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 16 / 40

Setting up the table L A TEX code \begin{tabular}[h]{ l c c } \hline this & is & a table\\ \hline this is & the second & row \\ \hline \hline \end{tabular} Result this is a table this is the second row Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 17 / 40

Font fashion L A TEX code \tiny{tiny} \large{large} \Large{Large} Result tiny large Large Sizes, from tiny to huge: \tiny, \scriptsize, \footnotesize, \small, \normalsize, \large, \Large, \LARGE, \huge, \Huge. Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 18 / 40

Font fashion, the bold and the beautiful L A TEX code \textit{italic} \textbf{bold} \underline{underline} \textsc{small Capital} \emph{emphasize} Result Italic Bold Underline Small Capital Emphasize Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 19 / 40

Font fashion, the text collection L A TEX code \textrm{roman font} \textsf{sans serif font} \texttt{teletype font, it also called monospace font} Result roman font sans serif font teletype font, it also called monospace font Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 20 / 40

Font fashion, the math collection L A TEX code \begin{align*} &\mathcal{x,y} ~ \text{like in information theory} \\ &\mathfrak{l,f} ~ \text{like Laplace and Fourier transforms} \ &\mathbb{r,c} ~ \text{like Real numbers and Complex numbers} \end{align*} Result X, Y like in information theory L, F like Laplace and Fourier transforms R, C like Real numbers and Complex numbers Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 21 / 40

Do the math One of the most powerful parts of L A TEX is the formula formating and writing. In addition to the L A TEX basic math support, additional packages can provide more symbols and can make formulas look better. Some of the popular packages are the amsmath and amssymb. Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 22 / 40

Math, the ABC There are few main ways to write equations and formulas in L A TEX: $y=x$ is used to insert formula or equation inside text \begin{equation} coupled with \end{equation} \begin{eqnarray} coupled with \end{eqnarray} \lefteqn is rarely used for splitting formulas While the equation can support only one line of equations, eqnarray supports multiple lines and helps align the equations. Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 23 / 40

Math, you need to give me an example L A TEX code This is a text with an equation $y=2x + 3.1S + 1.2f$ inside. \begin{eqnarray} y &=& (x+2)^2\\ &=& (x+2)(x+2)\\ &=& x^2+2x+2x+4\\ &=& x^2+4x+4 \end{eqnarray} Result This is a text with an equation y = 2x + 3.1S + 1.2f inside. y = (x + 2) 2 (1) = (x + 2)(x + 2) (2) = x 2 + 2x + 2x + 4 (3) = x 2 + 4x + 4 (4) Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 24 / 40

My two cents... L A TEX code \begin{eqnarray} y & = & (x+2)^{10}\\ & = & (x+2)(x+2)(x+2)(x+2)(x+2) \nonumber \\ & &(x+2)(x+2)(x+2)(x+2)(x+2) \\ & = & \dots \nonumber \end{eqnarray} Result y = (x + 2) 10 (1) = (x + 2)(x + 2)(x + 2)(x + 2)(x + 2) (x + 2)(x + 2)(x + 2)(x + 2)(x + 2) (2) =... Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 25 / 40

Greek alphabet The Greek alphabet is used in math mode. Capital Greek letters are spelled the same as lower case Greek letters but with capital letter in the start: L A TEX code $\alpha$, $\gamma$, $\Gamma$, $\epsilon$ and $\varepsilon$\\ $\lambda$, $\omega$, $\tau$ and $\sigma$\\ $\Sigma$, $\theta$, $\beta$ and $\Omega$\\ $\aleph$ Result α, γ, Γ, ɛ and ε λ, ω, τ and σ Σ, θ, β and Ω ℵ Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 26 / 40

SUPERscript Adding argument superscript or subscript notation is very simple L A TEX code \begin{eqnarray*} &t_0&\\ &f_{cutoff}&\\ &x^2&\\ &e^{j (2\pi f t+\phi)}& \end{eqnarray*} Result t 0 f cutoff x 2 e j(2πft+φ) Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 27 / 40

Getting on top of things L A TEX code \begin{eqnarray*} &\frac{1}{2}&\\ &\frac{x}{\frac{x+y}{2y+z}}&\\ &2x+4\stackrel{(a)}{=}4&\\ &\binom{5}{2}=\frac{5!}{3!2!}& \end{eqnarray*} Result 1 2 x x+y 2y+z 2x + 4 (a) = 4 ) = 5! 3!2! ( 5 2 Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 28 / 40

The collection Summation, multiplication and integration are very easy: L A TEX code \begin{eqnarray} \prod_{l=1}^l \sum_{n=0}^{n-1} \int_0^{\infty} \iiint \oint \int_{\frac{3\pi}{4}}^{\frac{7\pi}{4}} \nonumber \end{eqnarray} Result L N 1 7π 4 l=1 n=0 0 3π 4 Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 29 / 40

Parenthesis Writing () or [] may result sometimes with parenthesis size which doesn t fit the equation. L A TEX code \begin{eqnarray*} &\left(\frac{\sum_{n=1}^nb^n}{\sum_{n=1}^nb^{2n}}\right)&\\ &\left[\frac{\sum_{n=1}^nb^n}{\sum_{n=1}^nb^{2n}}\right]&\\ &\left\{\frac{\sum_{n=1}^nb^n}{\sum_{n=1}^nb^{2n}}\right\}& \end{eqnarray*} Result ( N ) n=1 bn N n=1 [ b2n N ] n=1 bn N n=1 { b2n N } n=1 bn N n=1 b2n Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 30 / 40

Parenthesis Self generated parenthesis are in the case of commands like \binom{}{} or \begin{cases}, \end{cases} and other... L A TEX code \begin{eqnarray*} g(x) = \begin{cases} x^2 & \text{if } x \geq 1 \\ 1 & \text{if } x < 1 \end{cases} \end{eqnarray*} Result g(x) = { x 2 if x 1 1 if x < 1 Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 31 / 40

When you really need a reference Labels are the method being used to add references in L A TEX documents. Adding a prefix, allows more than one element could have the same label. L A TEX code \begin{eqnarray}\label{equation} x[n]=\frac{1}{n}\sum_{k=0}^{n-1}x[k]e^{\frac{j2\pi n k}{n}} \end{eqnarray} See how to write a complicated equation in equation \eqref{equation}. Result x[n] = 1 N N 1 k=0 X [k]e j2πnk N (3) See how to write a complicated equation in equation (3). Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 32 / 40

When you really need a reference L A TEX code \begin{eqnarray}\label{eq:eq1} X[1]=1 \end{eqnarray} \begin{center} \begin{tabular}[h]{c c} a & b \\ \hline c & d \label{tab:eq1} \end{tabular} \end{center} We use the same label in equation \eqref{eq:eq1} and table \ref{tab:eq1}. Result X [1] = 1 (4) a c b d We use the same label in equation (4) and table 33. Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 33 / 40

A picture is worth a thousand words L A TEX supports various kind of pictures, the most common format is *.EPS (encapsulated postscript). The following programs supports *.EPS format: Inkscape Ghostscript Matlab Adobe Illustrator And more... The following formats are also supported: PDF, JPG and PNG, but not all of them can be compiled into DVI, meaning, no preview. Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 34 / 40

A picture is worth a thousand words Don t forget to add: \usepackage{graphicx} L A TEX code \includegraphics[width=0.5\textwidth]{bulb.jpg} Result Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 35 / 40

It s time to thank someone Additional strong part of the L A TEX is the bibliography management. Major articles sources supports a format called BibTeX. Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 36 / 40

It s time to thank someone BibTeX format @ARTICLE{1362497, title={pre-scrambling method for PAPR reduction in OFDM communication systems}, author={kwang Don Choe and Si Chul Kim and Park, S.K.}, journal={consumer Electronics, IEEE Transactions on}, year={2004}, month={nov.}, volume={50}, number={4}, pages={ 1044-1048}, doi={10.1109/tce.2004.1362497}, ISSN={0098-3063}, } Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 37 / 40

It s time to thank someone Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 38 / 40

It s time to thank someone Once a record is added to the bibliography *.BIB file. It can referred to with \cite{} command. To refer the article in the previous slide the command would be \cite{1362497}. The number can be changed to something more meaningful, like: @ARTICLE{TheArticleIdontUnderstand, title=... And refer it by that name: \cite{thearticleidontunderstand}. Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 39 / 40

Where to go from here? There is a lot of additional material on L A TEX all over the internet: Forums, web pages and wikis. You can either google or bing with latex + problem: latex how to make my thesis to look cool. Or you can start here: latex wiki Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 40 / 40