当前位置:科普知识站>IT科技>

latex使用教程

IT科技 阅读(7.37K)

1、latex定义:

LaTeX是一种基于ΤΕΧ的排版系统,利用这种格式,即使使用者没有排版和程序设计的知识也可以充分发挥由TeX所提供的强大功能,能在几天、甚至几小时内生成很多具有书籍质量的印刷品。对于生成复杂表格和数学公式,这一点表现得尤为突出。因此它非常适用于生成高印刷质量的科技和数学类文档。这个系统同样适用于生成从简单的信件到完整书籍的所有其他种类的文档。

2、LaTeX文件的通常语法:

documentstyle{article}

begin{document}

This is a first example of a simple inputfile.

end{document}

如果是中文,将documentstyle{article}改为documentstyle{carticle}

3、规则

(1)空格:Latex中空格不起作用。

(2)换行:用控制命令“”,或“ newline”.

(3)分段:用控制命令“par” 或空出一行。

(4)换页:用控制命令“newpage”或“clearpage”

(5)特殊控制字符:#,$, %, &, - ,{, }, ^, ~

latex使用教程

4、西文字符转换表:

rm   罗马字体          it     意大利字体

bf   黑体              sl     倾斜体

sf   等线体            sc     小体大写字母

tt    打字机字体       mit     数学斜体

纵向固定间距控制命令

smallskip             medskip               bigskip

页面控制命令

textwidth=14.5cm

textheight=21.5cm

系统默认:字号10pt= 五号字;西文字体为罗马字体;textwidth=12.2cm,textheight=18.6cm。相当于美国标准信纸大小。

5、中英文LaTeX模板

中文LaTeX2e模板,此时文件的扩展名为.ctx。模板中%后面的中文是中文注解,读者可以阅读这些模板中的中文注解,以理解所涉及的LaTeX2e命令的含义。

documentclass[11pt]{ccart}%文件类说明

%还可以选择的类是cctbook

setlength{parindent}{12pt}%自然段第一行的缩进量为12pt

setlength{parskip}{10pt plus1ptminus1pt}

%自然段之间的距离为10pt,并可在8pt到11pt之间变化

setlength{baselineskip}{8pt plus2ptminus1pt}

%行间距为8pt,并可在7pt到10pt之间变化

setlength{textheight}{21truecm}%版面高为21厘米

setlength{textwidth}{14.5truecm}%版面宽为14.5厘米

begin{document}%正文开始

title{Thesis}%文章标题,双反斜杠表示换行

author{authorDept. of Math.}

%作者名,单位,通信地址等,双反斜杠表示换行

date{2003/8/5}

%文章写作日期,如果省略此行,计算机日期作为写作日期

maketitle%建立标题部分

%文章的正文输入

begin{center}%参考文献的书写

latex使用教程 第2张

{heiti  参考文献}

end{center}

vskip 0.1cm

defhang{hangindentparindent}

deftextindent#1{indentllap{#1enspace}ignorespaces}

defre{parhangtextindent}

re{[1]} Nordhaus E,Stewart B,WhiteA.On theMaximum Genus of a Graph.{it J.combinatorial TheoryB},1971,11:258-267  

re{[2]} Skoviera M.The Maximum Genus of Graphsof Diameter Two.{it Discrete Math}.1991, 87:175-180

end{document}%源文件的结束

英文LaTeX2e模板

documentclass[11pt]{article}%文件类说明

%还可以选择的类是book,report

setlength{parindent}{12pt}%自然段第一行的缩进量为12pt

setlength{parskip}{10pt plus1ptminus1pt}

%自然段之间的距离为10pt,并可在8pt到11pt之间变化

setlength{baselineskip}{8pt plus2ptminus1pt}

%行间距为8pt,并可在7pt到10pt之间变化

setlength{textheight}{21truecm}%版面高为21厘米

setlength{textwidth}{14.5truecm}%版面宽为14.5厘米

begin{document}%正文开始

title{Thesis}%文章标题,双反斜杠表示换行

author{authorDept. of Math.}

%作者名,单位,通信地址等,双反斜杠表示换行

date{2003/8/5}

%文章写作日期,如果省略此行,计算机日期作为写作日期

maketitle%建立标题部分

%文章的正文输入

section{Introduction}%第一节引言(机器自动编号)

{bf Theorem 1.} {it For any fixed $rho>0$,we have

$$||R(u,rho)||leq ||R_1(u,rho)||leq2||R(u,rho)||,~~~forall uin H.

eqno(10)$$ Hence, (2) and (3) are equivalent forany fixed$rho>0$.}

%一般定理的写法

{bf Proof.}

begin{thebibliography}{99}

bibitem{Kind} D. Kinderlehrer and G.Stampacchia, {it An Introduction to

Variational Inequalities and Their Applications},Academic Press,New York, (1980).

end{thebibliography}%参考文献

end{document}%源文件的结束