Visualizing and Presenting1Söhn (SS 2008) Visualizing and Presenting in Research and Teaching Introduction to LaTeX Jan-Philipp Söhn Adapted from David.

Slides:



Advertisements
Similar presentations
Computers: Tools for an Information Age Writing Your Own Web Page: Using HTML and Web Authoring Tools.
Advertisements

DOCUMENT TYPES. Digital Documents Converting documents to an electronic format will preserve those documents, but how would such a process be organized?
Internet Services and Web Authoring (CSET 226) Lecture # 5 HyperText Markup Language (HTML) 1.
A complete citation, notecard, and outlining tool
Unit 3 Day 4 FOCS – Web Design. No Journal Entry.
LaTeX tutorial Eileen Kraemer CSCI 6950 September 30 th, 2011.
Lesson 16 Enhancing Documents
Cleveland State University EEC 414/503, ESC 720 Writing in Electrical and Computer Engineering Lecture 13 Technical Typesetting with LaTeX Dan Simon.
157A, Fall Semester 2006 Brent Turner. Presentation Contents: 1. What Is LaTeX? 2. History of LaTeX 3. LaTeX Use 4. Typesetting – HTML vs. LaTeX 5. LaTeX.
Introduction to LaTeX CPS470 Software Engineering Fall 1998.
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. Office Word 2003 Lab 3 Creating Reports and Tables.
LaTeX 2e Basics CSE470 Fall 2000 Software Engineering B.J. Czerny Updated by J. Brown, A. Subramanian.
23-Jun-15 HTML. 2 Web pages are HTML HTML stands for HyperText Markup Language Web pages are plain text files, written in HTML Browsers display web pages.
LaTeX 2e Basics CSE470 Spring 2000 Software Engineering B.J. Czerny Updated by Prasad.
Chapter 12: Network Programming Desktop Publishing Translator models Latex Documentation Preparation Postscript programming language WYSIWIG Editors.
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.
Other Features Index and table of contents Macros and VBA.
1 LaTeX Introduction Wenguang Wang Department of Computer Science University of Saskatchewan February 28, 2000.
For AMS 200, 2009 Dept. of Applied Math & Statistics School of Engineering University of California Santa Cruz, CA A Very Short Introduction to LaTeX.
Welcome to the 3-day Workshop on > Presented by Saeid Abolfazli Faculty of Computer Science and IT University Malaya 23,24, and.
Adopted from: PRISM Brownbag Series June 9 th, 2009 Byungwon Woo.
LaTeX tutorial Syed Shazli. Most of the material taken from Monash University Online material available from Googling…
Computer Science : Information Systems Design and Development Unit Web Sites - National 4 / 5 St Andrew’s High School-Revised January 2013 Slide 1 St Andrew’s.
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 LaTeX PRISM Brownbag Series June 9 th, 2009 Byungwon Woo.
Introduction to… About Tex & LaTeX What is TeX? What is LaTeX? Advantages - Disadvantages.
Basic Application Software Chapter 3. CE06_PP03-2 Basic Applications Called general-purpose or productivity applications Common types Word processors.
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.
LaTeX Tutorial Fiona Shearer May 11th, 2004 Disclaimer added
LATEXLATEX IPA – batch. LATEXLATEX  A document preparation system - pronounced as lay-tek  It is a markup and programming language created by.
LaTeX A Short Intro to Marco D. Santambrogio Politecnico di Milano Sala DEIB 2 Sept 2015 Ver. 2/9/15.
CC510 - LaTeX 1 Lecturer - 김한규 (Hangyu Kim) 1CC510 – 2011.
IS1811 Multimedia Development for Internet Applications Lecture 4: Introduction to HTML Rob Gleasure
Chapter 13. Applets and HTML HTML Applets Computer Programming with JAVA.
Just as there are many human languages, there are many computer programming languages that can be used to develop software. Some are named after people,
1 Lecture 4 A Brief Introduction to LaTeX Introduction to Information Technology Dr. Ken Tsang 曾镜涛
June LaTeX " A typesetting package for formatting and creating documents. Created by L. Lamport based on TeX designed by D. Knuth. " Alphanumeric.
1 LaTeX For Dummies Mulugeta Gebregziabher Division of Biostatistics and Epidemiology MUSC April 4, 2011.
Text, not Word Processing Gordon J. Pace March 2006 First steps.
Chapter 7 File I/O 1. File, Record & Field 2 The file is just a chunk of disk space set aside for data and given a name. The computer has no idea what.
Programming Fundamentals. Today’s Lecture Why do we need Object Oriented Language C++ and C Basics of a typical C++ Environment Basic Program Construction.
4 Chapter Four Introduction to HTML. 4 Chapter Objectives Learn basic HTML commands Discover how to display graphic image objects in Web pages Create.
McGraw-Hill Career Education© 2008 by the McGraw-Hill Companies, Inc. All Rights Reserved. Office Word 2007 Lab 3 Creating Reports and Tables.
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.
C151 Multiuser Operating Systems Introduction to LaTeX.
CSE470 Software Engineering Fall Tools - Overview LaTeX – Tool to create documents RCS – Revision Control System, to maintain multiple versions.
Chapter 5 More About LaTex. Packages A package, which takes the form of a file with a sty extension, can be used to alter formatting parameters, create.
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley What did we learn so far? 1.Computer hardware and software 2.Computer experience.
Information SKL for Graduate Students Instructors: Sina Mater 3 December 2010.
Writing Your Own Web Page: Using HTML and FrontPage Chapter 10.
R 賴威昇 Introduction 2. Why using LaTeX ? 3. LaTeX usage: ◦ Backbone ◦ Equation ◦ Figure ◦ Table ◦ BibTex 4. Compile 5. Conclusion.
Sébastien Le Roux. not What I am not going to talk about The explanations are in my HowTo ! Check my web IPCMS Basic tutorial to programming.
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.
Sébastien Le Roux.
Lesson 16 Enhancing Documents
Lesson 16 Enhancing Documents
GO! with Microsoft Access 2016
LaTeX Tutorial.
LaTeX is not... rubber a Bill Gates product WYSIWYG (see) VooDoo
Introduction to LaTeX David Squire
Basic usage and packages of TEX
A Very Short Introduction to LaTeX
A high quality document preparation system
Making Math Look Pretty – or How to Use LaTeX
Presentation transcript:

