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

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

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

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

Introduction to LaTeX. Paul Fodor Stony Brook University

Learning L A TEX. Patrick Lam

Math 235: Introduction to LaTeX

PRISM Introduction to L A TEX

Introduction to LATEX

An introduction to L A TEX for students

Helen Cameron. A Brief Overview of LATEX

Introduction to Latex. A workshop by Dr. Ala Eshmawi

COMS 6100 Class note

Student Learning Service: Introduction to Latex

Assessments for CS students:

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

MATLAB for the Sciences

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

An Introduction to LATEX

Introduction to L A TEX beamer

Outline. A Sneak Peek

An Introduction to L A T E X

Excellent support for mathematical formatting. Automatically downloads/installs missing components as needed Updates somewhat frequently

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

LaTeX A Tutorial. Mohsen Alimomeni, 2010

Mikkel Madsen

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

LaTeX. Information Literacy II EN(IL2) Course

Document Preparation Using L A TEX

Researcher Development Unit: Introduction to Latex

Helen Cameron. A Brief Overview of LATEX

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

Introduction to LATEX

LATEX TYPESETTING SYSTEM. CAAM 519, CHAPTER 3

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

L A TEX for psychological researchers

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

Workshop: A Simple Introduction to L A TEX

Intro to LaTeX Workshop

Getting started with Latex

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

(Yet Another) Introduction to L A TEX 2ε (V3)

LaTeX: Scientific Document Writing

Latex Tutorial. CIS400 Senior Design 9/5/2013

Introduction to L A TEX

Tools for Scientific Writing with LAT E X. Johan Carlson

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

Introduction to L A TEX

Introduction to L A TEX

Dec. 27 th, 2010 University of Isfahan

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

Getting Started with L A TEX

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

Introduction to L A TEX

How to get started in L A TEX

Become a L A TEX Guru

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

A brief introduction to L A TEX

Epyt Theme for Beamer

COMP496/901: Academic Presentation and Writing Skills Using LaTeX

VERY VERY SHORT GUIDE TO LATEX

GENERAL INFORMATION INSTRUCTIONS FOR MANUSCRIPT SUBMISSION

Very Short Introduction to LaTeX

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

Lecture 3-Introduction to Latex (II)

A Brief Introduction to LaTeX

Introduction to L A TEX

LaTeX. Information Literacy II EN(IL2) Course

The Joys of LAT E X. Vadim Ponomarenko. introducing the world s standard typesetting language.

Introduzione a LaTex. Fabrizio Messina

Introduction to L A TEX

Formatting with LaTeX

An Introduction to LATEX

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

Square cells: an array cooking lesson

L A TEXday, morning session Discovering L A TEX

Mikkel Madsen

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

LAT E X week 2: Basics for Writing a Document

What is L A T E X? Dan Yasaki. June 4, 2018 REU at Elon University. UNC Greensboro. Dan Yasaki What is LAT E X? 1 / 22

Basic L A TEX. what is LaTeX?

Abstract A quick intro by examples to the document preparation language L A TEX.

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

A L A TEX-Package for IEEE PES Transactions

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

Introduction to L A TEX Part II

A demonstration of the L A TEX2ε class file for the International Journal of Network Management

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

Using L A TEX Tom Edgar

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

An Introduction to L A TEX

1. Welcome. (1) Hello. My name is Dr. Christopher Raridan (Dr. R). (3) In this tutorial I will introduce you to the amsart documentclass.

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

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

Basics. Options. Commands

L A TEX- Advanced Topics

Introduction to L A TEX Part II

1 Obtaining LyX and L A TEX

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

Introduction. LaTeX (pronounced lay-tech ) is a professional document preparation system.

Transcription:

Research Method and Report Writing Lecture 4: An Introduction to L A TEX Farzaneh Abdollahi {Thanks to Hamed Rezaee} Department of Electrical Engineering Amirkabir University of Technology Fall 2012 Farzaneh Abdollahi Research Method and Report Writing Lecture 4 1/28

Introduction Prerequisites Generate a Document Graphics Tables Cross Referencing Bibliography and Citation Math and Equations Presentations Useful links Farzaneh Abdollahi Research Method and Report Writing Lecture 4 2/28

What is LaTeX? LaTeX is a document preparation system for the TeX typesetting program. It is used for high-quality typesetting for any form of publications. LaTeX encourages authors not to worry too much about the appearance of their documents. It is based on the idea that it is better to leave document design to document designers, And let authors write documents by using designed styles (templates). Farzaneh Abdollahi Research Method and Report Writing Lecture 4 3/28

