Lecture 2: Tables, Figures and Formulæ

Similar documents
Become a L A TEX Guru

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

Creating Tables and Figures with L A T E X

Latex Tutorial. CIS400 Senior Design 9/5/2013

LATEX TYPESETTING SYSTEM. CAAM 519, CHAPTER 3

Learn how to [learn] LATEX

An Introduction to LATEX

Workshop on LATEX 2ε. Asst. Prof. Dr. Kemal Bagzibagli Department of Economics. 20 May 2015

Lecture 3-Introduction to Latex (II)

A brief introduction to L A TEX

Assessments for CS students:

THIS IS AN INTRODUCTION TO. LaTeX. Introduction to Latex. University of Minnesota, November 7, 2016

An introduction to L A TEX for students

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

An Introduction to L A TEX

Manuscript Title. with Forced Linebreak. Ann Author a) and Second Author b) Authors institution and/or address This line break forced with \\

Lecture 5 - Graphics and PStricks

L A TEX - First Class

Lecture 1: Short summary of LaTeX basics

M. R. C. van Dongen. ucc. LaTEX and Friends. Including External Pictures. Marc van Dongen.

Introduction to LaTeX. Paul Fodor Stony Brook University

Introduction to L A TEX

An Introduction to L A TEX

Environments, Equations, and Tables

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

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

Tools for Scientific Writing with LAT E X. Johan Carlson

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

Martin Scharrer Version v1.2a 2018/03/30. Abstract

Math 235: Introduction to LaTeX

COMSC-030 Web Site Development- Part 1. Part-Time Instructor: Joenil Mistal

Math 291: Lecture 5. Dr. Fagerstrom. Minnesota State University Moorhead web.mnstate.edu/fagerstrom

Introduction to L A TEX

Introduction to Math in LaTeX

Learning L A TEX. Patrick Lam

L A T E X FOSSEE. Department of Aerospace Engineering IIT Bombay. FOSSEE (IIT Bombay) LAT E X 1 / 58

Homework # You ll want to use some LaTeX editor to edit and compile your.tex files

Introduction to LATEX

Using L A TEX Tom Edgar

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

LaTeX. Information Literacy II EN(IL2) Course

Helen Cameron. A Brief Overview of LATEX

Latex Manually Set Font Size For Tables

Tools Course: Part 2

Introduction to L A TEX

L A TEX and Basic Text Editing

MBI REU Matlab Tutorial

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.

Writing a L A T E X Article Using Tables L A T E X Workshop 4

L A TEXday, morning session Discovering L A TEX

Student Learning Service: Introduction to Latex

The content editor has two view modes: simple mode and advanced mode. Change the view in the upper-right corner of the content editor.

The rtsched package for L A TEX (version 1.0)

Introduction to L A TEX

An Introduction to. Andrew G. West, Jian Chang CIS400 Senior Design Tutorial September 15, 2009

How to get started in L A TEX

L A TEX Document Formatting Examples

Report Writing with Lyx

L A TEX: Online module 6

The Joys of L A T E X

Square cells: an array cooking lesson

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

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

Getting Started with L A TEX

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

L A TEX for Psychological Researchers

Separate Text Across Cells The Convert Text to Columns Wizard can help you to divide the text into columns separated with specific symbols.

Starting Excel application

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

Useful L A TEX Commands

The FigSize Package. Anthony A. Tanbakuchi. v0.1 last revised 2002/3/18. Abstract

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

CIS 580, Machine Perception, Spring 2015 Homework 1 Due: :59AM

L A TEXcourse. Carmen Alonso Montes. 30th May-2nd June, 2016

L A TEX Floats and Programming. K. Cooper

Latex Programs for Record

Introduction to L A TEX

LATEX Primer. 1 Introduction (Read Me)

Manuscript Title: with Forced Linebreak

CS 189 L A TEX and Linux: Text in Boxes

Interval Notation (mixed parentheses and brackets)

Programming in C++ The manager of a company. Lecture Notes 6. Functions (Procedures) 4/24/2018. he he he. Does Does Does

EXERCISE 1. OBJECTIVES File management. INSTRUCTIONS. Creating Spreadsheets and Graphs (Excel 2003) New CLAIT

L A TEX: Making Math Accessible for the Blind or Visually Impaired

The HTML Editor in icollege

Manuscript Title: with Forced Linebreak

Researcher Development Unit: Introduction to Latex

Mikkel Madsen

Rich Text Editor Quick Reference

The Joys of L A T E X

Learning LaTeX: The Basics