Visualizing and Presenting1Söhn (SS 2008) Visualizing and Presenting in Research and Teaching Introduction to LaTeX Jan-Philipp Söhn Adapted from David Squire’s slides. Cf. “The Not So Short Introduction to LATEX2e” by Tobias Oetiker

Visualizing and Presenting2Söhn (SS 2008) Preface  LaTeX is a typesetting system (not a word processor)  It is most suited to producing scientific and mathematical documents of high typographical quality.  LaTeX uses TeX as its formatting engine.  This short introduction describes LaTeX2e and should be sufficient for most applications of LaTeX.

Visualizing and Presenting3Söhn (SS 2008) Outline  Things you need to know...  Typesetting text  Typesetting mathematics  Including graphics  Bibliographies  Running LaTeX  Links to further resources

Visualizing and Presenting4Söhn (SS 2008) Things you need to know  The Name of the Game  Basics  LaTeX Input Files  Input File Structure  The Layout of the Document

Visualizing and Presenting5Söhn (SS 2008) The Name of the Game (1)  TeX was written by the legendary computer scientist Donald E. Knuth: It is intended primarily for typesetting text and mathematical formulae. The “X” stands for the Greek letter Chi. TeX is pronounced “Tech” with a “ch” as in the German word “Ach” or in Scottish “Loch”. It is definitely is not pronounced “ks”

Visualizing and Presenting6Söhn (SS 2008) The Name of the Game (2)   LaTeX is a macro package which enables authors to typeset their work at the highest typographical quality, using a predefined, professional layout.  LaTeX was originally written by Leslie Lamport. It uses the TeX for typesetting.  In 1995 the LaTeX package was updated. This version is called LaTeX2e.

Visualizing and Presenting7Söhn (SS 2008) Basics  Author, Book Designer, and Typesetter  Layout Design  Some Typography  Advantages and Disadvantages

Visualizing and Presenting8Söhn (SS 2008) Author, Book Designer, and Typesetter (1)  The traditional publishing process: author gives manuscript to a publishing company. a book designer from the publishing company decides the layout of the document (column width, fonts, etc.) the book designer writes his instructions into the manuscript and gives it to a typesetter the typesetter typesets the book according to these instructions.