Why LaTeX? 1. It is particularly suited for the production of long articles and books, professionally. 2. It has facilities for the automatic numbering of chapters, sections, theorems, and equations, and has facilities for cross-referencing. 3. It is feasible to use predefined styles. 4. It allows you to focus on the content rather than the appearance of your document. 5. You can switch to another styles easily. 6. It is stable and never be corrupted. 7. It is easy to typeset complex mathematical formulas by using LaTeX. Farzaneh Abdollahi Research Method and Report Writing Lecture 4 4/28

Prerequisites: Installing a Distribution The first step to use LaTeX is to install a TeX distribution. TeX distributions are packaged collections of packages and programs that enable you to type. The recommended distributions for each of the major operating systems are: TeXLive: is a major TeX distribution for Unix/Linux, Mac OS, and Windows. MiKTeX: is a Windows-specific distribution. MacTeX: is a Mac OS-specific distribution based on TeXLive. Farzaneh Abdollahi Research Method and Report Writing Lecture 4 5/28

Prerequisites: Getting a Text Editor You will also need a text editor to write LaTeX codes. A number of editors have been created specifically for working with LaTeX: WinEdt: MS Windows. TeXmaker: MS Windows and Mac OS. TeXworks: MS Windows, Mac OS, and Linux. etc. Normally LaTeX saves the final document as a.dvi file. It is necessary to use a tool to convert DVI files to PDF format. Most editors have this tool. Farzaneh Abdollahi Research Method and Report Writing Lecture 4 6/28

Generate a Document:Required Files To generate a document by LaTeX some files should be provided in a folder:.tex: The main text should be written in a.tex file..cls: The style of typesetting is defined in a.cls file..bib: The.bib file contains the information of references (articles, books, etc.)..sty: To typeset a report you may use some commands. The commands are defined in.sty files namely packages. The.cls,.bib, and.sty files should be called in the.tex file. Distributions contain a lot of.sty files, and it is not necessary to provide all of them in the folder. Farzaneh Abdollahi Research Method and Report Writing Lecture 4 7/28

How to Start? LaTeX begins with the \documentclass command, which identify the type of the document LaTeX follows. For example, to write an article with font size 10 you can use the following command at first: \documentclass[10pt]{article} The next step is to call necessary packages. \usepackage{package name} Then the title of the report, the name of the author, affiliation, and so on should be added: Farzaneh Abdollahi Research Method and Report Writing Lecture 4 8/28

How to Start? See the example below: \title{an Introduction to LaTeX} \author{farzaneh Abdollahi} \institute{tehtan Polytechnic} \title{} is to write the title, and \maketitle command adds it. \author{} is used to add the author s name. \institute{} adds the affiliation. The result is An Introduction to LaTeX Farzaneh Abdollahi Tehran Polytechnic Farzaneh Abdollahi Research Method and Report Writing Lecture 4 9/28

Main Document Everything you type and want to print such as abstract, sections, figures, etc. must appear in the environment below: \begin{document} The text goes here... \end{document} You can use the following commands to add the abstract of the report. \begin{abstract} The abstract goes here... \end{abstract} Farzaneh Abdollahi Research Method and Report Writing Lecture 4 10/28

The next step is sectioning the text to Introduction, Main Text, Conclusions, and so on. The following sectioning commands are available: \section{section name} The text goes here... \subsection{subsection name} The text goes here... \subsubsection{subsubsection name} The text goes here... Farzaneh Abdollahi Research Method and Report Writing Lecture 4 11/28

Graphics:Add a Figure To include a figure namely figurename in the text: It should be copied at the same folder as other files are in. The following commands should be used: \begin{figure}[!location ] \centering \includegraphics[size]{figurename} \caption{caption sentence.} \end{figure} \centering locates the figure at the center of the column. \caption{caption sentence.} is for captioning the figure by "caption sentence.". Farzaneh Abdollahi Research Method and Report Writing Lecture 4 12/28

Graphics: Add a Figure!location denotes the figure location in the page which can be:!h means hear.!t means top.!b means bottom. [size] is used to define the figure size. Various methods can be used for size definition: [width=x in] [height= x in] [scale= x] [width=x\textwidth] etc. This command can be found in WinEdt in Insert/Objects/Figure. Farzaneh Abdollahi Research Method and Report Writing Lecture 4 13/28

Tabular Environment The tabular environment can be used to typeset tables with optional horizontal and vertical lines. The following command can be used for an m n table: \begin{tabular}{ p1 p2... pn } \hline a11&...&a1n\\ \hline. \hline an1&...&ann\\ \hline \end{tabular} Farzaneh Abdollahi Research Method and Report Writing Lecture 4 14/28

Tabular Environment The \begin{tabular}\end{tabular} commands provide the environment. p1 denotes the position of the arrays in the ith column which can be l for left, c for center, and r for right. \\ shows the end of each row, and & decomposes arrays in a row. \hline draws horizontal lines, and between p1,...,pn draw vertical lines between columns. \hline and can be omitted to not to draw these lines. This command can be found in WinEdt in Insert/Table/Tabular. Farzaneh Abdollahi Research Method and Report Writing Lecture 4 15/28

