Typeset Ing

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Typeset Ing as PDF for free.

More details

  • Words: 3,793
  • Pages: 11
Latex Typesetting Manual TABLE OF CONTENTS Introduction The typesetting process Installing the typesetting program Latex commands Structure of a typeset document Text and math Typesetting regular text Spaces and carriage returns Font sizes Boldface Italics Boldface and italics Indentation Spaces Special text symbols Quotation marks Footnotes Exercises and Examples Headings and Chapter Titles Figures and Tables Typesetting mathematics Boldface math and Italic math Variables and Numbers Equals sign and Arithmetic symbols Spaces Fractions Square roots and other roots Exponents and superscripts Subscripts Greek letters Degrees Dot, dot, dot Angles Set theory symbols Function names Exercises Finding errors Correcting errors

Introduction This manual will explain how to typeset documents using the Latex typesetting language. Typesetting text with Latex is very easy. It takes a little more time to learn how to use Latex commands to typeset mathematical expressions, but once you learn, it becomes easy and you will be able to type much faster. I will send you easier pages at first and as you get more comfortable we will start sending pages with more mathematics.

I will also send you examples of pages that have already been typeset so that you can look at how the Latex commands have been used.

The typesetting process To typeset a document means adding additional text commands to the document which are then used by the Latex program to print out a result that looks the way the publisher wants it to look. Typesetting commands indicate things like what size the letters should be, whether they should be in bold type, italics or some other style, and a variety of other formatting options. The typesetting language we use for this project is called Latex and it will be discussed later in this manual. Latex is also the name of the program we use to convert the typeset text into a PDF document. We assume you have access to a Windows PC running Windows XP or Windows Vista. The typesetting process for this project has five steps. You will repeat these five steps for every image that we send you.

Step 1. Copy the text from the image file You will look at the image you have received and then type the text from the image into your word processor or into the Latex editing window. The images we send will be in the JPEG format and can be viewed with your web browser (Explorer, Firefox, etc). If you prefer another image format, let us know and we can talk about it. You are also welcome to use an OCR (optical character recognition) program and a scanner if you have them.

Step 2. Add Latex commands to the text After you have typed the text of the image, you need to add Latex commands to the text so that it can be processed by the Latex. Certain kinds of formatted text need to be typeset using Latex commands. The only Latex commands you will need for regular (non-mathematical) text are commands for boldface and italics. For mathematical expressions, you will use a lot of Latex commands. These commands will be discussed in more detail later in this manual. Here is an example of the latex command for boldface: \textbf{boldface} This command will put the word "boldface" in darker bold letters.

Step 3. Produce a PDF file After you have added the Latex typesetting commands to the text, you copy the typeset text to the Latex program and produce a PDF output file by clicking the “Typeset” button. In addition to the typesetting commands you added to the text while typing, there are a few extra Latex commands that have to be added to the beginning and end of every document. These will be explained later.

Step 4. Make corrections

You will rarely get everything right the first time, so you will need to find your errors and correct them. The Latex program will help you find mistakes. And there is a section on finding errors at the end of this manual.

Step 5. Send me the typeset document Once your PDF file looks approximately like the image it was copied from, you can send me the typeset text by email. For each typeset document, you will send two files: the text file with the Latex commands and the PDF produced from that file.

Installing the typesetting program The Latex typesetting program for Windows is available at http://www.tug.org/protext/. (If you are using a Macintosh or Unix computer, contact me for further information.) This site will redirect your browser to another site from which the download will take place. At this site you will see a file link called "protex.exe". Click on this link and the downloading will begin. Once the Latex program has been downloaded, the file "protex.exe" will be on your desktop. Double-click the file and follow the instructions as the program installs itself on your computer. A PDF file that comes with the program will explain how to submit typeset text to the Latex program.

Latex commands All Latex typesetting commands begin with a backslash, "\". Many of the commands use braces (a left brace, "{", and a right brace, "}") to enclose letters, words and phrases. Do not use any Latex commands that do not appear in this manual. There are hundreds of different Latex commands for formatting text, but in this project we only want to use a small number of basic commands. Don't try and get fancy. That's not what we want. We are only going to use the most basic Latex commands for this project and that will make yourtypesetting job a lot easier. We don’t want you slowed down trying to figure out how to make things look exactly like the pages you type and having to type a lot of extra commands to do so.

