Document Preparation LaTeX and other vital tools for computing scientists. CMPUT 603: Teaching and Research Methods Paul Berube Sept. 19, 2005.

Slides:



Advertisements
Similar presentations
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.
Advertisements

Intermediate Level Course. Text Format The text styles, bold, italics, underlining, superscript and subscript, can be easily added to selected text. Text.
1 Unix Talk #2 AWK overview Patterns and actions Records and fields Print vs. printf.
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.
Copyright © 2003 by Prentice Hall Computers: Tools for an Information Age Chapter 12 Spreadsheets and Business Graphics: Facts and Figures.
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.
Teaching Advanced Word 2007  Carol M. Cram  Capilano University  North Vancouver, BC.
For AMS 200, 2009 Dept. of Applied Math & Statistics School of Engineering University of California Santa Cruz, CA A Very Short Introduction to LaTeX.
Advanced File Processing
Research Tools: LaTex A high quality document preparation system by Karthikeyan Umapathy.
Introduction to… About Tex & LaTeX What is TeX? What is LaTeX? Advantages - Disadvantages.
Computers: Tools for an Information Age Chapter 12 Spreadsheets and Business Graphics: Facts and Figures.
Introduction to Unix – CS 21 Lecture 16. Lecture Overview LaTeX History Running and creating LaTeX documents Documents and Articles Tables Lists Fonts.
Agenda Sed Utility - Advanced –Using Script-files / Example Awk Utility - Advanced –Using Script-files –Math calculations / Operators / Functions –Floating.
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.
Computers Are Your Future © 2006 Prentice-Hall, Inc.
June LaTeX " A typesetting package for formatting and creating documents. Created by L. Lamport based on TeX designed by D. Knuth. " Alphanumeric.
Advanced File Processing. 2 Objectives Use the pipe operator to redirect the output of one command to another command Use the grep command to search for.
Chapter Five Advanced File Processing Guide To UNIX Using Linux Fourth Edition Chapter 5 Unix (34 slides)1 CTEC 110.
Chapter Five Advanced File Processing. 2 Objectives Use the pipe operator to redirect the output of one command to another command Use the grep command.
BRIEF A BRIEF Introduction to L A T E X For Physics Graduate Students Prof. L. S. Pinsky Physics Department University of Houston.
Agenda Regular Expressions (Appendix A in Text) –Definition / Purpose –Commands that Use Regular Expressions –Using Regular Expressions –Using the Replacement.
Creating documents 09/18/13 Introduction to Latex.
1 Week 3: Introduction to Microsoft Excel Spreadsheet READING: Glade Manual Ch. 1.
Improving Postgraduate Learning LaTeX Advanced – Thesis Preparation Michael FUNG
4 Chapter Four Introduction to HTML. 4 Chapter Objectives Learn basic HTML commands Discover how to display graphic image objects in Web pages Create.
Introduction to Unix – CS 21 Lecture 12. Lecture Overview A few more bash programming tricks The here document Trapping signals in bash cut and tr sed.
McGraw-Hill Career Education© 2008 by the McGraw-Hill Companies, Inc. All Rights Reserved. Office Word 2007 Lab 3 Creating Reports and Tables.
Introduction to Enterprise Guide Jennifer Schmidt Rhonda Ellis Cassandra Hall.
SIGNewGrad: Intro to LaTeX
Introducing Python CS 4320, SPRING Lexical Structure Two aspects of Python syntax may be challenging to Java programmers Indenting ◦Indenting is.
Chapter Five Advanced File Processing. 2 Lesson A Selecting, Manipulating, and Formatting Information.
Text, not Word Processing Gordon J. Pace March 2006 Logical Organisation.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Working with Data Lists.
Lecture 3- Microsoft Word COE 201- Computer Proficiency.
TABLE OF CONTENTS 2014 BasmahAlQadheeb. What is a report? A report is a clearly structured document that presents information as clearly as possible.
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.
In the name of Allah. Scientific & Technical Presentation Leila Sharif Sharif University of Technology
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. A Concise Introduction to MATLAB ® William J. Palm III.
LESSON 7 REVIEW Casey Polera. Text Boxes Inset tab, in the text group Choose to draw one or use a given one Helps with entering text directly where you.
 The term “spreadsheet” covers a wide variety of elements useful for quantitative analysis of all kinds. Essentially, a spreadsheet is a simple tool.
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.
Vereniging voor Technische Physica workshop 2016.
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.
CSE 303 Concepts and Tools for Software Development Richard C. Davis UW CSE – 10/9/2006 Lecture 6 – String Processing.
CSE 374 Programming Concepts & Tools
Vereniging voor Technische Physica workshop 2016.
Bash Introduction (adapted from chapters 1 and 2 of bash Cookbook by Albing, Vossing, & Newham) CPTE 440 John Beckett.
Microsoft Office 2007-Illustrated
PROGRAMMING THE BASH SHELL PART IV by İlker Korkmaz and Kaya Oğuz
Microsoft Word Illustrated
By Rajyalakshmi Divi IIT Bombay
LaTeX Tutorial.
LaTeX is not... rubber a Bill Gates product WYSIWYG (see) VooDoo
Guide To UNIX Using Linux Third Edition
Unit# 6: ICT Applications
Benchmark Series Microsoft Word 2016 Level 2
A Very Short Introduction to LaTeX
Engineering Librarian
Outline Basic English Information Inquiry Reading Technical Materials
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
Presentation transcript:

Document Preparation LaTeX and other vital tools for computing scientists. CMPUT 603: Teaching and Research Methods Paul Berube Sept. 19, 2005

CMPUT 603, Paul Berube2 Anatomy of a Thesis 6 Chapters, 2 Appendixes 14 Section 18 Subsections 196 Charts 11 Figures 48 Tables 35 cited works

Sept. 19, 2005CMPUT 603, Paul Berube3 Data for a Thesis ~ 40,000 raw data files ~ 8,000 processed data files 865 charts 41 tables Charts and tables change when data changes!

Sept. 19, 2005CMPUT 603, Paul Berube4 Managing the Complexity Scripts to process data –Shell scripts, awk, bc, grep, sed, wc, etc… Non-interactive programs to create charts –Matlab, gnuplot A document preparation system that: –Decomposes and compartmentalizes writing –Integrates with other tools –Automates formatting and numbering

LaTeX

Sept. 19, 2005CMPUT 603, Paul Berube6 The Basics Commands start with a ‘ \ ’ –\chapter, \section, \subsection, \subsubsection –{\tt }, {\bf }, {\it } –\input{<filename} Some special characters: ‘#’, ‘&’, ‘\’, ‘{‘, ‘}’ –‘ ~ ’ : non-breaking space –‘ $ ’ : math mode, ‘ ^ ’ superscript, ‘ _ ’ subscript –‘ % ’ : comments

Sept. 19, 2005CMPUT 603, Paul Berube7 Document Structure Root File Intro.texResults.texConc.tex Fig1.epsSec1.texSec2.tex Tab.tex Local.bib Fig2.eps

Sept. 19, 2005CMPUT 603, Paul Berube8 Document Structure Root File Intro.texResults.texConc.tex Fig1.epsSec1.texSec2.tex Tab.tex Local.bib Fig2.eps xfig script gnuplot

Sept. 19, 2005CMPUT 603, Paul Berube9 The figure environment Used for inserting images, graphs, charts, etc… A “float” environment –Latex will put the figure where it thinks is best Figure 2, top of page 4: \begin{figure} \centering \includegraphics{motiv2.eps} \caption{Motivating Example.} \label{fig:motiv-exmp} \end{figure}

Sept. 19, 2005CMPUT 603, Paul Berube10 \begin{figure} \centering \includegraphics{motiv2.eps} \caption{Motivating Example.} \label{fig:motiv-exmp} \end{figure} Captions Caption

Sept. 19, 2005CMPUT 603, Paul Berube11 Labels & References \begin{figure} \centering \includegraphics{motiv2.eps} \caption{Motivating Example.} \label{fig:motiv-exmp} \end{figure} Label

Sept. 19, 2005CMPUT 603, Paul Berube12 Labels & References \begin{figure} \centering \includegraphics{motiv2.eps} \caption{Motivating Example.} \label{fig:motiv-exmp} \end{figure} Label Figure~\ref{fig: motiv -exmp} shows… Reference

Sept. 19, 2005CMPUT 603, Paul Berube13 Labels & References \begin{figure} \centering \includegraphics{motiv2.eps} \caption{Motivating Example.} \label{fig:motiv-exmp} \end{figure} Label Figure~\ref{fig: motiv -exmp} shows… Figure 2 shows… Reference

