latex presentation.pptx
TRANSCRIPT
Government Engineering CollegeDept of Computer Science and Engineering
PRESENTATION ON
LaTeX
1. What is LaTeX?
LaTeX is a computer program for typesetting documents.
2. What is Tex?
TEX is the typesetting language upon which LaTeX is built.
Uses of LaTeX It is mainly used for typesetting professional research papers.
LaTeX provides very high quality and is extremely customizable.
It’s free and Open Source.
Your document is safe because the file format is open and there’s no virus threat.
Simple DocumentsLets Start to generate our documents using LaTeX. Each file must be saved with an extension of .tex
Every LaTeX document command must begin with a backslash(\).
Two balckslash(\\) symbols are used for newline and Percentage(%) symbol indicates the comment line statement.
Structure of a LaTeX file
\documentclass[options]{article}Preamble (for LaTeX commands only)
\begin{document}Document (text with embedded LaTeX commands)
\end{document}
Document Classes The overall layout of the document can be determined using this document class function. Some of the classes are
Article - for simple or short documents, including journal articles, and short reports. Report - for small books and longer reports containing chapters. Book- for books. Letter- for letters, either business or personal. Slides- for making transparencies for projection on a screen.
Class options
A document class may be modified by options by placing in square bracket after \documentclass command \documentclass[options,options,options]{class}
The standard class options are, 10pt,11pt,12,pt.
If no options are specified, by default 10pt is assumed.
Making a Title Page \maketitle command is used to add a title for the document.
\maketitle command is used to print the title page muse follow the \begin{document} command
Format for title is as follows
\title{This is the Title} provide title information \author{My Name} provide author information \date{the date} provide date \maketitle format and print title page
Making Table of Contents \tableofcontent command is placed right after the \maketitle command, it will generate the table of content using the information in headings(such as Chapter,Section and Subsection). A simple program for table of content.
\documentclass[12pt,a4paper]{article} \usepackage{times} \title{Introduction to LaTex} Here Inserting title \author{Dr. ABC} \date{\today}
\begin{document} \maketitle \begin{abstract} My first LaTex document.LaTex is a document preparation system for the Tex typesetting program. \end{abstract} \tableofcontents \section{Introduction} \subsection{Basic structure of LaTex} \subsubsection{Basic structure of LaTex document} \subsection{Information} \section{Text Formatting} \subsection{Fontsize} \subsubsection{Text Justification} \end{document}
OUTPUT: Introduction to LaTex Dr. ABC
February 19, 2014 Abstract
My first LaTex document.LaTex is a document preparation system for the Tex typesetting program. Contents 1 Introduction 1.1 Basic structure of LaTex 1.1.1 Basic structure of LaTex document 1.2 Information 2 Text Formatting 2.1 Fontsize 2.1.1Text Justification
Document Layout
Line Spacing and Paragraphs \linespread command is used to align the space between the lines in a paragraph. \linespread{1}will be the default value of the line spacing.
\parindent controls the paragraph identation. \parskip controls the paragraph seperation.
Example: \parindent=0in \parskip=8pt
Text Justification andText Formating
Text justification can be done using the following command
\begin{center} This is for centered.
\end{center} \begin{flushleft} This is left-justified. \end{flushleft}
\begin{flushright} This is right-justified.
\end{flushright}
Text formating can be done with the help of following commands:
\textit{text} and \emph{text} for italic text.
\textbf{text} for bold text.
\underline{text} for underline text.
Font Size LaTeX supports for font size with the help of following commands:
\begin{large}text\end{large} GECH \begin{Large}text\end{Large} GECH \begin{huge}text\end{huge} GECH \begin{Huge}text\end{Huge} GECH \begin{small}text\end{small} GECH
\begin{tiny}text\end{tiny} GECH
Lists Three LaTeX list environments all will use \item as command to start.
The enumerate environment (also Known as an ordered list)numbers items sequentially
\begin{enumerate} \item Sugar 1. Sugar \item Cream 2. Cream \item Chocolate 3. Chocolate \end{enumerate}
The itemize environment (also known as an unordered list)puts a bullet in front of each item Example: \begin{itemize} \item Mix all ingredients together.<==>. Mix all ingredients together. \item Stir and cool. <==>. Stir and cool. \end{itemize}
The description environment puts a boldface word or phrase in front of each item Example: \begin{description} \item[dog] A loving animal that likes to sleep on the furniture. \end{description}
Tabular Representation The tabular environment requires an additional argument that specifies the alignment of each column (centered, left justified, etc.):
\begin{tabular}{align}
Symbols for the align argument
l Left-justified column entry c Centered column entry r Right-justified column entry p Paragraph column entry | Vertical rule column || Double vertical rule column
Tabular Representation \begin{center} \begin{tabular}{ | m{5em} | m{1cm}| m{1cm} | m{1cm}| m{1cm} |} \hlinecell1 & cell2 & cell3 & cell2 & cell3\\ \hlinecell1 & cell5 & cell6 & cell2 & cell3\\ \hlinecell7 & cell8 & cell9 & cell2 & cell3\\ \hline
\end{tabular} \end{center}
Mathematics In-line Math LaTeXs in-line math environment allows you to place mathematical formulas in the midst of ordinary text. This environment can be invoked in one of three ways:
$ ... $ (Used in plain TEX) \( . . . \) \begin{math} . . . \end{math}
Format for equation:
\begin{equation} f=ma \end{equation}
Complex Equations Superscripts: $$2x^3$$ $$2x^{34}$$
Subscripts: $$x_1$$ $$x_{12}$$
Greek letters: $$\pi$$ $$\alpha$$ $$A=\pi r^2$$
Trignometric functions: $$y=\sin{x}$$ y = sin x, $$y=\cos{x}$$ y = cos x
Log functions: $$\log_5{x}$$ log5 x $$\ln{x}$$ ln x
Square roots: $$\sqrt{2}$$ 2 $$\sqrt[3]{2}$$
Fractions: About $\displaystyle{\frac{2}{3}}$ of the glass is full. $$\frac{x}{x^2+x+1}$$ $$\frac{\sqrt{x+1}}{\sqrt{x-1}}$$
ARRAY ENVIRONMENT The array environment is not itself a math environment; it must be enclosed within a math environment of your choosing Here is an example of the array environment used to build a 5*5 magic square:
\[ \begin{array}{ccccc} 17& 24& 1& 8& 15 23& 5& 7& 14& 16 4& 6& 13& 20& 22 10& 12& 19& 21& 3 11& 18& 25& 2& 9 \end{array} \]