logo资料库

The Not So Short Introduction to LATEX2.pdf

第1页 / 共145页
第2页 / 共145页
第3页 / 共145页
第4页 / 共145页
第5页 / 共145页
第6页 / 共145页
第7页 / 共145页
第8页 / 共145页
资料共145页,剩余部分请下载后查看
Title Page
Thank you!
Preface
Things You Need to Know
The Name of the Game
TeX
LaTeX
Basics
Author, Book Designer, and Typesetter
Layout Design
Advantages and Disadvantages
LaTeX Input Files
Spaces
Special Characters
LaTeX Commands
Comments
Input File Structure
A Typical Command Line Session
The Layout of the Document
Document Classes
Packages
Page Styles
Files You Might Encounter
Big Projects
Typesetting Text
The Structure of Text and Language
Line Breaking and Page Breaking
Justified Paragraphs
Hyphenation
Ready-Made Strings
Special Characters and Symbols
Quotation Marks
Dashes and Hyphens
Tilde ()
Degree Symbol
The Euro Currency Symbol
Ellipsis (...)
Ligatures
Accents and Special Characters
International Language Support
Support for Portuguese
Support for French
Support for German
Support for Korean
Support for Cyrillic
The Space Between Words
Titles, Chapters, and Sections
Cross References
Footnotes
Emphasized Words
Environments
Itemize, Enumerate, and Description
Flushleft, Flushright, and Center
Quote, Quotation, and Verse
Abstract
Printing Verbatim
Tabular
Floating Bodies
Protecting Fragile Commands
Typesetting Mathematical Formulae
General
Grouping in Math Mode
Building Blocks of a Mathematical Formula
Math Spacing
Vertically Aligned Material
Phantoms
Math Font Size
Theorems, Laws, …
Bold Symbols
List of Mathematical Symbols
Specialities
Including Encapsulated PostScript Graphics
Bibliography
Indexing
Fancy Headers
The Verbatim Package
Downloading and Installing LaTeX Packages
Working with pdfLaTeX
PDF Documents for the Web
The Fonts
Using Graphics
Hypertext Links
Problems with Links
Problems with Bookmarks
Creating Presentations with pdfscreen
Producing Mathematical Graphics
Overview
The picture Environment
Basic Commands
Line Segments
Arrows
Circles
Text and Formulas
The '134 multiput and the '134 linethickness command
Ovals. The '134 thinlines and the '134 thicklines command
Multiple Use of Predefined Picture Boxes
Quadratic Bézier Curves
Catenary
Rapidity in the Special Theory of Relativity
Xy-pic
Customising LaTeX
New Commands, Environments and Packages
New Commands
New Environments
Extra Space
Commandline LaTeX
Your Own Package
Fonts and Sizes
Font Changing Commands
Danger, Will Robinson, Danger
Advice
Spacing
Line Spacing
Paragraph Formatting
Horizontal Space
Vertical Space
Page Layout
More Fun With Lengths
Boxes
Rules and Struts
Bibliography
Index
The Not So Short Introduction to LATEX 2ε Or LATEX 2ε in 131 minutes Hubert Partl, Irene Hyna and Elisabeth Schlegl by Tobias Oetiker Version 4.13, 10 September, 2003
ii Copyright ©1995-2002 Tobias Oetiker and all the Contributers to LShort. All rights reserved. This document is free; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This document is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this document; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Thank you! Much of the material used in this introduction comes from an Austrian in- troduction to LATEX 2.09 written in German by: Hubert Partl Zentraler Informatikdienst der Universität für Bodenkultur Wien Irene Hyna Bundesministerium für Wissenschaft und Forschung Wien Elisabeth Schlegl in Graz If you are interested in the German document, you can find a version updated for LATEX 2ε by Jörg Knappen at CTAN:/tex-archive/info/lshort/german
iv Thank you! While preparing this document, I asked for reviewers on comp.text.tex. I got a lot of response. The following individuals helped with corrections, suggestions and material to improve this paper. They put in a big effort to help me get this document into its present shape. I would like to sincerely thank all of them. Naturally, all the mistakes you’ll find in this book are mine. If you ever find a word that is spelled correctly, it must have been one of the people below dropping me a line. Rosemary Bailey, Marc Bevand, Friedemann Brauer, Jan Busa, Markus Brühwiler, Pietro Braione, David Carlisle, José Carlos Santos, Neil Carter, Mike Chapman, Pierre Chardaire, Christopher Chin, Carl Cerecke, Chris McCormack, Wim van Dam, Jan Dittberner, Michael John Downes, Matthias Dreier, David Dureisseix, Elliot, Hans Ehrbar, Daniel Flipo, David Frey, Hans Fugal, Robin Fairbairns, Jörg Fischer, Erik Frisk, Mic Milic Frederickx, Frank, Kasper B. Graversen, Arlo Griffiths, Alexandre Guimond, Andy Goth, Cyril Goutte, Greg Gamble, Neil Hammond, Rasmus Borup Hansen, Joseph Hilferty, Björn Hvittfeldt, Martien Hulsen, Werner Icking, Jakob, Eric Jacoboni, Alan Jeffrey, Byron Jones, David Jones, Johannes-Maria Kaltenbach, Michael Koundouros, Andrzej Kawalec, Sander de Kievit, Alain Kessi, Christian Kern, Jörg Knappen, Kjetil Kjernsmo, Maik Lehradt, Rémi Letot, Johan Lundberg, Alexander Mai, Martin Maechler, Aleksandar S Milosevic, Henrik Mitsch, Claus Malten, Kevin Van Maren, Philipp Nagele, Lenimar Nunes de Andrade, Urs Oswald, Demerson Andre Polli, Maksym Polyakov Hubert Partl, John Refling, Mike Ressler, Brian Ripley, Young U. Ryu, Bernd Rosenlecher, Chris Rowley, Risto Saarelma, Hanspeter Schmid, Craig Schlenter, Gilles Schintgen, Baron Schwartz, Christopher Sawtell, Miles Spielberg, Geoffrey Swindale, Laszlo Szathmary, Boris Tobotras, Josef Tkadlec, Scott Veirs, Didier Verna, Fabian Wernli, Carl-Gustav Werner, David Woodhouse, Chris York, Fritz Zaucker, Rick Zaccone, and Mikhail Zotov.
Preface LATEX [1] is a typesetting system that is very suitable for producing scientific and mathematical documents of high typographical quality. It is also suitable for producing all sorts of other documents, from simple letters to complete books. LATEX uses TEX [2] as its formatting engine. This short introduction describes LATEX 2ε and should be sufficient for most applications of LATEX. Refer to [1, 3] for a complete description of the LATEX system. This introduction is split into 6 chapters: Chapter 1 tells you about the basic structure of LATEX 2ε documents. You will also learn a bit about the history of LATEX. After reading this chapter, you should have a roughly understand how LATEX works. Chapter 2 goes into the details of typesetting your documents. It explains most of the essential LATEX commands and environments. After reading this chapter, you will be able to write your first documents. Chapter 3 explains how to typeset formulae with LATEX. Many examples demonstrate how to use one of LATEX’s main strengths. At the end of the chapter are tables listing all mathematical symbols available in LATEX. Chapter 4 explains indexes, bibliography generation and inclusion of EPS graphics. It introduces creation of PDF documents with pdfLATEX and presents some handy extension packages. Chapter 5 shows how to use LATEX for creating graphics. Instead of draw- ing a picture with some graphics program, saving it to a file and then including it into LATEX you describe the picture and have LATEX draw it for you. Chapter 6 contains some potentially dangerous information about how to alter the standard document layout produced by LATEX. It will tell you how to change things such that the beautiful output of LATEX turns ugly or stunning, depending on your abilities.
vi Preface It is important to read the chapters in order—the book is not that big, after all. Be sure to carefully read the examples, because a lot of the information is in the examples placed throughout the book. LATEX is available for most computers, from the PC and Mac to large UNIX and VMS systems. On many university computer clusters you will find that a LATEX installation is available, ready to use. Information on how to access the local LATEX installation should be provided in the Local Guide [5]. If you have problems getting started, ask the person who gave you this booklet. The scope of this document is not to tell you how to install and set up a LATEX system, but to teach you how to write your documents so that they can be processed by LATEX. If you need to get hold of any LATEX related material, have a look at one of the Comprehensive TEX Archive Network (CTAN) sites. The homepage is at http://www.ctan.org. All packages can also be retrieved from the ftp archive ftp://www.ctan.org and its various mirror sites all over the world. They can be found e.g. at ftp://ctan.tug.org (US), ftp://ftp.dante.de (Germany), ftp://ftp.tex.ac.uk (UK). If you are not in one of these coun- tries, choose the archive closest to you. You will find other references to CTAN throughout the book, especially pointers to software and documents you might want to download. Instead of writing down complete urls, I just wrote CTAN: followed by whatever location within the CTAN tree you should go to. If you want to run LATEX on your own computer, take a look at what is available from CTAN:/tex-archive/systems. If you have ideas for something to be added, removed or altered in this document, please let me know. I am especially interested in feedback from LATEX novices about which bits of this intro are easy to understand and which could be explained better. Tobias Oetiker Department of Information Technology and Electrical Engineering, Swiss Federal Institute of Technology The current version of this document is available on CTAN:/tex-archive/info/lshort
Contents Thank you! Preface 1 Things You Need to Know 1.1 The Name of the Game . . . . . . . . . . . . . . . . . . . . . 1.1.1 TEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.2 LATEX . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.1 Author, Book Designer, and Typesetter . . . . . . . . 1.2.2 Layout Design . . . . . . . . . . . . . . . . . . . . . . 1.2.3 Advantages and Disadvantages . . . . . . . . . . . . . 1.3 LATEX Input Files . . . . . . . . . . . . . . . . . . . . . . . . . Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.1 1.3.2 Special Characters . . . . . . . . . . . . . . . . . . . . 1.3.3 LATEX Commands . . . . . . . . . . . . . . . . . . . . . 1.3.4 Comments . . . . . . . . . . . . . . . . . . . . . . . . . 1.4 Input File Structure . . . . . . . . . . . . . . . . . . . . . . . 1.5 A Typical Command Line Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.6 The Layout of the Document 1.6.1 Document Classes . . . . . . . . . . . . . . . . . . . . 1.6.2 Packages . . . . . . . . . . . . . . . . . . . . . . . . . . 1.6.3 Page Styles . . . . . . . . . . . . . . . . . . . . . . . . 1.7 Files You Might Encounter . . . . . . . . . . . . . . . . . . . 1.8 Big Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Typesetting Text 2.1 The Structure of Text and Language . . . . . . . . . . . . . . 2.2 Line Breaking and Page Breaking . . . . . . . . . . . . . . . . Justified Paragraphs . . . . . . . . . . . . . . . . . . . 2.2.1 2.2.2 Hyphenation . . . . . . . . . . . . . . . . . . . . . . . 2.3 Ready-Made Strings . . . . . . . . . . . . . . . . . . . . . . . 2.4 Special Characters and Symbols . . . . . . . . . . . . . . . . . iii v 1 1 1 1 2 2 2 3 4 4 4 5 6 6 7 9 9 9 11 11 13 15 15 17 17 18 19 19
viii CONTENTS 2.5 2.4.1 Quotation Marks . . . . . . . . . . . . . . . . . . . . . 2.4.2 Dashes and Hyphens . . . . . . . . . . . . . . . . . . . 2.4.3 Tilde (∼) . . . . . . . . . . . . . . . . . . . . . . . . . 2.4.4 Degree Symbol (◦) . . . . . . . . . . . . . . . . . . . . 2.4.5 The Euro Currency Symbol (€) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4.6 Ellipsis (. . . ) 2.4.7 Ligatures . . . . . . . . . . . . . . . . . . . . . . . . . 2.4.8 Accents and Special Characters . . . . . . . . . . . . . International Language Support . . . . . . . . . . . . . . . . . Support for Portuguese 2.5.1 . . . . . . . . . . . . . . . . . 2.5.2 Support for French . . . . . . . . . . . . . . . . . . . . Support for German . . . . . . . . . . . . . . . . . . . 2.5.3 Support for Korean . . . . . . . . . . . . . . . . . . . . 2.5.4 2.5.5 Support for Cyrillic . . . . . . . . . . . . . . . . . . . . 2.6 The Space Between Words . . . . . . . . . . . . . . . . . . . . 2.7 Titles, Chapters, and Sections . . . . . . . . . . . . . . . . . . 2.8 Cross References . . . . . . . . . . . . . . . . . . . . . . . . . 2.9 Footnotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.10 Emphasized Words . . . . . . . . . . . . . . . . . . . . . . . . 2.11 Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.11.1 Itemize, Enumerate, and Description . . . . . . . . . . 2.11.2 Flushleft, Flushright, and Center . . . . . . . . . . . . 2.11.3 Quote, Quotation, and Verse . . . . . . . . . . . . . . 2.11.4 Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . 2.11.5 Printing Verbatim . . . . . . . . . . . . . . . . . . . . 2.11.6 Tabular . . . . . . . . . . . . . . . . . . . . . . . . . . 2.12 Floating Bodies . . . . . . . . . . . . . . . . . . . . . . . . . . 2.13 Protecting Fragile Commands . . . . . . . . . . . . . . . . . . 3 Typesetting Mathematical Formulae 3.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Grouping in Math Mode . . . . . . . . . . . . . . . . . . . . . 3.3 Building Blocks of a Mathematical Formula . . . . . . . . . . 3.4 Math Spacing . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5 Vertically Aligned Material . . . . . . . . . . . . . . . . . . . 3.6 Phantoms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.7 Math Font Size . . . . . . . . . . . . . . . . . . . . . . . . . . 3.8 Theorems, Laws, . . . . . . . . . . . . . . . . . . . . . . . . . . 3.9 Bold Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.10 List of Mathematical Symbols . . . . . . . . . . . . . . . . . . 19 20 20 20 21 22 22 22 23 25 27 27 28 31 32 33 35 35 36 36 37 37 38 38 39 39 41 44 45 45 47 47 51 52 54 54 55 57 58
分享到:
收藏