c122sep2214.notebook September 22, 2014

A very brief introduction to L A TEX and beamer

The Table and Figure Environments

Adding CSS to your HTML

STUDENT NAME ECDL: EXCEL MR BENNELL. This is an example of how to use this checklist / evidence document

Spreadsheet EXCEL. Popular Programs. Applications. Microsoft Excel. What is a Spreadsheet composed of?

Homework # (Latex Handout) by Laura Parkinson

TUTORIAL 10: ARRAYS AND MATRICES. 1. Welcome. Hello. My name is Dr. Christopher Raridan (Dr. R). I want to welcome you to the L A TEX Tutorial Series.

An Interactive Introduction to L A TEX

Transcription:

Federico Cantini (Lib4RI) <federico.cantini@lib4ri.ch> Module 5: L A TEX Lecture 2: Tables, Figures and Formulæ Unless otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, which means that it can be freely copied, redistributed and adapted as long as appropriate attribution is given. Slides adapted from those of the former Lib4RI member Daniel R. Perez

Contents A Tables 1 The tabular environment 2 The table environment 3 Spanning columns 4 Exercise B Figures 1 Including graphics: the graphicx-package 2 The figure environment 3 Exercises C Mathematical Formulæ 2 Math modes and equation numbers 3 Examples 4 Exercise Lib4RI Training Series Module 5: LATEX Spring 2018 2 / 18

A. Tables 1. The tabular environment Fruit Price Apple 0.49 $ Orange 10.1 $ Avocado 999.999 $ \ begin { tabular }{c c} Fruit & Price \\ \ hline Apple & 0.49 \$ \\ Orange & 10.1 \$ \\ Avocado & 999.999 \$ \\ \end { tabular } Lib4RI Training Series Module 5: LATEX Spring 2018 3 / 18

A. Tables 1. The tabular environment \ begin { tabular }[ position ]{ columns specification } Fruit & Price \\ \ hline Apple & 0.49 \$ \\ Orange & 10.1 \$ \\ Avocado & 999.999 \$ \\ \end { tabular } position: t(op), c(entre), b(ottom). Adjusts the vertical position of the table relative to the baseline of the surrounding text; columns specification defines the format of the columns: Use l(eft), r(ight) or c(entred) to align the text inside the column. Use p{width} for justified text inside a column of width width. Separate columns by nothing or for a vertical line; Inside the table, use & to separate cells, \\ to go to the next row and \hline for a horizontal line. Lib4RI Training Series Module 5: LATEX Spring 2018 4 / 18

A. Tables 1. The tabular environment Our prices are as follows: Fruit Price Apple 0.49 $ Orange 10.1 $ Avocado 999.999 $ We actually don t have avocados. Our prices are as follows : \ begin { tabular }{c c} Fruit & Price \\ \ hline Apple & 0.49 \$ \\ Orange & 10.1 \$ \\ Avocado & 999.999 \$ \\ \end { tabular } We actually don t have avocados. Lib4RI Training Series Module 5: LATEX Spring 2018 5 / 18

A. Tables 2. The table environment \ begin { table }[ placement specifier ]... \ caption { some_text } \ label { some_label } \end { table } the placement specifier is a combination of h: place the float here (i.e. where the code occurred); t: place the float on top of a page; b: place the float on the bottom of a page; p: place the float on a special page at the end of the document;!: ignore æsthetical considerations and place the float even if the result is not so pretty Always place the label after the caption! Lib4RI Training Series Module 5: LATEX Spring 2018 6 / 18

A. Tables 2. The table environment Our prices are given in table \ ref {tab : prices }. \ begin { table } \ begin { center } \ begin { tabular }{c c} Fruit & Price \\ \ hline Apple & 0.49 \$ \\ Orange & 10.1 \$ \\ Avocado & 999.999 \$ \\ \end { tabular } \ caption { Fruit prices } \ label {tab : prices } \end { center } \end { table } We actually don t have avocados. Fruit Price Apple 0.49 $ Orange 10.1 $ Avocado 999.999 $ Table 1: Fruit prices. Our prices are given in table 1. We actually don t have avocados. Lib4RI Training Series Module 5: LATEX Spring 2018 7 / 18

