Helen Cameron. A Brief Overview of LATEX

Similar documents
Helen Cameron. A Brief Overview of LATEX

LaTeX A Tutorial. Mohsen Alimomeni, 2010

Introduction to LaTeX. Paul Fodor Stony Brook University

Introduzione a LaTex. Fabrizio Messina

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

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

An introduction to L A TEX for students

Introduction to Latex. A workshop by Dr. Ala Eshmawi

David Helmbold, October 2005, Revised October 2007

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

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

Getting started with Latex

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

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

COMP496/901: Academic Presentation and Writing Skills Using LaTeX

Using L A T E X for scientific writing

Introduction to L A TEX

An Introduction to L A T E X

LaTeX. Information Literacy II EN(IL2) Course

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

Introduction to L A TEX

Introduction to L A TEX

Document Preparation Using L A TEX

Dec. 27 th, 2010 University of Isfahan

Math 235: Introduction to LaTeX

Introduction to L A TEX

Guide to using L A TEX

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

An introduction to LaTeX

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

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 Interactive Introduction to L A TEX

Latex Tutorial 1 L A TEX. 1.1 Text

Introduction to L A TEX

Formatting with LaTeX

PRISM Introduction to L A TEX

Assessments for CS students:

Become a L A TEX Guru

Introduction to LaTeX. M&S Talk Series August 16 th, 2016 AH Sheikh

An Introduction to L A TEX

An Introduction to LATEX

Basic L A TEX. what is LaTeX?

The Honours Dissertation Class for L A TEX2e. Cara MacNish

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

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

Very Short Introduction to LaTeX

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

GROUP ASSIGNMENT. L A TEX Assignment 1/3

Introduction to LATEX

An Introduction to LATEX

Introduction to LAT E X

Introduction to Scientific Typesetting Lesson 1: Getting Started

Learning L A TEX. Patrick Lam

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

L A TEX From The Ground Up

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.

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

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

MATLAB for the Sciences

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

L A TEX for Psychological Researchers

L A TEX Document Formatting Examples

Latex Tutorial. CIS400 Senior Design 9/5/2013

A Short L A TEX Introduction

COMS 6100 Class note

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

VERY VERY SHORT GUIDE TO LATEX

L A TEX. A computer system for typesetting documents

Why do I need LaTeX? What is LaTeX? Where can I get LaTeX? How can I use LaTeX? Who can help me with LaTeX? Why What Where How Who

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

TUTORIAL 5: LIST ENVIRONMENTS. 1. Welcome. (1) Hello. My name is Dr. Christopher Raridan (Dr. R).

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

Basics. Options. Commands

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

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

Introduction to LAT E X

An introduction to LaTeX

How to get started in L A TEX

Learn how to [learn] LATEX

L A TEX for Psychological Researchers

Introduction to L A T E X

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

Introduction to L A T E X

Learning LaTeX: The Basics

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

Workshop: A Simple Introduction to L A TEX

A Brief Introduction to L A TEX

Introduction to L A TEX

A Demonstration of the L A TEX 2ε Class File for the Oxford University Press Ltd Journal. First Author 1 and Second Author 2.

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

How to use abdnthesis.cls

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

1 Obtaining LyX and L A TEX

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

Document Preparation Word Processors

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

Using L A TEX Tom Edgar

Effective Programming Practices for Economists

Typing Mathematics. Darrin Doud

Transcription:

A Brief Overview of L A TEX

What Is L A TEX? L A TEX is a document preparation system designed by Leslie Lamport on top of Donald Knuth s TEX.

Useful Books Leslie Lamport. L A TEX: A document preparation system (Second edition). Addison-Wesley, 1994. Michel Goossens, Frank Mittelbach, and Alexander Samarin. The L A TEX Companion. Addison Wesley Longman, Inc., 1994.

Useful Documentation Websites The Department of Engineering at the University of Cambridge maintains a useful website http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/ with pointers to lots of useful documentation.

