LaTeX Short Course Blake Larson, instructor

Slides:



Advertisements
Similar presentations
Copyright © 2003 Pearson Education, Inc. Slide 1-1 The Web Wizards Guide to PHP by David A. Lash.
Advertisements

Introducing JavaScript
Introduction to FX Equation 4. The Basic Idea FX Equation is DIFFERENT. Most equation editors use a point and click interface that has you searching for.
Student Manager Catalog Builder An ACEware Webinar.
Microsoft Word Objectives: Word processing using Microsoft Word
Cycle 2: Unit 15 Century 21 Keyboarding
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. Office Word 2003 Lab 3 Creating Reports and Tables.
1 Web Wizards Guide To PHP David Lash Chapter 1 Introduction to PHP.
Senior Project – I.D. Math & Computer Science jsMath Equation Editor Dana Cartwright Advisors – Prof. Cervone & Prof. Striegnitz Editor Design -
Programming Introduction November 9 Unit 7. What is Programming? Besides being a huge industry? Programming is the process used to write computer programs.
XP Tutorial 1 New Perspectives on JavaScript, Comprehensive1 Introducing JavaScript Hiding Addresses from Spammers.
Chapter 12: Network Programming Desktop Publishing Translator models Latex Documentation Preparation Postscript programming language WYSIWIG Editors.
Chapter 3: Introduction to C Programming Language C development environment A simple program example Characters and tokens Structure of a C program –comment.
LaTeX Tutorial. What is LaTeX? TeX is a typesetting system designed in 1978 to automate the production of high quality print using any type of computer.
Introducing HTML & XHTML:. Goals  Understand hyperlinking  Understand how tags are formed and used.  Understand HTML as a markup language  Understand.
Word Processing basics
For AMS 200, 2009 Dept. of Applied Math & Statistics School of Engineering University of California Santa Cruz, CA A Very Short Introduction to LaTeX.
Creating a Simple Page: HTML Overview
Research Tools: LaTex A high quality document preparation system by Karthikeyan Umapathy.
Internet Skills An Introduction to HTML Alan Noble Room 504 Tel: (44562 internal)
Introduction to… About Tex & LaTeX What is TeX? What is LaTeX? Advantages - Disadvantages.
JavaScript, Fifth Edition Chapter 1 Introduction to JavaScript.
Introduction to LaTeX CS157b John Eagle. TeX TeX is a computer program created by Donald E. Knuth. It is aimed at typesetting text and mathematical formulae.
Introduction to Unix – CS 21 Lecture 16. Lecture Overview LaTeX History Running and creating LaTeX documents Documents and Articles Tables Lists Fonts.
Introduction to LaTeX Thomas Gorry. What is Latex?  A typesetting system used to produce professional looking documents.  Particularly good at handling.
Introduction to XML 1. XML XML started out as a standard data exchange format for the Web Yet, it has quickly become the fundamental instrument in the.
Tutorial 1 Developing a Basic Web Page. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives – Lesson 1 Introduction to the.
Using Html Basics, Text and Links. Objectives  Develop a web page using HTML codes according to specifications and verify that it works prior to submitting.
Chapter 2 HTML Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
XP Mohammad Moizuddin Creating Web Pages with HTML Tutorial 1 1 New Perspectives on Creating Web Pages With HTML Tutorial 1: Developing a Basic Web Page.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 2 Input, Processing, and Output.
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
XP 1 HTML Committed to Shaping the Next Generation of IT Experts. 01: Introduction to HTML.
HTML Hyper Text Markup Language A simple introduction.
A Basic Web Page. Chapter 2 Objectives HTML tags and elements Create a simple Web Page XHTML Line breaks and Paragraph divisions Basic HTML elements.
IS1811 Multimedia Development for Internet Applications Lecture 4: Introduction to HTML Rob Gleasure
Intro and Review Welcome to Java. Introduction Java application programming Use tools from the JDK to compile and run programs. Videos at
Microsoft Word ITE115 Trisha Cummings. MsWord - Word Processing Program Allows you to create Letters, Envelopes, Mailing Labels, Memo’s , Fax’s.
Previous Page Next Page EXIT Created by Professor James A. Sinclair, Ph.D. MMXI Working with Fractions Continued 3 4, Proper fractions Proper fractions.
June LaTeX " A typesetting package for formatting and creating documents. Created by L. Lamport based on TeX designed by D. Knuth. " Alphanumeric.
Programming Fundamentals. Today’s Lecture Why do we need Object Oriented Language C++ and C Basics of a typical C++ Environment Basic Program Construction.
McGraw-Hill Career Education© 2008 by the McGraw-Hill Companies, Inc. All Rights Reserved. Office Word 2007 Lab 3 Creating Reports and Tables.
SIGNewGrad: Intro to LaTeX
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 2 Key Concepts 1 Copyright © Terry Felke-Morris.
L. Anne Spencer (c) 2001 Basic Web Design Document, text, & layout formatting tags & attributes.
Seminar Sam Panzer. Good Evening, and Welcome First, an overview of what these seminars will cover Topics: – What you need to get started – What LaTeX.
Internet & World Wide Web How to Program, 5/e © by Pearson Education, Inc. All Rights Reserved.
 2008 Pearson Education, Inc. All rights reserved JavaScript: Introduction to Scripting.