Sept. 19, 2005CMPUT 603, Paul Berube14 (conclusion.tex Overfull \hbox (196.49pt too wide) \begin{figure} \centering \includegraphics{motiv2.eps} \caption{Motivating Example.} \label{fig:motiv-exmp} \end{figure}

Sept. 19, 2005CMPUT 603, Paul Berube15 figure* Adding a ‘*’ lets a figure or table span the whole page in multi-column documents \begin{figure*} \centering \includegraphics{motiv2.eps} \caption{Motivating Example.} \label{fig:motiv-exmp} \end{figure*}

Sept. 19, 2005CMPUT 603, Paul Berube16 Tables Also a “float” environment \begin{table} \centering \begin{tabular}{|l|c|} \hline {\bf Evaluation Category} & {\bf Score} \\ How confident are [snip] & \\ \hline {\bf Reviewer Confidence} & \\ Are you convinced [snip] & \\ \hline \end{tabular} \caption{Peer-based referee report for \paper.} \label{tab:eval1} \end{table} Table 1, Page 3

Sept. 19, 2005CMPUT 603, Paul Berube17 \begin{table} \centering \begin{tabular}{|l|c|} \hline {\bf Evaluation Category} & {\bf Score} \\ How confident are [snip] & \\ \hline {\bf Reviewer Confidence} & \\ Are you convinced [snip] & \\ \hline \end{tabular} \caption{Peer-based referee report for \paper.} \label{tab:eval1} \end{table} Tables Also a “float” environment Table 1, Page 3 Table Format Specifier: -‘r’ : right-justified column -‘l’ : left-justified column -‘c’: center-justified column -‘|’ : vertical line

Sept. 19, 2005CMPUT 603, Paul Berube18 \begin{table} \centering \begin{tabular}{|l|c|} \hline {\bf Evaluation Category} & {\bf Score} \\ How confident are [snip] & \\ \hline {\bf Reviewer Confidence} & \\ Are you convinced [snip] & \\ \hline \end{tabular} \caption{Peer-based referee report for \paper.} \label{tab:eval1} \end{table} Tables Also a “float” environment Table 1, Page 3 & = column separator

Sept. 19, 2005CMPUT 603, Paul Berube19 \begin{table} \centering \begin{tabular}{|l|c|} \hline {\bf Evaluation Category} & {\bf Score} \\ How confident are [snip] & \\ \hline {\bf Reviewer Confidence} & \\ Are you convinced [snip] & \\ \hline \end{tabular} \caption{Peer-based referee report for \paper.} \label{tab:eval1} \end{table} Tables Also a “float” environment Table 1, Page 3 \\ = newline

Sept. 19, 2005CMPUT 603, Paul Berube20 \begin{table} \centering \begin{tabular}{|l|c|} \hline {\bf Evaluation Category} & {\bf Score} \\ How confident are [snip] & \\ \hline {\bf Reviewer Confidence} & \\ Are you convinced [snip] & \\ \hline \end{tabular} \caption{Peer-based referee report for \paper.} \label{tab:eval1} \end{table} Tables Also a “float” environment Table 1, Page 3 \hline

Sept. 19, 2005CMPUT 603, Paul Berube21 Text-figures To create a figure containing text, use a tabular inside a figure Works great for code segments, etc \begin{figure} \centering \begin{tabular}{|l|} \hline Title\\ 1. Introduction\\ Acknowlegments\\ \hline \end{tabular} \caption{Organization for \paper.} \label{fig:organization} \end{figure}

Sept. 19, 2005CMPUT 603, Paul Berube22 Other Table Tricks Multicolumn –\multicolumn{ }{ } Multirow –\multirow{ }*{ }

Sept. 19, 2005CMPUT 603, Paul Berube23 Enumeration Environments Not a float Enumerate : ordered list Itemize : unordered list Description : unordered list with item labels Canadian bands include: \begin{itemize} \item Chilliwack \item Harlequin \item The Guess Who \end{itemize}

Sept. 19, 2005CMPUT 603, Paul Berube24 Math Mode LaTeX is the tool to typeset mathematics and symbols $ $ : inline math $$ $$ : not-inline math

Sept. 19, 2005CMPUT 603, Paul Berube25 Make your own commands Customized commands –Shorthand –Help ensure consistency \def –\def\course{{\tt CMPUT}~603} This course is \course. \let, \newcommand, \newenvironment This course is CMPUT 603.

Sept. 19, 2005CMPUT 603, Paul Berube26 Citations & Bibliographies Bibtex makes it easy –Create a.bib file with your references –Cite references with \cite{ } in text –\cite{ }  [ ] in text, eg, [3] –Bibliography automatically generated with proper formatting –Bibliography only includes references you actually cite

Sept. 19, 2005CMPUT 603, Paul Berube27 Citations & Bibliographies.bib file

Sept. 19, 2005CMPUT 603, Paul Berube28 Citations & Bibliographies Optional Required Color-coded items

Sept. 19, 2005CMPUT 603, Paul Berube29 Citations & Bibliographies Fill in everything you can find out.

Sept. 19, 2005CMPUT 603, Paul Berube30 Citations & Bibliographies CTRL-C, CTRL-C to clean up bib entry

Sept. 19, 2005CMPUT 603, Paul Berube31 Things to read about Math mode Subfigures Tabularx environment Tabbing environment Minipages Algorithmics packages

Bash scripting See: Advanced Bash-Scripting Guide

Sept. 19, 2005CMPUT 603, Paul Berube33 Scripts Automate tedious tasks Tests and checks  more robust than manual execution “Glue” to bind a collection of tasks High-level programming –Scripts like a “meta-program”? Rely on common utilities to do the “real work”

sed See: Advanced Bash-Scripting Guide

Sept. 19, 2005CMPUT 603, Paul Berube35 Sed String manipluation utility Substitution –$> sed –e “s/hate/love/” file –$> find./data/ -name “*.data” | sed –e “s/\.\/data\///” < file Selection –$> sed –n –e “10p” file

awk See: Google

Sept. 19, 2005CMPUT 603, Paul Berube37 Awk Used to process data in plain-text formats C-like syntax Can address file data by column –$> awk ‘{print $3}’ file

Sept. 19, 2005CMPUT 603, Paul Berube38 Awk Use to process data in plain-text formats C-like syntax Can address file data by column Can perform math, has variables awk ‘BEGIN \ {max = 0; min = 9999; cnt = 0; sum = 0} \ { cnt++; sum += $1; \ if($1 > max) max = $1; \ if($1 < min) min = $1; } \ END \ {printf "%f %f %f\n", min, max, sum/cnt}’

Sept. 19, 2005CMPUT 603, Paul Berube39 Awk Use to process data in plain-text formats C-like syntax Can address file data by column Can perform math, has variables awk ‘BEGIN \ {max = 0; min = 9999; cnt = 0; sum = 0} \ {cnt++; sum += $1; \ if($1 > max) max = $1; \ if($1 < min) min = $1; } \ END \ {printf "%f %f %f\n", min, max, sum/cnt}’

Sept. 19, 2005CMPUT 603, Paul Berube40 Awk Use to process data in plain-text formats C-like syntax Can address file data by column Can perform math, has variables awk ‘BEGIN \ {max = 0; min = 9999; cnt = 0; sum = 0} \ {cnt++; sum += $1; \ if($1 > max) max = $1; \ if($1 < min) min = $1; } \ END \ {printf "%f %f %f\n", min, max, sum/cnt}’

Sept. 19, 2005CMPUT 603, Paul Berube41 Awk Use to process data in plain-text formats C-like syntax Can address file data by column Can perform math, has variables awk ‘BEGIN \ {max = 0; min = 9999; cnt = 0; sum = 0} \ {cnt++; sum += $1; \ if($1 > max) max = $1; \ if($1 < min) min = $1; } \ END \ {printf "%f %f %f\n", min, max, sum/cnt}’

gnuplot See: gnuplot webpage, Google

Sept. 19, 2005CMPUT 603, Paul Berube43 gnuplot Script-based 2D and 3D plotting Many output formats, including eps Graph functions and/or data from files Apply functions to data in files before graphing

Sept. 19, 2005CMPUT 603, Paul Berube44 gnuplot set term postscript eps set output ‘sincos.eps’ set title “sin(x), cos(x)” set xrange [-2*pi:2*pi] plot sin(x) with lines, cos(x) with points

Sept. 19, 2005CMPUT 603, Paul Berube45 Putting It All Together A Script: –Build the program if needed –Run the program to simulate M experiments, each run N times –Calulate the min, max, and average of the N runs for each experiment –Graph the results Max and min lines Smooth average line Each data point

Sept. 19, 2005CMPUT 603, Paul Berube46 Putting It All Together Demo…