Introduction to L A TEX

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

T E X and L A T E X Document preparation tools

Introduction to LaTeX. Paul Fodor Stony Brook University

David Helmbold, October 2005, Revised October 2007

An introduction to L A TEX for students

Learning L A TEX. Patrick Lam

Helen Cameron. A Brief Overview of LATEX

An introduction to LaTeX

Basic L A TEX. what is LaTeX?

VERY VERY SHORT GUIDE TO LATEX

Helen Cameron. A Brief Overview of LATEX

LYX with Beamer and Sweave

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

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

An introduction to LaTeX

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

Lecture 1: Short summary of LaTeX basics

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

Introduzione a LaTex. Fabrizio Messina

A LAT E X Tutorial. Evangelos Milios. March 15, 2004

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

L A TEX- Advanced Topics

Pimp your thesis: a minimal introduction to L A T E X.

Getting started with Latex

Introduction to L A TEX beamer

Latex Tutorial. CIS400 Senior Design 9/5/2013

Math 235: Introduction to LaTeX

Formatting with LaTeX

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

An Introduction to L A TEX

Latex Tutorial 1 L A TEX. 1.1 Text

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

Introduction to L A TEX

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

Introduction to Latex. A workshop by Dr. Ala Eshmawi

Learn LaTeX in 30 Minutes. A. LOTFI School of Science and Technology Nottingham Trent University

LaTeX A Tutorial. Mohsen Alimomeni, 2010

An Introduction to L A TEX

Assessments for CS students:

COMP496/901: Academic Presentation and Writing Skills Using LaTeX

MATLAB for the Sciences

Introduction to L A TEX

Introduction to LATEX

The wiki2beamer example. October 19, 2012

L A TEX Class Holiday Inn Fisherman s Wharf San Francisco, CA July Cheryl Ponchin Sue DeMerritt

Very Short Introduction to LaTeX

Introduction to L A TEX

Introduction to LaTeX. Christoph Pickl

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

Introduction to L A TEX

Introduction to L A TEX

COMS 6100 Class note

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

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

A brief introduction to L A TEX

LaTeX. Information Literacy II EN(IL2) Course

How to get started in L A TEX

Introduction to L A TEX

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

Introduction to LATEX

Become a L A TEX Guru

Introduction to L A TEX

Exercises in LaTeX IDA on AAU

Introduction to L A TEX

Written & Oral Presentation: Computer Tools

An Introduction to LATEX

LaTeX is essentially a markup language

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

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

Introduction to LAT E X

LATEX TYPESETTING SYSTEM. CAAM 519, CHAPTER 3

Document Preparation Word Processors

The Honours Dissertation Class for L A TEX2e. Cara MacNish

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

Tools Course: Part 2

NCSU Linguistics Eric Wilbanks & Jeff Mielke. November 21, An open-source typesetting language used for document mark-up

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

CSCM10 Research Methodology A Taster of L A TEX

WYSIWYG Systems. CSCM10 Research Methodology A Taster of L A TEX WYSIWYM. Advantages/Disadvantages of WYSIWYG Systems.

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

Absolute L A TEX Beginner

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

An Introduction to L A T E X

Mikkel Madsen

L A TEX: Eh? What is it, what isn t it, who cares? Andy Caird. LATEX: Eh? p.1/13

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

Table of Contents Headings:... 2 Changing text to a heading... 2 Modifying Style settings for current and future documents... 2

An Introduction to LATEX

LaTeX Workshop. While you re waiting, please make an account at

L A TEX for Psychological Researchers

L A TEX-cursus 5th e session: thesis in 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

L A TEX From The Ground Up

WYSIWYG Systems. CSCM10 Research Methodology Lecture 4 (11/2/16): A Taster of L A TEX WYSIWYM. Advantages/Disadvantages of WYSIWYG Systems

L A TEX for Psychological Researchers

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

A quick guide to L A TEX

L A TEX: Online module 6

TeXnicCenter v1 Beta Frank Van Puyvlde ICT for Research K.U.Leuven

Transcription:

Introduction to L A TEX Henrik Thostrup Jensen September 29 th 2006 1

