CMSC 601 LaTeX Spring 2011 Tim Finin

Slides:



Advertisements
Similar presentations
EndNote. What is EndNote:  EndNote is referencing software that enables you to create a database of references from your readings. Your database of references.
Advertisements

Lecture 8 Introduction to Latex. Introduction TeX is essentially a Markup Language (like HTML, XML and RTF) TeX written by Donald Knuth in 70´s –A revolution.
Some LaTeX features By Andreas Grondoudis 1. Contents This week we'll look at some TeX features Before specifics – Already uploaded on my website; the.
COE201 – Computer Proficiency Mr. Hamze Msheik
PZ14A Programming Language design and Implementation -4th Edition Copyright©Prentice Hall, PZ14A - Text processing Programming Language Design and.
Introduction to LaTeX CPS470 Software Engineering Fall 1998.
LaTeX 2e Basics CSE470 Fall 2000 Software Engineering B.J. Czerny Updated by J. Brown, A. Subramanian.
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.
1 LaTeX Introduction Wenguang Wang Department of Computer Science University of Saskatchewan February 28, 2000.
© 2002 ComputerPREP, Inc. All rights reserved. Word 2000: Working with Long Documents.
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…
Research Tools: LaTex A high quality document preparation system by Karthikeyan Umapathy.
Graduate Thesis Seminar Week 1: Latex and HTML Jonas Braasch.
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.
Introduction to Latex A very quick look at typesetting documents Andrei Gurtov (based on Troy D. Milner and Simon Cuce slides)
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.
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.
Committed to Shaping the Next Generation of IT Experts. Exploring Microsoft Office Word 2007 Chapter 4: Share, Compare and Document Robert Grauer, Keith.
Committed to Shaping the Next Generation of IT Experts. Exploring Microsoft Office Word 2007 Chapter 4: Share, Compare and Document Robert Grauer, Keith.
CC510 - LaTeX 1 Lecturer - 김한규 (Hangyu Kim) 1CC510 – 2011.
Intro to LaTeX WING meeting 12 Jan What’s LaTeX? >An alternative to using MS Word for writing reports and papers >Our target today: HYP Thesis.
LaTeX (+ BibTeX) Tutorial
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.
CMSC 601 LaTeX 101 Spring 2011 Tim Finin
BRIEF A BRIEF Introduction to L A T E X For Physics Graduate Students Prof. L. S. Pinsky Physics Department University of Houston.
Creating documents 09/18/13 Introduction to Latex.
McGraw-Hill Career Education© 2008 by the McGraw-Hill Companies, Inc. All Rights Reserved. Office Word 2007 Lab 3 Creating Reports and Tables.
Sukree Sinthupinyo Department of Computer Engineering Chulalongkorn University 13 June 2008.
SIGNewGrad: Intro to LaTeX
1 EndNote X2 Your Bibliographic Management Tool 29 September 2009 Humanities and Social Sciences Resource Teams.
Text processing Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section 12.1.
The How and Why of LaTeX February 2013 Tim Finin
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.
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.
1 ACCESSING THE PURDUE LIBRARY DATABASES AND ONLINE JOURNALS September 14, 2006.
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.
Introduction to Latex CE Dep, IAUSDJ.ac.ir (14 Dec, 2016)
LATEX By GerardoVela 3/27/2015.
Lecture 1 Introduction to Latex
Sébastien Le Roux.
By Rajyalakshmi Divi IIT Bombay
Introduction to LaTeX David and Lucas CS 173 Fall 2009
LaTeX Tutorial.
LaTeX is not... rubber a Bill Gates product WYSIWYG (see) VooDoo
Basic usage and packages of TEX
ICT Word Processing Lesson 1: Introduction to Word Processing
A Very Short Introduction to LaTeX
Text processing Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section 12.1.
A high quality document preparation system
Making Math Look Pretty – or How to Use LaTeX
LaTeX A typesetting package for formatting and creating documents. Created by L. Lamport based on TeX designed by D. Knuth. Alphanumeric source files are.
Welcome To Microsoft Word 2016
TERMS AND CONDITIONS   These PowerPoint slides are a tool for lecturers, and as such: YOU MAY add content to the slides, delete content from the slides,
Presentation transcript:

