An Introduction to LATEX – Or Why Word Sucks

An Introduction to LATEX – Or Why Word Sucks

For starters Using LATEX BibTeX An Introduction to LATEX – or Why Word Sucks Simen Hagen MS012A–Research Papers Ethics Simen Hagen LaTeX For starters Tools Using LATEX Preamble BibTeX Running LATEX WYSIWYG What You See Is What You Get Include programs like Word, OpenOffice, FrameMaker etc. Pros Easy to use for beginners. You get what you want (usually). Usable for simple letters, memos, flyers etc. Cons You have to be the designer. Hard to be consistent. Simen Hagen LaTeX For starters Tools Using LATEX Preamble BibTeX Running LATEX Structure Oriented Writing Include “programs” like LATEX, scribe, html, xml. Pros Concentrate on the subject. Easy to get a consistent, good design. Best suited for articles, reports, books, mathematical formulas etc. Cons Many commands to learn. The commands are in the text. Awkward in the beginning. Simen Hagen LaTeX For starters Tools Using LATEX Preamble BibTeX Running LATEX TEX&LATEX TEX was created by Donald Knuth (http: //www-cs-faculty.stanford.edu/~knuth/). is freely available. is extendable. LATEX was created by Leslie Lamport.(http: //research.microsoft.com/users/lamport/), and is based on TEX adds macros, packages, indexes etc. is more user friendly than TEX. is easily extendable. Simen Hagen LaTeX For starters Tools Using LATEX Preamble BibTeX Running LATEX LATEX LATEX is just a command line program that you can run from any prompt. For *NIX LATEX is often installed as a default. If it is not, just install it from the package-system of your distribution. For Windows Use the MiKTEX package (http://miktex.org/). Use via CygWin (http://cygwin.com/). CygWin emulates Linux for Windows. For OS X Install via MacPorts (http://www.macports.org/) or Fink (http://www.finkproject.org/). There are also standalone versions. Simen Hagen LaTeX For starters Tools Using LATEX Preamble BibTeX Running LATEX Editor You just need an ordinary text editor for editing LATEX-files. Some of them might be a little better suited for the job however. Which editor you use is a matter of preference, but personally I have a few favorites. Simen Hagen LaTeX For starters Tools Using LATEX Preamble BibTeX Running LATEX Editor Emacs/XEmacs Emacs (http://www.gnu.org/software/emacs/ or http://www.xemacs.org/) is a wonderful editor that works on all platforms that you are likely to use LATEX on. It has good support for LATEX right out of the box, but by installing AUCTex (http://www.gnu.org/software/auctex/) a lot of extra functionality is provided, including live preview. Emacs is available for *Unix (Install via package manager). OS X (Several, I like http: //homepage.mac.com/zenitani/emacs-e.html). Windows (I like XEmacs for Windows). Simen Hagen LaTeX For starters Tools Using LATEX Preamble BibTeX Running LATEX Editor Vim Vim (http://www.vim.org/) is a very powerful, light weight editor. On *NIX, it is installed by default. There is no GUI (check out gVim), and it might have a steep learning curve, but when you know how to use it, it is very fast and powerful to use. Simen Hagen LaTeX For starters Tools Using LATEX Preamble BibTeX Running LATEX Editor Texmaker . Texmaker (http://www.xm1math.net/texmaker/) is a cross platform editor that have many enhancments for working with LATEX. Simen Hagen LaTeX For starters Tools Using LATEX Preamble BibTeX Running LATEX IDEs There are several IDEs available, for writing LATEX documents. Some examples are: Linux Kile is good. Install from your package manager Windows TEXnicCenter (http://www.toolscenter.org/) OS X TexShop (http://www.uoregon.edu/~koch/texshop/) For an all-in-one install of LATEX, TexShop and several other tools, use MacTex (http://www.tug.org/mactex/) Simen Hagen LaTeX For starters Tools Using LATEX Preamble BibTeX Running LATEX rubber If you prefer to use the command line for making your documents, there are some tools that might help you. Some people create makefiles to create their documents. In stead of creating one for yourself, you can use rubber (http: //www.pps.jussieu.fr/~beffara/soft/rubber/), a script that automates many of things you otherwise would have had to do manually. Simen Hagen LaTeX For starters Tools Using LATEX Preamble BibTeX Running LATEX JabRef You will be creating a database of the papers that you read. Although using a plain text editor will work just fine, using a program to manage your references might make things a bit more easy. JabRef (http://jabref.sourceforge.net/) makes it easy to manage your database, with a nice GUI. It is java-based, so it works on most common platforms. If you are on OS X, BibDesk (http://bibdesk.sourceforge.net/) is a good, native alternative (my personal preferense). Simen Hagen LaTeX For starters Tools Using LATEX Preamble BibTeX Running LATEX The Preamble – An Example \ documentclass [11pt ,a4paper,english]{ article} \ usepackage [ latin 1]{inputenc} \ usepackage [T1]{fontenc} \ usepackage { babel } \ usepackage { u r l } \ t i t l e {Literature Survey} \ author {Simen Hagen\\ Oslo University College\\ \ url {[email protected]}} \ date {January 21st , 2008} %% Leave this out %%and it will use todays date. Simen Hagen LaTeX For starters Tools Using LATEX Preamble BibTeX Running LATEX The body – An Example \ begin { document } \ m a k e t i t l e \ begin { a b s t r a c t } In this section I write my abstract. An abstract is the authors version of a short summary. It often includes a short ‘‘guide’’ to the article. \ end { a b s t r a c t } \ section {Introduction} This is a literature survey on a topic that I have chosen\ c i t e {MEGA} . \ section {A chapter } In this part I will write some important information about the topic that I have chosen\ c i t e [page~2]{MEGA}. \ section {Conclusion} Now it is time to wrap up and think of something very impressive to say . \ bibliography { example } \ bibliographystyle { p l a i n } \ end { document } Simen Hagen LaTeX For starters Tools Using LATEX Preamble BibTeX Running LATEX The Resulting Page Literature Survey Simen Hagen Oslo University College [email protected] January 21st, 2008 Abstract In this section I write my abstract. An abstract is the authors version of a short summary. It often includes a short guide to the article. 1 Introduction This is a literature survey on a topic that I have chosen[1]. 2 A chapter In this part I will write some important information about the topic that I have chosen[1, page 2]. 3 Conclusion Now it is time to wrap up and think of something very impressive to say. References [1] Siri Fagernes and Simen Hagen. The MEGA project - virtual emotions in mixed reality. Technical Report N 50/2002, Telenor Research and Development, Fornebu, Norway, 2002. 1 Simen Hagen LaTeX For starters Tools Using LATEX Preamble BibTeX Running LATEX How to run LATEX You can use any text editor to write your LATEX-files. The LATEX-file typically ends with the extension .tex. I would recommend Emacs since it has many functions to help you write your “code”. When you have written the document, you run the LATEX-program with the following command: $ latex <my_latex_file>.tex If all goes well, your code compiles without errors, and it produces a .dvi document. You can view this document with any dvi viewer, e.g. xdvi in a UNIX environment, or with yap if you are using windows (and the MiKTeX-package for windows). You can also convert your .dvi files into .ps with dvips, or to .pdf with dvipdf. You could also use the command pdflatex instead of the “normal” latex to produce a .pdf directly. Simen Hagen LaTeX For starters Basics Using LATEX Math BibTeX Figures Document Classes Any document written in LATEX need to have a document class. The document class defines how the document will be rendred on the page. The example on the previous slides used the article style, but there are others available. The most common ones are: article report book There is also a letter class, and more can be downloaded or you can create your own. For your survey, the article class should be used. Simen Hagen LaTeX For starters Basics Using LATEX Math BibTeX Figures Classes and properties There are a number of properties you can set that influences the document created. The syntax for the command is \ documentclass [options]{class} The class is as on the previous slide, and you can have several options, dependent on the class you have chosen. Below is a list of a few of the possibilities. 10pt 11pt 12pt letterpaper a4paper onecolumn twocolumn oneside twoside draft final Simen Hagen LaTeX For starters Basics Using LATEX Math BibTeX Figures Writing Text You write text just as normal, plain text. There are a few reserved characters (see table below). Commands start with a \. Commands can occur anywhere in the text. You signal a new paragraph with a blank line. Simen Hagen LaTeX For starters Basics Using LATEX Math BibTeX Figures Reserved Characters Character Write Character Write # \# } \} $ \$ _ \_ % \% ^ \textasciicircum & \& ~ \textasciitilde { \{ \ \textbackslash Simen Hagen LaTeX For starters Basics Using LATEX Math BibTeX Figures Sections It is common practice to divide a document into parts. In LATEXthere are several commands, taking the form \section_comand{title}. These commands are: part chapter section paragraph subsection subparagraph subsubsection These commands produce sectioning numbers, and are automatically added to a table of context. There is also a version of the sectoning commands, on the form \section_comand*{title}, that do not produce sectioning numbers, or produce an entry into the table of context. Simen Hagen LaTeX For starters Basics Using LATEX Math BibTeX Figures Text Formating You can mark text in several different ways.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    45 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us