标签:
@(05.2 Latex)[latex][基础教程]
这篇文章是关于latex基础教程.pdf的一个总结。
以上是Latex的保留字符,不能直接使用。要加反斜杠\
以一反斜线 \ 开始,命令名后的空格符、数字或其它非字母字符标志该命令的结束。
Latex命令会忽略它后面的空格(因为空格被认为是结束命令),在命令后面加一个{}
可以使Latex命令立即结束。下面是一个例子:
I read that Knuth divides the
people working with \TeX{} into
\TeX{}nicians and \TeX perts.\Today is \today.
实际的显示效果如下:
I read that Knuth divides the people working
with TEX into TEXnicians and TEXperts.
Today is 8th March 2003.
Note: 注意3个TEX处的显示情况。
遇到一个百分号字符 %
,Latex
%
后的该行文本,分行符。当注释非常长时
\usepackage{verbatim}
\begin{coment}...\end{coment}
之间都会被认为是注释\documentclass[a4paper,11pt]{article}
% define the title
\author{H.~Partl}
\title{Minimalism}
\begin{document}
% generates the title
\maketitle
% insert the table of contents
\tableofcontents
\section{Start}
Well, and here begins my lovely article.
\section{End}
\ldots{} and here it ends.
\end{document}
\documentclass{...}
: 指定了你所写的文档的类别\usepackage{...}
: 宏集,进而为 Latex 系统增添一些新的功能\begin{document}
: 开始文档内容\documentclass{...}
和\begin{document}
之间的区域称为导言区文档类型通过命令 \documentclass
设置
\documentclass[options ]{class }
\documentclass[11pt,twoside,a4paper]{article}
这条命令指定 Latex 使用论文版式,11 磅大小的字体来排班此文档,并且得到适合打印在 A4 纸上的输出结果。
文档类型介绍
文档类 | 用途 |
---|---|
article | 排版科技期刊、短报告、程序文档、邀请函等 |
report | 排版多章节的长报告、短篇的书籍、博士论文等 |
book | 排版书籍。 |
slides | 排版幻灯片。其中使用了较大的 sans serif 字体。也可以考虑使用 FoilTEX得到相同的效果。 |
文档选项介绍
<center></center>
基本的 Latex 不能够解决你的问题。如果你想插入图形、彩色文本或源代码文件,你需要使用宏包来增强 Latex 的功能。
\usepackage[options ]{package }
Latex支持三种预定的页眉、页脚(header/footer)格式
\pagestyle{style }
<center></center>
Note: 可以用 \thispagestyle{style } 改变当前的页面样式
当处理大型文档时,最好将源文件分成几个部分。
\include{filename }
可将文件名为 filename.tex 的内容包括进来
Note: 在开始处理 filename.tex 的内容之前将会开始一新页
在文档的导言区
\includeonly{filename ,filename ,. . . }
\input{filename }
\\ or \newline
:另起一行,而不另起一段\\*
:在强行断行后,还禁止分页\newpage
:另起一新页这个主要是说明了在一个单词处换行的规则
例1
\hyphenation{FORTRAN Hy-phen-a-tion}
Note: 允许对 “hyphenation” 和 “Hyphenation” 进行断字,却根本不允许 “FORTRAN”, “Fortran” 和 “fortran” 进行断字
例2
I think this is: su\-per\-cal\-%
i\-frag\-i\-lis\-tic\-ex\-pi\-%
al\-i\-do\-cious
Note: 命令
\-
在单词中插入一个自主的断字点。它也就成为这个单词中允许出现的唯一断字点。
例3
My phone number will change soon.
It will be \mbox{0116 291 2319}.
Note:
\mbox{text }
保证把几个单词排在同一行上
用两个`产生左引号,用两个\‘ 产生右引号。一个 ` 和一个 \‘ 产生一个单引号。
``Please press the `x‘ key.‘‘
\ldots
: ...
省略号
% \label{marker }, \ref{marker } and \pageref{marker }
A reference to this subsection
\label{sec:this} looks like:
``see section~\ref{sec:this} on
page~\pageref{sec:this}.‘‘
其中 marker 是使用者选择的标识符。如果在节、子节、图、表或定理后
面输入 \label 命令,LATEX 把 \ref 替换为相应的序号。\pageref 命令排
印 \label 输入处的页码。
标签:
原文地址:http://www.cnblogs.com/GarfieldEr007/p/5463422.html