Structure of a typeset document All typeset documents begin with the following four lines of text: \documentclass{article} \setlength{\parskip}{2mm} \setlength{\parindent}{0pt} \begin{document} And all typeset documents end with the following one line of text. \end{document} All of the text you copy from the image will be inserted between these beginning and ending lines of text. You need to type this text at the beginning and end of every document you submit to the Latex program.

Note: The third command (\setlength{\parskip}{2mm}) puts 2mm of space between paragraphs. Note: The fourth command (\setlength{\parindent}{0pt}) tells Latex not to indent any paragraphs. Don't try to imitate the indentation you see in the pages you type. We don't want any paragraphs indented at this time.

Text and math All of the material you will be typing can be divided into two general categories, regular text and mathematics. This manual will discuss each of the two categories separately.

TYPESETTING REGULAR TEXT Regular text is text that doesn’t contain any mathematical expressions or variables. Very few typesetting commands need to be added to regular (non-mathematical) text. All the text that you typeset will be in one font and one size, even if it appears larger or smaller on the page you are copying. We will not use indentation of paragraphs, even if they are indented in the images. The only special commands you will need to use for non-mathematical text is to copy the boldface and italics that you see in the images.

Spaces and carriage returns Don’t try to type spaces using the spacebar. Latex will not insert any spaces when you do so. You shouldn’t ever need to use spaces for regular text. Sometimes you might want to add spaces to a mathematical expression and that process will be described later in this manual.

Font sizes All text will appear in one font size. The default font size we use is 10 points. A point equals 1/72 of an inch or 3/100 of a centimeter. Do not try to typeset any text to be a different size.

Boldface To make a word or phrase boldface, use the \boldface{ } command and put the word or phrase inside the braces. Example You type: An \boldface{acute angle}} is smaller than a right angle. And Latex prints: An acute angle is smaller than a right angle.

Italics To make a word or phrase italic, use the \textit{ } command and put the word or phrase inside the braces. You type: It is \textit{never} possible to divide a number by 0.

Latex prints: It is never possible to divide a number by 0.

Boldface and italics To make a word or phrase boldface and italic, use the \textbf{\textit{ }} command and put the word or phrase inside the braces. Be sure to include the two braces at the end of the command or you will get an error. Example: You type: The \textbf{\textit{ hypotenuse}} of a right triangle is always longer than either of the other two sides. Latex prints: The hypotenuse of a right triangle is always longer than either of the other two sides.

Indentation All Latex files will include the \setlength{\parindent}{0pt} command near the beginning of the file to suppress the indentation of paragraphs. Do not try to indent paragraphs. Special text symbols There are certain symbols in the images which need to be typeset using special commands because the symbols are also used as typesetting symbols in Latex. They are listed below To type an ampersand, &, type: \& To type an underscore, _, type: \_ To type three dots, . . ., type: \ldots To type a bullet, •, type: \textbullet To type a dollar sign, $, type: \$ To type at caret, ˆ, type: \^ To type a percent sign, %, type: \%

Quotation marks Don't use the regular quotation marks found on your keyboard. To typeset two opening quotation marks, use two `s, which are usually found on the key to the left of the 1 key at the upper left of your keyboard. For closing quotation marks we use two 's, found on the key to the left of the Return key. For single quotes, use one each of the opening and closing marks.

Footnotes Some images that you type have footnotes at the bottom of the page. Do not try to typeset these footnotes at the bottom of your pages. Instead, insert the text of the footnote in double parentheses right after the sentence in which the footnote appears. A double parentheses looks like this: ((This is a footnote.))

Exercises and Examples Many of the exercises and examples in the textbooks are set in a smaller font that the regular text. All of the text you typeset will be the same size so you don't have to take any action to reduce the size of the fonts for exercises or examples.

Headings and Chapter Titles Many of the section headings and chapter titles in the textbooks are in a larger font that the regular text and in boldface. All of the text you typeset will be the same size so you don't have to take any action to increase the size of the fonts for headings or chapter titles. Use the \textbf{ } command to put headings and chapter titles in boldface.

Figures and Tables Many pages will include figures and tables. In some cases we will delete the images so that they do not distract you while typing. You do not need to draw the figures or tables if you see them. But you should include the captions of the figures and tables, including the figure number. The caption is the short phrase that describes the figure or table.The figure caption should be typeset in the sans serif font and centered using the commands below. For example, where the caption "Fig. 195." appears, insert the following commands: \begin{center} \textsf{Fig. 195. A quadratic equation.} \end{center} You can use these three commands as a template for all the figures and tables in the text; just change the caption and figure number each time you use it. Note: the \textsf{ } command puts the text of the caption into a sans serif font. Don't try to copy the typestyle of any unusual fonts you see on the pages you copy. All text will be set in the same font except for the captions.

