A LaTEX Tutorial. A Collection of Handouts And Exercises for The Technically Uninitiated

Size: px
Start display at page:

Download "A LaTEX Tutorial. A Collection of Handouts And Exercises for The Technically Uninitiated"

Transcription

1 A LaTEX Tutorial A Collection of Handouts And Exercises for The Technically Uninitiated by Linda Bethel Graduate School of Business September 9, 2005

2 CONTENTS 2 Contents 1 Getting Started: An Overview PCTEX vs. L A TEX vs. TEX Three Files Using the Application: An Overview Create a Practice Document Getting Started: Opening a Practice Document Step by Step Environments Option, Effect Typing Basic Text: Character Formatting Type Face Type Style Font Sizes Typing Basic Text: Text Peculiarities 18 5 Typing Basic Text: Special Characters 20 6 Typing Basic Text: Foreign Characters 22 7 Typing Basic Text: Vertical Formatting Glue Typing Basic Text: Horizontal Formatting 26 9 Basic Math: Using Math Mode Subscripts and Superscripts Grouping Math Accents Basic Math: Math Tables Basic Math: Grouping 35

3 CONTENTS 3 12 Display Math Mode Two Display Styles Not So Basic Math: Equation Labeling The Label Command The Double Whammy Not So Basic Math: Multi-Line Display Math Eqnarray And There s More Eqnarray* Not So Basic Math: Math Arrays The Array Command Two Specialized Arrays Cases Matrices Summary Not So Basic Math: Text in Math Mode Roman Font Text Mode Not So Basic Text: The Preamble \usepackage{...} New Commands No So Basic Text: The Title Page Titlepage Commands The Abstract Not So Basic Text: The Main Body Sectioning Commands Labeling Footnotes

4 CONTENTS 4 20 Not So Basic Text: Lists and Quotations Lists Bulleted Lists Numbered Lists Word-Labeled Lists Nesting Lists Customizing the itemize Command Quotes and Quotations No So Basic Text: Tables Typing Tables in L A TEX More Table Commands No So Basic Text: Theorems Defining the theorem environment Using the theorem environment No So Basic Text: The bibliography Bibitem Using the cite Command More Tables Row and Column Lines Column Lines Row Lines Cline The Multicolumn Tricks with Multicolumn The Table Environment Additional Table Commands Longtable BibTeX Steps for using BibTeX A word about PCTeX and MikTeX Sample Bib file entries

5 CONTENTS 5 26 Make Index Using MakeIndex The Process A word about PCTeX and MikTeX Fine Tuning Your Index Graphics The Special Command The Includegraphics Command The Figure Environment Figures Homework Exercises 90

6 Getting Started

7 1 Getting Started: An Overview What is L A TEX? What is L A TEX? L A TEX is a powerful, elegant typesetting program, which can be confusing to the newcomer. The main reason for the confusion is that it s a WYSIWYS (what you see is what you see) program rather than a WYSIWYG (what you see is what you get) program. That is, L A TEX commands are logical and conceptual rather than visual. For example, a command to center text will work from anywhere on the page and the user will not immediately see the text actually centered on the screen. The centering takes place during the typesetting process, and the user sees the centering only after the document is typeset. 1.1 PCTEX vs. L A TEX vs. TEX These notes are spcifically designed to teach you how to use PCTEX in the Windows environment. PCTEX is an application for the PC that utilizes L A TEX commands. While these L A TEX commands are transferable to other systems, I do not cover L A TEX on other types of machines or programs, such as UNIX or Mac. What I refer to as simply TEX or Plain TEX, is the collection of root commands on which L A TEX is loosely based. To TEX a document is to compile all the commands you ve typed. 1.2 Three Files The PCTEX application uses 3 interconnected files: 1. The text (or input) file where you type the TEX commands (usually called filename.tex); 2. The log file which narrates the typesetting process, including any TEX errors you might have made (TEX calls this filename.log); and, 3. The typeset file which shows you your document as it will be printed (filename.dvi).

8 Getting Started: An Overview Using the Application: An Overview To use PCTEX, open the application from the list of program files located in the START menu. The first window you will see as the application opens is the text (or input) window. This is the window in which you will do your typing and entering of commands. To typeset, choose LaTeX from the format window. (See figure), and click on the Typeset button. The TEX log file or log window will appear immediately on the screen. This is where TEX shows you how it is reading your commands; this is also where TEX lists by line number any mistakes you have made. After the document has completed typesetting, the typeset window (or DVI file) will appear. This is the window which contains the final document after PCTEX has read in all your typed text and commands. The TEX name for the typeset document is called the DVI file. In order to print the typeset version of the document, choose Print DVI from the file menu. Find the DVI file, and print.

9 Getting Started: An Overview Create a Practice Document 1. Launch PCTEX. 2. Input text into the input window, which is the first window that appears. 3. When you are finished typing the document, save it (filename.tex). 4. Choose LaTeX from the Format menu. 5. Click the Typeset button. If you haven t saved it already, L A TEX will ask you to save the document. 6. The log window appears which narrates the typesetting process 7. When PcTEX has finished reading your document, go back to the input window and correct any errors. 8. Save and re-typeset the document. 9. If there are no more errors, choose PrintDVI from the File menu to print the typeset document. Note PcTEX will not allow you to do anything else with the document while it is typesetitng. PcTEX must be finished typesetting in order for you to re-enter the input window. You will not see any changes to your document unless you re-typeset.

10 2 Getting Started: Opening a Practice Document Now I will show you how to open a practice document so that you will have the opportunity to experiment with the various commands and exercises that are to follow. 2.1 Step by Step 1. Open the PcTEX application. In the File menu, choose new. 2. In the input window, type \documentclass[12pt]{article}. \begin{document} The documentstyle command tells L A TEX to format your document as an article (rather than a book or letter, for example). The TEX default is 10pt type; the command in square brackets (called an optional argument) enlarges the size to 12pt. The \begin{document} command officially begins the document environment. A. Note the backslash. This means command. 3. Type any text. It doesn t matter where you break the line when you type, as L A TEX does not recognize white space between words unless specified with a command (more about this later). 4. Double-space between paragraphs (L A TEX will automatically indent). 5. When you are finished typing, at the bottom of the document type \end{document}. This command closes the document and tells L A TEX you are ready to typeset. 6. Follow the procedures in Summary: 9 Easy Steps and print the document. When you save this document, save it somewhere you can find later so you can use it for typing the exercises and/or experimenting with the commands.

11 2. Getting Started: Opening a Practice Document Environments The idea of environment is central to L A TEX. The L A TEX program has many pre-set environments intended to make text and math formatting easier. Such environments include for example, text justification, lists, and tables. The largest, most general environment is the documentclass. The documentclass command encompasses a large array of formatting decisions which have been pre-set by L A TEX and defines the page environment in which you type the document. These page formatting options include margins, paragraph indentation, paragraph spacing, headers and footers, and section heading styles. The styles and their general usage are as follows. Style, Command, Usage Style Command Usage article \documentclass{article} Generally used for short, simple documents. report \documentstyle{report} Meant for longer documents that will be broken into chapters and sections. book \documentclass{book} Meant for typesetting actual books. letter \documentclass{letter} Meant for letters.

12 2. Getting Started: Opening a Practice Document Option, Effect In the command \documentstyle[12pt]{article} an option in square brackets was selected. Each documentstyle comes with a few formatting choices. The following are the general choices available to all styles. Option Command Result Type size [12 pt] 12 point type (Default: 10 pt) [11 pt] 11 point type # Columns [twocolumn] Two columns of text. (Default: one) (newspaper style) # sides [twoside] Intended for two-sided (Default: one-sided, copying: binding margin on left except in book style) side for odd numbered pages, right side for even numbered pages; headers may differ for odd and even numbered pages, depending on document style. Displayed Equations [fleqn] Left-align displayed equations. (Default: centered) Equation Numbers leqno Align equation numbers with the (Default: right) left margin. Title Page [titlepage] \maketitle places the title page (Default: on a separate page. \maketitle (For use with article style). places the title page at the top of the first page in article style, and on a separate page in other styles.)

13 Typing Basic Text

14 3 Typing Basic Text: Character Formatting Type Faces, Styles, and Sizes There are two general changes you can make to the fonts in L A TEX. One is changing the type face, and the other is changing the type style. 3.1 Type Face The good news is that there are only four type faces in L A TEX. (1) \rm produces normal roman type. You won t need to use this command very often, because it s the default type face in L A TEX. (2) \sf produces sans serif text. The sans serif font provides a change from the default roman type. (3) \tt produces typewritten text. Though this is not used very often, it does help to make a distinction. You will probably only want to use it when other options for emphasis have been exhausted. (4) Either \begin{equation} with \end{equation} or \[ with \] produces math italic. This is the font used in math mode. This font will be covered in the chapters on math typing.

15 Typing Basic Text: Character Formatting Type Style The following are the five options for type styles you can use in L A TEX. (1) \bf produces boldface type. This is the most commonly used font for emphasis. Like all other good things, however, you can have too much of it. Be careful not to overdo boldfacing. (2) \it produces italic type. This is the second most commonly used font for emphasis. After the end of the italicized text, be sure to include \/. This will add a little extra space before reverting to normal text, preventing the next word or words from running too close to the italicized text. (3) \sl produces slanted type. Slanted type is mostly used for things like journal titles or proclamations in papers (theorems, etc.). Because it does not produce quite as noticeable an effect as italicized text, it can be used for larger groups of text without causing reader eye irritation (whole paragraphs of italicized text can be very annoying; but slanted paragraphs don t have quite as much of an impact). You ll also need to add \/ to the end of slanted text (same as italicized text).

