13
L A T E X for dummies

Latex for Dummies

Embed Size (px)

DESCRIPTION

latex for dummies

Citation preview

Page 1: Latex for Dummies

LATEX for dummies

Page 2: Latex for Dummies
Page 3: Latex for Dummies

LATEX for dummies

by : The SWAN team

mail address : Delft University of TechnologyFaculty of Civil Engineering and GeosciencesEnvironmental Fluid Mechanics SectionP.O. Box 50482600 GA DelftThe Netherlands

e-mail : [email protected] page : http://www.swan.tudelft.nl

Copyright (c) 2012 Delft University of Technology.

Permission is granted to copy, distribute and/or modify this document under the terms ofthe GNU Free Documentation License, Version 1.2 or any later version published by theFree Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is available at http://www.gnu.org/licenses/fdl.html#TOC1.

Page 4: Latex for Dummies

iv

Page 5: Latex for Dummies

Contents

1 What is LATEX? 1

2 How to obtain LATEX? 3

3 Start using LATEX 5

4 Output formats 7

v

Page 6: Latex for Dummies

vi

Page 7: Latex for Dummies

Chapter 1

What is LATEX?

• TEX (pronounced ”tech”) is a typesetting language.

• LATEX (pronounced ”lay-tech” or ”la-tech”) is TEX with a lot of macros that make iteasier.

• Every mathematician uses it. It’s also very widely used among physicists, engineers,and other professionals who need to prepare technical documents.

• LATEX does a good job for documents that need structure, allowing you the flexibilityto easily modify the text, without worrying about how it’s going to turn out.

• To quote Donald Knuth (the inventor of TEX): ”It is intended for the creation ofbeautiful books and especially for books that contain a lot of mathematics.”

• There are many different styles of LATEX documents. The most well known are: letter,article, report, book and slides.

• Writing LATEX is just like writing any other language, such as Fortran. You writeLATEX code in ASCII format in your text editor, then you compile it, and look at theoutput file. In Fortran, your output is an executable program. In LATEX, your outputis a PDF document.

1

Page 8: Latex for Dummies

2 Chapter 1

Page 9: Latex for Dummies

Chapter 2

How to obtain LATEX?

• You need to get two programs: MiKTeX and TeXnicCenter1. They are freeanyway.

– MiKTeX has all the LATEX stuff needed by Windows users.

– TeXnicCenter is the userfriendly GUI program where you actually type yourcode.

– You need to install MiKTeX before you install TeXnicCenter, because TeXnic-

Center needs to be configured to use the MiKTeX files.

• Here’s how to install MiKTeX:

– Downloading the wizard will take a while. Live with it.Go here http://prdownloads.sourceforge.net/miktex/setup-2.4.1705.exe?downloadand download it from a mirror.

– After downloading the wizard, run it to download the MiKTeX package.Then, run it again to install the MiKTeX package. Thus, you’re going to endup having used the wizard twice.

• Here’s how to install TeXnicCenter:

– Installation of TeXnicCenter is pretty straightforward. Just make sure you dothis after installing MikTeX.

– Go tohttp://prdownloads.sourceforge.net/texniccenter/TXCSetup 1Beta6 31.exe?downloadand download the setup file from a mirror.

• Installation reference pages:

– The Art of Problem Solving’s LATEX installation guide.Go to http://www.artofproblemsolving.com/LaTeX/AoPS L Downloads.php

1Note to Linux users: LATEX is already available on Linux platforms.

3

Page 10: Latex for Dummies

4 Chapter 2

– MiKTeX homepage http://www.miktex.org/setup.html

– TeXnicCenter homepage http://www.toolscenter.org/

Page 11: Latex for Dummies

Chapter 3

Start using LATEX

• Now you need to know the actual syntax and code to write LATEX and be able producemathematics or physics papers or just adapting the SWAN Technical documentation.

• The format of a LATEX document is pretty simple:

\documentclass{}

... this is called the preamble ....

\begin{document}

... nice text and actual work here ....

... this is called the body ...

\end{document}

• LATEX allows free form text input. This means that it does not matter how manytabs, spaces you have, LATEX has its own idea of what your document will look like.

• As it goes with teaching yourself any computer language, you learn more by justtrying things, looking at examples, and searching google for all other answers.

• Here you find some links to the resources.

• Go here first: http://www.artofproblemsolving.com/LaTeX/AoPS L BasicFirst.phpIt is very good and brief.

• Short Math Guide for LATEXhttp://tex.loria.fr/general/downes-short-math-guide.pdf,Michael Downes, American Mathematical Society

5

Page 12: Latex for Dummies

6 Chapter 3

• The Not So Short Introduction to LATEXhttp://www.ctan.org/tex-archive/info/lshort/english/lshort.pdf

• For a good tutorial, go tohttp://www.tug.org.in/tutorials.html

• This is a complete course for new LATEX users (note: very large PDF file)http://tug.ctan.org/tex-archive/info/beginlatex/beginlatex-3.6.pdf

Page 13: Latex for Dummies

Chapter 4

Output formats

• Many people output their TEX or LATEX into DVI format1. But they usually endup converting their DVI into Postscript or PDF. You don’t need to know anythingabout DVI.

• Postscript is a different story. People use Postscript because it preserves the look ofthe document. However, one can convert Postscript to PDF and make the file muchmore portable.

• With Ghostscript/GSView, you can open Postscript files and just look at them likeall is good. It is good to be able to do this and to be able to convert them to PDF.If it’s something worth saving, you’d rather have the PDF.

• You can also convert Postscript to PDF using Adobe Distiller or using Go2PDF

which is free here http://www.go2pdf.com/product.html.

• It is also possible to create HTML documents from LATEX files using LATEX2HTML.For more information see http://www.latex2html.org.

1DeVice Independent, a format LATEX generates which can later be converted to PDF or Postscript,

viewed on screen, printed etc.

7