Document Sample

LaTex By Wen Ying Gao 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. 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} Sample of PDF formatted of the article: 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. 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} Result: 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. 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. Control Sequences Text Format \textrm Roman font \textsf Sans serif font \texttt Typewriter font \textup Upright shape \textit Italic shape \textsl Slanted shape \textsc Small caps shape \textmd Medium font \textbf Bold face \emph Emphasized 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} Result: 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. 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 \begin{equation} at the beginning of the formula and \end{equation} at the end of the formula will display the formula on a line by itself. 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} Result 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 Symbol LaTeX Syntax \cong \Pi \supseteq 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. Operations LaTeX control sequences Multiplication () \times Division () \div Fraction \frac{numerator}{denominator} Square Root \sqrt{expression} 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} Result 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. 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/LaTeX Primer/>

DOCUMENT INFO

Shared By:

Categories:

Tags:
Natural Rubber, latex products, latex exposure, allergic reactions, How to, allergic reaction, latex protein, Health care workers, American Latex Allergy Association, LaTeX documents

Stats:

views: | 96 |

posted: | 6/23/2011 |

language: | English |

pages: | 21 |

OTHER DOCS BY qingyunliuliu

How are you planning on using Docstoc?
BUSINESS
PERSONAL

By registering with docstoc.com you agree to our
privacy policy and
terms of service, and to receive content and offer notifications.

Docstoc is the premier online destination to start and grow small businesses. It hosts the best quality and widest selection of professional documents (over 20 million) and resources including expert videos, articles and productivity tools to make every small business better.

Search or Browse for any specific document or resource you need for your business. Or explore our curated resources for Starting a Business, Growing a Business or for Professional Development.

Feel free to Contact Us with any questions you might have.