Visualizing and Presenting9Söhn (SS 2008) Author, Book Designer, and Typesetter (2)  A human book designer tries to find out what the author had in mind while writing He decides on chapter headings, citations, examples, formulae, etc. based on his professional knowledge and the contents of the manuscript.

Visualizing and Presenting10Söhn (SS 2008) Author, Book Designer, and Typesetter (3)  LaTeX takes the role of the book designer and uses TeX as its typesetter.  But LaTeX is “only” a program and therefore needs more guidance.  The author has to provide additional information which describes the logical structure of his work.  This information is written into the text as “LaTeX commands.”  This is quite different from the popular WYSIWYG approach

Visualizing and Presenting11Söhn (SS 2008) Layout Design (1)  Typographical design is a craft: Unskilled authors often commit serious formatting errors by assuming that book design is a question of aesthetics. The readability and understandability of a document are much more important than its beauty, e.g. The font size and numbering of headings The line length must be short enough so as not to strain the reader’s eyes, but long enough to fill the page beautifully.

Visualizing and Presenting12Söhn (SS 2008) Layout Design (2)  With WYSIWYG systems, authors often generate aesthetically pleasing documents with very little, or inconsistent, structure  LaTeX prevents such formatting errors by forcing the author to declare the logical structure of the document LaTeX chooses the most suitable layout  Logical mark-up also improves the portability of documents Journals can use stylesheets to translate the logical mark-up into their in-house layout style

Visualizing and Presenting13Söhn (SS 2008) Some Typography (1)  Kerning and italics TeTeAVAV  Ligatures fi fi fl fl LaTeX cares about this automatically

Visualizing and Presenting14Söhn (SS 2008) Some Typography (2)  Justification  Orphans (have a future but no past)  Widows (have a past but no future)

Visualizing and Presenting15Söhn (SS 2008) Advantages and Disadvantages (1)  Advantages of LaTeX over WYSIWYG: professionally crafted layouts are available the typesetting of mathematical formulae is supported in a convenient way users need only to learn a few simple commands, which specify the logical structure of a document. They almost never need to tinker with the actual layout of the document

Visualizing and Presenting16Söhn (SS 2008) Advantages and Disadvantages (2)  Advantages of LaTeX over WYSIWYG: complex structures such as footnotes, references, table of contents, and bibliographies can be generated easily for many typographical tasks not directly supported by basic LaTeX, there exist free add-on packages LaTeX encourages authors to write well structured texts LaTeX is highly portable and free

Visualizing and Presenting17Söhn (SS 2008) Advantages and Disadvantages (3)  LaTeX also has some disadvantages: What you see is not what you get. Is this really a disadvantage? Why are you thinking about layout instead of content?

Visualizing and Presenting18Söhn (SS 2008) Advantages and Disadvantages (4)  LaTeX also has some disadvantages: More resources (memory, disk-space, computing power) are required to run a LaTeX system than a simple word processor, but Word for Windows 6.0 needs even more disk space than a normal LaTeX system. When it comes to processor usage, LaTeX beats any WYSIWYG system, as it only needs a lot of CPU time when a document is actually processed The design of a whole new layout is difficult and takes a lot of time.

Visualizing and Presenting19Söhn (SS 2008) LaTeX Input Files  The input for LaTeX is a plain ASCII text file.  You can create it with any text editor.  It contains the text of the document commands which tell LaTeX how to typeset the text. Spaces Special Characters LaTeX Commands Comments

Visualizing and Presenting20Söhn (SS 2008) Spaces  Whitespace characters (e.g. blank, tab, single linebreak) are treated uniformly as “space” by LaTeX. Several consecutive whitespace characters are treated as one ``space''.  An empty line between two lines of text defines the end of a paragraph. Several empty lines are treated in the same way as one empty line. It does not matter whether you enter one of several spaces after a word. An empty line starts a new paragraph. It does not matter whether you enter one or several spaces after a word. An empty line starts a new paragraph.

Visualizing and Presenting21Söhn (SS 2008) Special Characters  The following symbols are reserved characters, that either have a special meaning in LaTeX are not available in all the fonts. $ & % # _ { } ~ ^ \  Some of these characters can be used in your documents by adding a prefix backslash: $ & % # _ { } \$ \& \% \# \_ \{ \}  The other symbols (and many more!) can be printed with special commands in mathematical formulae or as accents.