MATHEMATICS Many of the pages you type will contain mathematical expressions. You don't need to understand any of the math, but you will need to learn how to copy the expressions so that they appear correctly in the PDF document. The number one rule to follow when typesetting math expressions is this:

All math expressions must appear between dollar signs. Math expressions that appear in the same sentence or paragraph as regular text are surrounded by single dollar signs. Math expresion which appear by themselves and centered on a line are surrounded by two dollar.

Math mode

When an expression is surrounded by single or double dollar signs, we say the expression is in “math mode.” A math expression is any group of numbers or letters that appear with any sort of mathematical symbol for addition, subtraction, multiplication, division, etc. The expression: 1 + 1 = 2 is typed $1 + 1 = 2$ If you want this expression to appear centered on a line by itself, we type: $$1 + 1 = 2$$

Boldface math Somestimes a math expression will be in boldface in the image you are copying. We will not be using boldface with math expression, so do not try to put math expressions in boldface, even if they appear in boldface in the text.

Italic math In most cases, any letters or words that appear in math mode will be typeset in italics. This happens automatically, you don’t use the \textit{ } command.

Variables In math textbooks, all variables are set in italics. In Latex, we don't use the \textit command. We put the variable into math mode by enclosing the variable with dollar signs. All variables will be typeset in math mode, meaning they will be surrounded by single dollar signs. And any text in math mode will automatically be typeset in italics. You will spend a lot of time putting individual variables between dollar signs. It is the most common kind of mathematical expression. In geometry, a variable is a letter that is used to stand for a point, line, or other geometrical element. Single upper-case variables usually represent points and angles. Two upper-case variables together represent a line or line segment. Three or more upper-case variables represent triangles, circles, rectangles and other polygons. Lower case variables usually represent the sides of figures. In algebra, variables represent unknown quantities. They are usually lower case letters like a, b, c, x, y, z. You will be typesetting many variables. All math variables that appear by themselves in a sentence should be surrounded by a single dollar sign on each side of the variable. If the variable is followed by a punctuation mark such as a comma, semicolon or period, you can include the period within the dollar signs. Example: The point $P$ is the vertex of the triangle $PQR.$ The variables $a, b$ and $c$ are used to indicate the lengths of the triangle $ABC$.

Numbers

Numbers do not need to be surrounded by dollar signs if they appear alone in a sentence with no related math symbols. But if a number is part of an equation that includes an equals sign, =, or a mathematical operator such as a plus sign, minus sign, multiplication symbol, or division symbol, then the entire expression should be surrounded by dollar signs. Equals sign Any math expression that includes an equals sign must be surrounded by dollar signs

Arithmetic symbols Any math expression that includes a plus sign, a minus sign, a multiplication symbol or a division symbol must be surrounded by dollar signs.

Spaces Use the \quad command to create spaces in math expressions.

Fractions There are two ways to typeset fractions 1. A fraction can be indicated with a forward slash: 1/2 2. A fraction can be typeset using the \frac{ }{ } command, where the numerator of the fraction appears within the first set of braces and the denominator appears within the second. This command is very useful and can be used with numbers and algebraic expressions. Examples $\frac{1}{2}$ $$\frac{a + b}{c + d}$$

Square roots and other roots The square root command is: \sqrt{ }. The number or expression whose root is being indicated is placed within the braces. Example: To typeset the square root of 2, type: $\sqrt{2}$ To type other roots you add an extra parameter to the square root command: \sqrt[n]{ }. The [n] parameter uses square brackets, not braces, and indicates which root is being extracted. Example: The cube root of 27, $\sqrt[3]{27}$ is 3.

Exponents and superscripts

Exponents and superscripts are both typeset using the carat symbol, ^. If the exponent or superscript is a single character, number or word, you don't need to enclose it in braces. But you will use braces if the exponent is a mathematical expression. Examples: $5^2 = 25$ The temperature today was $25^\circ" Celsius.

Subscripts Subscripts are typed using the underscore character, _. Example: The table entries $a_1, a_2$ and $b_1$ are all equal to 0.

Greek letters Greek letters are sometimes used as variables in math textbooks. They are most often used to represent angles in trigonometry sections. The commands for lowercase Greek letters are as follows. \alpha, \beta, \gamma, \delta, etc

