Download presentation
Presentation is loading. Please wait.
Published byEvangeline Ramsey Modified over 9 years ago
1
157A, Fall Semester 2006 Brent Turner
2
Presentation Contents: 1. What Is LaTeX? 2. History of LaTeX 3. LaTeX Use 4. Typesetting – HTML vs. LaTeX 5. LaTeX Syntax 6. Examples: document and formula 7. References
3
What Is LaTeX? TeX – typesetting standard TeX – typesetting standard A TeX based document format A TeX based document format Used for typesetting documents Used for typesetting documents Uses tags to request elements of a document from the TeX typesetter Uses tags to request elements of a document from the TeX typesetter Not WYSIWYG Not WYSIWYG
4
TeX (the history of LaTeX) Created by Donald E. Knuth in 1977 Ideal for typesetting text and mathematical formulae Mr. Knuth did not like the way publishers were formatting/typesetting his articles so he set up his own standard for authors His website – www-cs-faculty.stanford.edu/~knuth
5
History of LaTeX LaTeX is pronounced “Lay-tech,” with a “k” sound, it is not pronounced “latex” as in rubber. The “ch” originates from the Greek alphabet where X is the letter “ch” or “chi”. tex is also the first syllable of the Greek word texnologia (technology).
6
The LaTeX program is a macro package that allows authors to use TeX easily. It is similar to a simple programming language It is very stable and can run on almost any computer History of LaTeX - cont
7
LaTeX Use 1. Download and install the free software. 2. Setup can be tricky, it is OS/machine dependant. 3. When using LaTeX, all document formatting is embedded within the text. 4. LaTeX uses control sequences (tags), which consist of a backslash (\) followed by a string of letters, possibly contained within { }, to indicate the format of the text. (see examples later)
8
LaTeX fundamentals An author writes a LaTeX input file in a text editor and then compiles this using LaTeX. An input file has literal text along with commands to process the text. There are some conceptual similarities to a markup language such as HTML. However, a fundamental difference is that LaTeX is designed as a page layout language, unlike HMTL which is functional markup. The whole point of LaTeX is to achieve perfect typographic output, which is not the purpose of HTML.
9
Typesetting – HTML vs. LaTeX
10
Syntax Using LaTeX to produce a document: \documentclass\begin{document} (The text is typed here) (The text is typed here)…\end{document} LaTeX will automatically indent and put it in paragraph form. To not indent a paragraph, we can use the \noindent tag at the beginning of the paragraph. See the documentation for a complete list of tags.
11
Tags – a short list 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 \emphEmphasized
12
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}
13
Mathematical Formula Example \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} This example prints the definition of variance and standard deviation using LaTeX syntax.
14
Result: Trying to do this in MSWord, or other popular WYSIWYG editor = too much work!
15
References http://www.maths.tcd.ie/~dwilkins/LaTeXPrimerhttp://www.maths.tcd.ie/~dwilkins/LaTeXPrimer http://www.latex-project.org/http://www.latex-project.org/ John Eagle, Wen Gao; Spring 2006 cs157aJohn Eagle, Wen Gao; Spring 2006 cs157a http://en.wikipedia.org/wiki/LaTeXhttp://en.wikipedia.org/wiki/LaTeX
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.