Formatting Text with HTML. Objectives: Students will be able to: Define the structure of the document with block elements Format numbered, bulleted, and.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
HTML HYPER TEXT MARKUP LANGUAGE. INTRODUCTION Normal text” surrounded by bracketed tags that tell browsers how to display web pages Pages end with “.htm”
Internet & World Wide Web How to Program, 5/e © by Pearson Education, Inc. All Rights Reserved.
L071 Introduction to C Topics Compilation Using the gcc Compiler The Anatomy of a C Program Reading Sections
1 PROJECT 3 WEB/HTML PROJECT USING NOTEPAD Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,
Department of Mathematics, Jazan University, Jazan.
LaTex -Computer scientist named Donald Knuth developed the program called Tex, in 1978.(mainly focused on formulae) -Later a mathematician and computer.
LaTeX Tutorial. What is LaTeX? TeX is a typesetting system designed in 1978 to automate the production of high quality print using any type of computer.
LATEX By GerardoVela 3/27/2015.
Chapter 6 JavaScript: Introduction to Scripting
Introduction to LaTeX David and Lucas CS 173 Fall 2009
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
A Very Short Introduction to LaTeX
Outline Basic English Information Inquiry Reading Technical Materials
A high quality document preparation system
Making Math Look Pretty – or How to Use LaTeX
Presentation transcript:

LaTeX Short Course Blake Larson, instructor

Acknowledgements Short course information by Rich Kaszeta on MENET website (heavily pilfered) Various other web sources (there are many!)

Schedule Day 1: –Basic LaTeX Introduction –Editors on MENET Machines –Running LaTeX, Previewing, and Printing –Basic LaTeX Classes and Environments –Math

Schedule, cont. Day 2 –Macros –Large Documents –Figures and Tables –Bibliographies –The thesis-me class –Add-ins, helpers, and other setups

