没有合适的资源?快使用搜索试试~ 我知道了~
LaTex教程(LateX Tutorial)
需积分: 5 0 下载量 52 浏览量
2024-01-24
18:28:29
上传
评论
收藏 221KB PDF 举报
温馨提示
试读
35页
LateX教程,内容全面、详细! 有效果图有语法! 内容包括 1 简介 2 文件结构 3 数学排版 4 间距 5 重音和字体样式 6 表、数组和列表 7 多线方程 8 文本格式 9 参考书目和复合表达式 10 张幻灯片 11 在文档中包含图形 12 封商业信函
资源推荐
资源详情
资源评论
LaTeX Tutorial
Jeff Clark
Revised February 26, 2002
Contents
1 Introduction 4
1.1 Introduction to LaTeX . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2 Required Components of a LaTeX Document . . . . . . . . . . . 4
1.3 Using LaTeX on Elon’s Computers . . . . . . . . . . . . . . . . . 5
1.4 Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.5 Typing LaTeX Commands . . . . . . . . . . . . . . . . . . . . . 6
2 Document Structure 7
2.1 Page Numbering and Headings . . . . . . . . . . . . . . . . . . . 7
2.2 Creating a Title Page . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3 Creating a Title Page, Continued . . . . . . . . . . . . . . . . . . 8
2.4 Sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.5 Cross-References . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.6 Table of Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.7 Abstracts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3 Mathematical Typesetting 10
3.1 Mathematical Formulas . . . . . . . . . . . . . . . . . . . . . . . 10
3.2 Greek Letters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.3 Exponents and Subscripts . . . . . . . . . . . . . . . . . . . . . . 12
3.4 Above and Below . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.5 Fractions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1
3.6 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.7 Sums, Integrals, and Limits . . . . . . . . . . . . . . . . . . . . . 14
3.8 Roots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.9 Text in Math Displays . . . . . . . . . . . . . . . . . . . . . . . . 15
3.10 Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.11 Relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.12 Negated Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.13 More Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4 Spacing 19
4.1 Spacing Between Words . . . . . . . . . . . . . . . . . . . . . . . 19
4.2 Fine-Tuning Spacing in Math-Mode . . . . . . . . . . . . . . . . 19
4.3 Double Spacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.4 Sloppy Line Breaks . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.5 Enlarging Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5 Accents and Font Style 21
5.1 Accents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.2 Hyphenation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.3 The L
A
T
E
X Logo . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.4 Quotation Marks . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.5 Changing the Appearance of Words . . . . . . . . . . . . . . . . 22
6 Tables, Arrays, and Lists 23
6.1 Constructing Arrays . . . . . . . . . . . . . . . . . . . . . . . . . 23
6.2 Constructing Tables . . . . . . . . . . . . . . . . . . . . . . . . . 23
7 Multiline Equations 25
7.1 Multi-line Equations . . . . . . . . . . . . . . . . . . . . . . . . . 25
7.2 Accents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
7.3 Bracket Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
7.4 Dots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
7.5 Indenting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2
8 Text Formatting 29
8.1 Centering Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
8.2 Special Headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
8.3 Extended Quotation . . . . . . . . . . . . . . . . . . . . . . . . . 29
8.4 Bulleted Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
8.5 Numbered Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
8.6 Filling a Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
8.7 Line Breaks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
9 Bibliography and Compound Expressions 32
9.1 Bibliographies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
10 Slides 33
10.1 The Slide Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
10.2 How to Use the Slides Class . . . . . . . . . . . . . . . . . . . . . 33
11 Including Graphics in Your Document 34
11.1 Graphic File Formats . . . . . . . . . . . . . . . . . . . . . . . . . 34
11.2 Graphics Package . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
11.3 Including Graphics Within Your Document . . . . . . . . . . . . 34
12 Business Letters 35
12.1 The Letter Class . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
12.2 Letter Commands for the Preamble . . . . . . . . . . . . . . . . . 35
12.3 Commands for Each Letter . . . . . . . . . . . . . . . . . . . . . 35
1 Introduction
1.1 Introduction to LaTeX
LaTeX is a family of programs designed to produce publication-quality typeset
documents. It is particularly strong when working with mathematical symbols.
The history of LaTeX begins with a program called T
E
X. In 1978, a computer
scientist by the name of Donald Knuth grew frustrated with the mistakes that
his publishers made in typesetting his work. He decided to create a typesetting
program that everyone could easily use to typeset documents, particularly those
that include formulae, and made it freely available. The result is T
E
X.
Knuth’s product is an immensely powerful program, but one that does focus
very much on small details. A mathematician and computer scientist by the
name of Leslie Lamport wrote a variant of T
E
X called LaTeX that focuses on
document structure rather than such details.
1.2 Required Components of a LaTeX Document
Every LaTeX document must contain the following three components. Every-
thing else is optional (even text).
1. \documentclass{article}
2. \begin{document}
3. \end{document}
The first statement tells LaTeX what kind of document it is to process, as there
are different style rules for different kinds of documents. We will use the article
document class exclusively in this tutorial. Other possible classes include report,
book, and letter.
The default font size for each class is 10 point. You can use 11 point or 12
point fonts by including this information in the \documentclass command as
\documentclass[11pt]{article} or \documentclass[12pt]{article}. You
could also use \documentclass[10pt]{article}, but since this is the default
you don’t need to type the [10pt] part.
In general, required information is included in LaTeX commands in braces {},
while optional information is included in square brackets [].
The \documentclass command must appear at the very beginning of your
LaTeX document, before any other LaTeX commands, or you will get an error
message.
4
If you have commands for LaTeX that will affect the whole document, you
should include them in the preamble, which is what the space between the
\documentclass and \begin{document} commands is called. The body of
the document, where you include all of your text, must occur between the
\begin{document} and \end{document} commands. Any text that comes after
the \end{document} command will be ignored.
1.3 Using LaTeX on Elon’s Computers
LaTeX consists of several programs:
1. A program latex that processes your input.
2. A program (yap on our computers) that previews and prints your work.
In addition, you need an editor that produces plain text without formatting
commands as well as a good spell-checker.
Jim Beuerle has arranged for all of these programs to be installed on Elon’s lab
PC’s, as well as a program TeXShell to coordinate them.
You can start TeXShell either from a desktop seashell icon (for the machines
in Duke 201, 204, and 209) or from the Start/Courseware/Math menu (for the
lab machines).
To use TexShell, you need to follow the following steps:
1. You should either create a new LaTeX file with File/New or open an
existing LaTeX file with File/Open.
2. You need to designate the main file that you will be working with, since
LaTeX files can include other LaTeX files and the programs need to know
which one to use; a number of secondary files will be created with the
same filename but different extensions. Use File/Main File.
3. You should use the main editing screen to enter and revise your work.
4. Always spell-check or your teachers will laugh and/or cry at your work:
use Edit/Spell Check.
5. Press the TeX button to run the LaTeX program on your file. A small
window will open and close during this time; any error messages will show
up there; if successful the window will close itself. If not, you will need to
type an “x” and hit Enter to close it after reading the error message.
6. If you want to see the warnings and error messages later, press the Log
button.
5
剩余34页未读,继续阅读
资源评论
SleepingBug
- 粉丝: 141
- 资源: 13
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功