A. Tables 3. Spanning columns \ begin { tabular }{c c c} \ multicolumn {2}{c }{{\ bfseries Spanning % columns }} & \\ \ cline {1-2} {\ bfseries Col 1} & {\ bfseries Col 2} & {\ bfseries Col 3} \\ \ hline Row 1 & - & - \\ Row 2 & - & - \\ Row 3 & - & - \\ Row 4 & - & - \\ Row 5 & - & - \\ \end { tabular } Spanning columns Col 1 Col 2 Col 3 Row 1 - - Row 2 - - Row 3 - - Row 4 - - Row 5 - - Lib4RI Training Series Module 5: LATEX Spring 2018 8 / 18

A. Tables 4. Exercise Open the file Exercise_2a/ex_2a.pdf and write the L A TEX code to produce the document. Lib4RI Training Series Module 5: LATEX Spring 2018 9 / 18

B. Figures 1. Including graphics: the graphicx-package Have a png, jpg or pdf file; Load the graphicx-package using: \\usepackage{graphicx} Include the file using: \includegraphics[key=value,... ]{file} file is the filename without the extension (png/jpg) key: width, height, angle, scale key: a value in the proper unit (cm, in, ex, em,...) Example: \ includegraphics [key=value,...]{ file }... I love \ includegraphics [ height =1.75ex ]{ CH }! produces: I love! Lib4RI Training Series Module 5: LATEX Spring 2018 10 / 18

B. Figures 2. The figure environment \ begin { figure }[ placement specifier ]] \ includegraphics [key=value,...]{ file } \ caption { some_text } \ label { some_label } \end { figure } the placement specifier is a combination of h: place the float here (i.e. where the code occurred); t: place the float on top of a page; b: place the float on the bottom of a page; p: place the float on a special page at the end of the document;!: ignore æsthetical considerations and place the float even if the result is not so pretty Always place the label after the caption! Lib4RI Training Series Module 5: LATEX Spring 2018 11 / 18

B. Figures 3. Exercises Open the file Exercise_2b/ex_2b.pdf and write the L A TEX code to produce the document. Optional: Open the file Exercise_2c/ex_2c.pdf and write the L A TEX code to produce the document. Lib4RI Training Series Module 5: LATEX Spring 2018 12 / 18

C. Mathematical Formulæ lim n n k=1 lim n n k=1 ( 1) k 2 2k 1 = 1 dx = ln 2 1 x 2 ( 1) k 2k 1 = 1 1 dx = ln 2 x x R \ {0} : x 2 > 0 4 1 x 4 = x x { x, if x > 0, 0, if x = 0, x, if x < 0. } ( Rez > 0, Imz > 0 ) Γ k ij = 1 2 (g 1 ) kl x i g jl + x j g il x l g ij { u v u v U z C R α γµν = gαβ R βγµν Lib4RI Training Series Module 5: LATEX Spring 2018 13 / 18

C. Mathematical Formulæ 2. Math modes and equation numbers Use the package AMS-L A TEX (\usepackage{amsmath}) In line formulæ Einstein is popular for the formula $E = mc ˆ2$. He did achieve so much more, though \ ldots Einstein is popular for the formula E = mc 2. He did achieve so much more, though... The equation environment Einstein is popular for the formula given in equation \ eqref {eq:emc2 } below. \ begin { equation } \ label {eq:emc2 } E = mc ˆ2 \end { equation } Einstein is popular for the formula given in equation (1) below. E = mc 2 (1) Lib4RI Training Series Module 5: LATEX Spring 2018 14 / 18

C. Mathematical Formulæ 3. Examples $a ˆ2 + bˆ2 = cˆ2$ a 2 + b 2 = c 2 Lib4RI Training Series Module 5: LATEX Spring 2018 15 / 18

C. Mathematical Formulæ 3. Examples $\lim_ {n \to \ infty }\ sum_ {k=1}ˆn \frac {1}{kˆ2}= \frac {\ pi ˆ2}{6} $. lim n n k=1 1 k 2 = π2 6. \ begin { equation } \lim_ {n \to \ infty } \ sum_ {k=1}ˆn \ frac {1}{ kˆ2} = \frac {\ pi ˆ2}{6} \end { equation } lim n n k=1 1 k 2 = π 2 6 Lib4RI Training Series Module 5: LATEX Spring 2018 16 / 18

C. Mathematical Formulæ 4. Exercise Open the file Exercise_2d/ex_2d.pdf and write the L A TEX code to produce the document. Lib4RI Training Series Module 5: LATEX Spring 2018 17 / 18

Useful resources: https://tobi.oetiker.ch/lshort/ https://en.wikibooks.org/wiki/latex https://ctan.org/ https://tex.stackexchange.com/ https://doi2bib.org/ Lib4RI Training Series Module 5: LATEX Spring 2018 18 / 18