CMSC 601 LaTeX Spring 2011 Tim Finin

Objective Understand the role of LaTeX in your research Learn how to create a simple LaTeX2e document – Create a LaTeX source file – Create and include figures – Reference figures and sections – Create lists – Include other tex files – Generate pdf output – Cite bibliographic references

History: TeX and LaTeX Donald Knuth created TeX in the late 70s so he could typeset his famous Art of Computer Programming booksTeX TeX produced great output and was very powerful (and programmable) but also very obscure Leslie Lamport of SRI produced LaTeX in the ealry 80s as a macro package making TeX easy to useLaTeX I’ve never know anyone who used TeX directly

Other Options Microsoft Word is a great product – Track changes is a great feature – You can’t beat it for small documents HTML is fine if your target is a screen – The W3C does all of its documentation in HTML – The Kindle ebook format is HTML Google Docs is up and coming – great for real-time collaboration That’s about it these days – No one uses Tj6, Scribe, Pub, troff, WordPerfect, …

Why LaTeX?

Why LaTeX It’s good for complex documents like a dissertation It’s the standard for Computer Science, Mathematics and many other STEM fieldsSTEM fields – Many conferences have their own LaTex document – Elsevier uses LaTeX to typeset all their journals LaTeX’s bibliography system, BibTex, is the best LaTex is programmable! LaTeX is open source software, has a large community of users and developers and a good infrastructure (e.g., CTAN)CTAN

Accessing LaTeX Latex and associated tools are typically pre- installed on Linux and Mac OS X They are also on the CSEE servers and gl Use Miktex for WindowsMiktex

sample.tex \documentclass[12pt]{article} \usepackage{times} \begin{document} \title{Hello World in LaTeX} \author{My Name Goes Here} \maketitle Hello, world! {\em Hello, world!} {\bf Hello, world!} {\Large \bf Hello, world!!!} \end{document} Start by declaring the document type (article) and use the 12pt option setting the font size Loads required packages defining commands or setting parameters LaTex uses begin|end commands for blocks. Every document must have a document block The title and author command set document variables and the maketitle command generates the output text Latex comands start with a backslash, required args are in {}, options in []s Paragraphs are separated by blank lines {}s introduce un-named blocks and control scope. \em for italics, \bf for bold, \Large to increase font size

