LaTeX: Online module 2 · Fig2a: Snap shot- using commands for dots Venkata Manem (Univ. of...
Transcript of LaTeX: Online module 2 · Fig2a: Snap shot- using commands for dots Venkata Manem (Univ. of...
![Page 1: LaTeX: Online module 2 · Fig2a: Snap shot- using commands for dots Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 12 / 28. contd... Fig2b: Output of the previous](https://reader033.fdocuments.us/reader033/viewer/2022050104/5f4321cec77e2f54d9495dc5/html5/thumbnails/1.jpg)
LATEX: Online module 2
Venkata Manem
Univ. of Waterloo
July 22, 2011
Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 1 / 28
![Page 2: LaTeX: Online module 2 · Fig2a: Snap shot- using commands for dots Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 12 / 28. contd... Fig2b: Output of the previous](https://reader033.fdocuments.us/reader033/viewer/2022050104/5f4321cec77e2f54d9495dc5/html5/thumbnails/2.jpg)
Topics to be covered
Typeface
Font size
Special characters
Hyphens and dots
Spacing
Examples
Summary
Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 2 / 28
![Page 3: LaTeX: Online module 2 · Fig2a: Snap shot- using commands for dots Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 12 / 28. contd... Fig2b: Output of the previous](https://reader033.fdocuments.us/reader033/viewer/2022050104/5f4321cec77e2f54d9495dc5/html5/thumbnails/3.jpg)
Typeface
Use the following commands to get different types of fonts in yourdocument in text mode:
Bold face: \bf {content}Italic face: \it{content}Emphasized text: \emph{content}Typewriter: \texttt{content}Slanted text: \textsl{content}Small capitals: \textsc{content}Upper case: \uppercase{content}
Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 3 / 28
![Page 4: LaTeX: Online module 2 · Fig2a: Snap shot- using commands for dots Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 12 / 28. contd... Fig2b: Output of the previous](https://reader033.fdocuments.us/reader033/viewer/2022050104/5f4321cec77e2f54d9495dc5/html5/thumbnails/4.jpg)
contd...
Use the following commands to get different types of fonts in yourdocument in mathematical mode:
Math bold face: \mathbf {content}Math italic face: \mathit{content}Math typewriter: \mathtt{content}Math calligraphic letters: \mathcal{content}
Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 4 / 28
![Page 5: LaTeX: Online module 2 · Fig2a: Snap shot- using commands for dots Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 12 / 28. contd... Fig2b: Output of the previous](https://reader033.fdocuments.us/reader033/viewer/2022050104/5f4321cec77e2f54d9495dc5/html5/thumbnails/5.jpg)
Example
Fig1: Snap shot- using various typefaces
Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 5 / 28
![Page 6: LaTeX: Online module 2 · Fig2a: Snap shot- using commands for dots Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 12 / 28. contd... Fig2b: Output of the previous](https://reader033.fdocuments.us/reader033/viewer/2022050104/5f4321cec77e2f54d9495dc5/html5/thumbnails/6.jpg)
contd...
Fig2: Output of the previous slide
Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 6 / 28
![Page 7: LaTeX: Online module 2 · Fig2a: Snap shot- using commands for dots Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 12 / 28. contd... Fig2b: Output of the previous](https://reader033.fdocuments.us/reader033/viewer/2022050104/5f4321cec77e2f54d9495dc5/html5/thumbnails/7.jpg)
Font sizes
Default font size: \normalsize is 10 points, but can be even 11 and12 depending on the type of document
All the following commands change the size of the text embeddedwithin the command
Cannot be used in the mathematical mode
Following commands are in the increasing order of the font size:1 {\ tiny write your content here}2 {\ scriptsize write your content here}3 {\ footnotesize write your content here}4 {\small write your content here}
Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 7 / 28
![Page 8: LaTeX: Online module 2 · Fig2a: Snap shot- using commands for dots Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 12 / 28. contd... Fig2b: Output of the previous](https://reader033.fdocuments.us/reader033/viewer/2022050104/5f4321cec77e2f54d9495dc5/html5/thumbnails/8.jpg)
contd...
1 {\normalsize write your content here}2 {\large write your content here}3 {\Large write your content here}4 {\LARGE write your content here}5 {\huge write your content here}6 {\Huge write your content here}
Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 8 / 28
![Page 9: LaTeX: Online module 2 · Fig2a: Snap shot- using commands for dots Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 12 / 28. contd... Fig2b: Output of the previous](https://reader033.fdocuments.us/reader033/viewer/2022050104/5f4321cec77e2f54d9495dc5/html5/thumbnails/9.jpg)
Special characters
Some of the special characters that can be included in your document arethe following:
Backslash: \Ampersand: &
Hash: #
Percent: %
Curly brackets: { and }Text circled: a©Copyright: c©
All of the above can be included into your text by typing the command \followed by any of the above mentioned character, for example, \&
Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 9 / 28
![Page 10: LaTeX: Online module 2 · Fig2a: Snap shot- using commands for dots Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 12 / 28. contd... Fig2b: Output of the previous](https://reader033.fdocuments.us/reader033/viewer/2022050104/5f4321cec77e2f54d9495dc5/html5/thumbnails/10.jpg)
Hyphens
Minus sign: 0, 1 and −1
Hyphen: simple-easy-enjoyable
En dash: Figure 1 -- Figure 5 generates the output as the following:Figure 1 – Figure 5
Em dash: Table 1 --- Table 10 generates the output as the following:Table 1 — or Table 5
Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 10 / 28
![Page 11: LaTeX: Online module 2 · Fig2a: Snap shot- using commands for dots Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 12 / 28. contd... Fig2b: Output of the previous](https://reader033.fdocuments.us/reader033/viewer/2022050104/5f4321cec77e2f54d9495dc5/html5/thumbnails/11.jpg)
Dots
To generate the following output: applied mathematics department,pure mathematics department, ..., there might be a spacing issue withthe dots at the the end of the sentence.
Replace the dots with the command \dots: applied mathematicsdepartment, pure mathematics department, . . .
To generate the following output in mathematical environment10+11+...=100
Replace the dots with the command \ldots : 10+11+. . . =100
If you want the dots to be centered in the above mathematicalequation use the command \cdots to obtain: 10 + 11 + · · · = 100
Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 11 / 28
![Page 12: LaTeX: Online module 2 · Fig2a: Snap shot- using commands for dots Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 12 / 28. contd... Fig2b: Output of the previous](https://reader033.fdocuments.us/reader033/viewer/2022050104/5f4321cec77e2f54d9495dc5/html5/thumbnails/12.jpg)
Example
Fig2a: Snap shot- using commands for dots
Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 12 / 28
![Page 13: LaTeX: Online module 2 · Fig2a: Snap shot- using commands for dots Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 12 / 28. contd... Fig2b: Output of the previous](https://reader033.fdocuments.us/reader033/viewer/2022050104/5f4321cec77e2f54d9495dc5/html5/thumbnails/13.jpg)
contd...
Fig2b: Output of the previous slide
Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 13 / 28
![Page 14: LaTeX: Online module 2 · Fig2a: Snap shot- using commands for dots Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 12 / 28. contd... Fig2b: Output of the previous](https://reader033.fdocuments.us/reader033/viewer/2022050104/5f4321cec77e2f54d9495dc5/html5/thumbnails/14.jpg)
Spacing
Extra spaces are ignored by LATEX and the output file looks muchbetter than the source file.
\newline or \\ (short form): to start a new line
\newpage: to start a new page
\linebreak : makes a line break at this point
\pagebreak : makes a page break at this point
Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 14 / 28
![Page 15: LaTeX: Online module 2 · Fig2a: Snap shot- using commands for dots Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 12 / 28. contd... Fig2b: Output of the previous](https://reader033.fdocuments.us/reader033/viewer/2022050104/5f4321cec77e2f54d9495dc5/html5/thumbnails/15.jpg)
contd...
A quad is equal to the length of the font size, say, 1 quad = 11 pt with 11pt font size. The following are the commands that can be used forspacing:
ab: The generated output doesn’t have any space between a and b
\qquad - Generates 1 quad space
\qquad - Generates 2 quad space
\, - Generates 3/18 quad space
\: - Generates 4/18 quad space
\; - Generates 5/18 quad space
Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 15 / 28
![Page 16: LaTeX: Online module 2 · Fig2a: Snap shot- using commands for dots Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 12 / 28. contd... Fig2b: Output of the previous](https://reader033.fdocuments.us/reader033/viewer/2022050104/5f4321cec77e2f54d9495dc5/html5/thumbnails/16.jpg)
Example
Fig3: Snap shot- using spacing commands
Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 16 / 28
![Page 17: LaTeX: Online module 2 · Fig2a: Snap shot- using commands for dots Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 12 / 28. contd... Fig2b: Output of the previous](https://reader033.fdocuments.us/reader033/viewer/2022050104/5f4321cec77e2f54d9495dc5/html5/thumbnails/17.jpg)
contd...
Fig4: Output of the previous slide
Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 17 / 28
![Page 18: LaTeX: Online module 2 · Fig2a: Snap shot- using commands for dots Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 12 / 28. contd... Fig2b: Output of the previous](https://reader033.fdocuments.us/reader033/viewer/2022050104/5f4321cec77e2f54d9495dc5/html5/thumbnails/18.jpg)
Other spacing commands
To add some horizontal space between sentences, paragraphs orequations, use the command \hspace{length}For some vertical space between sentences, paragraphs or equations,use the command \vspace{length}
Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 18 / 28
![Page 19: LaTeX: Online module 2 · Fig2a: Snap shot- using commands for dots Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 12 / 28. contd... Fig2b: Output of the previous](https://reader033.fdocuments.us/reader033/viewer/2022050104/5f4321cec77e2f54d9495dc5/html5/thumbnails/19.jpg)
Example
Fig5: Snap shot- vertical and horizontal spacing commands
Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 19 / 28
![Page 20: LaTeX: Online module 2 · Fig2a: Snap shot- using commands for dots Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 12 / 28. contd... Fig2b: Output of the previous](https://reader033.fdocuments.us/reader033/viewer/2022050104/5f4321cec77e2f54d9495dc5/html5/thumbnails/20.jpg)
contd...
Fig6: Output of the previous slide
Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 20 / 28
![Page 21: LaTeX: Online module 2 · Fig2a: Snap shot- using commands for dots Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 12 / 28. contd... Fig2b: Output of the previous](https://reader033.fdocuments.us/reader033/viewer/2022050104/5f4321cec77e2f54d9495dc5/html5/thumbnails/21.jpg)
Subscripts and superscripts
Subscripts are specified by a underscore operator ( )
Superscripts are specified by a caret operator (ˆ)
Content should be enclosed with curly braces after the operator
Double subscript or double superscript can be done only withenclosing the first level in braces
Following slide gives several examples of using subscripts andsuperscripts
Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 21 / 28
![Page 22: LaTeX: Online module 2 · Fig2a: Snap shot- using commands for dots Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 12 / 28. contd... Fig2b: Output of the previous](https://reader033.fdocuments.us/reader033/viewer/2022050104/5f4321cec77e2f54d9495dc5/html5/thumbnails/22.jpg)
Example
Fig7: Snap shot- using subscripts and superscripts commands
Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 22 / 28
![Page 23: LaTeX: Online module 2 · Fig2a: Snap shot- using commands for dots Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 12 / 28. contd... Fig2b: Output of the previous](https://reader033.fdocuments.us/reader033/viewer/2022050104/5f4321cec77e2f54d9495dc5/html5/thumbnails/23.jpg)
contd...
Fig8: Output of the previous slide
Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 23 / 28
![Page 24: LaTeX: Online module 2 · Fig2a: Snap shot- using commands for dots Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 12 / 28. contd... Fig2b: Output of the previous](https://reader033.fdocuments.us/reader033/viewer/2022050104/5f4321cec77e2f54d9495dc5/html5/thumbnails/24.jpg)
Braces
Commands for different sizes of braces are:1 Left braces:
\bigl(\Bigl(\biggl(\Biggl(
2 Right braces:
\bigr)\Bigr)\biggr)\Biggr)
For curly brackets use the same commands, but replace the left open brace( by { and right open brace ) by }
Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 24 / 28
![Page 25: LaTeX: Online module 2 · Fig2a: Snap shot- using commands for dots Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 12 / 28. contd... Fig2b: Output of the previous](https://reader033.fdocuments.us/reader033/viewer/2022050104/5f4321cec77e2f54d9495dc5/html5/thumbnails/25.jpg)
Example
Fig9: Snap shot of using braces
Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 25 / 28
![Page 26: LaTeX: Online module 2 · Fig2a: Snap shot- using commands for dots Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 12 / 28. contd... Fig2b: Output of the previous](https://reader033.fdocuments.us/reader033/viewer/2022050104/5f4321cec77e2f54d9495dc5/html5/thumbnails/26.jpg)
contd...
Fig10: Output of the previous slide
Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 26 / 28
![Page 27: LaTeX: Online module 2 · Fig2a: Snap shot- using commands for dots Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 12 / 28. contd... Fig2b: Output of the previous](https://reader033.fdocuments.us/reader033/viewer/2022050104/5f4321cec77e2f54d9495dc5/html5/thumbnails/27.jpg)
References
For more references please visit the following websites:
1 http://www.latex-project.org/
2 http://en.wikibooks.org/wiki/LaTeX
3 http://www.ctan.org/
Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 27 / 28
![Page 28: LaTeX: Online module 2 · Fig2a: Snap shot- using commands for dots Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 12 / 28. contd... Fig2b: Output of the previous](https://reader033.fdocuments.us/reader033/viewer/2022050104/5f4321cec77e2f54d9495dc5/html5/thumbnails/28.jpg)
Exercises
Try to get the following output: (Remember to have equations embeddedwithin two dollar signs, i.e., $ equation $)
1 xy2
= a + b
2 xy2 = a + b
3 xy2 = a + b
4 xy2 = a + b
5
(({{a + b + c + d
}}))
Venkata Manem (Univ. of Waterloo) LATEX: Online module 2 July 22, 2011 28 / 28