Visualizing and Presenting22Söhn (SS 2008) LaTeX Commands (1)  LaTeX commands are case sensitive and take one of two formats: They start with a backslash \ and have a name consisting only of letters. Command names are terminated by a space, a number or any other “non- letter”. They consist of a backslash and exactly one special character.

Visualizing and Presenting23Söhn (SS 2008) LaTeX Commands (2)  LaTeX ignores whitespace after commands. If you want to get a space after a command, you have to put either {} and a blank or a special spacing command after the command name. I read that Knuth divides people working with TeX into TeXnicians and TeXperts. Today is March 25th, I read that Knuth divides people working with \TeX{} into \TeX{}nicians and \TeX perts. Today is \today.

Visualizing and Presenting24Söhn (SS 2008) LaTeX Commands (3)  Some commands take a parameter which has to be given between curly braces { } after the command name.  Some commands support optional parameters which are added after the command name in square brackets [ ].  The next example uses some LaTeX commands. Don't worry about them, they will be explained later. This is italicized text. Please start a new line right here! Thank you! This is \textit{italicized} text. Please start a new line right here!\linebreak[3] Thank you!

Visualizing and Presenting25Söhn (SS 2008) Comments  When LaTeX encounters a % character while processing an input file, it ignores the rest of the present line.  This is useful for adding notes to the input file, which will not show up in the printed version. This text is processed. This text is processed. % A comment isn’t

Visualizing and Presenting26Söhn (SS 2008) Input File Structure (1)  When LaTeX2e processes an input file it expects it to follow a certain structure. Every input file starts with the command: \documentclass{...} This specifies what sort of document you intend to write (article, letter, book etc.)  After that, you can include global style commands or you can load packages which add new features to the LaTeX system. To load a package you use the command: \usepackage{...}

Visualizing and Presenting27Söhn (SS 2008) Input File Structure (2)  When all the setup work is done, you start the body of the text with the command: \begin{document}  Now you enter the text mixed with some useful LaTeX commands.  At the end of the document you use the \end{document}  command, which tells LaTeX to finish. Anything which follows this command will be ignored by LaTeX

Visualizing and Presenting28Söhn (SS 2008) Input File Structure (3)  A minimal LaTeX file: \documentclass{article} \begin{document} Small is beautiful. \end{document}

Visualizing and Presenting29Söhn (SS 2008) Input File Structure (4)  A more realistic LaTeX file: \documentclass[a4paper,11pt]{article} \usepackage{latexsym} \author{H.~Partl} \title{minimalism} \begin{document} \maketitle \tableofcontents \section{Start} Here begins my lovely article \ldots \section{End} \ldots{} and here it ends. \end{document}

Visualizing and Presenting30Söhn (SS 2008) Typesetting Mathematics (1)  Type setting mathematics beautifully is perhaps the major strength of TeX and LaTeX - and perhaps the main reason for which researchers use them  LaTeX can typeset just about any mathematical thing you can imagine …and if you can’t do it with standard LaTeX then you almost certainly can with the amstex package (ams: American Mathematical Society)  Here we will just scratch the surface. See reference books or the web for lists and tables of LaTeX maths commands

Visualizing and Presenting31Söhn (SS 2008) To find the square of the hypotenuse, add a squared to b squared to find c squared, e.g.. It’s as easy as that! Typesetting Mathematics (2)  LaTeX has a special mode for typesetting mathematics, called “math mode”.  Within a paragraph, math mode is entered between $ characters, or by using the \begin{math} and \end{math} commands To find the square of the hypotenuse, add a squared to b squared to find c squared, e.g. $a^2 + b^2 = c^2$. It’s as easy as that!