About What is L A TEX How does it work Exercises Fetch slides and work from them Not everyone works with same speed/focus First a topic is explained, then an exercise is given 2

On learning ASK QUESTIONS DAMMIT! If something does not work If you do not understand something If you want to know something outside the curriculum Not knowing is not failure Not wanting to know is You are responsible for your learning If you are not responsible today, you probably won t be tomorrow. Ask questions 3

What is L A TEX Document preparation system A markup language - not WYSIWYG A front end to TEX(τɛχ) Must be compiled to get a document The thing you should write your report in Because it is better than the alternatives 4

A simple L A TEXdocument \documentclass{report} \begin{document} some text \end{document} 5

Slightly more advanced L A TEXdocument % preamble \documentclass[10pt,twoside,a4paper]{report} % content \begin{document} \chapter{some chapter} \section{a section} some textual content \end{document} 6

Producing Output Compiling:latex file.tex Will output file.dvi Can be viewed with xdvi Postscript: dvips file.dvi -o file.ps PDF: dvipdf file.dvi -o file.pdf Alternative: pdflatex file.tex Directly from L A TEXto PDF 7

Document Structure 1/2 First a preamble Font page, Title page, Preface Table of contents (auto generated) Contents Appendix Bibliography (auto generated using BibTEX) 8

Document Structure 2/2 Split the document into several files Include other files using \input{file.tex} One include/master file is usually the best 9

Preamble The cursing that goes before the document Not magical! Typical structure: Document class Packages Macros, environments, etc 10