LaTeX Advantages LATEX provides an easy-to-use method for producing high-quality typeset math. LATEX provides very high quality typeset output which pays attention to fine typographical details such as math typesetting, ligatures (i.e. `’ instead of `fi'), advanced font handling (with both slanted and italics text, which are slightly different), and hyphenation that are often handled poorly in WYSIWYG programs. The LATEX markup language lends itself to writing well-structured documents that are easy to modify. The user only needs to learn a few easy commands, and generally does not need to tinker with the actual layout of the document. Even complicated structures such as footnotes, cross-references, indices, tables of contents, and bibliographies are easily generated. The basic functionality of LATEX can be enhanced by using free add-on packages that provide features such as graphics, endnotes, etc. LATEX is freely available for almost every computer platform in existence.

LaTeX Disadvantages LATEX is not WYSIWYG – you have to run latex on your file before you can see your changes. If you are trying to produce a document for which there is no pre-defined layout, it requires a fair bit of knowledge to design a new layout. You cannot easily exchange LATEX files with colleagues that are unfamiliar with it.

Getting Started Make a new directory –cd ~ –mkdir latexcourse Open your favorite web browser to – texcourse/ texcourse/ Download all those files into your latexcourse directory

Official Process Create a simple text file with a.tex extension Run latex on the command line to get a.dvi file Print or preview the.dvi file

The approach for this course Create the text file as before, with a.tex extension Run pdflatex on the.tex file to create a standard.pdf file View the.pdf file using acroread This approach produces documents that we are more comfortable working with

Text Editors Choose your favorite editor to make your.tex file: –pico –emacs –vi –nedit –Notepad/Wordpad (Windows) –others…

Our First Document Open the sample file example1.tex in your favorite editor Note the basic parts: –\documentclass declaration –\begin{document} –\author, \title, and \maketitle –Document contents –\end{document} Run pdflatex example1 Run acroread example1.pdf

Basic Text Formatting Lines and Paragraphs –You can force new lines with \\ –You can force new pages with \newpage Hyphenation –You can enforce a hyphenation pattern with \hyphenation{} –You can keep hyphenation from occurring with \mbox{} Quotes and Dashes –Quotes are entered with `, ‘, ``, ’’ (not “ ) –Dashes are entered with -, --, and ---

Other Characters Accents (dots, tildes, etc.) Symbols (daggers, copyright, etc.) (see Basic LaTex Skills handout for details)

Sectioning Commands –\part{} –\chapter{} –\section{} –\subsection{} –\subsubsection{} –\paragraph{} –\subparagraph{} Each of the above has an unnumbered “starred” form (i.e. \section*{} )

Labels and References At almost any point in the document you can place a “label” using \label{key}, where the argument is a “key”, a short one word description of the location. You can refer to this label by section and page number using \ref{key} and \pageref{key}, respectively. Advanced: you can use \autoref{key} to automatically place the proper label (i.e. Section 2.1 or Table 1.1 instead of just 2.1 or 1.1). Must include the hyperref package.

Sizes \tiny \scriptsize \footnotesize \small \normalsize \large \Large \LARGE \huge \Huge Note these are declarations, so the proper syntax is {\Large Text}

Environments For special purpose text such as lists, quotations, poetry verse, and aligned text, LATEX provides environments. To use an environment, you use \begin{} and \end{} : \begin{environment} \end{environment} where environment is the name of the particular environment.

Lists Two of the simplest environments are list environments. The first is the itemize environment. Each item starts with \item : \begin{itemize} \item First item. \item Another item. \item Yet another item. \end{itemize} The enumerate environment does the same thing, but numbers the entries.

Alignment Environments The next simplest environments are the alignment environments center, flushleft, and flushright, which align the text accordingly. For example, the center environment centers the text: \begin{center} Centered Text \end{center} Centered Text

Math LATEX provides two basic methods of typesetting math, “inline” which occursinside of a sentence: a = b + c, and “displayed”, which occurs centered between paragraphs: a = b +c To typeset material in inline mode, surround it with dollar signs: $...$. Thus, $A=bh$ yields A = bh.

Displayed Equations To type displayed math, use \[ and \] instead. So \[A=bh\] yields A = bh If instead you use the equation environment instead of \[ and \], you get the same results, but with an equation number: A = bh (1) Note that if you put a \label in here, you can refer to that equation number elsewhere in the text.

Differences from Text Mode Spaces in math mode are ignored. No empty lines are allowed. Letters are italicizes All letters are typed as single variables, not words. So $effective$ (e f f ective) typsets much differently from “effective”

Basic Math Building Blocks Sub/superscripts are produced with _ and ^. For example, $p_2$ gives p 2 and $x^y$ gives x y. Note these only work on a single character - to sub – or superscript an expression surround it with curly braces. Fractions are produced using \frac, which takes two arguments, one for the numerator and one for the denominator. $\frac{5}{8}$ yields a ⅝.

More Basic Math Radicals are produced using \sqrt, with $\sqrt{x}$ yielding the square root of x and $\sqrt[3]{2}$ yielding the cube root of 2 Lowercase Greek Letters are given by simply spelling out the letter as a macro, $\delta$ yielding δ, etc. Uppercase Greek letters are the same, except the macro name is capitalized, $\Omega$ yielding Ω, etc.

Math Exercises How would you typeset:

Answers to Exercises 1.$y=\sqrt[z]{x^2+w_2^2}$ 2.$\sigma=\frac{\Omega^{x}+y_2}{\sqrt{x}}$ 3.$\sqrt[n+1]{a}$ 4.$\tau_{xy}''$

Spacing Sometimes you may wish to “tweak” the spacing in math mode. The followingmacros are provided for this purpose: \, thin space \: medium space \! negative thin space \; thick space

Integrals and Summations To do integrals and summations, simply put in a \int. For example, \[\int x\,dx\]( note the spacing factor) To add limits, simply sub and superscript the integral, \[\int_0^\infty x\,dx\], To do summations, simply do the same thing with \sum.

Parentheses, Braces, etc. To use parentheses and braces, simple type the character for them. For curly braces, you have to type \{ and \} since { and } are reserved for defining groups. However, if you want to type large expressions containing symbols such as integrals and fractions, it is nice to have larger versions of these delimiters. If you preface the delimiters with \left and \right, you get larger symbols that are (usually) the right size. Example: \[\left(\frac{\int_0^l x\,dx}{\Delta x}\right)\] gives a

More Math Exercises Typeset the following:

Answers to More Examples 1.$1+\left(\frac{1}{1- x^2}\right)^3$ 2.$\pi(n)=\sum_{k=2}^{n}\left[\f rac{\phi(k)}{k-1}\right]$ 3.$\Delta x=x_{\mathrm{max}}- x_{\mathrm{min}}$ 4.$A=\int_0^\pi r^2\,dr$

Common Mistakes Sometimes LATEX will give you errors when you try to run it because of problems with your input le. As mentioned earlier, sometimes the location of the error that LATEX reports may not be correct, so it is useful to know what usually causes these problems. Usual sources of error include: –Misspelled command or environment names –Missing or improperly nested \end statements. –Improperly matched { and }. They should always come in pairs. –Missing command arguments. –A missing $. –Using one of the special LATEX characters such as #.

Thursday’s Schedule Day 2 –Macros –Large Documents –Figures and Tables –Bibliographies –The thesis-me class –Add-ins, helpers, and other setups