Degrees We use the degree symbol to denote angle measurements and temperatures. To typeset the degree symbol we combine two Latex commands, the superscript carat, ^, and the circle, \circ. Example: Water boils at $100^\circ$ degrees Celsius. Example: The sum of the angles in a triangle is $180^\circ$ degrees.

Dot, dot, dot Three dots are sometimes used to indicate an ongoing sequence of some kind. For example, to indicate that the counting numbers go on forever, we might write them out as 1, 2, 3, 4, . . . The three dots indicate that the numbers continue on in the same pattern. Use the \dots command to indicate an ongoing sequence of some kind. Example: The counting numbers are $1, 2, 3, 4, \dots$

Angles In geometry textbooks, the symbol, angle, is used to indicate that a certain variable represents an angle. To typeset his angle symbol, type: \angle

Set theory symbols Two commonly used symbols in set theory are the union symbol and the intersection symbol. The union symbol, ∪, is typset with: \cup The intersection symbol, ∩, is typeset with: \cap

Function names Some commonly used mathematical functions are represented by three-letter abbreviations that are in regular text format (not in italics). These abbreviations often appear in mathematical expressions, but since all text in mathematical expressions that are surrounded by dollar signs is set in italics, we need a convenient way to be sure that these function names are not set in italics. To do this we use special Latex commands. Here are some common function names:\cos, \csc, \exp, \ln, \log, \sin, \tan. By using these special commands we prevent them from being typeset in italics. Example: $$\sin^2 + \cos^2 = 1$$

Exercises Many numbered exercises include multiple individual problems which are identified with lower-case alphabetical letters. These letters should be set in text mode. Example: Draw figures showing the following angles placed in standard position; determine the quadrant in which each angle lies; use a protractor, and mark the angles with curved arrows: (a) $30^\circ$; (b) $135^\circ$; (c) $210^\circ$; (d) $315^\circ$; (e) $-50^\circ$; (f) $-120^\circ$; (g) $330^\circ$; (h) $405^\circ$.

Finding errors Common errors include: 1. Unbalanced dollar signs One common source of error is not having matching dollar signs. Every dollar sign that starts a mathematical expression must be matched by another dollar sign that ends the mathematical expression. It's very easy to forget a dollar sign, and doing so leaves the other dollar sign unmatched. 2. Unbalanced braces Another common error is to forget to use a closing brace for those commands that use braces. 3. Variables not in italics

This error will not be flagged by Latex. You need to remember that ALL variables must be put in math mode buy surrounding them with dollar signs. 4. Misspelled Latex commands

Correcting errors 1. Look at the error messages 2. Use the Comment and Uncomment features of your Latex editor. If you precede a line of Latex typesetting with a percent sign, %, that line will not be processed by the Latex program. This feature is often taken advantage of to leave comments in the .tex file that explain why certain things were done a certain way. But it can also be used as a way to find errors in your text. The Format menu option of the window that I paste my Latex typesetting into has options for Commenting and Uncommenting a block of text. I select the text first, then I choose Format > Comment, and a percent sign is put in front of every line I have selected. And all the lines are then displayed in a red color. When I then run Latex, none of those lines will appear in the PDF output. If I want the text to appear in the output, I can select the text again and choose Format > Uncomment, and then run Latex. This ability to easily Comment and Uncomment a block of text can be used as a way to find errors in the text. For example, if I have an error somewhere in my text, I can begin by Commenting the first half of the text and then running Latex. If it runs without error, then I know that the error must be in the half that I Commented. If it doesn't output okay, then I know that the error is in the half of my text that I didn't comment. Once I know which half of the text the error is in, I can then Comment half of that half, and thereby narrow down the error to one half of one half of the text (or one quarter of the text). I can keep doing this until I find the line that is causing the error. This process of narrowing down the error to half of the text, and then to half of half of the text, and so on is called a binary search. This method assumes that there is only one error in the text and it doesn't work for every kind of error. If your Latex program doesn't allow you to Comment blocks of text, you can just delete half of the text and see if Latex can process the remaining half. (Be sure to keep a copy!) It's the same principle, but you have to keep swapping blocks of text in and out of the Latex window.

Related Documents

Typeset Ing
November 2019 2
Ing
May 2020 42
Ing Final
May 2020 24
Ing. Plantas.docx
November 2019 36
Gas Ing
May 2020 41
Ing D.docx
May 2020 19