Visualizing and Presenting32Söhn (SS 2008) Typesetting Mathematics (3)  Here are some more examples:  Larger mathematical formulae are best displayed on a single line: is pronounced [t . 100m 3 of water. \Tex is pronounced [t$\epsilon\chi$]. 100m$^3$ of water. To find the square of the hypotenuse, add a squared to b squared to find c squared,. It’s as easy as that! To find the square of the hypotenuse, add a squared to b squared to find c squared, \begin{displaymath} a^2 + b^2 = c^2. \end{displaymath} It’s as easy as that!

Visualizing and Presenting33Söhn (SS 2008) Typesetting Mathematics (4)  In a scholarly article or thesis, you will often want to number equations and refer to them in the text  This is done using the equation environment, and the commands \label and \ref  (note that \label and \ref are used with figures and tables too) … it is clear that  From Equation 1 it follows that... \ldots it is clear that \begin{equation} \epsilon > 0. \label{eq:eps} \end{equation} From Equation~\ref{eq:eps} it follows that \ldots

Visualizing and Presenting34Söhn (SS 2008) Including Graphics  LaTeX2e includes a standard package for including PostScript graphics in your document. Load it using \usepackage{graphics}  A figure can be included using, for example, \begin{figure}[ht] \begin{center} \includegraphics[width=140mm]{mypic.ps} \end{center} \caption{An example of a figure.} \label{fig:example} \end{figure}

Visualizing and Presenting35Söhn (SS 2008) Bibliographies (1)  Articles can be referred to in the text using the \cite command:  The details of the cited articles are stored in BibTeX format, in a “.bib” file.  BibTeX resolves the citations in the LaTeX file and generates the required bibliography By far the most commonly used feature is colour (e.g. [1,2,3]), usually computed in a colour space thought to be “perceptually accurate” (e.g. HSV [3] or CIE [4]. By far the most commonly used feature is colour (e.g.\ \cite{NBE1993,JaV1996,SmC1996a}), usually computed in a colour space thought to be ``perceptually accurate'' (e.g.\ HSV \cite{SmC1996a} or CIE \cite{STL1997}).

Visualizing and Presenting36Söhn (SS 2008) Bibliographies (2)  Example BibTeX entries from a.bib author ={N. Ahmed and K. Rao}, title ={Orthogonal transforms for digital signal processing}, publisher ={Springer-Verlag}, year ={1975}, address ={New York}, author ={James Austin and A. Phantom and Also Phantom}, title ={High Speed Invariant Recognition Using Adaptive Neural Networks}, booktitle ={IEE 3rd International Conference on Image Processing and its Applications}, year ={1989}, pages ={28--32}, abstract ={A method is described which...}, }

Visualizing and Presenting37Söhn (SS 2008) Running LaTeX (1)  The simplest way to run LaTeX on a source document is to do so at the UNIX command line:  This will create several files. If test.tex is a simple document, these will be: >latex test.tex test.aux # the auxiliary file that LaTeX will use in subsequent passes to resolve references to figures, tables, citations etc. test.log # a log file that contains information about the LaTeX run test.dvi # the DeVice Independent output file. This is the typeset document, ready for conversion to postscript or other printable formats

Visualizing and Presenting38Söhn (SS 2008) Running LaTeX (2)  We can view the document we have created using a DVI viewer. The most common one under UNIX is xdvi. Type >xdvi test to see the typeset document  It is important to realise that LaTeX sometimes needs to be run several times to resolve all references. This is because LaTeX reads such information from the.aux file at the start of a run If new information is written to the.aux file during the run, you will need to run LaTeX again. LaTeX will let you know about this, e.g. LaTeX Warning: Label(s) may have changed. Rerun to get cross references right.

Visualizing and Presenting39Söhn (SS 2008) Running LaTeX (3)  You also need to run LaTeX multiple times when you are using citations and bibtex  There are other ways of running LaTeX The most common under UNIX is probably from with XEmacs, using the AUCTeX package There are also integrated environments like this under windows (see next slide)  All this stuff is much easier to learn by trying it on a computer, rather than hearing it in a lecture…

Visualizing and Presenting40Söhn (SS 2008) Running LaTeX on Windows  First, download and install the Windows version of LaTeX  "Basic MiKTeX" Installer Adds MiKTeX\bin directory to PATH  Then, download and install a front end (editor and further features) Texnic Center ( Texmaker ( LEd (

Visualizing and Presenting41Söhn (SS 2008) Running LaTeX on Windows  Texniccenter Wizard: Path to TeX/LaTeX executables "C:\Program Files\MiKTeX 2.7\miktex\bin" TeX file loaded: Projekt > Erzeugen mit aktueller Datei als Hauptdatei verwendet BibTeX Projektsprache: en Ausgabeprofil: LaTeX => PDF Ausgabe erstellen (up to 3 times in a row to get no warnings!)

Visualizing and Presenting42Söhn (SS 2008) Further reading  This tutorial is largely based on parts of “The Not So Short Introduction to LaTeX2e” by Tobias Oetiker et al.  There are links to this and many more resources at the page:  These slides are for the most part made by David Squire