LATEX Quick Start a first Guide to Document Preparation
Total Page:16
File Type:pdf, Size:1020Kb
Thomas E. Price Lance Carnes LATEX Quick Start A first guide to document preparation Published by Personal TEX, Inc. First Edition, September 2009. Personal TEX Inc. E-mail/Internet: [email protected] • www.pctex.com Notices: Information in this manual is subject to change without notice and does not represent a commitment on the part of Personal TEX Inc. (PTI). PTI makes no represen- tation, express or implied, with respect to this documentation or the software it describes, including without limitations, any implied warranties of merchantability or fitness for a particular purpose, all of which are expressly disclaimed. PTI shall in no way be liable for any indirect, incidental, or consequential damages. No part of this manual may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying and recording, for any purpose, without the express written permission of Personal TEX Inc. Copyright c 2009 by Personal TEX Inc. All rights reserved. Printed in the United States of America. PCTEX, PCTEX for Windows, and Personal TEX, Inc. are registered trademarks of Personal TEX, Inc. PostScript is a registered trademark of Adobe Systems, Inc. TEX is a trademark of the American Mathematical Society (AMS). MathTıme is a trademark of Publish or Perish, Inc. Lucida R is a trademark of Bigelow & Holmes, Inc. All other brand, product, and trade names are the trademarks of their respective owners. Library of Congress Cataloging-in-Publication Data Price, Thomas E. LaTeX Quick Start : A first guide to document preparation / Thomas E. Price and Lance Carnes. p. cm. Includes bibliographical references. ISBN: 0-9631044-4-6 ISBN-13: 978-0-9631044-4-1 1. LaTeX (Computer file) 2. PCTeX 3. Computerized typesetting 4. Mathematics printing–Computer programs. I. Title. Z253.4.L38 P75 2009 686.2’2544536-dc22 2009907722 Contents Introduction ........................................................................... 1 What’s in this bundle 1 • The guide at a glance 1 Chapter 1. First things first ........................................................ 3 What is LATEX? 3 • More about LATEX 4 • PCTEX Installation 4 • The PCTEX user interface 4 • Are you using another LATEX system? 4 • Quick Start installation 4 • Loading project documents 4 • Ready to go 6 • Conventions used in this guide 7 • Review or reference 8 Chapter 2. Your first article ....................................................... 9 Getting started 9 • Format and view the document 10 • Recovering from errors 11 • Title and author 13 • Abstracts and sections 14 • Graphics 16 • Marking up text 19 • Marking up simple mathematics 21 • Creating a bibliography 22 • Congratulations! 24 • More about LATEX 24 Chapter 3. Your first presentation ............................................... 25 Design your presentation 25 • Setting up the document 26 • The title slide 26 • Notes 28 • Outline slide 28 • Introduction slide 29 • Adding a graphic 31 • Revealing points one at a time 32 • Sections and slides 34 • Frame titles and description lists 36 • Finishing up 38 • Giving your presentation 39 Chapter 4. Text markup basics ................................................... 41 Markup basics 41 • A time-saving trick 45 • Font sizes 46 • Font styles and weights 46 iii iv CONTENTS Chapter 5. LATEX document formatting ......................................... 47 LATEX writing guidelines 47 • Changing the document appearance 48 • Styles, or how to get more markup commands 48 • A style example 49 • Finding classes and styles 50 • Cross-references 51 Chapter 6. Math markup basics .................................................. 53 Inline math 53 • Displayed math 54 • Spaces in math markup 54 • LATEX Errors with math 54 • Common math elements 56 • Further reading 64 Chapter 7. Writing a math article ............................................... 65 Setting up the document 65 • Top matter 68 • The article body 69 • Introduction and Theorem 70 • A definition 71 • The theorem statement 71 • The proof 72 • A corollary and a theorem reference 74 • Other math proclamations 75 • Math figures 75 • References 76 • Formatting the bibliography 77 • Guidelines for writing math articles 78 • Further reading 78 Chapter 8. Tables and figures ..................................................... 79 Making tables 80 • More table options 81 • Tables as floating figures 81 • Figures and graphics 82 • Further reading 83 Chapter 9. Bibliography and Index .............................................. 85 External bibliography files 85 • Citing a reference 87 • Formatting the bibliography 87 • Indexing 88 Chapter 10. Finding and fixing errors ........................................... 91 Types of errors 92 • Spelling, grammar, and other content errors 92 • LATEX command errors 93 • Math markup errors 94 • Techniques for isolating errors 94 • Open/Close errors 97 • Unreported errors 97 • More LATEX command errors 97 • Guidelines for avoiding errors 99 Appendix A. Sample document .................................................. 100 Appendix B. LATEX markup used in this guide ................................ 104 Appendix C. Additional markup commands ................................... 114 Appendix D. Selected amsmath commands ..................................... 119 Appendix E. LATEX Font samples ................................................ 123 Glossary .............................................................................. 127 Bibliography ......................................................................... 128 About the authors ................................................................... 129 Index ................................................................................. 131 Introduction The purpose of this guide is to get you started using the LATEX document formatting system. In a few short sessions you will be able to format professional looking documents. PCTEX for Windows will be used to illustrate the basics of using LATEX. If you do not use PCTEX you can still use this guide. It is easy to adapt the instructions here to other LATEX systems, such as WinEdt, TEXShop, and MiKTEX. What’s in this bundle The guide you are now reading is part of a bundle. This bundle is composed of: • a printed copy of this guide • instructional videos • sample documents and files, and • a 30-day trial version of the PCTEX system [13]. This guide presents easily understood techniques for writing LATEX documents. The videos demonstrate most of the document construction techniques contained in the guide. Both the guide and videos make use of the included documents and files. See page 136 for more details. The guide at a glance Chapter 1: First things first shows how to install and use PCTEX, and how to use the hands-on projects that are included with each chapter. Chapter 2: Your first article leads you step by step to make a complete LATEX document. This first hands-on project includes making a title, sections, simple math, graphics, and a bibliography. 1 2 INTRODUCTION Chapter 3: Your first presentation shows how to make a slide presentation. The final document includes a title slide, a contents slide, bulleted lists, and graphics. Chapter 4: Text markup basics introduces the basics of LATEX markup, including LATEX’s special characters, quotes, dashes, font changes, and more. Chapter 5: LATEX document formatting introduces techniques for changing a docu- ment’s appearance using classes and styles. This chapter also covers the basics of cross- referencing. Chapter 6: Math markup basics introduces typing mathematics in LATEX. Using a hands- on project you will learn the basic elements of formatting math expressions. Chapter 7: Writing a math article will guide you through writing an American Mathe- matical Society (AMS) math article. Using a hands-on project, you will add markup to text to create a title, abstract, definitions, theorems, proofs, graphics, and a bibliography. Chapter 8: Tables and figures introduces techniques for formatting tables and graphics. Chapter 9: Bibliography and Index shows how to use an external BIBTEX database for managing references, and how to create an index for a book or large document. Chapter 10: Finding and fixing errors presents techniques for tracking down and cor- recting LATEX errors. The Appendices contain summaries of LATEX markup, math symbols, available fonts, and more. CHAPTER 1 First things first The goal of this guide is to show how to write basic LATEX documents. LATEX has an immense number of commands and capabilities, however in this guide we will present a basic set only. The material presented in this guide is all you will need to create nearly any straightforward document. What is LATEX? LATEX is a document formatting system. It was designed to format high-quality text, math- ematics, and scientific material. It can be used for books, articles, posters, and even for poems and recipes. It starts with a source document, which contains ordinary text, and formats it into a typeset document. For example, if you type the following into your source document The \emph{secret} formula is $x = y^{2} + z_{2}$. it will show up in your typeset document as 2 The secret formula is x = y + z2. You can see how \emph emphasizes the word “secret”, and if you look carefully you’ll see that the math expression is easy to type as well. We’ll talk more about how all this works later. 3 4 1. FIRST THINGS FIRST More about LATEX LATEX is based on Donald Knuth’s TEX typesetting program [7]. LATEX was originally developed by Leslie Lamport [9], and is currently