f.aux Compiling with pdflatex > pdflatex sample This is pdfTeX, Version (TeX Live 2009) entering extended mode (./sample.tex LaTeX2e... (/usr/local/texlive/2009/texmf-dist/tex/latex/base/article.cls Document Class: article 2007/10/19 v1.4h Standard LaTeX document class (/usr/local/texlive/2009/texmf-dist/tex/latex/base/size12.clo))... Output written on sample.pdf (1 page, bytes). Transcript written on sample.log. f.tex pdflatex f.pdf

Compiling, old school > latex sample This is pdfTeX, Version (TeX Live 2009)... Output written on sample.dvi (1 page, 652 bytes). Transcript written on sample.log. > dvips sample -o sample.ps This is dvips(k) 5.98 Copyright 2009 Radical Eye Software ( ' TeX output :0857' -> sample.ps... > ps2pdf sample.ps > f.tex latex dvips f.dvi f.ps ps2pdf f.pdf

Output files > ls -l sample* -rw-r--r-- 1 finin staff 8 Jan 31 08:57 sample.aux -rw-r--r-- 1 finin staff 652 Jan 31 08:57 sample.dvi -rw-r--r-- 1 finin staff 3363 Jan 31 08:57 sample.log 1 finin staff 3336 Jan 31 09:00 sample.pdf -rw-r--r-- 1 finin staff Jan 31 08:58 sample.ps -rw-r--r-- 1 finin staff 237 Jan 31 08:33 sample.tex

Files LaTeX Uses Input source file (.tex) Files containing structure and layout definitions (.sty) Tex formatted output file (.dvi) Others:.toc (table of contents),.lof (list of figures),.lot (list of tables),.bib (bibliography)

Document Classes There are standard document classes: article, report, book, slides, letter \documentclass[11pt,letterpaper]{article} Conferences and journals publish their own \documentclass[10pt,journal,compsoc]{IEEEtran} \documentclass[runningheads,a4paper]{llncs} These an be further customized via packages \usepackage{graphicx} \usepackage{algorithm} – Using additional packages

Including Other LaTeX Files Supports modularity – a single LaTeX document can consist of multiple LaTeX files – Very useful for group work, e.g., many authors using SVN \input{intro} – used to include other Latex files – Latex filename is intro.tex \documentclass[letterpaper]{article} \usepackage{aaai} \usepackage{times} \usepackage{graphicx} % comment: more here \begin{document} \include{title} \include{intro} \include{motivation} \include{related} \include{approach} \include{evaluation} \include{conclusion} \include{bibliograph} \end{document} \documentclass[letterpaper]{article} \usepackage{aaai} \usepackage{times} \usepackage{graphicx} % comment: more here \begin{document} \include{title} \include{intro} \include{motivation} \include{related} \include{approach} \include{evaluation} \include{conclusion} \include{bibliograph} \end{document} A typical top level file

Fall 1998CPS 470 Software Engineering 15 More Complex LaTeX File \documentclass[12pt]{article} \usepackage{doublespace,epsfig} \usepackage{../custom} \begin{document} \input{abstract} \section{Sample Section} \label{s:sample} Text goes here... \end{document}

Cross-references \label{key-string} – assigns the key key-string to the current element of the document \ref{key-string} – inserts a string identifying the element to which key- string refers \pageref{key-string} – inserts the page number on which the element referenced by key-string appears

Fall 1998CPS 470 Software Engineering 17 Cross-reference Example Figure~\ref{f:figexample} in Section~\ref{s:sample} is on page~\pageref{f:figexample}. Figure 1 in Section 1 is on page 1.

Including a Figure \begin{figure} [htbp] \centerline{\epsfig{figure=figname.eps, height=2.5in,silent=,clip=}} \caption{\label{f:figexample} Example of a figure.} \end{figure}

Fall 1998CPS 470 Software Engineering 19 Making a List \begin{itemize} % \begin{enumerate} \item Text for this item. \end{itemize} % \end{enumerate}

Table of Contents Contains section headings and page number where each section starts. \tableofcontents Causes LaTeX to generate a.toc file Must run LaTeX on the file at least twice: – On the first pass, LaTeX collects information – On the second pass, LaTeX reads back information and typesets it.

List of Figures Contains caption text of the figures and page number where each figure appears. \listoffigures – Causes LaTeX to generate.lof file. As for the table of contents, must run LaTeX at least twice.

Bibliographies and BIBTeX Must create a bibliography “database” –.bib file – formatted by keyword, readable by BIBTeX Bibliographies can have different formats yet the same.bib file (alphabetical, order of citation, etc.) BIBTeX formats entries based on the bibliography style chosen (.bst or.sty) – ieeetr, plain, alpha, acm, etc.

BIBTeX Entry Entry type – book, article, inproceedings, etc. Keyword identifying publication – should be unique for each entry Series of fields for each type – author, title, journal, etc.

Referencing.bib entry \cite{keyword} \nocite{key1, key2, key3,…} example: In \cite{pressman97}, the characteristics of software are discussed. In [1], the characteristics of software are discussed.

BIBTex and LaTeX Command sequence – latex file.tex – bibtex file – latex file – May have to latex file again if unresolved references

Format Sections – \section{…} = 1. Latex is Great – \subsection{…} = 1.1 Why Latex is Great – \subsubsection{…} = Reason One – \appendix - changes numbering scheme – \chapter{…} - To be used with book and report document classes Titles, Authors and others – \title{…} \author{…} – \footnote{…}

Lists Source – \begin{itemize} – \item Apple – \item Orange – \end{itemize} Result – Apple – Orange

Group Group is some text between { and } Many commands work until the end of the group Code – put {one word \bf in bold} here Result – put one word in bold here

Alignment Environments center, flushleft, flushright Example – \begin{flushright} – Right aligned – \end{flushright} Result Right aligned

Font size \tiny \scriptsize \footnotesize \small \normalsize \large \Large \LARGE \huge \Huge

Example of Latex document \documentclass{article} \title{Simple Example} \author{Andrei Gurtov} \date{March 2000} \begin{document} \maketitle Hello world! \end{document}

Tabular Columns – \begin{tabular}{|…|…|} – \end{tabular} Rows – & - Split text into columns – \\ - End a row – \hline - Draw line under row – e.g & 34.00\\ \hline Two Columns l = automatically adjust size, left justify r = automatically adjust size, right justify p = set size e.g p{4.7cm} c = centre text

Example of table \begin{tabular}{|l|r|c|} \hline Date & Price & Size \\ \hline Yesterday & 5 & big \\ \hline Today & 3 & small \\ \hline \end{tabular}

Floating Objects Floating objects can stop splitting of tables and images over pages. \begin{figure}[options] \end{figure} \begin{table}[options] \end{table} They will now appear in the – List of Figures (LOF) and – List of Tables (LOT). Options (recommendations) h = place table here t = place at top of page b = place at bottom of page

Example of floating figure \begin{figure}[ht] \centering\epsfig{file=uni.ps, width=5cm} \caption{University of Helsinki} \label{uni} \end{figure} Figure~\ref{uni} shows...

Images Use epsfig package \usepackage{epsfig} Including images in main body \epsfig{file=filename.eps, width=10cm, height=9cm, angle=90} Creating EPS - Use xv and/or xfig. MS Power Point, save as GIF and convert to EPS.

Bibliography by hand \begin{thebibliography}{} \bibitem[Come95]{Come95} Comer, D. E., {\it Internetworking with TCP/IP: Principles, Protocols and Architecture}, volume 1, 3rd edition. Prentice-Hall, \end{thebibliography}

Bibliography using Bibtex Bibliography information is stored in a *.bib file, in Bibtex format. Include chicago package – \usepackage{chicago} Set referencing style – \bibliographystyle{chicago} Create reference section by – \bibliography{bibfile with no extension}

Bibliography using author=“D. E. Comer”, title={Internetworking with TCP/IP: Principles, Protocols and Architecture}, publisher=“Prentice-Hall”, year=1995, volume=1, edition=“Third”}

Bibliography contd. Citing references in text – \cite{cuc98} = (Cuce 1998) – \citeN{cru98} = Crud (1998) – \shortcite{tom98} = (Tom, et. al. 1998) Creating Bibtex Files – Use Emacs with extensions. – or copy Bibtex entries from bibliography database.

Some Math \begin{center} {\large $$ y=\frac{a^3+2c_{x}}{1+\sqrt{b_{x}}} $$ \\ \vspace{0.2in} $$ Q=\sum_{i=1}^{j}\int_{\mu}^{\infty}f(x_{j}) dx $$ \\ \vspace{0.2in} $$ \Psi = \oint_{- \infty}^{\infty}f_{xy}({\frac{\partial Qx}{\partial Qy}})^{\Im_{\pi}^ \prime} $$ \\ }

Tools UNIX based systems – xdvi, ghostview, fixps, emacs with latex/bibtex support. Windows 98/NT – Ghostview, Acrobat Distiller, Acrobat Reader, Scientific Workplace (not the best), the Bibtex viewer is good. Paint Shop Pro, Latex and Emacs

Conclusions Latex is optimal for master and phd thesis? Mathematical formulae are easy. Use bibtex search engines Consider converting Postscript files to PDF (more widespread in Windows world) and to conserve space.