没有合适的资源?快使用搜索试试~ 我知道了~
首页探索LaTeX基础教程:实用资源指南
探索LaTeX基础教程:实用资源指南
5星 · 超过95%的资源 需积分: 9 21 下载量 92 浏览量
更新于2024-08-02
收藏 982KB PDF 举报
本资源是一份关于LaTeX的实用教程指南,由印度TeX用户组(Indian TEX Users Group)编撰,作者为E.Krishnan,封面设计者为G.S.Krishna。该教程出版于2003年9月,旨在为用户提供入门级的LaTeX基础知识,帮助他们理解和掌握这个强大的排版系统。 LaTeX是一种基于TeX的排版系统,以其高度的可定制性和专业级的数学公式排版能力而闻名。本教程可能包含对LaTeX基本环境的设置、文档结构介绍、文本格式化、列表、表格、图片插入、参考文献管理以及高级特性如宏包使用等内容。通过引用Donald Knuth的话,强调了LaTeX在美学和实用性上的双重价值,它不仅提供美观的排版效果,而且是科研论文、技术文档等专业出版物的理想选择。 教程的发布遵循GNU自由文档许可证,允许用户自由复制、分发和修改,但需保持版权声明和许可条款不变。网络上可以在线获取这份教程的最新版本,网址为http://www.tug.org.in/tutorials.html。此外,作者强调,在编写教程的过程中,他们自身深受LaTeX的魅力吸引,并希望读者能从中获得类似的乐趣和满足感,同时认识到LaTeX在实际工作中的实用价值。 对于初学者而言,这本教程将是一个宝贵的资源,它提供了清晰的步骤和实例,使读者能够快速上手并逐步提升LaTeX技能。无论是在学术研究、报告撰写还是项目文档编制中,了解并掌握LaTeX都将极大地提高工作效率和文档质量。因此,无论是为了美观还是为了高效,学习和使用LaTeX都是值得投入时间和精力的。
资源详情
资源推荐
16 I. THE BASICS
\end{center}
\noindent This is to certify that Mr. N. O. Vice has undergone a
course at this institute and is qualified to be a \TeX nical Expert.
\begin{flushright}
{\sffamily The Director\\
The \TeX nical Institute}
\end{flushright}
and this produces
The T
E
Xnical In stitute
CERTIFICATE
This is to certify that Mr. N. O. Vice has undergone a course at this institute and is
qualified to be a T
E
Xnical Expert.
The Director
The T
E
Xnical Institute
TUTORIAL II
THE DOCUMENT
II.1. DOCUMENT CLASS
We now describe how an entire document with chapters and sections and other embellish-
ments can be produced with L
A
T
E
X. We have seen that all L
A
T
E
X files should begin by spec-
ifying the kind of document to be produced, using the command \documentclass{... }.
We’ve also noted that for a short article (which can actually turn out to be quite long!) we
write \documentclass{article} and for books, we write \documentclass{book}. There
are other document classes available in L
A
T
E
X such as report and letter. All of them
share some common features and there are features specific to each.
In addition to specifying the type of document (which we must do, since L
A
T
E
X has
no default document cla ss), we can also specify some options which modify the default
format.Thus the actual syntax of the \documentclass command is
\documentclass[options]{class}
Note that options are given in square brackets and not braces. (This is often the
case with L
A
T
E
X commands—options are specified within square brackets, after which
mandatory arguments are given within braces.)
II.1.1. Font size
We can se lect the size of the font for the normal text in the entire document with one of
the options
10pt 11pt 12pt
Thus we can say
\documentclass[11pt]{article}
to set the normal text in our document in 11 pt size. The default is 10pt and so this is the
size we get, if we do not specify any font-size option.
II.1.2. Paper size
We know that L
A
T
E
X has its own method of b reaking lines to make paragraphs. It also has
methods to make vertical breaks to produce different pages of output. For these breaks
to work properly, it must know the width and height of the paper used. The various
options for selecting the paper size are given below:
letterpaper 11×8.5 in a4paper 20.7×21 in
legalpaper 14×8.5 in a5paper 21×14.8 in
executivepaper 10.5×7.25 in b5paper 25×17.6 in
Normally, the longer dimension is the vertical one—that is, the height of the page. The
default is letterpaper.
17
18 II. THE DOCUMENT
II.1.3. Page formats
There are options for setting the contents of each page in a single column (as is usual) or
in two columns (as in most dictionaries). This is set by the options
onecolumn twocolumn
and the default is onecolumn.
There is also an option to specify w hether the document will be finally printed on just
one side of each paper or on both sides. The names of the options are
oneside twoside
One of the differences is that with the twoside option, page numbers are printed on
the right on odd-numbered pages and on the left on even numbered pages, so that when
these printed back to back, the numbers are always on the outside, for better visibility.
(Note that L
A
T
E
X has no control over the actual printing. It only makes the formats for
different types of printing.) The default is oneside for article, report and letter and
twoside for book.
In the report and book class there is a provision to specify the different chapters (we
will soon see how). Chapters always begin on a new page, leaving blank space in the
previous page, if necessary. With the book class there is the additional restriction that
chapters begin only on odd-numbered pages, leaving an entire page blank, if need b e.
Such behavior is controlled by the options,
openany openright
The default is openany for reportclass (so that chapters begin on “any” new page)
and openright for the book class (so that chapters begin only on new right, that is, odd
numbered, page).
There is also a provision in L
A
T
E
X for formatting the “title” (the name of t he docu-
ment, author(s) and so on) of a document with special typographic consideration. In the
article class, this part of the document is printed along with the text following on the
first page, while for report an d book, a separate title page is printed. These are set by the
options
notitlepage titlepage
As noted above, the default is notitlepage for article and titlepage for report and
book. As with the other options, the default behavior can be overruled by explicitly
specifying an option with the documentclass command.
There are some other options to the documentclass which we will discuss in the rele-
vant context.
II.2. PA GE STYLE
Having decided on the overall appearance of the document through the \documentclass
command with its various options, we next see how we ca n set the style for the individual
pages. In L
A
T
E
X parlance, each page has a “head” and “foot” usually containing such
information as the current page number or the current chapter or section. Just what goes
where is set by the command
\pagestyle{...}
where the mandatory argument can be an y one of the following styles
plain empty headings myheadings
The behavior pertaining to each of these is given below:
II.3. PAGE NUMBERING 19
plain The page head is empty and the foot contains just the page number, cen-
tered with respect to the width of the text. This is the default for the
article class if no \pagestyle is specified in the preamble.
empty Both the head and foot are empty. In particular, no page numbers are
printed.
headings This is the default for the book class. The foot is empty and the head
contains the page number and names of the chapter section or subsection,
depending on the document class and it s options as given below:
CLASS OPTION LEFT PAGE RIGHT PAGE
book, report
one-sided — chapter
two-sided chapter section
article
one-sided — section
two-sided section subsection
myheadings The same as headings, except that the ‘section’ information in the head
are not predetermined, but to be given explicitly using the commands
\markright or \markboth as described below.
Moreover, we can customize the style for the current page only using the command
\thispagestyle{style}
where style is the name of one of the st yles above. For example, the page number may
be suppressed for the current page alone by the command \thispagestyle{empty}. Note
that only the printing of the page number is suppressed. The next page will be numbered
with the next number and so on.
II.2.1. Heading declarations
As we mentioned above, in the page style myheadings, we have to specify the text to
appear on the head of every page. It is don e with one of the commands
\markboth{left head{right head}
\markright{right head}
where left head is the text to appear in the head on left-hand pages and right head is the
text to appear on the right-hand pages.
The \markboth comm and is used with the twoside option with even numbered pages
considered to be on the left and odd numbered pages on the right. With oneside option,
all pages are considered to be ri ght-hand ed and so in this case, the command \markright
can be used. These commands can also be used to override the default head set by the
headings style.
Note that these give only a limited control over the head and foot. since the general
format, including the font used an d the placement of the page number, is fixed by L
A
T
E
X.
Better customization of the head and foot are offered by the package fancyhdr, which is
included in most L
A
T
E
X distributions.
II.3. PA GE NUMBERING
The style of page numbers can be specified by the command
\pagenumbering{...}
The possible arguments to this command and the resulting style of the numbers are given
below:
20 II. THE DOCUMENT
arabic Indo-A rabic numerals
roman lowercase Roman numerals
Roman upper case Roman numerals
alph lowercase English letters
Alph uppercase English letters
The default value is arabic. This command resets the page counter. Thus for example, to
number all the pages in the ‘Preface’ with lowercase Roman numerals and the rest of the
document with Indo-Arabic numerals, declare \pagenumbering{roman} at the beginning
of the Preface and issue the command \pagestyle{arabic} immediately after the first
\chapter command. (The \chapter{...} command starts a new chapter. We will come
to it soon.)
We can make the pages start with any number we want by the command
\setcounter{page}{number}
where number is the page number we wish the current page to have.
II.4. FORMATTING LENGTHS
Each page that L
A
T
E
X produces consists not only of a head an d foot as discussed above
but also a body (surprise!) containing the actual text. In formatting a page, L
A
T
E
X uses
the width and heights of these parts of the page a nd various other lengths such as the
left an d right margins. The values of these lengths are set by th e paper size options and
the page format and style commands. For example, the page layout with values of these
lengths for an odd page and even in this book are separately shown below.
These lengths can all be changed with the command \setlength. For example,
\setlength{\textwidth}{15cm}
makes the width of text 15 cm. The package geometry gives easier interfaces to customize
page format.
II.5. PARTS OF A DOCUMENT
We now turn our attention to the contents of the document itself. Documents (especially
longer ones) are divided into chapters, sections and so on. There may be a title part
(sometimes even a separate title page) and an abstract. All these require special typo-
graphic considerations and L
A
T
E
X has a number of features which automate this task.
II.5.1. Title
The “title” part of a do cument usually consists of the name of the document, the name
of author(s) and sometimes a date. To produce a title, we make use of the commands
\title{document name}
\author{author names}
\date{date text}
\maketitle
Note that after specifying the arguments of \title, \author and \date, we must issue the
command \maketitle for this part to be typeset.
By default, all entries produced by these commands are centered on the lines in which
they appear. If a title text is too long to fit in one line, it will be broken automatically.
However, we can choose the break points with the \\ command.
If there are several authors and their names are separated by the \and command, then
the names appear side by side. Thus
剩余154页未读,继续阅读
wxs1989wxs
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 解决本地连接丢失无法上网的问题
- BIOS报警声音解析:故障原因与解决方法
- 广义均值移动跟踪算法在视频目标跟踪中的应用研究
- C++Builder快捷键大全:高效编程的秘密武器
- 网页制作入门:常用代码详解
- TX2440A开发板网络远程监控系统移植教程:易搭建与通用解决方案
- WebLogic10虚拟内存配置详解与优化技巧
- C#网络编程深度解析:Socket基础与应用
- 掌握Struts1:Java MVC轻量级框架详解
- 20个必备CSS代码段提升Web开发效率
- CSS样式大全:字体、文本、列表样式详解
- Proteus元件库大全:从基础到高级组件
- 74HC08芯片:高速CMOS四输入与门详细资料
- C#获取当前路径的多种方法详解
- 修复MySQL乱码问题:设置字符集为GB2312
- C语言的诞生与演进:从汇编到系统编程的革命
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功