16 Typing Basic Text: Character Formatting 16 (4) \sc produces small caps text. The small caps font is used mostly in titles and section headings. (5) \em produces an emphasis text, one that is different from the prevailing font. This is obviously used to emphasize a word or phrase, and is relative to the font which surrounds the command. For example, Output Input I hate you. {\bf I {\em hate\/} you.} I hate you. {\it I {\rm hate} you.} And so forth. Note that the italic correction should always be included when italic or slanted type is followed by type that is neither italic nor slanted; if you are not sure what \em will do, then put in the italic correction as it has no effect unless italic or slanted type is followed by type that is neither.

17 Typing Basic Text: Character Formatting Font Sizes Unlike PlainTEX, L A TEX offers a selection of easily accessible font sizes: Example Command This is tiny \tiny This is script size This is footnote size This is small This is normal size This is large This is larger This is very large This is huge This is even huger \scriptsize \footnotesize \small \normalsize \large \Large \LARGE \huge \Huge For example, to produce Hello you would type {\bf \large Hello}.

18 4 Typing Basic Text: Text Peculiarities Peculiarities There are five peculiarities to typing basic (meaning simple, easy, rudimentary, elementary, read: non-mathematical!) text in L A TEX. They are as follows: (1) Quotation Marks:,,, and. Left-hand quotation marks (both singular and plural) are typed using the left accent mark ( ), usually located in the left-hand portion of the keyboard. Right-hand quotation marks (both singular and plural) can be typed using either the right accent mark ( ), or by using a double quote symbol ("). (2) Dashes and Hyphens: -,,, and. These four dashes and hyphens are used in four different situations (oddly enough!). The first is used strictly as a hyphen, as in doublejointed. Type it as a single -. The second is used in place of the word to, as in p Type it as --. The third is used as a dash in a sentence when one part of the sentence needs to be set off from the other. Type it as ---. And the last is used in math, as in x y. We ll worry about this one later (and no, it s not ----!). (3) Spaces:. Did you catch that example? No? Well, here s another one:. Spaces in TEX are, for the most part, taken care of automatically. As a general rule, just type a space when you want a space and TEX will adjust the final amount of printed space according to typesetting standards (e.g., L A TEX puts a little more space at the end of a sentence so that you no longer have to remember to type two spaces after a period). One peculiar thing, however, is that L A TEX interprets a single carriage return (usually marked return on your keyboard!) as a space and not as the end of a paragraph.

19 Typing Basic Text: Text Peculiarities 19 (4) Paragraphs: There are a few ways to tell L A TEX to end a paragraph; but the easiest (and the only one we re going to learn right now) is just to double return (remember that we ve already said a single return is just like a space?). That is, put a blank line in-between the two separate paragraphs to tell TEX to separate them. TEX will automatically indent a new paragraph unless you tell it not to do so. (5) Ties: ~ Ties are just like spaces, except they tie two objects together; i.e., they can t be broken at the end of a line or page (hence the name, tie... get it?!). If you want two objects to be tied together, simply connect them with the ~ symbol. For example, it is customary to prevent line breaks in the following situations: when stating a page reference (p.~79 80); in a date (July~4, 1776); when referring to named parts of a document (figure~2); within names (Mr.~Chang); and in other examples we ll see later.

20 5 Typing Basic Text: Special Characters You have already seen that several characters on your keyboard serve a special purpose. For example: \ The backslash tells L A TEX to begin a control sequence; { The left curly bracket begins a group; } The right curly bracket ends a group; and ~ The tilde is used to tie textual objects together on the same line. There are several other characters which serve special purposes. Some of them we will learn to use very soon; and others we probably won t see again until much later. However, it s time to be introduced to them so that you know what they are. Now, say hello to: % The percent symbol is used to make comments in your text window which you don t want to appear in the typeset version of your document (anything that appears on an input line after a percent symbol will not be typeset); & The ampersand is used as an alignment tab (we will see this more when we get into math alignments and tables); # The pound or number symbol is used as a parameter variable in alignments and also in writing definitions; $ The dollar sign is used as the introduction and ending to math items (we will be using this one a great deal... and soon!); ^ The caret symbol is used in math mode to indicate a superscript; and The underscore is used in math mode to indicate a subscript.

21 Typing Basic Text: Special Characters 21 Typing Special Characters as Part of Text So, how do you get L A TEX to typeset these characters when they appear naturally in text? That s a good question to which you can probably guess the answer: the general rule is simply to place a backslash in front of them in the input window. This general rule applies with no modifications to the percent symbol (%), the ampersand (&), the number symbol (#), the dollar sign ($), and the underscore ( ). When you place a backslash in front of the caret (^) and the tilde (~), you get accents on the immediately following character (see handout 2D). There is never really any need to use these characters by themselves; but should you ever have to do so, there are several creative ways (because basic L A TEX is so flexible!). Finally, the backslash (\) and both curly brackets ({ and }) can only be used in math mode. That is, they must be surrounded by dollar signs in your input window. To produce a typeset curly bracket, precede it in your input window with a backslash; to produce a typeset backslash, type \backslash in your input window (both in math mode).

22 6 Typing Basic Text: Foreign Characters As you read earlier about special characters, typing a backslash before a caret or a tilde produces an accent on the letter immediately following. Here is a list of additional accents and foreign characters you can produce in L A TEX: Command Produces \ o ò grave accent \ o ó acute accent \^o ô circumflex or hat \"o ö umlaut or dieresis \~o õ tilde or squiggle \=o ō macron or bar \.o ȯ dot accent \u o ŏ breve accent \v o ǒ háček or check \H o ő l ong Hungarian umlaut \t oo oo tie-after accent \c o o cedilla accent \d o ọ dot-under accent \b o ō bar-under accent \oe,\oe œ,œ French ligature OE \ae,\ae æ,æ Latin and Scandinavian ligature AE \aa,\aa å,å Scandinavian A-with-circle \o,\o ø,ø Scandinavian O-with-slash \l,\l l, L Polish suppressed-l \ss ß German es-zet or sharp S Of course, the accents listed above with the letter o can be used on any other appropriate letter as well.

23 Typing Basic Text: Foreign Characters 23 It is important to note that the commands which include letters in them (the commands from \u on) must be followed immediately by a space, as opposed to those which have only symbols in them (those before \u ). The reason for this is that L A TEX would not know when to stop reading the lettered command sequences without a space to end them. There are also: \i ı dotless i \j j dotless j which are used when i and j are given an accent.

24 7 Typing Basic Text: Vertical Formatting There are four main ways to tell L A TEX to skip vertically on the page: \smallskip skips roughly a single line space; \medskip skips roughly a space and a half; \bigskip skips roughly a double space; and, \vspace{dimension} will allow you to skip any amount you choose. The dimension in the last command can be replaced with any unit of measurement: inches (in), centimeters (cm), points (pt), whatever you feel most comfortable using. As an example, you could type \vspace{1in} and L A TEX would skip 1 inch. Keep in mind, though, that LaTEX understands spaces as being relative to something a one inch skip vertically down from a title, for example. You can t start a page with a skip because L A TEX wouldn t have anything to skip from. In that case, you would put an asterick in the command, to tell L A TEX that this is a non-relative skip: \vspace*{dimension} 7.1 Glue We say that the first three vertical spacing commands skip roughly a certain amount because they actually insert space relative to the rest of the page. In other words, L A TEX will determine exactly how far to skip based on how much room there is on the page for the skip (within certain limitations). For example, a \bigskip is defined as being anywhere between 8 and 16 points. As L A TEX is typesetting the page, it determines exactly how much room there is for each skip and stretches or shrinks the amount of space depending on how much room there is (in the case of a \bigskip, as little as 8 points or as much as 16 points, but usually somewhere closer to 12 points). You will sometimes hear people talk about blank space as glue because of this ability to stretch and shrink.

25 Typing Basic Text: Vertical Formatting 25 Additionally, there are: \vfil, and \vfill. These commands tell L A TEX to insert blank space ( glue ) with much more stretchability and shrinkability than any of the other commands. You probably won t have too much direct need for these, except in the case of inserting a pagebreak. The commands for a pagebreak are: \vfill \eject The \vfill fills the vertical space between the end of the text and the end of the page, and \eject tells L A TEX to move to the next page. You could simply use \eject, but if you only had a few lines of text, L A TEX would try to vertially spread the information out to fill the page; inserting the \vfill keeps this from happening.

26 8 Typing Basic Text: Horizontal Formatting The following commands tell L A TEX to horizontally position the bracketed text, either to the left, right, or center: \begin{flushleft} text, text \end{flushleft} \begin{flushright} text, text \end{flushright} \begin{center} text, text \end{center} Notice that these formatting commands are treated like environments in L A TEX. You must begin and end the environment, but the text within remains fluid. It is possible to manually terminate a line within the environment, and the command for doing this is: \\ and a multi-lined title might look like this: \begin{center} \bf \large TITLE\\[.5in] AUTHOR \end{center}

27 Typing Basic Text: Horizontal Formatting 27 Notice also that the font commands, boldface and large, do not need extra curly brackets because L A TEX will extend them only through the end of the environment. The font commands WILL continue, however, until you tell them to stop by indicating a new font. Notice also a dimension in square brackets. This is an optional argument and tells the program to skip the indicated space between the lines in the environment (in this example, the extra space is.5 inches). You can use a negative space also, if you find you ever have the need for that. Horizontal Skips There are three main ways to tell L A TEX to skip horizontally on a page: \quad skips about the length of the letter m in whatever font you are currently using; \qquad skips about twice that much (what a surprise!); \hspace{dimension} will allow you to skip any amount you choose. Just as with vertical skipping, you can use both regular inches (in), centimeters (cm), or points (pt); or you can use the true measurements: truein, truecm, or truept. Remember what we said about regular measurements being relative to the rest of the page (they will magnify along with the text if you magnify the document), but true measurements always stay the same size. Additionally, there are: \hfil, and \hfill. Just like the related vertical commands, these commands tell TEX to insert blank space ( glue ) with much more stretchability and shrinkability than any of the other commands (in the horizontal direction this time instead of vertical!). And, also just like the vertical fills, you probably won t have too much direct need for these. But if you understand the concept of glue, you will almost definitely be able to find a use for them sometime.

28 Basic Math

29 9 Basic Math: Using Math Mode Using Math Mode Dollar signs ($) surrounding a word or command indicate math mode, or math font. The math font includes math symbols, Greek letters, and text. Any text in math mode is printed in italics, called math italics. Once you learn the symbols and Greek letters, the actual set of math commands is very simple. Tables of various math symbols and Greek letters follow. As an example of the way commands work in math mode, if you wanted to typeset the Greek letter β, you would type $\beta$ in the input window and compile. LaTeX reads the command, executes it, and gives you a.dvi with the β ready to print. 9.1 Subscripts and Superscripts An underscore ( ) in math mode indicates subscript: $C i$ in the input window C i in the typeset window. A carat (^) in math mode indicates superscript: 9.2 Grouping $C^i$ in the input window C i in the typeset window. As we have seen with other L A TEX commands, the curly brackets ({ and }) are used to group text together to tell L A TEX when a group begins and ends. The curly brackets are used in math mode this way as well. As an example, if you want more than one character subscripted, you need to group them with brackets: $C {ijk}$ in the input window C ijk in the typeset window. The same thing applies for superscript: $C^{ijk}$ in the input window C ijk in the typeset window.

30 Basic Math: Using Math Mode Math Accents We have discussed special characters and accents in normal text. LaTEX also has special characters in math mode, called math accents, which use different commands than they do in normal text typing: $\hat a$ $\check a$ $\tilde a$ $\acute a$ $\grave a$ $\dot a$ $\ddot a$ $\breve a$ $\bar a$ $\vec a$ â ǎ ã á à ȧ ä ă ā a These accents generally apply only to the next, single character and can t be grouped.

31 10 Basic Math: Math Tables Note: All the commands in this handout must occur in math mode (i.e., between dollar signs). Greek Letters α \alpha ι \iota \varrho β \beta κ \kappa σ \sigma γ \gamma λ \lambda ς \varsigma δ \delta µ \mu τ \tau ǫ \epsilon ν \nu υ \upsilon ε \varepsilon ξ \xi φ \phi ζ \zeta o o ϕ \varphi η \eta π \pi χ \chi θ \theta \varpi ψ \psi ϑ \vartheta ρ \rho ω \omega Uppercase Γ \Gamma Ξ \Xi Φ \Phi \Delta Π \Pi Ψ \Psi Θ \Theta Σ \Sigma Ω \Omega Λ \Lambda Υ \Upsilon Openings and Closings [ \lbrack \lfloor \lceil { \lbrace \langle ] \rbrack \rfloor \rceil } \rbrace \rangle

32 Basic Math: Math Tables 32 Miscellaneous Symbols ℵ \aleph \prime \forall h \hbar \emptyset \exists ı \imath \nabla \neg j \jmath \surd \flat l \ell \top \natural \wp \bot \sharp R \Re \ \clubsuit I \Im \angle \diamondsuit \partial \triangle \heartsuit \infty \ \backslash \spadesuit Relations \leq \geq \equiv \prec \succ \sim \preceq \succeq \simeq \ll \gg \asymp \subset \supset \approx \subseteq \supseteq = \cong \sqsubseteq \sqsupseteq \bowtie \in \ni \propto \vdash \dashv = \models. \smile \mid = \doteq \frown \parallel \perp Negated Relations \not< \not> \not= \not\leq \not\geq \not\equiv \not\prec \not \succ \not\sim \not\preceq \not\succeq \not\simeq \not\subset \not\supset \not\approx \not\subseteq \not\supseteq = \not\cong \not\sqsubseteq \not\sqsupseteq \not\asymp

33 Basic Math: Math Tables 33 Binary Operations ± \pm \cap \vee \mp \cup \wedge \ \setminus \uplus \oplus \cdot \sqcap \ominus \times \sqcup \otimes \ast \triangleleft \oslash \star \triangleright \odot \diamond \wr \dagger \circ \bigcirc \ddagger \bullet \bigtriangleup \amalg \div \bigtriangledown Arrows \leftarrow \longleftarrow \uparrow \Leftarrow = \Longleftarrow \Uparrow \rightarrow \longrightarrow \downarrow \Rightarrow = \Longrightarrow \Downarrow \leftrightarrow \longleftrightarrow \updownarrow \Leftrightarrow \Longleftrightarrow \Updownarrow \mapsto \longmapsto ր \nearrow \hookleftarrow \hookrightarrow ց \searrow \leftharpoonup \rightharpoonup ւ \swarrow \leftharpoondown \rightharpoondown տ \nwarrow \rightleftharpoons

34 Basic Math: Math Tables 34 Function Names These are all math functions which should be typeset in roman type (as opposed to the usual math italics). The following commands will typeset the related function in roman type. \arccos \cos \csc \exp \ker \limsup \min \sinh \arcsin \cosh \deg \gcd \lg \ln \Pr \sup \arctan \cot \det \hom \lim \log \sec \tan \arg \coth \dim \inf \liminf \max \sin \tanh Large Operators These large operators can be used in both normal math mode and display math mode (we ll talk about display math later). They should be used in either case when the operator has a subscript or superscript and should be distinguished from their smaller counterparts. For example, \Sigma should be used to describe the capital Greek character Σ; however, \sum should be used when the symbol has a subscript or superscript, as in n i=1. \sum \prod \coprod \int \oint \bigcap \bigcup \bigsqcup \bigvee \bigwedge \bigodot \bigotimes \bigoplus \biguplus

35 11 Basic Math: Grouping Now that you have mastered the tables of Greek and math symbols, it s time to learn a few more frequently used math commands: (1) \sqrt (2) \frac (3) \atop (4) \sum (5) \int As we shall see in the following examples, all five of these commands require special grouping. (1) \sqrt: This is the square root command. Though this command doesn t ALWAYS require grouping like the others, it s still good to be acquainted with how grouping works with it. Note that the curly brackets surround only the information that is to go into the square root sign. The command itself is on the outside of the curly brackets. \sqrt{x + Y + Z} X + Y + Z (2) \frac: This is the fraction command. The command stands outside the curly brackets, with both the numerator and denominator are enclosed in curly brackets. \frac{x}{y} X Y

36 11. Basic Math: Grouping 36 (3) \atop: This command is used to place two pieces of information on top of each other. Note that this command stands in the center, and the curly brackets surround the entire expression. {X \atop Y} (4) \sum: This command looks like an upper case sigma, but acts differently. With the \sum command, the super- and subscripts are placed either to the side (in regular math mode) or directly on top and bottom (in display math mode) of the summation sign. The super- and subscripts are called limits. Regular Math Mode: X Y $\sum^{x + Y} {A + B}$ X+Y A+B Display Math Mode: \[\sum^{x + Y} {A + B}\] X+Y A+B

37 11. Basic Math: Grouping 37 (5) \int: This is the integral command. The super- and subscripts for \int are also called limits. However, unlike \sum, the limits appear to the side of the integral sign in both regular math and display modes (although you can change that with the \limits command). Regular Math Mode: $\int^{x + Y} {A + B}$ X+Y A+B Display Math Mode: \[\int^{x + Y} {A + B}\] X+Y A+B

38 12 Display Math Mode There are two ways to indicate display math mode. \[; and, \begin{equation} paired, of course, with \end{equation}. We will discuss the differences between these two methods in a moment, but for the present, note the differences just between regular (in-text) math mode and displayed math mode: Regular Math Mode: Finally, we know that $(X + Y)\times B$ is, as suspected, non-differentiable. Finally, we know that (X + Y ) B is, as suspected, non-differentiable. Display Math Mode: Finally, we know that $$(X + Y)\times B$$ is, as suspected, non-differentiable. Finally, we know that is, as suspected, non-differentiable. (X + Y ) B

39 Display Math Mode 39 The obvious differences in the typeset versions are that display math mode: centers the equation on a new line, puts a little extra space above and below the equation; and, the display command takes the place of dollar signs. L A TEX also adjusts the sizing of symbols in display mode, making them larger if necessary (e.g., the numerators and denominators of fractions are made larger in display mode than they are in regular math mode). Note also the difference in input style namely, that we have begun the text we want to display on a new input line. While this is not necessary, it does make things easier to find when you come back to edit. However, you need to be careful not to include a blank line in your input above or below displayed text. Can you guess why? That s right: because those blank lines will be interpreted as indicating a new paragraph and L A TEX will include more space than is necessary to properly display the equation Two Display Styles As I indicated above, there are three ways to indicate display mode. The differences between them are small, and only sometimes important. \[ is the way to indicate display mode in LaTEX if you do NOT want the equation numbered. LaTEX automatically numbers the equations otherwise. \begin{equation} and \end{equation} automatically numbers the equations and allows you to label them.

40 Not So Basic Math

41 13 Not So Basic Math: Equation Labeling As I said earlier, LaTEX will automatically number your displayed equations. The command pair that you use to do this, again, is \begin{equation} and \end{equation}. So, what if there is a textual reference to a specific equation? If you update the numbering, by inserting an equation somewhere for example, you will want the textual reference to update as well. L A TEX does this by allowing you to name the equation, so that the textual reference can link to the name and then update the number. This is called labeling and can be used in many L A TEX environments The Label Command The command is simply \label{ name"}, and comes before the \end{equation} command. Then, the textual reference look like this, \ref{ name"}. For example, \begin{equation} \alpha + \sqrt{\beta - \infty} \label{fred} \end{equation} would give you: α + And, somewhere in the text you would type: \ref{fred} β (1) LaTEX then finds fred and places fred s number in that place. For example, this current sentence contains the reference command, (\ref{fred}) (1). Notice that I typed parentheses around the reference command to format the referenced number to be like the equation number. If I have many types of environments labeled, like propositions, proofs, Lemmas, I might also specify that this is an equation, like Equation (\ref{fred}).

42 Not So Basic Math: Equation Labeling The Double Whammy In order for L A TEX to read references, label them, and typeset, you need to typeset a document twice. The first typeset will read the commands and store the information into an auxiliary file. The second typeset will read the auxiliary file and fill in the correct numbers. PcTEX will actually give you a dialogue box that gives you the option to re-typeset. We will see in subsequent sections that almost any L A TEX environment can be labelled and referred to.

43 14 Not So Basic Math: Multi-Line Display Math Frequently, you will need to type displayed equations that take up more than just one line. There are two basic commands that will help you to accomplish this. They are: \eqnarray; and \eqnarray* Eqnarray The command \eqnarray is used when you need to align the different lines of a multi-line equation, and you need to number any or all of them. The format for \eqnarray is: \begin{eqnarry} math text & = & math text\\ math text & = & math text \end{eqnarray} There are many things to note: The \begin and \end eqnarray is set up much like begin and end equation, and in fact takes the place of the begin and end equation commands; Ampersands (&) are used as tab markers; L A TEX sees the equation as having three columns: A right-aligned math text column; A centered equal sign (or other operator); and, A left-aligned math text. A double backslash (\\) tells L A TEX to end the line; There is no double backslash on the last line of text apparently L A TEX knows to end the last line of the equation (duh).

44 Not So Basic Math: Multi-Line Display Math And There s More... Confused yet? There s more! When you use eqnarray, L A TEX automatically numbers each line. There are a couple of finer points about this command: If you don t want a particular line numbered, you type \nonumber before the double backslash; If you want a little less or a little more space between lines (you might have some giant fractions that need more room), you simply add an optional argument(the same type of argument we saw that goes with document styles and horizontal formatting). This optional argument is simply a pair of square brackets with a vertical skip amount, after the double backslash. For example, \\[5pt] adds more space, or \\[-5pt] subtracts a little space. AND, since this is a L A TEX environment, each and any of the lines can be specifically labeled for future reference. It s as if L A TEX sees each line like a little mini-equation. For example, an eqnarray with the first line not numbered, 5 points of extra space between the second and third lines, and the third line labeled would look like this: \begin{eqnarry} math text & = & math text\\\nonumber math text & = & math text\\[5pt] math text & = & math text\\\label{fido} math text & = & math text \end{eqnarray} 14.3 Eqnarray* The \eqnarray* command is exactly like the regular eqnarray command except that NONE of the lines are numbered. All the lines can still be labelled and spaced, just like the previous command.

45 15 Not So Basic Math: Math Arrays We have seen the eqnarray (equation + array) command which lines up parts of an equation. Now we will see an array command which lines up material within an equation. An array is L A TEX-talk for a table in math mode. Any time you want to line things up inside an equation, you use an array, and they, for the most part, are fairly simple to use The Array Command The array command has two parts: the beginning and end argument (like the line formatting arguments and the equation arguments) and a set-up argument. All arguments are enclosed in curly brackets. The set-up argument is simply a shorthand to tell L A TEX how many columns you want and how you want them justified. For example, to set-up a three column array where all the columns are left-justified, the array command would look like this: \begin{array}{lll} Similarly, you would use a c to center the math text and an r to right-justify it. After you begin the array, columns are marked by ampersands (&) and end-oflines are marked by a double backslash(\\), just like the eqnarray commands. So, our array would look like this: \[ \begin{array}{lll} math & math & math \\ math& math & math \end{array} \] Please note: All of the formatting you saw in eqnarray applies here, the optional argument ([5pt]), the labeling, the ampersands, double backslash. Just think of it as, where the eqnarray had three columns that were already set up as right-, center-, and left-justified, the array command will allow to set your own number and justification of columns.

46 Not So Basic Math: Math Arrays Two Specialized Arrays Cases The first special case of an array is called case. This is an array that generally has only two columns, centered and left-justified. The second column usually contains non-math text. And usually there is only one delimeter (a left curly bracket). The output for a case looks like this: { 1 < 2 for all δ 0 otherwise The input would look like this: \[ \left\{ \begin{array}{ll} 1<2 & \hbox{for all } \delta \rightarrow \infty\\ 0 & \hbox{otherwise} \right. \] Please note: There is a left delimeter (in this case a curly bracket), but no right delimeter. Therefore, we tricked L A TEX and typed \right. in the place where L A TEX would be looking to match the \left{. The way cases are generally used, the material in the second column involves non-math text. Therefore, we have placed the non-math text in an \hbox. The cases format can contain more than two rows, but usually contains only two columns.

47 Not So Basic Math: Math Arrays Matrices The matrix format can have multiple columns and multiple rows; the information is centered, and the whole thing is generally surrounded by delimeters. The output would look like this: And the input would look like this: a + b 0 c + d 0 a + b c + d c + d a + b 0 \[ \left( \begin{array}{ccc} a + b & 0 & c + d\\ 0 & a + b & c + d\\ c + d & a + b & 0 \end{array} \right) \] Please note: Unlike the cases format, text in each column is centered. Like cases format, the matrix format can have more than two rows; however, unlike cases, the matrix can also have more than two columns by adding additional ampersands on each line.

48 Not So Basic Math: Math Arrays Summary Case Matrix Ampersand for alignment yes yes Text justification left center \\at end of each line yes yes Surrounded by a delimiter no left { yes # of columns 2 any # of rows any any Display only yes yes Font change after & yes (need \hbox{}) no (stays in math mode)

49 16 Not So Basic Math: Text in Math Mode As you know, LaTEX prints everything that is in math mode as math italics. Sometimes, however, you may want to type a word or two of regular text inside an equation. There are two ways to do this Roman Font One way to type text in math mode is simply to specify the roman font. For example, to get Θ σ or Θ α you could enter \[\Theta\times\sigma {\rm\ or\ } \Theta\times\alpha\]. Note that the \rm ( roman ) command is enclosed in curley brackets (as all character formatting commands usually are). Note that we have included a \ followed by a space on either side of the roman text. This is necessary because all we have done is to change the style of the current font; we have not changed the mode in which TEX is operating. Remember that TEX ignores spaces in math mode unless you specify otherwise (with a \ followed by a space or some other type of horizontal spacing such as \quad) Text Mode Another way to type text in math mode is to actually change the mode, by putting the text into horizontal text mode instead of math mode by using the \hbox command. In the example above, you could also have typed \[\Theta\times\sigma \hbox{ or } \Theta\times\alpha\].

50 Not So Basic Math: Text in Math Mode 50 Note that the \hbox command is outside the curly brackets. When using \hbox, you can simply type a space inside the group and TEX will typeset a space (unlike when using the \rm command where you had to type \ followed by a space). Again, you could also use \quad for more space. The problem with using \hbox arises when you need text in a size other than normal text size (e.g., a superscript). The command \hbox changes the mode of TEX operation from math to text, so superscripts are no longer available. General Rule: It is probably easiest to use \hbox unless you think you might need roman text in a non-text size, in which case you should use \rm.

51 Not So Basic Text

52 17 Not So Basic Text: The Preamble Parts of a Preamble The Preamble The preamble, a bit of space before the beginning of the content of the document, is the place where you include any macro packages you might want to use, list any new definitions you may have written, and list any definitions of new theorems \usepackage{...} This is the command that tells L A TEX to read in any macro packages you wish to use in the document. These packages can range from a style file that gives the headers a little more pizazz to a set of definitions that allow you to include graphics in the paper. Most packages come installed with PCTeX, but more are listed in the AFS space of the Leland directory, and they can be easily downloaded New Commands As if there weren t already too many commands, L A TEX allows you to easily create new ones. The command looks like this: \newcommand{\new name}{string of characters and/or old commands}. For example, you may find that in a certain paper you are typing ˆθ t+1 very often. You can write a little definition for this expression, \newcommand{\ht}{\hat\theta {t+1}}}. And, as long as you use the expression inside math mode, it will work like a charm. As you can guess, however, if you put dollar signs into the definition itself, the expression won t need them later on. In this particular case, leaving the dollar signs out makes sense, because you would not very likely be using the expression outside of math mode.

53 18 No So Basic Text: The Title Page The Titlepage In L A TEX, both article style and report style have a \maketitle command that makes setting up a titlepage easier. By default, the titlepage is on a separate page in the report style and on the top of the first page in the article style. You can use the [titlepage] option in article style if you wish the titlepage to be separate Titlepage Commands These are the commands for a titlepage: \title{title of document} \author{author\and Author\thanks{Acknowledgements}} \date{\today} \maketitle The \title{} command automatically centers, bolds, and enlarges the text. Note that the \author command can handle more than one name with the \and; this, however, centers the names on one line. If you want the authors names on separate lines, a double backslash acts as a line break, for example, \author{first author s name\\ and\\ Second author s name} The \thanks{} command comes inside the author command s curly brackets. This produces an unnumbered footnote.

54 18. No So Basic Text: The Title Page 54 The \today command will insert today s date, whatever it is. If you want a particlular date, simply type it in. The \maketitle command tells L A TEX to produce all the titlepage commands. Note that, although these definitions make it easier to type a titlepage, they also make it very difficult to type things differently than the way L A TEXhas it set up The Abstract L A TEX has an Abstract environment which titles and indents the abstract. In the report style, the abstract receives a separate page, and in the article style the abstract is placed just below the title. Using the [titlepage] option with the article style places the abstract on a separate (as well as the title, as mentioned above). To use the abstract environment, directly after the \maketitle command, simply type \begin{abstract} Type the text of the abstract \end{abstract}

55 19 Not So Basic Text: The Main Body 19.1 Sectioning Commands L A TEX utilizes sectioning commands to help you divide the document into parts. All but the paragraph and subparagraph will be automatically numbered. The following is a list of the commands. \part (used with article style) \chapter (used with book style) \section \subsection \subsubsection \paragraph \subparagraph \appendix You type the actual title of the section in curly brackets, for example, \section{introduction}. The appendix The appendix section receives a special mention because L A TEX automatically names these sections as Appendix A and so forth.

56 19. Not So Basic Text: The Main Body Labeling Any command in L A TEX that automatically numbers (like an equation, section, or item) can be labeled for future reference. For example, you may want to label a section, and refer to it later on by its label rather than by its number. L A TEX will automatically update the references as it numbers. That way, you don t have to worry about changing the numbering as the paper is revised in case a section is deleted or the order is changed. As well, you don t actually see the numbering of equations and sections until after the document is typeset, so numbering and referring to the numbers by hand can be tedious. The Labeling and Referencing Commands Environment and Label \begin{equation}\label{eq1} \section{introduction}\label{intro} \item\label{item1} \begin{theorem}\label{th1} Referencing the Label \ref{eq1} \ref{intro} \ref{item1} \ref{th1} There may be times when you want an un-numbered section. To do this, you type \section*{ Name of section} This will give you a section titled Name of Section that is not numbered and will not appear in the table of contents Footnotes L A TEX has a very simple format for making footnotes. The command looks like this: \footnote{text of footnote} You type the footnote into the text of the document where you want the footnote number to occur. The footnotes are automatically numbered.

Getting started with L A TEX on XP

Getting started with L A TEX on XP Getting started with L A TEX on XP A very brief beginners guide Version 1.4: The current version is linked to from www.maths.leeds.ac.uk/school/students 1 Introduction This is a very simple document to

More information

Introduction to L A TEX

Introduction to L A TEX Introduction to L A TEX John McCleary Vassar College 17 September 2013 When the first volume of Donald Knuth s The Art of Computer Programming was published in 1969, it was typeset using hot metal type

More information

Summary of Commonly-Used Features of LaT E X

Summary of Commonly-Used Features of LaT E X Summary of Commonly-Used Features of LaT E X D. R. Wilkins November 19, 1993 Contents 1 Rules for Ordinary Text (without mathematics) 2 1.1 Special Characters... 2 1.2 Paragraphs... 2 1.3 Quotation marks...

More information

LaTeX in SLATE. Common Symbols. 1. Subscripts & Superscripts Fractions & Roots. 4. Brackets.. 5. Multiline Formulas.. 6. Matrices..

LaTeX in SLATE. Common Symbols. 1. Subscripts & Superscripts Fractions & Roots. 4. Brackets.. 5. Multiline Formulas.. 6. Matrices.. LaTeX in SLATE Common Symbols. 1 Subscripts & Superscripts... 3 Fractions & Roots. 4 Brackets.. 5 Multiline Formulas.. 6 Matrices.. 7 Limits & Integrals. 8 l LaTeX Common Symbols Operations \times \div

More information

L A TEX Primer. Randall R. Holmes. August 17, 2018

L A TEX Primer. Randall R. Holmes. August 17, 2018 L A TEX Primer Randall R. Holmes August 17, 2018 Note: For this to make sense it needs to be read with the code and the compiled output side by side. And in order for the compiling to be successful, the

More information

A Short Introduction to L A TEX

A Short Introduction to L A TEX A Short Introduction to L A TEX David J. Eck October 22, 2003 Abstract This paper is a very short introduction to the essentials of L A TEX, a document-preparation system that is an alternative to typical

More information

Using L A TEX. A numbered list is just that a collection of items sorted and labeled by number.

Using L A TEX. A numbered list is just that a collection of items sorted and labeled by number. Using L A TEX About these notes These notes give some starting tips on using L A TEX to typeset mathematical documents. To learn the system at all fully you ll need a proper L A TEX manual, but you can

More information

Character Entity References in HTML 4 and XHTML 1.0

Character Entity References in HTML 4 and XHTML 1.0 1 of 12 2/2/2009 2:55 PM Character References in HTML 4 and XHTML 1.0 Here is a set of tables containing the 252 allowed entities in HTML 4 and XHTML 1.0, as described in section 24 of the official HTML

More information

Guide to using L A TEX

Guide to using L A TEX Guide to using L A TEX Andrew Stevens, UC Berkeley 1 What is L A TEX, and why use it? L A TEX (pronounced LAH-tekh or LAY-tekh) is a language and document preparation system for typesetting. L A TEX is

More information

News from the Wrapper

News from the Wrapper News from the Wrapper Gesellschaft für Schwerionenforschung mbh Darmstadt, Germany JACoW Team Meeting 2004 Knoxville, Tennessee November 7, 2004 What is still the same? What is still the same? What has

More information

Math 235: Introduction to LaTeX

Math 235: Introduction to LaTeX Math 235: Introduction to LaTeX The LaTeX word processing system was built to do mathematical typesetting. It is different than word processors; in LaTeX you type in text and typesetting commands, then

More information

A L A T E X quick start

A L A T E X quick start 1 A L A T E X quick start 1.1 A first example When you meet a new computer language (and TEX is a language, although not a very general purpose one) the first thing to do is to write a program that outputs

More information

Appendix B: Latex survival guide

Appendix B: Latex survival guide Appendix B: Latex survival guide The philosophy in this course is that we would like to be good citizens of the scientific community. An important part of being a good citizen is being able to communicate

More information

Meeting One. Aaron Ecay. February 2, 2011

Meeting One. Aaron Ecay. February 2, 2011 Meeting One Aaron Ecay February 2, 2011 1 Introduction to a L A TEX file Welcome to LaTeX. Let s start learning how to use the software by going over this document piece by piece. We ll read the output

More information

Using the mathematical features of Word 2007

Using the mathematical features of Word 2007 Using the mathematical features of Word 2007 Important information for Open University students It is important to note that mathematical notation created in Word 2007 will not be preserved if the document

More information

L A TEX Tutorial. 1 Introduction. 2 Running L A TEX. J. E. Rice. May 2010

L A TEX Tutorial. 1 Introduction. 2 Running L A TEX. J. E. Rice. May 2010 L A TEX Tutorial J. E. Rice May 2010 Abstract The purpose of this document is to provide a simple example of how to use L A TEX. Examples of tables, figures, citations, references and math are shown, and

More information

A Beginner s guide to L A TEX for CSCA67/MATA67. Kohilan Mohanarajan

A Beginner s guide to L A TEX for CSCA67/MATA67. Kohilan Mohanarajan A Beginner s guide to L A TEX for CSCA67/MATA67 Kohilan Mohanarajan August 31, 2017 Contents 1 Foreword 2 2 Getting Started 3 3 Setting up your L A TEXDocument 4 4 Writing your L A TEXDocument 6 4.1 Environments...............................

More information

Learning LaTeX: The Basics

Learning LaTeX: The Basics Learning LaTeX: The Basics The best way to learn LaTeX is by trial and error, with a lot of experimenting, and using other people s.tex files as a model. Google is also a good source: for example, googling

More information

Introduction to L A TEX for MCS-236

Introduction to L A TEX for MCS-236 Introduction to L A TEX for MCS-236 Max Hailperin, based on a version by Tom LoFaro September 14, 2011 1 Why L A TEX? L A TEX is a very strange document formatting system. Actually, it is a combination

More information

Simple Math. Adam Dishaw 2011 September 21. Suppose you want to include some math in your documents. Just follow these basics steps:

Simple Math. Adam Dishaw 2011 September 21. Suppose you want to include some math in your documents. Just follow these basics steps: Simple Math Adam Dishaw 2011 September 21 Suppose you want to include some math in your documents. Just follow these basics steps: 1. Create a new TEX document with the basic requirements (the documentclass

More information

My Mathematical Thesis

My Mathematical Thesis My Mathematical Thesis A. Student September 1, 2018 Abstract An abstract is a paragraph or few that gives the reader an overview of the document. Abstracts are commonly found on research articles, but

More information

CS 189 L A TEX and Linux: Mathematical Formulas

CS 189 L A TEX and Linux: Mathematical Formulas CS 189 L A TEX and Linux: (1) Robert S. Laramee Computer Science Department School of Physical Sciences Swansea University May 7, 2008 (1) Robert S. Laramee CS 189 LATEX and Linux: Overview of Lecture

More information

An Interactive Introduction to L A TEX

An Interactive Introduction to L A TEX An Interactive Introduction to L A TEX Part 1: The Basics Dr John D. Lees-Miller December 2, 2017 Why L A TEX? It makes beautiful documents Especially mathematics It was created by scientists, for scientists

More information

David Helmbold, October 2005, Revised October 2007

David Helmbold, October 2005, Revised October 2007 Short Intro to LATEX David Helmbold, October 2005, Revised October 2007 Goals: Introduce L A TEX... so you can read/edit L A TEX source... and use manual as reference rather than reading it Outline: 1.

More information

Introduction to MCS 220 and L A TEX

Introduction to MCS 220 and L A TEX Introduction to MCS 220 and L A TEX Tom LoFaro August 28, 2009 1 Introduction to MCS 220 MCS 220, Introduction to Analysis, carries a WRITD (writing in the discipline) designation. What this means to you

More information

Semantics. Doug Arnold (L A TEX for Linguists) September 25, 2007

Semantics. Doug Arnold (L A TEX for Linguists) September 25, 2007 Semantics Doug Arnold (L A TEX for Linguists) September 25, 2007 1 Introduction TEX and L A TEX are very good at typesetting logic so typesetting most bits of semantics is very easy, just using the things

More information

Introduction to Math in LaTeX

Introduction to Math in LaTeX Robert Andersen University of Oxford and University of Western Ontario ICPSR Summer Program, July 2002 Introduction to Math in LaTeX LaTeX has three basic modes: 1. Text mode 2. Inline math mode (allows

More information

Latex Tutorial 1 L A TEX. 1.1 Text

Latex Tutorial 1 L A TEX. 1.1 Text Latex Tutorial This tutorial was originally prepared by Joel Wein of MIT. You may find it helpful in preparing your notes. Anything I send you in the template file supercedes what is written here. Yishay

More information

L A TEX: Online module 2

L A TEX: Online module 2 L A TEX: 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 Topics to be covered Typeface Font size Special characters

More information

Course A, Part 1 Basic Formatting in L A TEX

Course A, Part 1 Basic Formatting in L A TEX Course A, Part 1 Basic Formatting in L A TEX As you become acquainted with L A TEX, you must remember that this is not a piece of word processing software. Neither is it a programming language. Specifically,

More information

LATEX Primer. 1 Introduction (Read Me)

LATEX Primer. 1 Introduction (Read Me) LATEX Primer 1 Introduction (Read Me) This document is intended to be used as a primer. You are welcome to remove the body of the document and use the headers only. If you actually read this document,

More information

2. Unlock the Customization Features: The Edit Button Click the "Edit" button on the Dashboard Home Page to unlock the customization features.

2. Unlock the Customization Features: The Edit Button Click the Edit button on the Dashboard Home Page to unlock the customization features. 1. Introduction: Customize Content for Your Students The Garland Science Learning System (GSLS) is completely customizable. You can edit, delete, or add content to create a unique learning experience for

More information

Outline. Installing LaTeX. Opening TeXShop. Intro to LaTeX. Intro to LaTeX interface Working with text Tabbing and tables Figures Math and equations

Outline. Installing LaTeX. Opening TeXShop. Intro to LaTeX. Intro to LaTeX interface Working with text Tabbing and tables Figures Math and equations Outline UCLA Department of Statistics Statistical Consulting Center interface Working with text Tabbing and tables Figures Math and equations April 23, 2009 Installation Installing LaTeX Opening TeXShop

More information

Getting started General Tables Figures Math Wrap up. UCLA Department of Statistics Statistical Consulting Center. LaTeX Bootcamp

Getting started General Tables Figures Math Wrap up. UCLA Department of Statistics Statistical Consulting Center. LaTeX Bootcamp UCLA Department of Statistics Statistical Consulting Center Mine Çetinkaya mine@stat.ucla.edu September 20, 2010 Outline 1 Getting started 2 General 3 Tables 4 Figures 5 Math 6 Wrap up 1 Getting started

More information

My LaTeX Document. July 7, Introduction 2

My LaTeX Document. July 7, Introduction 2 My LaTeX Document Me July 7, 2017 Contents 1 Introduction 2 2 Exercises 2 2.1 Piecewise defined function...................... 2 2.2 Greek letters............................. 2 2.3 Limits.................................

More information

Intro to LATEX I. Aaron Erlich POLS/CSSS 510, Why LATEX? Programming Document Structure Floats Tables Lists Math

Intro to LATEX I. Aaron Erlich POLS/CSSS 510, Why LATEX? Programming Document Structure Floats Tables Lists Math Intro to LATEX I 1 1 POLS/CSSS 510, 2012 Intro to LATEX I 1 / 32 Outline 1 Why L A TEX? 2 Programming 3 Document Structure 4 Floats 5 Tables 6 Lists 7 Math Intro to LATEX I 2 / 32 The Complaint This sucks

More information

Become a L A TEX Guru

Become a L A TEX Guru Become a L A TEX Guru 1 Many thanks to Michele, who was my coteacher for this class for Splash 2009 1. Log in using the username sipb2 and the password hsspmonster 2. Once you are logged on, type sudo

More information

The MathType Window. The picture below shows MathType with all parts of its toolbar visible: Small bar. Tabs. Ruler. Selection.

The MathType Window. The picture below shows MathType with all parts of its toolbar visible: Small bar. Tabs. Ruler. Selection. Handle MathType User Manual The MathType Window The picture below shows MathType with all parts of its toolbar visible: Symbol palettes Template palettes Tabs Small bar Large tabbed bar Small tabbed bar

More information

An Interactive Introduction to L A TEX. Part 1: The Basics. John Lees-Miller. writel A TEX

An Interactive Introduction to L A TEX. Part 1: The Basics. John Lees-Miller. writel A TEX An Interactive Introduction to L A TEX Part 1: The Basics John Lees-Miller writel A TEX Why L A TEX? I It makes beautiful documents I Especially mathematics I It was created by scientists, for scientists

More information

L A TEX for Psychological Researchers

L A TEX for Psychological Researchers L A TEX for Psychological Researchers Lecture 2: Basics of the L A TEX language Sacha Epskamp University of Amsterdam Department of Psychological Methods 27-01-2015 The L A TEX process.tex pdfl A TEX.pdf

More information

Introduction to LATEX

Introduction to LATEX Introduction to L A TEX Department of Statistics, UC Berkeley January 28, 2011 1 Why L A TEX? 2 Basics 3 Typing Math 4 BibTeX 5 More Why L A TEX? Professional typesetting tool offering great control Why

More information

Appendix C. Numeric and Character Entity Reference

Appendix C. Numeric and Character Entity Reference Appendix C Numeric and Character Entity Reference 2 How to Do Everything with HTML & XHTML As you design Web pages, there may be occasions when you want to insert characters that are not available on your

More information

Introduction to LaTex 2ε. Based on The Not So Short Introduction to LaTeX 2ε by Tobias Oetiker et al., April 2001

Introduction to LaTex 2ε. Based on The Not So Short Introduction to LaTeX 2ε by Tobias Oetiker et al., April 2001 Introduction to LaTex 2ε Based on The Not So Short Introduction to LaTeX 2ε by Tobias Oetiker et al., April 2001 Contents Things you need to know Typesetting text Typesetting Mathematical Formulae Specialties

More information

Getting Started with L A TEX

Getting Started with L A TEX Getting Started with L A TEX This document is designed to help you see how to produce some mathematical typesetting. The best way to learn how to use L A TEX is to experiment with particular commands.

More information

Learning L A TEX. Patrick Lam

Learning L A TEX. Patrick Lam Learning L A TEX Patrick Lam setting up 1. download a TeX distribution (MiKTeX, MacTeX, etc.) 2. download an editor (Texmaker, WinEDT, XEmacs, etc.) 3. start a.tex file in editor 4. work only in the.tex

More information

Quick Start Instructions on using MyOMLab with the JAWS Screen Reader*

Quick Start Instructions on using MyOMLab with the JAWS Screen Reader* Quick Start Instructions on using MyOMLab with the JAWS Screen Reader* To work on assignments in MyOMLab with JAWS, follow these steps to turn on the Automatically Detect for Accessibility Setting: 1.

More information

Introduction to L A TEX

Introduction to L A TEX Introduction to L A TEX Mark Baltovic MA498 - Dissertation in Mathematics Objectives of this session What is L A TEX? The L A TEX source file Inside the body of the text Typesetting mathematics Internal

More information

Typesetting with TEX

Typesetting with TEX Typesetting with TEX Scientific typesetting made easy TEX (rhymes with blecchhh! ) is a technical typesetting system created by Donald Knuth of Stanford University. It is currently used by most physicists,

More information

ShortCourseOfL A T E X Lecture I

ShortCourseOfL A T E X Lecture I ShortCourseOfL A T E X Lecture I LukaG.Poniatowski ½ ¾ ½ DepartmentofPhysics,FacultyofExactandNaturalSciences, Tbilisi State University ¾ AbastumaniAstrophysicalObservatory, Ilia State University August

More information

Paul Gartside. March 2, 2013

Paul Gartside. March 2, 2013 SIAM L A TEX Workshop: First Steps Paul Gartside March 2, 2013 1 Introduction Today you are going to take the first steps in learning how to create beautiful mathematical documents using L A TEX (or review

More information

Introduction to L A TEX

Introduction to L A TEX Introduction to L A TEX Renata Retkute Department of Mathematics November 2008 Contents 1 Getting started 2 2 Basic L A TEX 2 2.1 A Typical LaTeX Input File................................. 2 2.2 Text

More information

WORD XP/2002 USER GUIDE. Task- Formatting a Document in Word 2002

WORD XP/2002 USER GUIDE. Task- Formatting a Document in Word 2002 University of Arizona Information Commons Training Page 1 of 21 WORD XP/2002 USER GUIDE Task- Formatting a Document in Word 2002 OBJECTIVES: At the end of this course students will have a basic understanding

More information

MoM's ridiculously complex math-typing tutorial Keyboard typing lessons for Math-o-mir v2.0

MoM's ridiculously complex math-typing tutorial Keyboard typing lessons for Math-o-mir v2.0 MoM's ridiculously complex math-typing tutial Keyboard typing lessons f Math-o-mir v.0 Lesson 1 Starting and ending the Typing mode left-mouse-click mouse-click anywhere at empty area......the blue blinking

More information

LAT E X Math Mode. RSI 2007 Staff

LAT E X Math Mode. RSI 2007 Staff LAT E X Math Mode RSI 2007 Staff LAT E X has a special mode for formatting mathematic This mode allows the use of: Subscripts and superscripts Greek letters and various special symbols Example of text

More information

An Introduction to LATEX

An Introduction to LATEX An Introduction to LATEX Mathematics 23a, Fall 2012 By: Isabel Vogt, Will Rafey, and Neil Gat Last Updated: 13 September, 2012 1 Introduction The simplest way to learn TeX is by example. Copy the heading

More information

L A TEX and Basic Text Editing

L A TEX and Basic Text Editing L A TEX and Basic Text Editing 1 Basics L A TEXis a mathematical typesetting word processing tool. You need a compiler to display L A TEX, and you can dowload the open-source freeware at MikTex.org. We

More information

Summary of TLA + Module-Level Constructs. The Constant Operators. Miscellaneous Constructs. Action Operators. Temporal Operators

Summary of TLA + Module-Level Constructs. The Constant Operators. Miscellaneous Constructs. Action Operators. Temporal Operators Summary of TLA + Module-Level Constructs The Constant Operators Miscellaneous Constructs Action Operators Temporal Operators User-Definable Operator Symbols Precedence Ranges of Operators Operators Defined

More information

Introduction to L A TEX

Introduction to L A TEX Introduction to L A TEX D. Broline, A. Mertz & W. Slough Mathematics and Computer Science Department Eastern Illinois University February 8, 2007 The Logo L A TEX Overview What is L A TEX? Typesetting

More information

Introduzione a LaTex. Fabrizio Messina

Introduzione a LaTex. Fabrizio Messina Introduzione a LaTex Fabrizio Messina messina@dmi.unict.it www.dmi.unict.it/~fmessina Tex and LaTex TEX is a formatting program created by Donald E. Knuth from 1977. Typesetting text and mathematical formulae.

More information

Introduction to L A TEX

Introduction to L A TEX Introduction to L A TEX Yuval Carmel Ben-Gurion University June 30, 2009 Yuval Carmel (Ben-Gurion University) Introduction to LATEX June 30, 2009 1 / 40 Introduction L A TEX is not a word processor! Word,

More information

L A TEX examples. a b c a b c b b a c b c c b a. This table was typeset with the following commands.

L A TEX examples. a b c a b c b b a c b c c b a. This table was typeset with the following commands. L A TEX examples This document is designed to help you see how to produce some mathematical typesetting. The best way to learn how to use L A TEX is to experiment with particular commands. After you have

More information

An Introduction to. Rado Ivanov CIS400 Senior Design Tutorial September 18, 2014

An Introduction to. Rado Ivanov CIS400 Senior Design Tutorial September 18, 2014 An Introduction to Rado Ivanov CIS400 Senior Design Tutorial September 18, 2014 Today's Outline Introducing TeX/LaTeX Benefits and potential difficulties Installation and use on Unix/Mac/Windows Compiling

More information

The Mathematics of Banking and Finance By Dennis Cox and Michael Cox Copyright 2006 John Wiley & Sons Ltd

The Mathematics of Banking and Finance By Dennis Cox and Michael Cox Copyright 2006 John Wiley & Sons Ltd The Mathematics of Banking and Finance By Dennis Cox and Michael Cox Copyright 2006 John Wiley & Sons Ltd Less than ( ), less than or equal to ( ) Appendix 281 A symbol meaning smaller or less than, for

More information

Nutthapat Kaewrattanapat. Lecture in Principle of Web Design

Nutthapat Kaewrattanapat. Lecture in Principle of Web Design ASCII CODE (ASCII CHARACTERS) ls should display in files using charsets ISO 8859-1 or UTF-8. [ " ] quotation mark [name: "] [number: "] [ & ] ampersand [name: &] [number: &] [ < ] less than [name:

More information

L A TEX incollaboration

L A TEX incollaboration L A TEX incollaboration Alexandre Bernardino ISR/IST March 9, 2015 Alexandre Bernardino (ISR/IST) JEEC 2015 Workshop March 9, 2015 1 / 28 Outline 1 Introduction 2 Some History 3 First Steps 4 L A TEX Basics

More information

The package paresse. Le TEXnicien de surface February 16, 2013

The package paresse. Le TEXnicien de surface February 16, 2013 The package paresse Le TXnicien de surface le.texnicien.de.surface@wanadoo.fr February 16, 2013 Abstract This package implements an example from T. Lachand-Robert in [1]. It provides a means of typing

More information

1 Obtaining LyX and L A TEX

1 Obtaining LyX and L A TEX A Guide to LyX and L A TEX Based off A Quick Guide to LyX by Jessica Moses 08 October 2011 Many economists (and academics in mathematics-heavy disciplines) use a program called L A TEX to create documents.

More information

A Grasshopper s Approach to L A TEX

A Grasshopper s Approach to L A TEX A Grasshopper s Approach to L A TEX JHB Deane and S Reich Updated by PJ Aston February 1, 2011 Contents 1 Introduction 2 2 Winshell 2 2.1 Editor Commands..................................... 2 2.2 Processing

More information

Tabella dei caratteri ASCII e UNICODE

Tabella dei caratteri ASCII e UNICODE Appendice 1: ausiliaria Tabella dei caratteri ASCII e UNICODE formato di stampa: A4 APP_1A_IT_R3.0.docx 1 di 9 Indice 1 TABELLE DEI CARATTERI... 3 Caratteri ASCII... 3 Lettere greche... -4 APP_1A_IT_R3.0.docx

More information

Typesetting in wxmaxima

Typesetting in wxmaxima Typesetting in wxmaxima 1 Introduction To make your paper look as good as possible you should be familiar with the following: how to format text and create sections (and subsections, etc.), how to typeset

More information

TUTORIAL 8: TYPESETTING MATHEMATICAL EXPRESSIONS CHRISTOPHER RARIDAN Abstract. Upon completion of this tutorial, the author should be able to add some mathematical content to his or her paper. In particular,

More information

How to L A TEX. George Wong, David Mykytyn. 6 October 2016

How to L A TEX. George Wong, David Mykytyn. 6 October 2016 How to L A TEX George Wong, David Mykytyn 6 October 2016 1 What is L A TEX? Used in textbooks, journal/conference articles, and lab reports! You provide the material and L A TEX renders according to typographical

More information

Formatting with LaTeX

Formatting with LaTeX Formatting with LaTeX Zuyuan Wang School of Mechanical Engineering Purdue University wang1707@purdue.edu June 23, 2016 Seminar @ SURF 2016 About the SURF GAs Formatting with LaTeX (02/35) 06/23/2016 Purdue

More information

L A TEX. The Logo. Introduction to L A TEX. Overview. Primary Benefits. Kinds of Documents. Bill Slough and Andrew Mertz

L A TEX. The Logo. Introduction to L A TEX. Overview. Primary Benefits. Kinds of Documents. Bill Slough and Andrew Mertz The Logo Introduction to L A TEX Bill Slough and Andrew Mertz L A TEX Mathematics and Computer Science Department Eastern Illinois University January 20, 2010 Overview TEX and L A TEX What is L A TEX?

More information

An Introduction to L A TEX

An Introduction to L A TEX An Introduction to L A TEX Ryan C. Trinity University Math Majors Seminar September 12, 2017 What is L A TEX? L A TEX is a typesetting system/language used for the production of technical (mathematical)

More information

L A T E X FOSSEE. Department of Aerospace Engineering IIT Bombay. FOSSEE (IIT Bombay) LAT E X 1 / 58

L A T E X FOSSEE. Department of Aerospace Engineering IIT Bombay. FOSSEE (IIT Bombay) LAT E X 1 / 58 L A T E X FOSSEE Department of Aerospace Engineering IIT Bombay FOSSEE (IIT Bombay) LAT E X 1 / 58 Outline Introduction 1 Introduction 2 Adding Structure 3 Typesetting Text 4 Figures, Tables & Floats 5

More information

TABLE OF CONTENTS PART I: BASIC MICROSOFT WORD TOOLS... 1 PAGE BREAKS... 1 SECTION BREAKS... 3 STYLES... 6 TABLE OF CONTENTS... 8

TABLE OF CONTENTS PART I: BASIC MICROSOFT WORD TOOLS... 1 PAGE BREAKS... 1 SECTION BREAKS... 3 STYLES... 6 TABLE OF CONTENTS... 8 TABLE OF CONTENTS PART I: BASIC MICROSOFT WORD TOOLS... 1 PAGE BREAKS... 1 SECTION BREAKS... 3 STYLES... 6 TABLE OF CONTENTS... 8 LIST OF TABLES / LIST OF FIGURES... 11 PART II: FORMATTING REQUIREMENTS:

More information

Latex Tutorial. CIS400 Senior Design 9/5/2013

Latex Tutorial. CIS400 Senior Design 9/5/2013 1 Latex Tutorial CIS400 Senior Design 9/5/2013 2 Outline Introducing TeX/LaTeX Benefits and potential difficulties Installation and use on Unix/Mac/Windows Compiling PDF documents from LaTeX Basic document

More information

An Introduction to LATEX

An Introduction to LATEX An to L A TEX Iryna Schlackow Mathematical Institute This talk and other useful L A TEX-related information is available at http://www.maths.ox.ac.uk/help/faqs/latex/ May 21, 2009 An to LATEX The Name

More information

The Name of the Game. An Introduction to LATEX. Why L A TEX? The Name of the Game

The Name of the Game. An Introduction to LATEX. Why L A TEX? The Name of the Game The Name of the Game An to L A TEX Iryna Schlackow Mathematical Institute This talk and other useful L A TEX-related information is available at http://www.maths.ox.ac.uk/help/faqs/latex/ TEX is a computer

More information

Introduction to L A T E X

Introduction to L A T E X L A T E X R. M. Department of Mathematics University of Kentucky 6 October 2008 / L A T E X Outline T E X T E X was begun by Donald Knuth in 1977 because he did not like the appearance of his book The

More information

Teacher Activity: page 1/9 Mathematical Expressions in Microsoft Word

Teacher Activity: page 1/9 Mathematical Expressions in Microsoft Word Teacher Activity: page 1/9 Mathematical Expressions in Microsoft Word These instructions assume that you are familiar with using MS Word for ordinary word processing *. If you are not comfortable entering

More information

L A TEX Introduction. 1 Basic Resources: Melissa Desjarlais (amended by Dr. Dena Morton)

L A TEX Introduction. 1 Basic Resources: Melissa Desjarlais (amended by Dr. Dena Morton) L A TEX Introduction Melissa Desjarlais (amended by Dr. Dena Morton) Abstract We showcase some L A TEX typesetting. Additionally, we give resources for further exploration of typesetting mathematics and

More information

LATEX Workshop. Yi Liu Chen SUNY Geneseo PRISM Math Club. February 6, Wordmark Reversed Geneseo Wordmark Style Guide 4

LATEX Workshop. Yi Liu Chen SUNY Geneseo PRISM Math Club. February 6, Wordmark Reversed Geneseo Wordmark Style Guide 4 Yi Liu Chen SUNY Geneseo PRISM Math Club February 6, 2019 Outline L A TEX Environment The Basics Mathematics SUNY Geneseo PRISM Math Club 2 BDA/MBS and Math/Physics People People taking BDA (BIOL250) or

More information

Pimp your thesis: a minimal introduction to L A T E X.

Pimp your thesis: a minimal introduction to L A T E X. 1 / 20 Pimp your thesis: a minimal introduction to L A T E X. Maarten Bransen IC/TC, U.S.S. Proton March 20, 2018 2 / 20 What is L A T E X? Most word processors you may be used to (i.e. Microsoft Word,

More information

L A TEX. COMPSCI 111 / 111G Mastering Cyberspace: An introduction to practical computing. LaTeX. Development. Why?

L A TEX. COMPSCI 111 / 111G Mastering Cyberspace: An introduction to practical computing. LaTeX. Development. Why? LaTeX A document preparation system Used to typeset a document COMPSCI 111 / 111G Mastering Cyberspace: An introduction to practical computing LaTeX Compiler L A TEX http://en.wikipedia.org/wiki/latex

More information

L A TEX minicourse. dstowell, mag, sar, scannell,... September Typeset by FoilTEX

L A TEX minicourse. dstowell, mag, sar, scannell,... September Typeset by FoilTEX L A TEX minicourse dstowell, mag, sar, scannell,... September 2003 Typeset by FoilTEX What it is What is L A TEX? a typesetting system for creating high-quality documents allows you to create complex-looking

More information

Manuscript Title. with Forced Linebreak. Ann Author a) and Second Author b) Authors institution and/or address This line break forced with \\

Manuscript Title. with Forced Linebreak. Ann Author a) and Second Author b) Authors institution and/or address This line break forced with \\ Manuscript Title: with Forced Linebreak Ann Author a) and Second Author b) Authors institution and/or address This line break forced with \\ Charlie Authoring c) Second institution and/or address This

More information

Abstract A quick intro by examples to the document preparation language L A TEX.

Abstract A quick intro by examples to the document preparation language L A TEX. Jumpstart LaTeX Bo Waggoner Updated: 2014-09-15 Abstract A quick intro by examples to the document preparation language L A TEX. 1 Overview LaTeX is essentially a programming language that, when executed,

More information

Instructions for Typesetting Manuscripts Using L A TEX

Instructions for Typesetting Manuscripts Using L A TEX Asia-Pacific Journal of Operational Research c World Scientific Publishing Company & Operational Research Society of Singapore Instructions for Typesetting Manuscripts Using L A TEX First Author University

More information

Part - I : Short Course Typing Text

Part - I : Short Course Typing Text Part - I : Short Course Sanjay Mishra Department of Mathematics Lovely Professional University Punjab, India June 14, 2012 Outline 1 Introduction The Keyboard Your First Note Lines too Wide More Text Features

More information

1. Welcome. (1) Hello. My name is Dr. Christopher Raridan (Dr. R). (3) In this tutorial I will introduce you to the amsart documentclass.

1. Welcome. (1) Hello. My name is Dr. Christopher Raridan (Dr. R). (3) In this tutorial I will introduce you to the amsart documentclass. TUTORIAL 3: MY FIRST L A TEX DOCUMENT CHRISTOPHER RARIDAN Abstract. Upon completion of this tutorial, the author should be able to produce a very basic L A TEX document. This tutorial will introduce the

More information

Homework # (Latex Handout) by Laura Parkinson

Homework # (Latex Handout) by Laura Parkinson 1 Latex Homework # (Latex Handout) by Laura Parkinson Latex helps you make your homework pretty. It makes us happy when you use it. The best way to learn is by example, so here are some examples of pretty

More information

L A TEX Workshop. An Introduction to L A TEX. Rakesh Jana Research Scholar Department of Mathematics IIT Guwhati

L A TEX Workshop. An Introduction to L A TEX. Rakesh Jana Research Scholar Department of Mathematics IIT Guwhati L A TEX Workshop An Introduction to L A TEX Rakesh Jana j.rakesh@iitg.ernet.in Date: 2018/08/24 Research Scholar Department of Mathematics IIT Guwhati Overview 1. What is L A TEX? 2. First L A TEX document

More information

Using the Equation Palette

Using the Equation Palette module 5 Using the Equation Palette Contents Basic Workflow............................. 244 Exercise 58 Creating Your First Equation..... 245 Exercise 59 Positioning an Equation.......... 250 A Tour of

More information

Assessments for CS students:

Assessments for CS students: Assessments for CS students: Two hours per week lectures, Tuesdays 2-4pm. Three in-semester assignments, with feedback de-coupled from assessment: Assignment 1 Generic paper Assignment 2 Literature review

More information

LaTeX Seminar III: Environments and More Advanced Mathematical Typesetting

LaTeX Seminar III: Environments and More Advanced Mathematical Typesetting LaTeX Seminar III: Environments and More Advanced Mathematical Typesetting Clifford E. Weil March 24, 2004 1 General Environments We have already encountered two environments. They are the document environment

More information

A quick guide to L A TEX

A quick guide to L A TEX A quick guide to L A TEX L A TEX is more of a programming language. The text you produce in your input file will look almost completely different from the final result in print. This requires knowledge

More information

Typing Math: Symbols and Graphing

Typing Math: Symbols and Graphing Typing Math: Symbols and Graphing The purpose of this assignment is to learn how to produce word-processed documents containing mathematical expressions and graphs that look like they could have come from

More information

VerTeX User s Manual

VerTeX User s Manual VerTeX User s Manual Steve Kieffer Updated: 18 January 2013 Contents 1 Introduction 1 2 Slash the Backslashes 3 2.1 bsmes................................. 3 2.2 built-ins................................

More information