La Tex Computer scientist named Donald Knuth developed

  • Slides: 22
Download presentation
La. Tex - Computer scientist named Donald Knuth developed the program called Tex, in

La. Tex - Computer scientist named Donald Knuth developed the program called Tex, in 1978. (mainly focused on formulae) - Later a mathematician and computer scientist by the name Leslie Lamport wrote a variant of Tex called La. Tex that focuses on document structure.

- Typesetting program - La. Tex is a family of programs designed to produce

- Typesetting program - La. Tex is a family of programs designed to produce publication-quality typeset documents. - It is particularly strong when working with mathematical symbols.

Unique Advantages of La. Te. X • Professional typesetting • Best output • •

Unique Advantages of La. Te. X • Professional typesetting • Best output • • • It is the standard for scientific documents Processing Mathematical (& other) symbols Meaning based structuring (rather than appearance) Knowledgeable and helpful user group Its FREE Platform independent

A Simple La. Te. X Document documentclass{article} begin{document} HELLO. end{document}

A Simple La. Te. X Document documentclass{article} begin{document} HELLO. end{document}

Parts of a La. Te. X Document: documentclass {article} {report} {book} {letter} Basic Classes

Parts of a La. Te. X Document: documentclass {article} {report} {book} {letter} Basic Classes § First line of all La. Te. X documents § Specifies the type of the document documentclass[font size]{puthesis}

documentclass{article}. . Includes commands that effect the document structure . begin{document} Called as body

documentclass{article}. . Includes commands that effect the document structure . begin{document} Called as body of the HELLO. document end{document} - The default font size is 10 points or pt. for ex: documentclass[12 pt]{article} - In La. Tex the required information is included in curl braces({}) and optional information in square brackets([ ]).

Sections section{Section Title} subsection{Title} subsubsection{Title}

Sections section{Section Title} subsection{Title} subsubsection{Title}

Mathematics Greek Symbols alpha, beta, gamma Superscript, Subscript x^y x_y Calculus int_0^infty frac{partial u}{partial

Mathematics Greek Symbols alpha, beta, gamma Superscript, Subscript x^y x_y Calculus int_0^infty frac{partial u}{partial x} x_y^z int{int}

1)Fonts: you can have bold font, italics font, etc as follows: {bf This is

1)Fonts: you can have bold font, italics font, etc as follows: {bf This is in bold} and {it this is in italics} default roman {rm as is this}. 2) There are kinds begin{enumerate} item First item. . . item Second item. . . end{enumerate} or of lists. Here is one: Instead of the "enumeration" list above, you can use a "description" list instead: begin{description} item[(a)] First item. . . item[(b)] Second item. . . end{description}

3)TO typeset math, you need to enclose your math typography within special brackets: either

3)TO typeset math, you need to enclose your math typography within special brackets: either $. . . math typography. . . $ begin{equation}. . . math typography. . . end{equation} or

