latex - Latex Introduction - latex tutorial - latex tutorial



What is latex?

  • LaTeX is a document preparation system, a special version of Donald Knuth's TeX program.
  • learn latex - latex tutorial - latex example programs
  • TeX is a sophisticated program designed to produce high-quality typesetting, especially for mathematical text.
  • It takes a computer file which is prepared according to the "rules" of TeX, and is converted to a form that may be printed on a high-quality printer, such as a laser writer, to produce a printed document of publication quality.
  • Probably the reference for using LaTex is the "LaTeX User's Guide & Reference Manual" by Leslie Lamport, the author of LaTeX.

latex vs msword :

learn latex tutorial - latex vs msword - latex example programs

learn latex tutorial - latex vs msword - latex example programs

Latex Working:

  • In typical "WYSIWYG" text processors, such as Microsoft Word or Word Perfect:
    • Formatting commands are invisible.
    learn latex -  latex tutorial -  latex development tutorial -  latex examples -  latex  -  latex script -  latex program -  latex download -  latex samples  -  latex scripts
    • The file shows pretty much the final result.
  • LaTeX, on the other hand, is a formatter rather than a text processor:
    • The file includes commands that define structure.
    • The formatting commands are visible.
    • The process requires a compiler to format the final result.
 Latex Images

learn latex tutorial - latext working - latex example

Input File:

  • Example for a LaTex input file.
     \documentstyle{article}

     \begin{document}

     ``Well, in OUR country,'' said Alice, still panting 
     a little, ``you'd generally get to somewhere else -- if
     you ran very fast for a long time, as 
     we've been doing.''

     ``A slow sort of country!'' said the Queen.
     ``Now, HERE, you see, it takes all the 
     running YOU can do, to keep in the same
     place.  If you want to get somewhere else,
     you must run at least twice as fast as that!''

     \end{document}

The Edit/Format/Preview Process

  • Here's how you get from a blank emacs-19 window to a fully formatted, previewed.
  • Put text and LaTeX commands in a file
    • call the file anything
    • add the extension ".tex"
    • edit the file with emacs-19 repeatedly to make changes
  • Issue the latex command to format the file
    • latex filename.tex
    • The result is a ".dvi" ("dvi" = device independent) file.
  • Display the .dvi file with XWindows previewer xdvi
    • xdvi filename.dvi
  • Print with a UNIX command
    • dvips filename.dvi | lpr -d filename.dvi
 Latex Images

latex tutorial - latex file name - latex example

  • Use LaTeX to convert running.tex (should already be in your latex directory) into a "dvi" file and the output is seen with xdvi.

Advantages of Latex :

  • Complete concentration on documents not with layout of document.
  • No need of manual type settings of height, width etc.
  • Mathematical formulae can be easily typeset
  • Index, footnotes, citations and references are generated easily.
  • Forced to structure your documents correctly
  • It natively supports PDF (Potable Document Format), DVI(Device Independent) file format but also PostScript, PNG, JPEG etc by using other software.

The Edit/Format/Preview Process LaTeX Document Structure:

  • LaTeX document consists of:
    • \documentstyle{article}
    • preamble
    • \begin{document}
    • body
    • \end{document}
    learn latex tutorial - latex introduction - latex example programs

    learn latex tutorial - latex introduction - latex example programs

  • The preamble consists of the overall, document-wide LaTeX formatting commands.
  • The body contains the text of the document and text formatting commands.

General Principles:

  • When creating a LaTeX input file, there are a few general principles to remember:
  • All input, both text and formatting commands is in "ASCII" text.
  • Spaces and line breaks are not important. A blank line starts a new paragraph, however.
  • Commands all start with backslash:
    • \documentstyle
  • Braces are used for "arguments":
    • \begin{document}
  • Brackets are used for "optional arguments":
    • \documentstyle[11pt]{article}
  • Commands are case sensitive.
    • \documentstyle not \DocumentStyle
  • Some text characters must be generated by control sequences (i.e., quotes, {}, [], \, etc.).

Document Styles:

  • The \documentstyle command describes the overall format of the document.
  • There are four basic document styles:
    • article - for short documents for publication
    • report - for longer technical documents; like articles, but has chapters
    • book - for large documents, such as books
    • letter - for writing letters (has other special which have to be set)

Optional Argument for Document Styles:

  • There are numerous optional arguments to \documentstyle:
    • 11pt - uses 11-point type rather than the default point size
    • 12pt - uses 12-point type rather than the default point size
    • twoside - formats output for two-sided printing
    • twocolumn - produces two-column output for printing

TeX Distributions :

  • The distributions (have compiler, fonts and LaTeX macro set) for different Operating Systems:
    • TeX Live -----for BSD, GNU/Linux, Mac OS X and Windows
    • MikTeX------for Windows
    • MacTeX-----for Mac OS X
      • Compilers or Engines: generate output files from source
    • luatex, lualatex----TeX engine with Lua scripting
    • Pdftex, pdflatex---PDF compilers
    • tex, latex -----------DVI compilers
    • xetex, xelatex------TeX engine which uses Unicode

TeX Editors :

  • TeX and LaTeX documents are all text files and can be opened and modified with all text editors (Ex: notepad, EditPlus) but not word processor (Word, OpenOffice).
  • Dedicated LaTeX editors are more useful.
    • Cross platform: BaKoMa TeX, Emacs, gedit-latex-plugin, LyX, TeXmaker, TeXstudio, TeX works, vim
    • BSD* and GNU/Linux: kile, Gumni, LaTeXila
    • Mac OS X: TeX Shop,
    • Windows: Led, TeXnicCenter, WinEdt, WinShell

latex cheatsheet :

learn latex - latex tutorial - latex windows commands - latex example programs

learn latex - latex tutorial - latex commands - latex example programs



Related Searches to Latex Introduction