270 likes | 721 Views
Academic Writing Using LaTeX. Michael Boyer Chris Gregg Jiawei Huang University of Virginia 04/24/2012. What is LaTeX?. LaTeX is a typesetting system. LaTeX Source File. PDF. LaTeX Compiler. Brief History. TeX released by Donald Knuth in 1978 LaTeX released by Leslie Lamport in 1985.
E N D
Academic Writing Using LaTeX Michael Boyer Chris Gregg Jiawei Huang University of Virginia 04/24/2012
What is LaTeX? LaTeX is a typesetting system LaTeX Source File PDF LaTeX Compiler
Brief History • TeX released by Donald Knuth in 1978 • LaTeX released by Leslie Lamport in 1985
Why Use LaTeX? • Looks better • Especially math • Separation of content & formatting • More flexible • Easier concurrent editing • Easier citations • More widely available • Free (as in beer) • Free (as in speech)
Why Use Word? • What you see is what you get (WYSIWYG) • All-in-one document format • More widely used
Workshop Outline • What is LaTeX and why use it? • High-level workflow • How to write a paper • Equations • Figures & Tables • Citations • Packages • Compiling • Useful tools
Steps to Produce a PDF Using LaTeX .tex (input file) .bib (bibliographic file) .sty (style file) .eps (graphics file) latex .dvi (typeset file) packages pdflatex \usepackage{color} \usepackage{amsmath} \usepackage{multirow} \usepackage{graphicx} \usepackage{subfigure} ... dvips .ps (postscript file) ps2pdf .pdf (output file)
Packages • Collections of macros to extend the functionality: • Text coloring • Cell merging in a table • Special math symbols • … • Download from www.ctan.org • Package Manager by MiKTeX • To enable a package • \usepackage{package_name}
Let’s Write a Paper! • Download author kits from the conference website: • www.cs.virginia.edu/~jh3wn/latex-> ISCA2012.zip • Web-based LaTeX editor/compiler: • http://www.scribtex.com/ • Create a project “ISCA”, upload the .zip file
Math 1 • \usepackage{amsmath} • Embedded in text, use $...$: • Separate paragraph, use or or • In math mode, sky is the limit! $$ … $$ \[ … \] \begin{equation} … \end{equation}
Math 2 (in math mode) • Super/subscript • x^{2} -> • x_{0} -> • Fractions, square root, etc. • \frac{x+1}{x-1} -> • \sqrt{x} -> • \sin{\theta} -> • Greek letters • \alpha -> • Operators • \times -> • \le -> • Normal text • y=x\mbox{ if and only if }x<0 ->
Math 3 (in math mode) • \usepackage{amssymb} • Equation array (multiline equations): Practice e = \lim_{n\to\infty} \left( 1 + \frac{1}{n} \right)^n \begin{align*} [A]&=[2x]=[-2,2]\\ [B]&=[x^2+1]=[1,2]\\ [A+B]&=[-2,2]+[1,2]=[-1,4] \end{align*} \begin{align} ... \end{align} Numbered Un-numbered
Math 4 • LaTeX Cheat sheet • Wikipedia • Symbol classifier • Detexify http://detexify.kirelabs.org/classify.html • Equation editor http://www.codecogs.com/latex/eqneditor.php
Cross-reference • Define • \label{my_label} • Reference • \ref{my_label} • Use with chapters, sections, tables, figures, equations, etc.