# LaTex

Télécharger la présentation

## LaTex

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
##### Presentation Transcript

1. LaTex By Wen Ying Gao

2. What is LaTeX? • LaTeX is a typesetting system with the features that enhance the formatting of the documents. • It is efficient for using on publication of books or articles. • It can save user’s time by automatically formatting the sections, equations, and pictures of the documents.

3. Example of LaTeX: Here is a sample of LaTeX syntax: \documentclass{article} \ttfamily\title{Wonderful Town} \author{Wendy Gao} \date{February 2006} \begin{document} \maketitle \itshape There is a \bfseries{Wonderful Town} \mdseries{located at the end of the country. This town full of happy people….} \end{document}

4. Sample of PDF formatted of the article:

5. Syntax of the LaTeX • Using LaTeX to produce a document: \documentclass \begin{document} (The text is typed here) … \end{document} • LaTeX will automatically indent and put in paragraph for the text by simply double line the text. For no indent paragraph, we can use the \noindent control sequence at the beginning of the paragraph.

6. Example for creating paragraphs in LaTeX: \documentclass{article} \begin{document} During the 1960s, many large software development efforts encountered severe difficulties. Software schedules were typically late, costs greatly exceeded budgets and the finished products were unreliable. \vspace{10 mm} \noindent People began to realize that software development was a far more complex activity than they had imagined. \end{document}

7. Result:

8. LaTeX for Simple Document • By using LaTeX, all the document formats are typed within the text. • LaTeX using control sequences, which consist of a backslash follow by a string of letters, to indicate the format of the text.

9. Text Format Control Sequences To change the font of the text, we can use the control sequences to edit particular word or a group of words.

10. Example: \documentclass{article} \begin{document} \textrm{PERL How To Program} \texttt{by Deitel, Nieto, and McPhie} \textsl{1.8 Object-Oriented Programming} \textsc{\textbf{One} of the key problems with procedural programming is that the program units programmers create do not easily mirror \emph{real-world} entities effectively.} \end{document}

11. Result:

12. Mathematical Formulae Control Sequences To indicate the mathematical formulae in the text, LaTeX provides many control sequences to organize the mathematical formulae and print its mathematical symbols.

13. Display Mathematical Formulae in LaTeX There are four ways that LaTeX will display the mathematical formulae: • Use ‘$’ at the beginning and ending of the formula to indicate the formula within the document. • Use ‘$$‘$$at the beginning of the formula and$$‘$$’ at the end of the formula to indicate the formula within the document. • Use ‘$‘$$at the beginning of the formula and$$‘$’ at the end of the formula. This will display the formula on a line by itself. • Use $$at the beginning of the formula and$$ at the end of the formula will display the formula on a line by itself. 14. Example The following LaTeX will display the definition of sample mean: \documentclass{book} \begin{document} \noindent Definition: \noindent The \textbf{sample mean}$\bar{x}$of observations$x_1$,$x_2$,...,$x_n$is given by $\bar{x} = \frac{x_1 + x_2 + ... + x_n}{n} = \frac{\sum_{i=1}^n x_i}{n}$ \noindent The numerator of$\bar{x}$can be written more informally as$\sum x_i$, where the summation is over all sample observations. \end{document} 15. Result 16. Mathematical Symbol in LaTeX Many of the mathematical symbol are indicated by a backslash that follow by the name of the symbol. For example: Mathematical SymbolLaTeX Syntax  \cong  \Pi  \supseteq 17. Mathematical Operation in LaTeX The mathematical operation such as addition and subtraction will be using the keyboard symbol ‘+’ and ‘-’. However, the operation for multiplication, division, fraction, and square root will need to apply other LaTeX control sequences. 18. Example This example prints the definition of variance and standard deviation. \documentclass{article} \begin{document} \noindent The \textbf{variance} of a continuous random variable$X$with pdf$f(x)$and mean value$\mu$is $\sigma_X^2 = V(X) = \int_{-\infty}^\infty (x - \mu)^2 \bullet f(x)dx = E[(X - \mu)^2]$ The \textbf{standard deviation} (SD) of$X$is$\sigma_X = \sqrt{V(X)}\$. \end{document}

19. Result

20. Conclusion There are a lot of features in the LaTeX that are not able to demonstrate all at one time. However, there are many tutorials on the web which contain the usage and syntax of LaTeX. The preferable LaTeX tutorial websites from my research are in the reference page. Also, LaTeX is a free system that we can download it from the site, which is in the reference page.

21. Reference • Obtaining LaTeX. 16 Jan. 2006. 31 Jan. 2006 <http://www.latex-project.org/ftp.html> • Wilkins, David R. Getting Started with LaTeX. 9 March 1998. School of Mathematics. 2 Feb. 2006 <http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/>