EXAMPLE PROGRAM 1 CODE documentclass{article} title{Cartesian closed categories and the price of eggs} author{Jane

EXAMPLE PROGRAM 1 CODE documentclass{article} title{Cartesian closed categories and the price of eggs} author{Jane Doe} date{September 1994} begin{document} maketitle Hello world! end{document} OUTPUT Cartesian closed categories and the price of eggs Jane Doe September 1994 Hello world!

EXAMPLE PROGRAM 2 documentclass[12 pt]{article} % options include 12 pt or 11 pt or

EXAMPLE PROGRAM 2 documentclass[12 pt]{article} % options include 12 pt or 11 pt or 10 pt % classes include article, report, book, letter, thesis title{This is the title} author{Author One \ Author Two} date{29 February 2004} begin{document} maketitle This is the content of this document. This is the 2 nd paragraph. Here is an inline formula: $ V = frac{4 pi r^3}{3}$. And appearing immediately below is a displayed formula: $$ V = frac{4 pi r^3}{3} $$ end{document}

Example program 3 documentclass[12 pt]{article} usepackage{amsmath} title{La. Te. X} date{} begin{document} maketitle La. Te.

Example program 3 documentclass[12 pt]{article} usepackage{amsmath} title{La. Te. X} date{} begin{document} maketitle La. Te. X{} is a document preparation system for the Te. X{} typesetting program. It offers programmable desktop publishing features and extensive facilities for automating most aspects of typesetting and desktop publishing, including numbering and cross-referencing, tables and figures, page layout, bibliographies, and much more. La. Te. X{} was originally written in 1984 by Leslie Lamport and has become the dominant method for using Te. X; few people write in plain Te. X{} anymore. The current version is La. Te. X 2 e. % This is a comment, not shown in final output. % The following shows typesetting power of La. Te. X: begin{align} E_0 &= mc^2 \ E &= frac{mc^2}{sqrt{1 -frac{v^2}{c^2}}} end{align} end{document}

Program 4 documentclass{article} usepackage{graphicx} begin{document} title{Introduction to La. Te. X{}} author{Author's Name} maketitle begin{abstract}

Program 4 documentclass{article} usepackage{graphicx} begin{document} title{Introduction to La. Te. X{}} author{Author's Name} maketitle begin{abstract} The abstract text goes here. end{abstract} section{Introduction} Here is the text of your introduction. begin{equation} label{simple_equation} alpha = sqrt{ beta } end{equation} subsection{Subsection Heading Here} Write your subsection text here. begin{figure} centering includegraphics[width=3. 0 in]{myfigure} caption{Simulation Results} label{simulationfigure} end{figure} section{Conclusion} Write your conclusion here. end{document}

Program 5 % This is a comment line documentclass{article} begin{document} % Note to self:

Program 5 % This is a comment line documentclass{article} begin{document} % Note to self: % I must change this title later! title{Hello World} author{Your Name\ Department of Computer Science\ Courant Institute, NYU} maketitle begin{abstract}. . put your abstract here. . . end{abstract} section{First Section}. . . text. . . subsection{First subsection}. . . text. . . subsection{Second subsection}. . . text. . . subsubsection{Second Section}. . . text. . . and so on. . . end{document}

insert a table documentclass{article} begin{document} begin{table} begin{tabular}{|c|c|c|} hline h 1&h 2&h 3\ hline a&b&c\

insert a table documentclass{article} begin{document} begin{table} begin{tabular}{|c|c|c|} hline h 1&h 2&h 3\ hline a&b&c\ hline end{tabular} end{table} end{document}

Inserting an image documentclass{article} usepackage{graphicx} begin{document} begin{figure} includegraphics[width=linewidth]{boat. jpg} caption{A boat. } label{fig: boat

Inserting an image documentclass{article} usepackage{graphicx} begin{document} begin{figure} includegraphics[width=linewidth]{boat. jpg} caption{A boat. } label{fig: boat 1} end{figure} Figure ref{fig: boat 1} shows a boat. end{document}

documentclass{article} Specifies that we want to format our paper using a basic article style.

documentclass{article} Specifies that we want to format our paper using a basic article style. usepackage{graphicx} This is needed if we want to include figures. Packages are extensions of a basic La. Te. X system and provide additional functionality. Packages are loaded using the usepackage command. begin{document}. . . end{document} The whole document is enclosed between these. title{Introduction to La. Te. X{}} Here you write the title of the document. (The La. Te. X{} command prints the fancy logo. ) author{Author's Name} Name of the author. maketitle Tell La. Te. X to print the title, author name, etc. here. begin{abstract}. . . end{abstract} Write the abstract between these commands. section{Heading of the First Section} Every section begins with this command. Write the heading of the section between the curly braces. Then after this command you can write the text of the section. When you want to start a new paragraph of text, write an empty line in the La. Te. X source file. begin{equation} label{simple_equation} alpha = sqrt{ beta } end{equation} These commands insert an equation. Greek symbols are simply called with their name by inserting a backslash in front of them. sqrt creates a square root function. The label command gives a logical name for the equation. It can be used when creating cross references. subsection{Subsection Heading Here} Every subsection begins with this command. You can also create subsubsections. If the selected document style uses numbering for headings, sections will be automatically numbered in a hierarchical way. That is, sections get a number like "1", subsections "1. 2", and subsubsections "1. 2. 4".

begin{figure} centering includegraphics[width=3. 0 in]{myfigure} caption{Simulation Results} label{simulationfigure} end{figure} These lines insert an image

begin{figure} centering includegraphics[width=3. 0 in]{myfigure} caption{Simulation Results} label{simulationfigure} end{figure} These lines insert an image file into the document. More about images can be found here. Anyway, the most important command is includegraphics, which now inserts an image named myfigure. eps (La. Te. X appends. eps extension by default) or myfigure. pdf (Pdf. La. Te. X appends. pdf). Additionally the figure gets a caption "Simulation Results" using the caption command.