ebook img

TEX: starting from 1 PDF

117 Pages·1993·1.947 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview TEX: starting from 1

Michael Doob TE X: starting from [] Springer-Verlag Berlin Heidelberg New York London Paris Tokyo Hong Kong Barcelona Budapest Michael Doob University of Manitoba Department of Mathematics Winnipeg, Manitoba R3T 2N2 Canada Library of Congress Cataloging-in-Publication Data Doob, Michael. TEX: starting from I / Michael Doob. p. cm. Includes index. ISBN-l3: 978-3-540-56441-6 e-ISBN-13: 978-3-642-95704-8 DOl: 10.1007/978-3-642-95704-8 I. TEX (Computer file). 2. Computerized typesetting. 3. Mathematics printing - Computer programs. I. Title. II. Title: TEX: starting from one. Z253.4.T47D66 1993 686.2'2544536 - dc20 93-26025 This work is subject to copyright. All rights are reserved, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on micro-film or in any other way, and storage in data banks. Duplication of this publication or parts thereof is permitted only under the provisions of the German Copyright Law of September 9,1965, in its current version, and permission for use must always be obtained from Springer-Verlag. Violations are liable for prosecution under the German Copyright Law. © Springer-Verlag Berlin Heidelberg 1993 The use of general descriptive names, registered names, trademarks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use. Typesetting: Camera-ready copy from the author Cover design: Konzept + Design, Ilvesheim 33/3140-5432 1-Printed on acid-free paper To Judy: we're still crazy after all these years. Preface What's the purpose of this slim volume, and for whom is it written? It's for anyone who needs and perhaps wants to use 'lEX! to typeset high quality math ematics; this includes students, professors, secretaries and others. While each type of user brings a different perspective, there is a common thread that applies to learning to use 'lEX. Let's think about what a person has to do to learn to speak English. First it's necessary to learn the simple structures; phrases like "I am", "you are", "he is" must be learned. On the other hand, a phrase like "thou art" is rarely used and, like many other phrases, is probably better left unspoken. While I may want to "compare thee to a summer day", it is probably intemperate to use unusual or obscure parts of the language; these are better left to the time when the more straightforward parts are second nature. We want to do the same thing with 'lEX. Some parts are straightforward, and others are more obscure. You might, for example, want to change the height of the little horizontal line that is at the left margin between the text and the footnotes at the bottom of this page. This is in fact easy to do, but it is not something that we will address in the book; you'll have to wait to learn about 1E;Xbook: 364 such minutia. Here we'll learn the "basic grammar" that will let you get started with 'lEX and handle most mathematical and other documents. If you do want to learn more about some topic, then there are notes in the margin, just like the one next to this paragraph, to tell you where to look in the most fundamental reference of all, The TEXbook2. As you get acquainted with TEX, you may want to experiment with your own typesetting. This is definitely a good idea. There is nothing you can do that will hurt 'lEX or the hardware on which it is running. Have fun with it! What previous knowledge is assumed for this book? Well, we're starting from [TI, so we won't assume much. But we're not starting from [Q], because we do assume that you can use some type of editor to create a text file. In fact, that's about all we assume. What editor you use is your choice, but do remember that we want to save everything in ASCII or nondocument mode. This book is organized to serve two functions. First, it is designed to start with the more simple concepts and then to move on to more complicated ones. The exercises are designed to help with this process; they gradually get more difficult, and also recapitulate ideas from time to time. It's very important to ! 'lEX is pronounced by using the "te" from the word "ten" and adding the "ch" sound from the Scottish "loch". 2 Addison-Wesley, Reading, Massachusetts, 1986, ISBN 0-201-13448-9. PAGE VIII PREFACE do the exercises. Second, it is a reference to remind the reader of the ideas mastered. The tables, in particular, are designed to bring together common ideas and can be used, for example, to remember a specific concept that may be partially forgotten. To make things even easier, the tables are all gathered together and repeated at the end of the book. One more thing-this book contains fibs! This is a method of hiding details that aren't important at the moment. Using the analog of learning English, this is like saying that you can add "n't" for negation after the verbs like could, would, and to be: you are becomes you aren't, she is becomes she isn't, they are becomes they aren't, etc. What goes with I am? Well, there would have been a correct word 150 years ago but there isn't now; but when first learning the concept of negation, the question of exceptions is best left to a more advanced level. The same thing is done with TEX. As you get more familiar with TEX you'll be able to see the fibs. TEX is a public domain program that is available for no license fee. It was developed by Donald Knuth at Stanford University as a major project. In the profit-oriented market place, the program would certainly cost many thousands of dollars. The TEX Users Group (TUG) is a nonprofit organization which dis tributes copies of TEX, sells manuals, updates software, and gives information about new developments in both hardware and software in its publications TUG boat and TEXniques. Joining this users group is inexpensive; please consider doing so. The address is: TEX Users Group P.O. Box 869 Santa Barbara, CA 93102 U.S.A. This book is an extension of the paper A Gentle Introduction to TEX, a manuscript that has circulated around the internet as a TEX file for a couple of years. This has resulted in a large number of email messages for me; the responses and helpful criticisms of many readers have been gratifying. I won't try to list all these names individually since they now total in the hundreds, but I certainly want to collectively thank the TEX community as a whole. There has been an enormous voluntary effort by those interested in TEX. It has resulted in many improvements to the TEX environment. Much of this effort (from which allTEX users benefit) has been aided by the aforementioned TEX Users Group. Department of Mathematics University of Manitoba Winnipeg, Manitoba, Canada R3T 2N2 MichaelJ)oob~UManitoba.ca Contents Getting Started ............................................................ 1 Running'lEX ......................................................... 1 From 'lEX file to readable output, the big setup ........................ 2 Let's do it! ............................................................ 3 Commanding 'lEX with control words and control symbols ............. 5 What 'lEX won't do .................................................... 6 Call in the auxiliaries ................................................. 7 All characters great and small .............................................. 9 Some characters are more special than others .......................... 9 Typesetting with an accent ............................................ 9 Dots, dashes, quotes, . .. . ............................................ 13 Different fonts ....................................................... 14 The shape of things to come ............................................... 19 Units, units, units .................................................... 19 Page shape ........................................................... 20 Paragraph shape ..................................................... 21 Line shape ........................................................... 26 Footnotes ............................................................ 27 Headlines and footlines ............................................... 28 Overfull and underfull boxes ......................................... 28 {Groups, {Groups, {and More Groups}}} ................................. 31 No math anxiety here! .................................................... 33 Lots of new symbols ................................................. 33 Similar symbols ...................................................... 37 Fractions ............................................................. 37 Subscripts and superscripts ........................................... 38 Roots, square and otherwise .......................................... 39 Lines, above and below .............................................. .40 Delimiters large and small ............................................ 40 Those special functions .............................................. .41 Hear ye, hear yet ..................................................... 42 Matrices ............................................................. 43 Multilined displayed equations ....................................... 45 All in a row ............................................................... 49 Picking up the tab ................................................... 49 Horizontal alignment with more sophisticated patterns ................ 52 PAGE X CONTENTS Rolling your own .......................................................... 57 The long and short of it .............................................. 57 Filling in with parameters ............................................ 59 By any other name ................................................... 61 Taking it to the limit ................................................. 62 To err is human ........................................................... 65 The forgotten bye .................................................... 65 The misspelled or unknown control sequence .......................... 65 The misnamed font .................................................. 67 Mismatched mathematics ............................................ 67 Mismatched braces ................................................... 68 Digging a little deeper ..................................................... 73 Big files, little files ................................................... 73 Larger macro packages ............................................... 74 Going for the count .................................................. 75 Horizontal and vertical lines .......................................... 76 Boxes within boxes ................................................... 78 Some special additions ............................................... 84 I get by with a little help .................................................. 85 Control sequence index .................................................... 99 Index .................................................................... 103 Tables revisited .......................................................... 107 1 Getting started To begin with we shall assume that 'lEX has been set up on your computer and you now want to start using it. In this section we will look at the exact steps that are necessary. We'll look at some samples to see how things work, and we'll look a little bit at the philosophy behind using 'lEX. 1BX 1.1 Running First of all, let's see what steps are necessary to produce a document using 'lEX. The first step is to type the file that 'lEX reads. This is usually called the TEX file or the input file, and it can be created using a simple text editor (in fact, if you're using a fancy word processor, you have to be sure that your file is saved in ASCII or nondocument mode without any special control characters). The input file will contain only the usual characters from the keyboard. The 'lEX program then reads your input file and produces what is called a DVI file (DVI stands for DeVice Independent). This file is not readable, at least not by humans. The DVI file is then read by another program (called a device driver) that produces the output that is readable by humans. Why the extra file? The same DVI TF.;Xbook: 23 file can be read by different device drivers to produce output on a dot matrix printer, a laser printer, a screen viewer, or a phototypesetter. Once you have produced a DVI file that gives the right output on, say, a screen viewer, you can be assured that you will get exactly the same output on a phototypesetter. It's not even necessary to run the 'lEX program again. The process may be thought of as proceeding in the following way: edit text 'lEX 'lEX program ~ device driver readable input ---+ file ---+ ~ ---+ output This means that we don't see our output in its final form as it is being typed at the terminal. 'lEX is not WYSIWYG (what you see is what you get). But in this case a little patience is amply rewarded, for a large number of symbols not available in most word processing programs become available. In addition, the typesetting is done with more precision than screen previewing allows, and the input files are easily sent between different computers by electronic mail or on a magnetic medium. Our focus will be on the first step, that is, creating the 'lEX input file and then running the 'lEX program to produce appropriate results. There are two -1- PAGE 2 GETTING STARTED ways of running the 'lEX program; it can be run in batch mode or interactively. In batch mode you submit your 'lEX input file to your computer; it then runs the 'lEX program without further intervention and gives you the result when it is finished. In interactive mode the program can stop and get further input from the user, that is, the user can interact with the program. Using 'lEX interactively allows some errors to be corrected by the user, while in batch mode the 'lEX program makes the corrections as best it can. Interactive is the preferred mode, of course. All personal computer and most mainframe implementations are interactive. Almost all university computer centers run 'lEX in interactive mode. On some mainframes, however, the only practical method of running 'lEX is in batch mode. 1.2 From 'lEX file to readable output, the big setup Suppose we have created an input file called, say, first. tex. What happens next? Usually you just need to type tex first to make the DVI file. When 'lEX is running, you will see information indicating what is happening. It would look something like this: This is TeX, eVersion 3.14t3 (first. tex [1] ) Output written on first.dvi (1 page, 256 bytes). Transcript written on first.log. For computers with windowing systems, e. g. the Apple Macintosh, the same thing can often be done via pulldown menus. When this step is completed, there will also be a copy of what was written to the window in the log file, i.e., there will be a file called first .log with the same information that may be read or printed like any other text file. A file called first. dvi has also been created. This is, of course, the DVI file. You now need to use your device driver to view or print the file. This has nothing to do with 'lEX per se, and the names of the drivers will vary from site to site. If the screen driver for previewing is called dviscr, for example, you would enter dviscr first in order to view your 'lEX output. If you have a printer driver called dvidrv, then you would enter dvidrv first and you would then have some printed output to look at.

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.