Preamble Example \documentclass[10pt,twoside,a4paper]{report} \usepackage[english]{babel} \usepackage{t1enc} \usepackage{graphicx} \usepackage{makeidx} \usepackage{xspace} \makeindex \bibliographystyle{plain} \newcommand{\word}[0]{my word\xspace} \renewcommand{\texttt}[1]{{\tt{\small{#1}}}} 11

About the Exercises First a concept is explained Then a small exercise is given Download the slides and follow them Available on the course home page You can skip an exercise if you know the topic 12

Exercise 1 Create a simple document using the previous examples (or other sources) Compile it to a postscript or PDF file 13

Exercise 2 Split the document into a master, a preamble, and a content file, and recompile 14

Parts, Chapters, and Section \part \chapter \section \subsection \subsection \subsubsection \paragraph Used to divide the report into logical chunks \part is usually not needed Note: These are specific to the report class 15

Exercise 3 Create entries with everything from chapter to paragraph in your document, and recompile 16

Italic, Bold, Teletype, and Verbatim Sometimes you want text in italic or something else \textit{words in italic} \textbf{words in bold} \texttt{words in teletype} Shorthand notation: {\it words in italic} The verbatim environment create a teletype section in which no escaping is necessary: \begin{verbatim} \ {} \end{verbatim} 17

Exercise 4 Insert italic, bold, and teletype text into your document Insert a verbatim section in your document 18

Lists To create a numbered list: \begin{enumerate} \item thing \item object \end{enumerate} To create a bulleted list use itemize, instead of enumerate. Also possible to create a description lists, see the L A TEXcheat sheet for details. 19

Exercise 5 Create a numbered list in your document Create a bulleted list in your document 20

Labels and References Used for referencing within the document Example: \section{introduction}\label{sec:introduction} \ref{sec:introduction} \pageref{sec:introduction} \ref refers to section or figure number \pageref refers to page number It is custom to use cha prefix for chapters, sec for section, and fig for figures. Note: You will often need to compile the document two or three times to get page references right. 21

Exercise 6 Create a label for a section and create a reference, and a page reference. 22

Figures 1/2 The graphic and graphicx packages provides a simple method for including figures: \includegraphics{myfigure.eps} Scaling: \includegraphics[width=6cm]{myfigure.eps} Alternatively, it is possible to use: \begin{figure}... \end{figure} Can do more (e.g., better placement control) Usually \includegraphics is enough 23

Figures 2/2 Bitmap files (bmp, gif, jpg, png, etc.) tend to look bad when printed. Use vector graphics whenever possible. For postscript files eps is preferred, for pdf, include other pdf documents. If you exclude the dot-suffix (e.g.,.eps) in \includegraphics, L A TEXwill look for eps for postscript, and pdf for pdf documents. 24

Exercise 7 Insert a figure into your document. Scale it Create a label for the figure, and refer to it Create an eps and pdf version of the figure and make sure the document can be compiled to both postscript and pdf Hint: Use epstopdf 25

Table of Contents L A TEXcan generate this automatically Insert the following in your master file: \tableofcontents Usually followed by: \cleardoublepage The level of section inclusion can be set. E.g.,: \setcounter{tocdepth}{1} includes parts, chapters, and sections. Note: As a table of contents is build using page references, L A TEXshould be run several times, usually two, sometimes three. 26

Exercise 8 Create a table of content for your document Remove subsection entries from the table of content 27

latexmk You can skip this part of you are afraid of Unix Or if you do not want to make your life easier latexmk is a Perl script which can run L A TEXthe right amount of times to get pagerefs correct. Usage: latexmk file.tex (produces dvi output) Or: latexmk -pdf file.tex for pdf output If you use Unix you can copy the script to your PC 28

Exercise 9 Use latexmk to compile your document to dvi and pdf 29

Math Mode L A TEXrocks at math Math mode can be entered in two ways: Easy: $ math mode $ Longer: \begin{equation} math mode \end{equation} Example: $ dˆ2\sqrt{2\pi} $ produces d 2 2π The L A TEXcheat sheet is handy when writing math 30

Exercise 10 Create the following formula in your document: e iπ + 1 = 0 d = b 2 4ac, x 1 = b+ d 2a 31

Page Styles Changing the layout style in L A TEXis easy The page style is set like this: \pagestyle{plain} Page style can be set anywhere in the document, and will be style of the following pages, until redefined Build-in page styles are: plain, empty, headings, myheadings The package fancyheadings has some fancy styles, e.g., fancy, fancyplain \thispagestyle set the style for current page only 32

Exercise 11 Set your page style to fancy Be sure to include the fancyheadings package Now set it back, because fancy looks silly 33

Page Numbering Page numbering is usually done automatically But sometimes this does not fit Resetting the current page number to 1: \setcounter{page}{1} It is also possible to change the page number style: \pagenumbering{roman}. arabic is default numbering style. 34

Exercise 12 Set your page numbering to start with one in the introduction Use roman numerals to number the pages before the introduction 35

BibTEX The way to do citations in L A TEX Have one file with all books, articles, etc. Can be shared across several documents Only includes the cited works in the report BibTEXautomatically sorts the entries by last name To use BibTEX: \bibliographystyle{plain} in the preamble \bibliography{bibliography} in the master And have a file called bibliography.bib with your bibliography. Then use \cite{cite entry} to cite. 36

Exercise 13 Fetch the example bibliography.bib from the course web page. Cite the entry in your document, set it up for using BibTEX, and compile Note: It is a good idea to use, instead of a space before \cite. This creates a space which cannot be line breaked. 37

Title Page The title page is the thing that goes between the front page and the preface Has to look a certain way There is a L A TEXversion of this available at the course homepage. 38

Exercise 14 Download the example title page from the course web page You need title.tex and logo.eps Edit the file to reflect your project (or something else) and insert it into your document You should have a file called synopsis.tex which contains your synopsis (or some garbage text). 39

Getting Further with L A TEX Print out the L A TEXcheat sheet: http://www.stdout.org/~winston/latex/ The LaTeX Companion is a good book But just use L A TEXand you will get better 40

L A TEXBeyond Reports Beamer Can create very nice slides http://latex-beamer.sourceforge.net/ This presentation was created with it AAU theme: http://www.cs.aau.dk/~ltm/ Short Documents Will rid you of the feeling that L A TEXis complicated And documents just look way better in L A TEX 41

Summary Hopefully you will know a bit more L A TEXnow Ask questions if there is anything more you would like to know Anything on these slides can be found in less than five minutes using google Now, go drink beer! 42