Get L A TEX for Free The TEX Users Group (TUG) website (http://www.tug.org) is a good place to find information. Also try the L A TEX Project s website at http://www.latex-project.org/ MiKTEX: For Windows, public domain, and available at http://www.miktex.org/ Here s a Mac OSX L A TEX website: http://www.esm.psu.edu/mac-tex/

L A TEX Editors For Windows: WinEdt: Available at http://www.winedt.com (shareware: $30 student registration after a 30-day trial period). It can connect to pretty much any version of TEX, but is preconfigured for MiKTEX. LEd: A free environment for rapid TEX and L A TEX document development. It is available at http://www.latexeditor.org/. Texmaker: A free L A TEX editor that integrates many tools needed to develop documents with L A TEX in just one application. Texmaker runs on Unix, Mac OS X, and Windows systems and is available at http://www.xm1math.net/texmaker/. Check the Mac OSX L A TEX website (http: //mactex-wiki.tug.org/wiki/index.php?title=main_page) for Mac editors. LyX runs on many platforms (http://www.lyx.org/).

How Do I Use L A TEX? Create a L A TEX source file (filename.tex) containing the content of the document plus L A TEX commands that describe the logical structure of the document. Run L A TEX on the source file (latex filename.tex). L A TEX formats the document using the formatting rules of the document class specified in the source, putting the output in a device-independent file (filename.dvi). The formatted output can be displayed on the screen using xdvi, or translated into Postscript using dvips and then printed.

How Do I Use PDFL A TEX? Create a L A TEX source file (filename.tex) containing the content of the document plus L A TEX commands that describe the logical structure of the document. Run PDFL A TEX on the source file (pdflatex filename.tex). PDFL A TEX formats the document using the formatting rules of the document class specified in the source, putting the output in a PDF file (no.dvi file).

L A TEX on Our Unix Systems You must use the command source /usr/local/tex/setup.csh to use LaTeX 2e on our Unix systems. (This command could go in one of the standard files such as your.login file.) Typical session on our Unix systems: latex file.tex bibtex file latex file.tex latex file.tex xdvi file.dvi & dvips -o file.ps file.dvi lpr -Pamber file.ps

Overview of L A TEX Source \documentclass[options]{chosendocumentclass} preamble \begin{document} The content of your document goes here! \end{document}

Document Classes article: used for ordinary documents. Some options: 11pt, 12pt, twoside, twocolumn report: like article, only for longer documents. book: for books. letter: for letters. seminar, slides or beamer: for slides.

The Title Page Specify the title, author(s), and date (optional) in the preamble, and generate the title page with the \maketitle command. \documentclass{article} \title{$p \not= \mathit{np}$} \author{} \begin{document} \maketitle The rest of my article goes here. \end{document}

Sectioning Start a new section with \section{section_title}. Also available \subsection{subsection_title} and \subsubsection{subsubsection_title}. To get unnumbered sections and subsections, use \section*{section_title} and \subsection*{subsection_title}.

Example: \section{introduction} Many theoretical computer scientists have hypothesized --- correctly --- that $P \not= \mathit{np}$, but none were able to prove it. At last, that hypothesis is proved correct. \subsection{the Class $P$} The class $P$ consists of all decision problems that can be solved in polynomial time. \subsection{the Class $\mathit{np}$} The class $\mathit{np}$ consist of all decision problems that can be solved in nondeterministic polynomial time.

Text Type in the text of your document mostly as you normally would. L A TEX ignores whitespace (tabs, blanks, newlines) except... a blank line ends a paragraph. L A TEX ignores the formatting you used when you type in your text and formats it according to the document class you specified.

Lists L A TEX provides three types of lists: enumerated list: items are numbered itemized list: unnumbered items descriptive lists: items are named

Example: Enumerated List \begin{enumerate} \item Prove that $P \not= \mathit{np}$. \begin{enumerate} \item Give an overview of your proof. \item Now provide the details. \end{enumerate} \end{enumerate} produces 1 Prove that P NP. 1 Give an overview of your proof. 2 Now provide the details.

Example: Itemized List \begin{itemize} \item I can describe my ideas in point form. \item Students like point form. \item English professors do not. \end{itemize} produces I can describe my ideas in point form. Students like point form. English professors do not.

Example: Descriptive List \begin{description} \item[chocolate:] Necessary to my existence. Don t get between me and my chocolate! \item[baby carrots:] Nice crunch and healthy, too. \end{description} produces Chocolate: Necessary to my existence. Don t get between me and my chocolate! Baby carrots: Nice crunch and healthy, too.

Inline Lists To produce a list that is inline in a sentence, investigate the paralist package.

Mathematics In-line equation log 2 32 = log 2 2 5 = 5 is created with $\log_{2} 32 = \log_{2} 2^{5} = 5$. Unnumbered displayed equation x 2 + x x = x + 1 is created by \[ \frac{x^{2}+x}{x} = x + 1 \]

Numbered displayed equation n i = i=1 n(n + 1) 2 (1) is created by \begin{equation} \sum_{i=1}^{n} i = \frac{n(n+1)}{2} \end{equation} \label{mysum} and can be referred to in text as Equation 1 by Equation \ref{mysum}.

Hint Do not use \frac{numerator}{denominator} in an in-line formula. Instead, either use a displayed equation \[ \frac{numerator}{denominator} \] or use (numerator)/(denominator) in an in-line formula.

Consider $\frac{1}{2}$, which produces 1 2. The digits are too small, and the result is too tall and will make the inter-line spacing look funny. The result is more readable if you use $1/2$, which produces 1/2. The result is of \frac{}{} is readable only in a displayed formula: \[ \frac{1}{2} \] produces 1 2.

Many Useful Symbols and Math Commands Don t type words directly in mathematical expressions. For example, if you type $log n$, you get logn. L A TEX thinks you are multiplying four variables named l o, g and n, and does not typeset log as a word. L A TEX provides many useful commands for commonly-used mathematical words: \log, \ln, \lim, \sin, and so on. In the above example, you should type $\log n$ to get log n. http://www.ctan.org/tex-archive/info/symbols/ comprehensive/symbols-a4.pdf contains a comprehensive list of symbols you can use in mathematical expressions and elsewhere.

Numbering L A TEX can figure out the numbering for you, if you tell it to remember a number with \label{yourlabelname}, just as we saw in numbered displayed equations. Example: Because I typed \frametitle{numbering} \label{num} I can refer to this section as Slide 26 anywhere in this document using Slide \ref{num} and L A TEX automagically fills in the number for me.

Hint Any number that L A TEX generates (page numbers, item numbers, section or subsection numbers, figure numbers, equation numbers and so on) can be captured using the \label command and used elsewhere in your text with the \ref command. Never type the numbers that L A TEX generated for you. For example, never type As Figure 1 shows,.... Always use \label and \ref. Make L A TEX do the work, instead!

Figures L A TEX can do figures: \begin{figure} Content of the figure goes here. \caption{caption of the figure.} \label{figurelabel} \end{figure} The contents could be text, encapsulated Postscript diagrams, diagrams created with L A TEX s own picture environment, a table or anything else that L A TEX is capable of handling. Note: Tables, encapsulated Postscript and picture diagrams can all go anywhere in a document, not just in figures.

Encapsulated Postscript To include an encapsulated Postscript picture, you must include some package (e.g. graphics, epsfig) that handles pictures. You include a package using the \usepackage{packagename} command in the preamble. Using the graphics package, you can include a picture using \includegraphics{filename.eps}. Using the epsfig package, you can include a picture using \epsfig{file=filename.eps}. (You can shrink or expand a picture by specifying a height and/or a width: \epsfig{file=filename.eps,width=3cm})

Example: \usepackage{graphics} % In the preamble \begin{center} % In the body of the document \includegraphics{tinypicture.eps} \end{center}

Graphics with PDFL A TEX Using pdflatex and including the graphicx package, you can include PDF image and bitmap images in JPEG (best for photos) or PNG (best for other bitmap images) or GIF. Other formats should be converted to PDF. graphicx allows you to specify width, height, or scale: \includegraphics[width=0.5\textwidth]{boy.png} \includegraphics[height=60mm]{cats.jpg} \includegraphics[scale=0.5]{mygraphic.png}

Abstracts If you want an abstract in your document (for example, a thesis proposal usually has one), then use the abstract environment: \begin{abstract} The negative side-effects of using lock-based synchronization mechanisms are well known. \end{abstract}

Double-Spaced Document To double-space your document (for your seminar reports, for example), use \usepackage{setspace} \doublespacing in the preamble.

A Period That Does Not End a Sentence A period is used to mark the end of sentence in L A TEX source. (Exception: a period following an uppercase letter does not end a sentence in L A TEX source.) L A TEX puts a larger amount of space between the end of sentence and the start of the next one than it puts between two words within a sentence.

You may want to use a period that does not end a sentence. Example: in Cameron et al., the period does not end a sentence. To tell L A TEX that a period does not end a sentence, place a backslash followed by a blank immediately after the period. Example: Cameron et al.\ If you want a period after an uppercase letter to end a sentence, type \@ immediately after the period. For example: DO NOT REMOVE YOUR LAPTOP CASE.\@ It would void your warranty.

Periods That Don t End Sentences: Examples Look for common abbreviations. Here are some examples: et al.: Using et al. without a ~\cite{} command immediately after it. Titles of people: Dr. or Mr. or Mrs. or other abbreviated titles. Type Dr.\ Peter Graham, for example. etc.: Note that you should avoid etc. as much as possible and certainly not end a sentence with etc. Special case: i.e. and e.g. should each be followed immediately by a comma i.e., and e.g., so you don t need to type \ after them.

Correct Quotation Marks Here is what correct quotation marks look like: Be careful how you type in your quotes, she said. In elementary school, we referred to them as 66 and 99. To get correct quotes: Opening double quotes: Type two single back quotes with no space between. Closing double quotes: Type two single forward (ordinary) quotes with no space between them.

Quoting Someone Else s Words Remember that you must: indent the copied text, put quotation marks around the copied text, provide a reference to the original document (the one that you copied the text from) immediately before the copied text, and provide a complete bibliographic entry for the original document in a References section at the end of your document.

Direct Quotations in L A TEX Gunawi et al.~\cite{gun} conclude that \begin{quote} Adding reliability through the I/O shepherd was simple in some ways and challenging in others. \end{quote} Gunawi et al. [1] conclude that Adding reliability through the I/O shepherd was simple in some ways and challenging in others.

Advice Learn to let L A TEX do the formatting. Microsoft Word makes you do the formatting. L A TEX is expert at formatting.

There s Lots More! You can do a table of contents and an index. You can split your L A TEX source into multiple files. And there s lots of other things L A TEX can do!

Haryadi S. Gunawi, Vijayan Prabhakaran, Swetha Krishnan, Andrea C. Arpaci-Dusseau, and Remzi H. Arpaci-Dusseau. Improving file system reliability with I/O shepherding. ACM SIGOPS Operating Systems Review, 41(6):293 306, December 2007.