Cross Referencing To cross-reference to tables, figures, sections, and more. \label{marker} command should be used next to the environment that generates a table, figure, section, etc. which you wish to reference. marker is a label associated to the environment. To reference the environment you should use the following command in the main text where you wish to reference: Text1 +\ref{marker}+text2 And to reference the page of the environment: Text1+\pageref{marker}+Text2 Farzaneh Abdollahi Research Method and Report Writing Lecture 4 16/28

Example To make a label for a figure: \begin{figure}. \label{marker} \end{figure} To reference to the figure you should use the following command where you wash to reference: Text1+Figure \ref{marker}+text2 The environment will be referenced in the text with its number: Text1+Figure 1+Text2 Farzaneh Abdollahi Research Method and Report Writing Lecture 4 17/28

Bibliography and Citation: Create a Database The.bib file contains the bibliographic database. Each reference in the.bib file has the following form: @type {label, field1="value 1",. fieldn="value n", } type defines the type of the reference such as: inproceedings, article, book,... field1,...,fieldn are related to the reference information such as: author, title, pages,... Farzaneh Abdollahi Research Method and Report Writing Lecture 4 18/28

Bibliography and Citation:Style To cite the references and create a section of references we should define a style. Various publishers use various styles for citation. To use a style the following command should be added at the end of document in the.tex file. \bibliographystyle{stylename} And finally the following command should be used to add a.bib file namely bibfilename : \bibliography{bibfilename } The command to create a reference in the.bib file can be found in WinEdt in Insert/BibTex Items Farzaneh Abdollahi Research Method and Report Writing Lecture 4 19/28

Example See the following example: @book{spo:05, author=m. W. Spong and S. Hutchinson and M. Vidyasagar, title=robot Modeling and Control, edition= 1st, publisher=john Wiley and Sons, year= 2005} To cite the reference we should use the following command in the main text where we want to cite: Text1 +\cite{spo:05}+text2 Farzaneh Abdollahi Research Method and Report Writing Lecture 4 20/28

Example Cont d The reference will be cited in the text with a number: Text1+[1]+Text2 And it will be added in the References section with that number: References: [1] M. W. Spong, S. Hutchinson,and M. Vidyasagar, Robot Modeling and Control, 1st ed. John Wiley and Sons, 2005. Farzaneh Abdollahi Research Method and Report Writing Lecture 4 21/28

Math and Equations: Single Equations A lot of methods exist to write equations in LaTeX. To write single equations the following environment is useful: \begin{equation} a=b+c \end{equation} The above commands result in: a = b + c (1) In case of no numbering, you should use: \begin{equation*} \end{equation*} Farzaneh Abdollahi Research Method and Report Writing Lecture 4 22/28

Math and Equations: Multi Equation In case of multi equations a useful environment is: \begin{eqnarray} a& = &b + c\\ d& = &e + f \end{eqnarray} The above commands yields: a=b + c (2) d=e + f (3) &..& sort this part of each equation in the same column For no numbering \nonumber command is useful. The command to create a reference in the.bib file can be found in WinEdt in Insert/Environments/... Farzaneh Abdollahi Research Method and Report Writing Lecture 4 23/28

Compile the file When your typing is finished the file should be compiled To compile in WinEdt: F9 or Farzaneh Abdollahi Research Method and Report Writing Lecture 4 24/28

Presentations:BEAMER beamer is a useful package to for presentations with LaTeX. This package is provided with most LaTeX distributions. The first step is to add the beamer as follows: \documentclass{beamer} The first slide in the presentation is dedicated to author s name and affiliation by using mentioned command before. The other slides are created in the \begin{document}\end{document} environment. A useful environment to create slides is as follows: \begin{frame}{frame title} the text goes here... \end{frame} Farzaneh Abdollahi Research Method and Report Writing Lecture 4 25/28

Itemize To itemize the slides: \begin{frame}{frame title} \begin{itemize} \item Item 1 \item Item 2 \end{itemize} \end{frame} The items will be numerated if you use enumerate instead itemize. These commands can be found in WinEdt in insert/list/... Farzaneh Abdollahi Research Method and Report Writing Lecture 4 26/28

Example Therefore, we can get the following slide: You should use a theme to create a presentation by using \usetheme{theme name} command. Farzaneh Abdollahi Research Method and Report Writing Lecture 4 27/28

Useful links for more details Everything about LaTeX commands, packages, math equations, and so on can be found in the following web en.wikibooks.org/wiki/latex www.ctan.org/what is tex.html http://www.math.harvard.edu/texman/ To type in Persian you may use Xepersian http://ctan.org/tex-archive/macros/xetex/latex/xepersian Farzaneh Abdollahi Research Method and Report Writing Lecture 4 28/28