You are on page 1of 94

Son ti liu khoa hc

vi L
A
T
E
X
Bin son: Gary L. Gray
Laboratory for Parallel and Computational Mechanics
Engineering Science and Mechanics Department
The Pennsylvania State University
Dch bi: Nguyn Phi Hng
Ngy 24 thng 08 nm 2004
ii
Bn quyn c _2000-2004 thuc v Gary L. Gray, All rights reserved.
Cm n!
Phn ln ni dung ca ti liu ny c ly t bn hng dn son ti liu
khoa hc vi L
A
T
E
X bng ting Anh ca Gary L. Gray, i hc Pennsylvania
State.
iv Cm n!
Ti liu ny c dch trong thi gian ti hc L
A
T
E
X vi mong mun gip
cc bn hc v s dng L
A
T
E
X tt hn.
N cng l mn qu lu nim ca ti gi tng khoa TonTin trng
i hc S Phm Thnh Ph H Ch Minh sau khi kt thc kha hc. Nu
c sai st trong vic nh my, hay cn b sung thm ti liu ny cc bn
hy lin h vi ti.
Nguyn Phi Hng
email: phihung_sp@yahoo.com
Li gii thiu
L
A
T
E
X l mt h thng son tho rt ph hp vi vic to ra cc ti liu
khoa hc v ton hc vi cht lng bn in rt cao. ng thi, n cng rt
ph hp vi cc cng vic son tho cc ti liu khc t th t cho n
nhng cun sch hon chnh. L
A
T
E
X s dng T
E
X lm b my nh dng.
Ti liu ny s gii thiu cho cc bn cch s dng L
A
T
E
X2

son ti
liu khoa hc v cn hn th na.
Ti liu ny c chia lm 7 chng:
Chng 1 gii thiu v cu trc c bn ca mt ti liu c son tho
bng L
A
T
E
X2

. Ngoi ra, chng ny cng gii thiu v mt s thut


ng v kin thc c bn lm c s cho vic nh dng ti liu ca
bn..
Chng 2 Gii thiu su hn v cc mi trng lit k, tabbing, list, . . .
Chng 3 Hng dn cch son tho cc cng thc Ton trn hng v
trn mt hng ring bit.
Chng 4 Hng dn cch son tho cc cng thc Ton nhiu hng.
Chng 5 Ni v cc gi lnh h tr chn hnh nh v bng vo ti liu.
Chng 6 Hng dn bn to lnh mi v mi trng mi.
Chng 7 To danh sch ti liu tham kho vi BIBT
E
X.
Nu bn c nhu cu v cc vn lin quan n L
A
T
E
X, hy tham kho thm
ti liu trang web ca Comprehensive T
E
X Archive Network (CTAN). Trang
ch c t ti http://www.ctan.org. Bn c th ti v tt c cc gi d
liu thng qua cc chng trnh FTP a ch ftp://www.ctan.org hay
rt nhiu a ch lin kt ph khc trn th gii nh ftp://ctan.tug.org
(US), ftp://ftp.dante.de (Germany), ftp://ftp.tex.ac.uk (UK). Nu
bn khng cc nc trn th hy la chn a ch no gn bn nht.
Nu bn mun s dng L
A
T
E
X trn my tnh c nhn, hy xem qua nhng
thng tin a ch CTAN:/tex-archive/systems.
Mc lc
Cm n! iii
Li gii thiu v
1 Gii thiu v L
A
T
E
X 1
1.1 Gii thiu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1 L
A
T
E
X l g ? . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.2 Ti sao ta dng L
A
T
E
X ? . . . . . . . . . . . . . . . . . 1
1.1.3 Cc ngun cung cp phn mm v ti liu v L
A
T
E
X . 2
1.2 Bt u vi L
A
T
E
X . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2.1 Cu trc chung ca ti liu . . . . . . . . . . . . . . . 2
1.2.2 Cc lnh ca L
A
T
E
X. . . . . . . . . . . . . . . . . . . . 3
1.2.3 Mi trng (Environment) . . . . . . . . . . . . . . . . 3
1.2.4 Declarations . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.5 K t (character), t (word), on vn (paragraph) . . . 4
1.2.6 Cu (Sentence) . . . . . . . . . . . . . . . . . . . . . . 4
1.2.7 Quotes, Hyphens, & Dashes . . . . . . . . . . . . . . . 4
1.2.8 Kiu ti liu . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2.9 Cc gi thm vo (Package) . . . . . . . . . . . . . . . 5
1.2.10 Bin giy, phn u v chn trang . . . . . . . . . . . 5
1.3 Tng hp nhng g bit . . . . . . . . . . . . . . . . . . . . 6
2 Font ch, cc mi trng lit k 7
2.1 Tng quan v L
A
T
E
X . . . . . . . . . . . . . . . . . . . . . . . 7
2.1.1 V d v cc sch p son bng L
A
T
E
X . . . . . . . . 7
2.1.2 Font trong L
A
T
E
X . . . . . . . . . . . . . . . . . . . . . 7
2.2 Thay i font cho k t . . . . . . . . . . . . . . . . . . . . . 8
2.2.1 Nhn mnh . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2.2 ln font ch . . . . . . . . . . . . . . . . . . . . . . 8
2.2.3 H Font, sc nt, m nht. . . . . . . . . . . . . . 8
2.3 Canh gia v tht u hng . . . . . . . . . . . . . . . . . . . 9
2.3.1 Canh gia . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3.2 Trch dn mt on vn . . . . . . . . . . . . . . . . . 9
MC LC vii
2.4 Cc mi trng lit l . . . . . . . . . . . . . . . . . . . . . . 10
2.4.1 Danh sch chm im . . . . . . . . . . . . . . . . . . 10
2.4.2 Danh sch nh s . . . . . . . . . . . . . . . . . . . . 11
2.4.3 Danh sch m t . . . . . . . . . . . . . . . . . . . . . 11
2.4.4 Thay i nhn cho mi trng lit k. . . . . . . . . . 12
2.4.5 Mi trng lit k tng qut . . . . . . . . . . . . . . 13
2.4.6 Mi trng tabbing . . . . . . . . . . . . . . . . . . . . 14
2.5 Hp trong L
A
T
E
X . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.6 Bng trong L
A
T
E
X . . . . . . . . . . . . . . . . . . . . . . . . . 16
3 Son tho Ton trong L
A
T
E
X 18
3.1 S dng /
/
o-L
A
T
E
X . . . . . . . . . . . . . . . . . . . . . . . 18
3.2 Cc ch hin th cng thc . . . . . . . . . . . . . . . . . . 19
3.2.1 Mi trng math . . . . . . . . . . . . . . . . . . . . . 19
3.2.2 Khong trng trong ch son cng thc Ton. . . . 20
3.2.3 Cc phng trnh Ton hc . . . . . . . . . . . . . . . 20
3.2.4 Cc cu trc c bn . . . . . . . . . . . . . . . . . . . 21
3.2.5 Chn ch vo cng thc Ton . . . . . . . . . . . . . . 24
3.2.6 Cc du ngoc . . . . . . . . . . . . . . . . . . . . . . 26
3.2.7 Hm s . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.2.8 Cc du nhn trn mt k hiu . . . . . . . . . . . . 30
3.2.9 Khong trng xung quanh cc k hiu . . . . . . . . . 30
3.2.10 K t v k hiu Ton hc . . . . . . . . . . . . . . . . 32
3.2.11 Phn s tng qut . . . . . . . . . . . . . . . . . . . . 34
4 Cc phng trnh nhiu dng 35
4.1 Biu din cng thc Ton trn nhiu dng . . . . . . . . . . . 35
4.2 Gp nhm cc cng thc . . . . . . . . . . . . . . . . . . . . . 35
4.3 Ngt dng cc cng thc di . . . . . . . . . . . . . . . . . . 37
4.4 Vi nguyn tc c bn . . . . . . . . . . . . . . . . . . . . . . 38
4.4.1 Cng thc con . . . . . . . . . . . . . . . . . . . . . . 38
4.4.2 Ngt dng v sp theo ct cc cng thc . . . . . . . 39
4.4.3 nh s nhm cc cng thc . . . . . . . . . . . . . . 40
4.5 Canh ngay cc ct . . . . . . . . . . . . . . . . . . . . . . . . 41
4.5.1 Mi trng align . . . . . . . . . . . . . . . . . . . . . 41
4.5.2 Mi trng flalign . . . . . . . . . . . . . . . . . . . . 43
4.5.3 Mi trng alignat . . . . . . . . . . . . . . . . . . . . 43
4.6 Mi trng Ton con . . . . . . . . . . . . . . . . . . . . . . . 44
4.6.1 Mi trng con split . . . . . . . . . . . . . . . . . . . 46
4.7 nh dng ct . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
4.7.1 Cc dng ca mi trng matrix . . . . . . . . . . . . 48
4.7.2 Mi trng array . . . . . . . . . . . . . . . . . . . . . 48
4.7.3 Mi trng cases . . . . . . . . . . . . . . . . . . . . . 49
4.8 Ngt trang . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
viii MC LC
5 Hnh nh v cc i tng c bit 51
5.1 Gi graphicx . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
5.1.1 C bn v lnh \includegraphics . . . . . . . . . . . 52
5.1.2 Lnh \includegraphics: ty chn scale . . . . . . . . 52
5.1.3 Lnh \includegraphics: ty chn width, height, v
keepaspectratio . . . . . . . . . . . . . . . . . . . . . . 54
5.1.4 Lnh \includegraphics: ty chn angle . . . . . . . . 55
5.1.5 Lnh \includegraphics: ty chn bb . . . . . . . . . 55
5.2 Gi lscape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
5.3 Cc vn xy ra khi chn hnh nh . . . . . . . . . . . . . . 60
5.4 S dng mu vi gi color . . . . . . . . . . . . . . . . . . . . 62
5.4.1 nh ngha mu . . . . . . . . . . . . . . . . . . . . . 63
5.4.2 Tn mu c trong ty chn dvips . . . . . . . . . . . . 64
5.5 Mi trng float . . . . . . . . . . . . . . . . . . . . . . . . . 65
5.5.1 Ni t i tng . . . . . . . . . . . . . . . . . . . . 65
5.5.2 V d v mi trng table . . . . . . . . . . . . . . . . 67
5.5.3 V d s dng mi trng figure . . . . . . . . . . . . 68
6 Ti u cho ngi s dng 70
6.1 Ti u vic s dng L
A
T
E
X . . . . . . . . . . . . . . . . . . . . 70
6.1.1 B m (Counters) . . . . . . . . . . . . . . . . . . . . 70
6.1.2 di . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
6.1.3 nh ngha lnh mi . . . . . . . . . . . . . . . . . . . 73
6.1.4 Vi ch c bn . . . . . . . . . . . . . . . . . . . . . 74
7 Danh sch ti liu tham kho 76
7.1 Ti liu tham kho & BIBT
E
X . . . . . . . . . . . . . . . . . 76
7.1.1 To danh sch ti liu tham kho n gin . . . . . . 76
7.1.2 To danh sch ti liu tham kho vi BIBT
E
X . . . . 77
Ch mc 82
Chng 1
Gii thiu c bn v L
A
T
E
X
1.1 Gii thiu
1.1.1 L
A
T
E
X l g ?
L
A
T
E
X c pht m l Lay-tech hay Lah-tech. Chng ta sn sng
s dng L
A
T
E
X2

v c th nng cp ln L
A
T
E
X3. Chng ta vit L
A
T
E
X
c ngha l L
A
T
E
X2

. L
A
T
E
X l phn mm x l vn bn, hn na c th
d dng to ra file .html. N rt tt to cc vn bn khoa hc m nht
l Ton hc. T
E
X, b my nh dng ca L
A
T
E
X, s dng cc font c cht
lng rt tt (Computer Modern), c to bi Donald Knuth, mt nh khoa
hc my tnh Stanford, trong khi vit tc phm The Art of Computer
Programming. Bi vy, ng ta tri qua nhiu nm lp trnh T
E
X trc
khi hon thnh cun sch ny.
1.1.2 Ti sao ta dng L
A
T
E
X ?
N khng ging Microsoft Word !!!
Vi L
A
T
E
X, bn c th d dng to ra cc ti liu di, phc tp nhng
rt p v chuyn nghip
1
.
L
A
T
E
X h tr rt tt cho vic son tho cc ti liu Ton hc v khoa
hc k thut.
Cc phng trnh, hnh nh, bng, chng, mc . . . c th c gn
nhn, c L
A
T
E
X nh s t ng v th ta c th tham kho n
chng d dng.
Chng ta c th to ra v tham chiu n mt danh sch ti liu tham
kho rt ln nh s dng BIBT
E
X.
1
cc ti liu to ra bi L
A
T
E
X l kiu mu c s dng bi cc nh xut bn ni ting
nc ngoi.
2 Gii thiu v L
A
T
E
X
T
E
X hon ton min ph v ta c th dng n nh trn mi h thng
c cu hnh cao hay thp, dng PC hay Mac.
File ngun ca T
E
X lu dng k t ASCII (file .tex) nn rt nh.
Sau khi bin dch file ngun, L
A
T
E
X to ra kt qu c th l file .pdf
(Adobe Portable Document Format), .ps (PostScript), hoc .dvi (De-
vice Independent format).
Hin nay trn th gii c rt nhiu c nhn v t chc s dng T
E
X.
1.1.3 Cc ngun cung cp phn mm v ti liu v L
A
T
E
X
Web site ca ti liu ny: http://www.esm.psu.edu/courses/LaTeX
( thi im ny n c thay bng mt a ch mi.)
Cng ng ngi dng T
E
X: comp.text.tex
Comprehensive TEX Archive Network (CTAN): http://www.ctan.org
TEX Users Group (TUG) http://www.tug.org
American Mathematical Society (AMS), to ra AMSL
A
T
E
X (h rt
thng minh !): http://www.ams.org
N. J. Higham, Handbook of Writing for the Mathematical Sciences,
SIAM, Philadelphia, PA, 1993.
Macintosh T
E
X/L
A
T
E
X Web Site: http://www.esm.psu.edu/mac-tex
1.2 Bt u vi L
A
T
E
X
1.2.1 Cu trc chung ca ti liu
Mi file ngun ca L
A
T
E
X c cu trc c bn sau:
\documentclass[options]{class}
Phn u ti liu
\begin{document}
. . . ni dung ti liu . . .
\end{document}
trong class l mt trong cc kiu ti liu sau article, report, book hay
letter
2
v options l mt danh sch cc ty chn tng ng vi kiu ti
liu .
2
thc ra trn Internet cn c nhiu kiu ti liu khc, mt s trong chng c bn quyn.
1.2 Bt u vi L
A
T
E
X 3
1.2.2 Cc lnh ca L
A
T
E
X.
Mt lnh ca L
A
T
E
X c cu trc c bn sau:
\name[parameter]{mandarg}
name l tn lnh, parameter l tham s (hay l bin), s lng cc tham s
c th c l t 0 n 9, mandarg l ni dung ca lnh. Cc lnh ca L
A
T
E
X
c hai dng:
Cc k t & $ % _ { } # c ngha c bit v rt hay dng trong
L
A
T
E
X. K t \ theo sau bi duy nht mt k t ni trn s in ra chnh
n trong vn bn.
K t \ theo sau bi mt hay nhiu k t thng thng.
Sau ny chng ta s bit v dng nhiu lnh nh th ny.
1.2.3 Mi trng (Environment)
Phn vn bn bn trong mt mi trng th khc vi phn vn bn ngoi
mi trng . Mt mi trng c dng:
\begin{environment}
phn thn ca mi trng
\end{environment}
y cng l mt cu trc quan trng ca L
A
T
E
X m ta s dng rt nhiu.
Mt v d l mi trng center (canh gia mt on vn bn) ging nh th
ny:
on vn bn ny nm trong mi trng center
v n c canh u hai bin giy.
1.2.4 Declarations
Declaration l nhng lnh m n lm thay i cch hot ng ca mt tham
s hay lnh no m n khng in ra vn bn g c. V d nh lnh
\setlength{\topmargin}{-0.9in}
c dng trong ti liu iu chnh li bin trn (top margin) ca t giy
l 0.9 inches (vng, di vn c th m). Nh mt v d khc, chng
ta dng declaration \footnotesize to kch thc nh hn kch thc
thng thng, ging nh th ny: y l footnotesize.
Mt declaration c tc dng trc tip t khi gi n v kt thc khi c
mt declaration khc cng loi c gi li. Nu mt declaration xut hin
bn trong mt mi trng hay cp du {... } th tc dng ca n ch c trong
mi trng ny hay i vi phn vn bn trong cp du ngoc ging nh
khi thy v d trn vi declaration \footnotesize.
4 Gii thiu v L
A
T
E
X
1.2.5 K t (character), t (word), on vn (paragraph)
L
A
T
E
X xem xt xp mt nhm cc k t thnh mt t thng qua cc
khong trng (nhiu khong trng hay xung hng cng ch c coi l mt
khong trng). Mt hng trng hay nhiu hng trng ch cho L
A
T
E
X rng ta
mun kt thc mt on v bt u on mi. Mt khong trng khng b
ngt c a vo vi du . Chng ta s thy nhiu v d loi ny. Nhng
k t: & $ % { } # c nhng ngha c bit i vi L
A
T
E
X. Nu bn
mun xut ra chng th ta phi t trc n k t \ ging nh th ny:
\$ \& \# .... Tt c cc lnh ca L
A
T
E
X bt u vi k t \, k t % lm
cho L
A
T
E
X b qua tt c cc phn vn bn trn hng k t sau n.
1.2.6 Cu (Sentence)
Mt cu kt thc vi . (hoc c th l ? hay !) v L
A
T
E
X t ng thm vo
mt khong trng ln hn khi bt u cu mi (gp i khong trng thng
thng). Trong s thm vo , s c vi trng hp L
A
T
E
X lm sai khi
trc du chm cu l ch in hoa. Sau y l mt v d minh ha, nu ta
nhp vo: G. L. Gray sent a proposal to NSF. How nice., ta s c
kt qu l: G. L. Gray sent a proposal to NSF. How nice.
Ch rng kh nng ngt cu v thm vo cc khong trng t ng
ca L
A
T
E
X s b sai khi trc du chm l ch in hoa, khc phc iu
ny ta c th thm vo lnh \@ trc du chm. Ging nh th ny: G.
L. Gray sent a proposal to NSF\@. How nice. N s cho ta kt
qu l: G. L. Gray sent a proposal to NSF. How nice.
Lnh \frenchspacing s tt chc nng thm vo khong trng khi
kt thc cu v y l c trng ca ting Php.
1.2.7 Quotes, Hyphens, & Dashes
Chng ta hu nh khng bao gi dng k t " , bi v m hay ng ngoc
(n hay kp) ta thng dng nh sau single hay double. Chng c
nhp vo nh sau: single v double.
Nhng loi du gch ni (dash) c dng trong son tho ty tng
hon cnh. L
A
T
E
X c th to ra bn loi du gch ni sau:
3
Hyphen (-) s dng ni cc t b ngt qung khi kt thc hng, v d
nh docu-ment.
En dash () dng biu th dy c th t, v d nh t 1216 Thng Tm.
du tr ($-$) dng trong ch son tho cng thc ton ging nh xy
2
,
ch di ca du tr v cc khong trng ln xung quanh n.
dash hoc emdash () Cc trng hp khc.
3
Nhng ngi s dng Microsoft Word dng nh ch bit mt loi trong chng.
1.2 Bt u vi L
A
T
E
X 5
1.2.8 Kiu ti liu
i vi mi ti liu, L
A
T
E
X u yu cu ngi son xc nh cu trc ca
ti liu thng qua cc ty chn (option) v chn kiu ti liu (class) mun
son. Cc chn la c th dng l:
font size 10pt, 11pt, 12pt, trong mc nh l 10pt.
paper size/orientation Kh giy mc nh ph thuc vo bn L
A
T
E
X m
bn ci t. Kh giy letterpaper dng cho U.S. l 8
1
2
11 in. Kiu
dng mc nh l portrait, nhng ta c th thay thnh landscape.
one/two column onecolumn l gi tr mc nh. Ty chn twocolumn t
ng nh dng li ti liu thnh 2 ct.
V th, bn c th bt u ti liu vi lnh:
\documentclass[letterpaper,12pt]{article}
Xem Sch [4] c cc thng tin chi tit hn v cc ty chn khc.
1.2.9 Cc gi thm vo (Package)
Mt phn mi c thm vo u ti liu l cc gi lnh. C hng ngn gi
lnh c sn v min ph trn CTAN m ta c th dng.
Nhng gi no c th dng ph thuc vo bn L
A
T
E
X m bn ci t,
nhng ta cng c th ci b sung thm sau . Sch [4] s cho bn nhng
tng tt ci cc gi thm vo. Ni bn ci cc gi ph thuc vo th
mc gc m bn ci L
A
T
E
X. V d, vi h iu hnh Mac OS X (UNIX), th
mc ci L
A
T
E
X l
/Library/texmf/tex/latex/misc/
v trong Windows vi MikT
E
X th mc nh l th mc
C:\texmf\tex\
Mi file .sty m L
A
T
E
X cn dng u trong th mc ny, c th c tm
thy v s dng. y l th mc ci L
A
T
E
X thng dng, v ta c th ci cc
gi vo y. Khi bin dch, T
E
X s tm cc file cn dng trong th mc ny,
v th mc t file cn bin dch.
1.2.10 Bin giy, phn u v chn trang
Bn c th iu chnh hnh dng ca trang in khi cn cho ph hp vi mc
ch ca mnh. Mi trang cha phn u trang (head), chn trang (foot) v
phn thn (phn cha vn bnbody). L
A
T
E
X dng cc kch thc mc nh
nhng ta c th thay i n. Hy cn thn, thay i cc gi tr ny c th
lm mt i tnh trong sng v chuyn nghip ca vn bn.
V th, nh mt v d, vi kh giy 8
1
2
11in, c th thit lp li bin
tri v phi l 1 in bng cc lnh sau:
6 Gii thiu v L
A
T
E
X
\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{0.0in}
Nh mt v d khc, u ti liu ta c th dng lnh:
\setlength{\textwidth}{9.75in}
\setlength{\textheight}{6.8in}
\setlength{\oddsidemargin}{-0.25in}
\setlength{\topmargin}{-0.9in}
c trang in p bn hy xem trang 555557 trong Sch [4].
1.3 Tng hp nhng g bit
y l mt phn file ngun tng hp cc hng dn trn y.
\documentclass[12pt,letterpaper]{article}
\title{Ti liu u tin ca bn son bng \LaTeX}
\author{Tn tc gi\thanks{ch thch cho tc gi: ni
lm vic, email,...}
\and
ng tc gi\thanks{ch thch nh trn}}
\date{\today}% in ra ngy trong my
\begin{document}
\maketitle % lnh yu cu to tiu
\begin{abstract} % tm tt bi bo co ca bn
\addcontentsline{toc}{section}{Tm tt}
y l tm tt ca bn.
\end{abstract}
\tableofcontents % to mc lc
\section{y l mc th nht} \label{sec:01}
Phn thn ca Mc~\ref{sec:01} y.
\subsection{y l mc con ca Mc~\ref{sec:01}}
\label{ssec:01}
Phn thn ca Mc~\ref{ssec:01} y.
......................
\end{document}
Chng 2
Font ch, cc mi trng lit
k
2.1 Tng quan v L
A
T
E
X
2.1.1 V d v cc sch p son bng L
A
T
E
X
Chng ti lun mun lm cho bn bit c mt ti liu c son vi L
A
T
E
X
cha nhng g v n p nh th no, bn hy xem
Mt trang trong Journal of the Mechanics and Physics of Solids.
Mt trang trong Journal of Applied Mechanics.
Mt quyn sch ca George Gratzer: First Steps in L
A
T
E
X: A Short
Course.
Mt ngi c th tranh ci rng c phi L
A
T
E
X to ra cc trang in ni trn
tp trung vo ni dung hn l cch thc nh dng khng ?
Vi phn ng nhng ngi son tho, h c gng so snh v lm theo
nhng trang vn bn nh dng hon chnh hay cc quyn sch m cc
nh xut bn sp xp li cc mc, tham chiu cho ...
2.1.2 Font trong L
A
T
E
X
Mt bn L
A
T
E
X ci t hon chnh s cha y cc font h cm..., c
th thm cc font lazy..., logo... . Nu c ci gi vietnam th s c thm
cc font vn.... Chng trong th mc: \texmf\font\...
8 Font ch, cc mi trng lit k
2.2 Thay i font cho k t
2.2.1 Nhn mnh
Nhng ngi nh my khi h mun nhn mnh (emphasisze) iu g th h
gch di n. Trong son tho, ta khng nn dng bin php gch di
nhn mnh m phi THAY I FONT ca on vn bn .
Thng thng, ta c th nhn mnh mt on vn bng cch in nghing
n trong font thng ng, lnh \emph cho php nhn mnh mt on vn
trong mi font. Ta c th nhn mnh mt phn on vn m on
c nhn mnh. Hy xem v d sau: Bn c th nhn mnh vn bn khi
m n c chnh l in nghing, trong font ch dng sans-serif, hay kiu
nh my.
2.2.2 ln font ch
ln ca font c th c thay i bng cc declarations (xem mc 2.4
ca Chng 1) sau y:
\tiny (tiny) \scriptsize (scriptsize)
\footnotesize (footnotesize) \small (small)
\normalsize (normalsize) \large (large)
\Large (Large) \LARGE (LARGE)
\huge (huge) \Huge (Huge)
Cc c ch trong cc lnh trn ph thuc vo font ch chn u ti liu.
Ch rng hai lnh \huge v \Huge c cng ln khi chn c ch l 12pt
hay kiu ti liu l FoilT
E
X . Thm na, di khong trng v khong
cch gia cc hng s thay i khi thay i c ch.
2.2.3 H Font, sc nt, m nht.
S dng cc font chun ca L
A
T
E
X (Computer Modern fonts), chng ta c
th:
family: cho ta nhng kiu ch sau: Roman, Typewriter, Sans
Serif.
shape: cho ta nhng dng ng, nghing: upright, italic, slanted,
small caps.
series: cho ta sc nt ca ch: medium, bold.
Ch rng h font san serif thng dng mc nh trong trnh din v khng
c cc kiu in nghing v ch in nh. thay i h font, kiu, sc
nt ta c th dng cc lnh di y hay chnh xc hn l cc declarations
(xem trong [4]).
2.3 Canh gia v tht u hng 9
family: \textrm{text},\texttt{text},\textsf{text}
shape: \textup{text},\textit{text},\textsl{text},\textsc{text}
series: \textmd{text},\textbf{text}
2.3 Canh gia v tht u hng
2.3.1 Canh gia
C nhiu cch canh gia mt on, nhng vi L
A
T
E
X, chng ta ch c mi
trng center lm vic ny, ging nh th ny:
\begin{center}
dng 1\\ dng 2 di hn\\ dng ny di nht
\end{center}
n s cho ta kt qu sau
dng 1
dng 2 di hn
dng ny di nht
trong lnh \\ cho ta mt hng mi.
[4] c ni n hai declaration l \centering v \centerline nhng c
hai khng tt.
2.3.2 Trch dn mt on vn
Ta c th thm vo mt on trch dn nhiu hng bng cch s dng mi
trng quote hoc quotation. y l v d v mi trng quote:
My father was a relentlessly self-improving boulangerie owner from
Belgium with low-grade narcolepsy and a penchant for buggery.
My mother was a fifteen-year-old French prostitute named Chloe
with webbed feet. My father would womanize, he would drink, he
would make outrageous claims, like he invented the question mark.
Sometimes he would accuse chestnuts of being lazy. A sort of general
malaise that only the genius possess and the insane lament.
My childhood was typical. Summers in Rangoon, luge lessons. In the
spring wed make meat helmets. If I was insolent, I was placed in
a burlap bag and beaten with reeds. Pretty standard, really. At the
age of twelve I received my first scribe. Dr. Evil, Austin Powers.
v y l mi trng quotation:
My father was a relentlessly self-improving boulangerie owner
from Belgium with low-grade narcolepsy and a penchant for buggery.
10 Font ch, cc mi trng lit k
My mother was a fifteen-year-old French prostitute named Chloe
with webbed feet. My father would womanize, he would drink, he
would make outrageous claims, like he invented the question mark.
Sometimes he would accuse chestnuts of being lazy. A sort of general
malaise that only the genius possess and the insane lament.
My childhood was typical. Summers in Rangoon, luge lessons. In
the spring wed make meat helmets. If I was insolent, I was placed in
a burlap bag and beaten with reeds. Pretty standard, really. At the
age of twelve I received my first scribe. Dr. Evil, Austin Powers.
Bn hy tm s khc nhau
1
gia hai mi trng ny i !
2.4 Cc mi trng lit l
2.4.1 Danh sch chm im
y l mi trng lit k vi cc du chm hay k t c bit u dng,
hy xem v d sau:
\begin{itemize}
\item Cp ln nht l chm en ln.
\begin{itemize}
\item Sau ta c mt gch u hng (\engidx{dash}).
\begin{itemize}
\item K ta c du sao (\engidx{asterisk}).
\begin{itemize}
\item Cui cng l du chm nh.
\end{itemize}
\item Mt du sao khc.
\end{itemize}
\end{itemize}
\item Item 2
\end{itemize}
n s cho ta
Cp ln nht l chm en ln.
Sau ta c mt gch u hng.
K ta c du sao.
Cui cng l du chm nh.
Mt du sao khc.
1
Mi trng quote khng c tht u hng (noindent) u mi on nhng khong
trng dc gia hai on th ln hn thng thng; mi trng quotation c phn cch
on tc l lnh \par c tc dng v c tht u hng.
2.4 Cc mi trng lit l 11
Mt gch u hng na.
Item 2
C bn loi mi trng lit k v ta c th dng xen k hay lng vo nhau
n 4 ln.
2.4.2 Danh sch nh s
Mi trng enumerate cho php to ra cc danh sch nh s. Sau y l v
d v mi trng ny:
\begin{enumerate}
\item nh s bng s kiu Arabic ln s dng th nht.
\begin{enumerate}
\item nh s bng ch thng.
\begin{enumerate}
\item nh s bng s kiu Roman cp th 3.
\begin{enumerate}
\item Cui cng dng ch in hoa.
\end{enumerate}
\item V y l nh s kiu Roman.
\end{enumerate}
\end{enumerate}
\item Number 2
\end{enumerate}
N s cho ta:
1. nh s bng s kiu Arabic ln s dng th nht.
(a) nh s bng ch thng.
i. nh s bng s kiu Roman cp th 3.
A. Cui cng dng ch in hoa.
ii. V y l nh s kiu Roman.
2. Number 2
Ch rng c hai mi trng itemize v enumerate u c th lng vo nhau
xen k ty n 4 ln.
2.4.3 Danh sch m t
nh x l mt qui tc tng ng t mt tp hp, gi l tp xc nh, vo
mt tp hp khc gi l tp gi tr m mi phn t tp xc nh c
duy nht mt nh tp gi tr.
12 Font ch, cc mi trng lit k
Hm s l nh x c tp xc nh l tp con ca tp s thc R.
Tch phn Riemann l gii hn ca mt dy cc tng Riemann ca hm
f, tc l gii hn
_
b
a
f(x) dx = lim
|P|0
n

k=1
f(
k
)(x
k
x
k1
)
trong x
0
= a < x
1
< < x
n1
< x
n
= b v
k
chn ty trong
(x
k1
, x
k
).
Cc nh ngha trn son bi mi trng description nh sau:
\begin{description}
\item[nh x] l mt qui tc tng ng t mt tp hp,
gi l \emph{tp xc nh}, vo mt tp hp khc gi l
\emph{tp gi tr} m mi phn t tp xc nh c duy
nht mt nh tp gi tr.
\item[Hm s] l nh x c tp xc nh l tp con ca
tp s thc R.
\item[Tch phn Riemann] l gii hn ca mt dy cc tng
Riemann ca hm $f$, tc l gii hn $$\int_a^bf(x)\,dx=
\lim_{|P|\rightarrow0}\sum_{k=1}^nf(\xi_{k})(x_k-x_{k-1})
$$ trong $x_0=a<x_1<\dots<x_{n-1}<x_n=b$ v $\xi_k$
chn ty trong $(x_{k-1},x_k)$.
\end{description}
Chng ta s tho lun v vic son cc cng thc Ton Chng 3.
2.4.4 Thay i nhn cho mi trng lit k.
Trong mi trng lit k (itemize) cc nhn u mi mc (item) c th
c thay i ton b hay tng ci mt. lm vic ny ta c th dng
thm mt tham s lnh \item.
clubs
hearts
diamonds
spades
N c son nh sau:
2.4 Cc mi trng lit l 13
\begin{itemize}
\item[$\clubsuit$] clubs
\item[$\heartsuit$] hearts
\item[$\diamondsuit$] diamonds
\item[$\spadesuit$] spades
\end{itemize}
thay i ton b cc nhn thnh mt nhn mi, ta c th dng lnh
\labelitemi theo v d sau
\begin{itemize}
\renewcommand{\labelitemi}
{$\checkmark$}
\item item 1 \item item 2
\end{itemize}
cho ta kt qu
item 1
item 2
2.4.5 Mi trng lit k tng qut
c to bi mi trng list theo dng sau:
\begin{list}{label}{declarations}
\item mc 1
\item mc 2
\end{list}
trong
label l nhn mc nh cho nhng mc no khng c ch r
nhn c th lnh \item.
declarations l cc lnh iu khin di ngang v dc cho
mi trng list ging nh cc lnh xc nh di khc.
Sau y l v d v mi trng list:
\begin{list}{}{%
% rng bin tri
\setlength{\leftmargin}{1.6in}
% rng phn cha nhn
\setlength{\labelwidth}{1.2in}
% khong trng ngang gia nhn v text
\setlength{\labelsep}{0.0in}
% khong trng dc gia hai item
\setlength{\parsep}{5pt plus 1pt minus 0pt}
% khong trng dc gia hai item
\setlength{\itemsep}{7pt plus 1pt minus 0pt}
% khong trng dc trc v sau mi trng list
\setlength{\topsep}{10pt plus 1pt minus 0pt}
14 Font ch, cc mi trng lit k
}
\item[\textsc{\textbf{Education}}\hfill]
Ph.D., Engineering Mechanics, 1993\\
\emph{University of Wisconsin--Madison}
M.S., Engineering Mechanics, 1988\\
\emph{University of Wisconsin--Madison}
S.M., Engineering Science, 1987\\
\emph{Harvard University}
B.S. \emph{cum laude}, Mechanical Engineering, 1985\\
\emph{Washington University}
\item[\textsc{\textbf{Experience}}\hfill] Some jobs here and
some jobs there.
\end{list}
Kt qu l ta c on sau:
Education Ph.D., Engineering Mechanics, 1993
University of WisconsinMadison M.S., Engineer-
ing Mechanics, 1988
University of WisconsinMadison S.M., Engineer-
ing Science, 1987
Harvard University B.S. cum laude, Mechanical En-
gineering, 1985
Washington University
Experience Some jobs here and some jobs there.
2.4.6 Mi trng tabbing
y l v d s dng mi trng tabbing
Professors Dr. Gary L. Gray 409C Earth-Engineering Sciences Bldg.
Associate Professor phone: 863-1778
ESM Dept. email: gray@engr.psu.edu
Dr. Francesco Costanzo 409D Earth-Engineering Sciences Bldg.
Associate Professor phone: 863-2030
ESM Dept. email: costanzo@engr.psu.edu
v y l on m ca n
\begin{tabbing}
\hspace{1.7in} \= \hspace{3.4in} \= \kill
\textbf{Professors} \> Dr.\ Gary L. Gray \> 409C
Earth-Engineering Sciences Bldg. \+ \\
Associate Professor \> phone: 863-1778 \\
2.5 Hp trong L
A
T
E
X 15
ESM Dept. \> email: \texttt{gray@engr.psu.edu} \\[0.1in]
Dr.\ Francesco Costanzo \> 409D Earth-Engineering
Sciences Bldg.\\
Associate Professor \> phone: 863-2030\\
ESM Dept. \> email: \texttt{costanzo@engr.psu.edu}
\end{tabbing}
y l vi li gii thch ca ti: mi trng tabbing lm vic ging nh cch
canh ngay cc ct ca nhng ngi dng my nh ch
canh ngay cc ct v bn tri.
tab dng khi gp lnh \=.
khng c ngt dng t ng trong mi trng ny, mun ngt dng
phi dng lnh \\.
\> ngn cch cc ct.
Vic dng tab c th thit lp trn mt dng khng c in ra nu
dng kt thc vi \kill.
Bn c th xem v d phc tp hn file tabbing_demo.pdf. V mi trng
ny bn c th tham kho thm trong Sch [1].
2.5 Hp trong L
A
T
E
X
Mi hp box l mt vt th m L
A
T
E
X xem nh l mt n v, ging nh
mt k t. Do mi k t c L
A
T
E
X xem nh mt ci hp, nhng ci hp
ny c th di chuyn sang mi hng xung quanh n nhng khng th ph
v n.
Mt \framebox l mt hp thc s m ta c th thy c, lnh
\framebox{text} s cho ta kt qu text , lnh \framebox c th
thay i theo thch, hy xem chi tit trong [4].
Mt on c th a vo mt ci hp ln bng cch s dng lnh
\parbox hay l t n trong mi trng minipage. Ta s c v d v
n di y.
Mt rule box cho php v mt hp en ch nht vi chiu di v rng
xc nh, cu trc ca n l \rule[lift]{width}{height}.
Sau y l nhng v d v cc lnh trn. Lnh \framebox th khng cn
phi a vo v d v n qu r rng. Lnh \rule{\textwidth}{1pt} s
cho ta ng thng ngang di bng di ca lnh \textwidth v dy
l 1 pt.
16 Font ch, cc mi trng lit k
v y l lnh \rule{0.3\textwidth}{1pt}.
Cc tham s width v height c th thay ty bng di hay cc lnh
xc nh di nh trn. V d tinh t hn v lnh \rule v \baselineskip
file rule_command_demo.pdf.
i vi lnh \parbox, y l cu trc c dng trong rt nhiu v d:
\parbox[pos][height][innerpos]{width}{text}
Problem 1
The mechanism shown at the right consists of
the disk whose center is pinned at O and two
links AB and BC. The disk O has radius R
and is rotating with a constant counterclockwise
angular velocity
0
. If the lengths of AB and
BC are also equal to R, determine the angular
accelerations of link AB,
AB
, and link BC,

BC
, at the instant shown.
R
A B
C
O

O
R
R
N c to ra bng cch dng on sau:
\textsf{\textbf{Problem 1}}\\\parbox[t][][t]{3in}{\textsf{
The mechanism shown at the right consists of the disk
whose center is pinned at $O$ and two links $AB$ and
$BC$. The disk $O$ has radius $R$ and is rotating with
a constant counterclockwise angular velocity $\omega_0$.
If the lengths of $AB$ and $BC$ are also equal to $R$,
determine the angular accelerations of link $AB$,
$\alpha_{AB}$, and link $BC$, $\alpha_{BC}$, at the
instant shown.}}\hfill\parbox[t][][b]{2.1in}{
\includegraphics[scale=.8]{Problem1}}
Lnh \parbox to ra mt hp (khng c bin nhn thy nh lnh \framebox)
c chiu rng v di ln lt cho bi tham s width v height, pos v
innerpos l tham s ch v tr ca hp ng vi chiu dc v chiu ngang.
2.6 Bng trong L
A
T
E
X
y l on nhp liu ca mt ci bng rt p.
\begin{table}[ht]
\begin{center}
\begin{tabular}{||l|c|c|c|c||} \hline \hline
\multicolumn{2}{||c|}{Onset of Delamination} &
\multicolumn{3}{c||}{Laminate Type} \\ \hline
2.6 Bng trong L
A
T
E
X 17
Result & Source & $[0]$ & $[(0/90)_{N}]_{S}$ &
$[(0_7/90_5)_N]_S$ \\ \hline\hline
$\rho$ & Martins Analysis & 0.42 & N/A & 0.42 \\ \cline{2-5}
& Martins Experiment & 0.33--0.49 & N/A & N/A\\ \cline{2-5}
& DDSHM & 0.41 & 0.41 & 0.41\\ \hline
$\theta^{\circ}$ & Martins Analysis & 25 & N/A & 25 \\
\cline{2-5}
& DDSHM & 25.4 & 25.4 & 25.4\\ \hline
$P$ (N) & Martins Experiment & 7.23--14.60 & N/A &
6.50--10.50\\ \cline{2-5}
& DDSHM & 9.13--9.74 & 7.99--8.49 & 8.88--9.48\\ \hline \hline
\end{tabular}
\caption{y l mt bng rt phc tp v tinh t,
ng khng bn ?}
\label{table}
\end{center}
\end{table}
N to ra bng 2.1.
Onset of Delamination Laminate Type
Result Source [0] [(0/90)
N
]
S
[(0
7
/90
5
)
N
]
S
Martins Analysis 0.42 N/A 0.42
Martins Experiment 0.330.49 N/A N/A
DDSHM 0.41 0.41 0.41

Martins Analysis 25 N/A 25


DDSHM 25.4 25.4 25.4
P (N) Martins Experiment 7.2314.60 N/A 6.5010.50
DDSHM 9.139.74 7.998.49 8.889.48
Bng 2.1: y l mt bng rt phc tp v tinh t, ng khng bn ?
V cch son tho cc bng trong L
A
T
E
X, bn c th tham kho chi tit trong
mc 2.11.5 Sch [3] hoc [2].
Chng 3
Son tho Ton trong L
A
T
E
X
3.1 S dng A
M
S-L
A
T
E
X
Ti gi s rng bn ci t v c th s dng cc gi lnh sau: amsmath,
amssymb, exscale, eucal v mi khi bn son vn bn Ton hc, ti khuyn
bn nn np ht bn gi ny. y l m t ngn gn v bn gi lnh trn:
amsmath y l gi lnh u tin ca /
/
o-L
A
T
E
X, b sung vo L
A
T
E
X cc
lnh v mi trng mi son cc cng thc, h phng trnh nhiu
hng, thm nhiu k hiu Ton in m, d dng to ra k hiu mi v
nhiu tnh nng khc.
amssymb Thm vo hn mt trm k hiu Ton hc mi m chng khng
c trong L
A
T
E
X thng thng.
exscale Gi ny cho php L
A
T
E
X dng cc font m rng khc nhau (font
cmex) trong trng hp c th. Cc font cmex c dng cho cc k
hiu ton ln nh

,

,
_
, . . . v exscale cn cho php nhng font
ny c th c lm ln ln cho ph hp vi lp ti liu headings v
nhng kiu ti liu dng font ln khc.
eucal Thay th k thut to ra cc k t Ton hc p ca L
A
T
E
X vi cc
k t Ton Euler Script. Vi ty chn mathscr, bn c c hai loi font
bng cch dng \mathcal to ra cc k t Ton p ca L
A
T
E
X,
ging nh /B(T, v s dng lnh \mathscr to ra cc k t Euler
Script, ging nh ABCD.
/
/
o-L
A
T
E
X cn bao gm nhiu gi khc, t ng np vo khi np bn gi
trn, c th l amsmath t ng np thm vo amsgen, amsbsy, amsopn v
amstext cn amssymb t ng np vo amsfonts.
3.2 Cc ch hin th cng thc 19
3.2 Cc ch hin th cng thc
Thng thng, cng thc Ton c hin th trn cng mt hng, l mt
phn ca hng hin thi, hoc c hin th trn mt hay nhiu hng khc
song song vi hng hin thi. u tin, chng ta s tho lun v cng thc
hin th trn cng hng hay trn mt hng ring bit sau s ni v cng
thc trn nhiu hng.
3.2.1 Mi trng math
Cng mt cng thc nhng y l cng trn hng M() =
_
+

f(X
c
(t))
g(X
c
(t), t + ) dt v y l trn mt hng ring bit
M() =
_
+

f(X
c
(t)) g(X
c
(t), t + ) dt
C mt vi ch nh y:
Hai cng thc trn c nhp vo khc nhau ty vo ta mun cng
thc trn hng hay mt hng ring.
Cng thc trn hng c gii hn bi cp du $...$, ta cng c th
dng cp du \(...\) hay mi trng math, ti lun dng du $.
Cng thc hin th trn mt dng ring bit c th nhp vo bi cp
du $$...$$ hay l \[...\] hay c th dng mi trng displaymath.
Thng thng, i vi cng thc Ton, cc s v hm c dng font
Roman thng ng, v cc bin th in nghing (italics). L
A
T
E
X t ng
thm vo cc khong trng xung quanh cc ton t nh +, , = . . .
i vi cng thc trn cng hng th cc ch s (trn v di) khng
c y ra xa, cc k hiu tch phn, tng khng ln, cn i vi cng
thc trn mt dng ring th ngc li. Bn hy xem v d trn
thy r s khc nhau ny.
Tt c nhng cp k t hay mi trng ni trn (v cn nhng mi trng
khc na) u cho php ta vo hay thot khi ch son tho Ton hc.
Hn na, ta khng cn phi thm vo cc khong trng
1
khi ang trong
ch Ton hc, v nu bn nhp vo mt hng trng trong n th L
A
T
E
X
s bo li.
! Missing $ inserted.
<inserted text>
$
l. 67
?
1
Ngoi tr khong trng dng ngn cch cc lnh vi k t ngay sau n.
20 Son tho Ton trong L
A
T
E
X
3.2.2 Khong trng trong ch son cng thc Ton.
L
A
T
E
X b qua mi khong trng trong ch son cng thc Ton theo qui
lut sau:
Bn phi gii hn tn lnh bng khong trng, s hay k hiu m
khng l cc k t: a, b, c, ...
Nu bn tm thi chuyn qua ch son tho thng thng trong
ch Ton, khi khong trng trong phn son theo ch thng
vn c tc dng.
Tht vy, nh mt v d, bn s thy c cng mt kt qu khi nhp vo
$\ddot{x} +\sin x=0$ v $ \ddot{x} +\sin x =0 $, l cng thc
x + sinx = 0. Ch rng khong trng theo sau lnh \sin v trc bin x
l cn thit v nu khng c n th tc l ta nhp vo lnh \sinx, m
lnh ny cha c nn L
A
T
E
X bo li
! Undefined control sequence
Tht l tt nu bn c th son file ngun mt cch r rng c th d
dng tm kim nu c li.
3.2.3 Cc phng trnh Ton hc
Equation c hiu l mt phng trnh hay mt cng thc, n lun c
nh s v hin th ring trn mt hng, c nhp vo thng qua mi
trng equation. Theo mc nh, s th t phng trnh hin th st bin
phi v lnh \label cho php bn gn cho n mt tn gi bt k, sau ny
c th tham kho hay i chiu n n. V d sau y s gip bn r hn:
\begin{equation} \label{int:Mel}
M(\theta) = \int_{-\infty}^{\infty} \mathbf{f}(\mathbf{x}_c(t))
\wedge \mathbf{g}(\mathbf{x}_c(t), t + \theta) \, dt.
\end{equation}
s cho ta cng thc sau
M() =
_

f (x
c
(t)) g(x
c
(t), t + ) dt. (3.1)
m n c th c tham kho tr li bi lnh \eqref nh l tch phn Mel-
nikov (3.1). Ch rng L
A
T
E
X chun dng lnh \ref, n yu cu bn phi
t nhp vo cp du ngoc n: tch phn Melnikov~(\ref{int:Mel}).
Lnh \eqref rt tt v n lun gi s ca phng trnh font Roman
thng ng m khng chu tc ng ca cc lnh thay i font nh \emph,
\textsl,. . .
3.2 Cc ch hin th cng thc 21
Cc phng trnh c nh s lin tip bn trong ti liu, v cch nh
s ph thuc lp ti liu m bn chn. i vi kiu ti liu article, phng
trnh c nh s dng 1, 2, 3, ... nhng ta c th thay i nh lnh sau t
u ti liu \numberwithin{equation}{section} s cho ta cch nh s
bn trong section nh tch phn (3.1) ni trn. Do phng trnh th
hai trong mc ny s c nh s nh sau:
y(x) = e

R
x
a
p() d
__
x
a
e

R

a
p() d
q() d + b
_
(3.2)
Cui cng ta c th dng mi trng equation* to ra cc cng thc
khng nh s theo dy trn, v d nh cng thc tch phn Leibniz sau
y
d
dt
_
b(t)
a(t)
f(x, t) dx =
_
b(t)
a(t)
f
t
dt + b

(t)f(b(t), t) a

(t)f(a(t), t)
Tht ra, hu nh ta khng cn dng equation* to ra cc cng thc
khng nh s v to ra n ta ch cn dng cp du $$...$$ s lm cho
vic nhp liu tr nn n gin. Mc ch chnh ca ngi son khi dng
equation* l ta c th dng lnh \tag{nhn ring} gn mt nhn ring
v tnh cht c bit ca cng thc , v d:
x
2
a
2
+
y
2
b
2
= 1 (elip)
V ta c th tham chiu n n bng cc lnh \label v \ref: Cng thc
trn l mt elip tm 0, i qua cc im (a, 0) v (0, b).
Mt ln na, ti nhc cc bn rng khng th c mt hng trng bn
trong mi trng equation.
3.2.4 Cc cu trc c bn
By gi ti s ch cho bn cch son cc cng thc nh cc ch v tnh
cht ca cng thc m bn mun to ra.
ln ca cng thc
Da vo mi trng son tho trn dng hay trn mt dng ring m bn
nhp vo, L
A
T
E
X t ng thm vo cc khong trng c di thch hp
ti v tr thch hp. V d x + y, x y, x/y, x, xy, x y, x y v x y.
Trong ch son Ton, phn s lun c nhp vo bi lnh \frac{ }{ }
c kt qu ging nh sau:
_v =
v
x
x
+
v
y
y
+
v
z
z
(3.3)
22 Son tho Ton trong L
A
T
E
X
Cc phng trnh hay cng thc ln, quan trng
2
thng khng t trn
cng hng m nn t ring bit trn mt hng v c nh s hay khng l
ty thuc vo bn c cn nhc li n hay khng.
Th nhng, c khi bn mun t n trn cng hng ? Thng thng,
kt qu s khng p nu bn nhp vo bng lnh \frac ging nh th
ny: _ v =
v
x
x
+
v
y
y
+
v
z
z
, c l cc phn s trong cng thc ny hi
nh ? Tt nht bn nn dng du / biu din phn s trn cng hng:
_ v = v
x
/x + v
y
/y + v
z
/z.
Cc ch s trn v di S m
Ch s di (subscript) v trn (superscript) ln lt c nhp vo bi du _
v ^. Nhp vo $x^y, e^{x+y}, x_1, x_2, a_i^1, a^1_i$ s cho kt
qu l x
y
, e
x+y
, x
1
, x
2
, a
1
i
, a
1
i
. Bn c th dng cp du ngoc { } nhm
cc bin cn lm ch s hay s m
3
. Bn hy nhp vo $x^{y^z}, x^{yz}, x_1,
x_12, x_{12}$ ta s c x
y
z
, x
yz
, x
1
, x
1
2, x
12
. L
A
T
E
X t ng iu hnh kch
thc nh hn cho cc s m v ch s (subscript v superscript) nh bn
thy trn.
C mt k t lun t ng nm cao hn (theo trn gi l superscript) cc
k t thng, l du phy (prime) . Nh mt v d, trong cng thc
tch phn Leibniz, ta dng du phy b

(t)f(b(t), t) a

(t)f(a(t), t) ch
o hm. Ngoi cch nhp trc tip t bn phm, du phy trong ch
Ton c th c nhp vo bi lnh \prime v du phy ny khng ch
superscript.
Du ba chm trong L
A
T
E
X
Ellipses l s lc b mt hay nhiu t ca mt cu m ta vn hiu c
ngha ca n. y l mt cu trc rt quan trng trong Ton hc. N c
s dng trong cc biu thc lin quan vi s t nhin, s nguyn, ging nh
nh ngha hm logarit ca s phc:
log z
def
= log r + i(
0
+ k2), k = 0, 1, 2, 3, . . .
Trn y, ti dng lnh \ldots to ra du ba chm trn chn ca
hng . . . , cn y l lnh \cdots, ta dng lnh ny to ra du ba chm
gia hng trong phng trnh vi phn tuyn tnh bc n sau
L
def
=
d
n
dx
n
+ p
1
(x)
d
n1
dx
n1
+ + p
n1
(x)
d
dx
+ p
n
(x)
Bn hy so snh cc du ba chm hai cng thc trn.
2
Cc cng thc ny thng l kt qu ca mt vi suy lun m bn s dng li sau
ny.
3
Tt c cc lnh trong L
A
T
E
X, tr cc declaration, u dng cp du { } gii hn
phm vi tc dng ca n.
3.2 Cc ch hin th cng thc 23
Khi dng /
/
o-L
A
T
E
X, ti khuyn bn khng bao gi dng lnh \ldots
hay \cdots, th nhng \dot (v \ddot) th hu ch hn, n to ra mt chm
(tng ng hai chm) trn mt k kiu ging nh bin x ny c nhp
vo bi lnh \dot{x}. Lnh \dots cng to ra du ba chm ging nh lnh
\ldots, /
/
o-L
A
T
E
X cn cung cp cho chng ta cc lnh hu ch sau to
ra cc du chm:
\dotsc: lnh ny to ra cc du chm theo sau du phy;
\dotsb: to ra du ba chm theo sau cc php ton nh phn nh
x y ;
\dotsm: to ra du ba chm theo sau cc php nhn, v d x
1
x
2
x
3
;
\dotsi: du ba chm vi tch phn;
\dotso: s dng trong cc trng hp khc (ti th tht rng ti
khng bit v n).
By gi, ta nhp vo cng thc Taylor ca hm f ti a
\begin{equation}\label{ct Taylor}
f(x)=f(a)+f(a)(x-a)+\frac{1}{2!}f(a)(x-a)^2+\dotsb,
\end{equation}
v ta c
f(x) = f(a) + f

(a)(x a) +
1
2!
f

(a)(x a)
2
+ , (3.4)
n c son nh vy l rt tt.
Tch phn
Lnh \int s in ra k hiu tch phn
_
v hai cn ca n c nhp vo nh
hai ch s bng du ^ v _, cch L
A
T
E
X in ra cc cn ty vo ta nhp vo
ch trn cng hng (in-line) hay l trn mt hng ring (displaymath).
Chng ta gp tch phn Melnicov cng thc (3.1) nhng ti s nhc li
y tin so snh
M() =
_

f (x
c
(t)) g(x
c
(t), t + ) dt. (3.5)
V ch hin th in-line v displaymath bn c th xem li Mc 3.2.1. Nu
bn mun cc cn thc s trn v di k hiu tch phn th bn c th
thm lnh \limits ngay sau lnh \int. N s in ra cng thc sau:
M() =

f (x
c
(t)) g(x
c
(t), t + ) dt. (3.6)
24 Son tho Ton trong L
A
T
E
X
Bn hy so snh cch xp cc cn ca tch phn trong cng thc (3.5) v
(3.6). Ti ngh rng (3.6) trng tt hn (3.5), nu bn mun tt c cc tch
phn trong ch displaymath u c cc cn ging nh cng thc (3.6)
m khng cn phi nhp lnh \limits tng cng thc th c th dng
ty chn intlimits trong gi amsmath
\usepackage[intlimits]{amsmath}
Cc du tch phn hai, ba hay nhiu lp c th c nhp vo nh sau
\iint, \iiint, \iiiint, \idotsint, \oint v ln lt ta c
_ __ ___ ____ _

_ _
Du cn
Du cn bc hai c nhp vo bi lnh \sqrt ging nh \sqrt{x} ta c

x. Cn bc ln hn hai c nhp vo nh mt ty chn ca lnh \sqrt


ging nh lnh \sqrt[x]{y}, n s cho ta
x

y. Du cn ny rt d nhn
thy v rt p nhng cng c i khi c mt vi k t m font ch lm ta
rt kh nhn thy, v d nh
g

x. /
/
o-L
A
T
E
X cung cp hai lnh \leftroot
v \uproot ci thin mt t cho s khuym khuyt trn. Bn hy xem
xt cc v d sau y:
\sqrt[g]{x}
\sqrt[\uproot{2}{g}]{x}
\sqrt[q]{x}
\sqrt[\leftroot{-1}{q}]{x}
g

x
g

x
q

x
q

x
Lnh \uproot ko bc ca cn ln pha trn, ph thuc tham s, tng t
lnh \leftroot ko bc ca cn v bn tri, du tr trong v d trn cho
hng ngc li.
3.2.5 Chn ch vo cng thc Ton
Khi son tho trong L
A
T
E
X, nhiu ngi s lm nh sau, v d sau l nh
ngha tp hp cc im n nh trong dng chy (a local stable manifold:)
W
s
lot
(x)
def
= x U [
t
(x) xast , and
t
(x) Uforallt 0 (3.7)
Mc d bn c cc khong trng trc v sau cc t as, and, for all
nhng kt qu hon ton khng nh mong i, tt c cc khong trng
u b b qua v n nm trong mi trng son cng thc Ton, hn na,
tt c cc k t trong cc t lot, as, and, for all u c T
E
X coi l bin,
c in nghing v hiu l nhiu bin nhn vi nhau, chng lm ta nhm
vi cc t ast, fooralt. l mt c mng !. Ti c mt vi ch nh cho
bn v iu ny:
3.2 Cc ch hin th cng thc 25
Cc ch loc, as, and, for all c T
E
X hiu l nhiu bin nhn
vi nhau;
Khng c y cc khong trng gia cc bin v cc ch theo ta,
iu ny lm ngi c rt d hiu nhm thm ch khng hiu;
Cc ch loc, as, and, for all c nh dng l in nghing m l
ra l thng ng.
Nhiu ti liu v L
A
T
E
X ch cho bn dng lnh \mbox gii quyt cc vn
trn khi cn son vi ch ch thng bn trong mi trng son
cng thc Ton. Tt nhin, n c th gii quyt hu ht cc vn trn.
Bn hy nhn cng thc 3.8 di y m ti c dng lnh \mbox:
W
s
lot
(x)
def
= x U [
t
(x) x as t , and
t
(x) U for all t 0
(3.8)
N tng i tt nhng ch lot do nm trong lnh \mbox nn thot
khi tnh nng iu chnh kch thc t ng trong mi trng Ton vi
cc ch s trn v di v v th n hi ln so vi mt ch s di thng
thng. May mn thay, /
/
o-L
A
T
E
X cung cp cho ta lnh \text lm cho
cng thc (3.8) tr nn hon ho nh di y:
W
s
lot
(x)
def
= x U [
t
(x) x as t , and
t
(x) U for all t 0
(3.9)
Cc cng thc (3.7), (3.8) v (3.9) c to ra nh sau:
%%%%%%%%%%%%%% Cng thc (2.7) %%%%%%%%%%%%%%%%%%%
\begin{equation}\label{def:stable1}
W_{lot}^s(\overline{\mathbf{x}})\stackrel{def}{=}
\{x\in U\,|\,\phi_t(x)\rightarrow\overline{\mathbf{x}}
as t\rightarrow\infty, and \phi_t(x)\in U for all
t\geq0\}
\end{equation}
%%%%%%%%%%%%% Cng thc (2.8) %%%%%%%%%%%%%%%%%%%%
\begin{equation}\label{def:stable2}
W_{\mbox{lot}}^s(\overline{\mathbf{x}})\stackrel{
\mbox{def}}{=}\{x\in U\,|\,\phi_t(x)\rightarrow
\overline{\mathbf{x}}\mbox{ as }t\rightarrow\infty,
\mbox{ and }\phi_t(x)\in U\mbox{ for all }t\geq0\}
\end{equation}
%%%%%%%%%%%%% Cng thc (2.9) %%%%%%%%%%%%%%%%%%%%
\begin{equation}\label{def:stable3}
W_{\text{lot}}^s(\overline{\mathbf{x}})\stackrel{
\text{def}}{=}\{x\in U\,|\,\phi_t(x)\rightarrow
\overline{\mathbf{x}}\text{ as }t\rightarrow
26 Son tho Ton trong L
A
T
E
X
\infty,\text{ and }\phi_t(x)\in U\text{ for all }
t\geq0\}
\end{equation}
Bn cng c th dng lnh \textrm{small text} t mt vi ch bn
trong mi trng son cng thc Ton nhng n c nhng hn ch ging
ht nh lnh \mbox.
3.2.6 Cc du ngoc
Cc du ngoc mc ny c th l (), {}, [ ], v cc phn sau l ni chung
cho c ba loi .
ln cc du ngoc
Nu bn nhp vo cc du ngoc m khng c cc lnh iu khin ln
th chng s c cng mt kch thc nh trong cng thc (3.10)

r
=
1
I
r
B
[(
1
A

1
C + A
)h
1
h
3
+

I
r
(B+)
r


(
h
2
I
r

r
B +
)] (3.10)
Cc du ngoc ny qu nh lm ta kh phn bit tng cp tng ng nhau.
Khc phc vn ny, ta c th iu chnh kch thc cc du ngoc bng
cc lnh \big, \Big, \bigg, \Bigg (mi lnh cho kch thc ln dn) ging
nh cng thc sau

r
=
1
I
r
B
_
_
1
A

1
C + A
_
h
1
h
3
+

I
r
(B + )
r

_
h
2
I
r

r
B +
_
_
(3.11)
Ch rng tng cp du ngoc tng ng nhau phi c cng ln, vi
cc lnh ny cng thc son ra tng i tt nhng vn cn mt khuyt
im, l phn bin gia cc cp du ngoc m c bit l cc khong
trng c ln khng ph hp vi cp du ngoc ln xung quanh n.
Tt c cc du ngoc (c 22 loi, xem trang 130 Sch [4]) c th ch dng
mt bn (tri hay phi) ca mt t, mt s hng, v d du [ ch dng
mt ln trong cng thc sau
_
b
a
F

(x) dx = F(x)

a
b
vi F

(x) lin tc trn [a, b] (3.12)


ln cc bin bn trong cp du ngoc
Nh ni trn, cc lnh thay i kch thc mc 3.2.6 khng lm thay
i kch thc cc bin bn trong cp du ngoc, do cng thc khng
c p. May thay, L
A
T
E
X c cung cp hai lnh \left v \right s dng
thnh tng cp c tc dng thay i kch thc cp du ngoc v c
3.2 Cc ch hin th cng thc 27
phn bin bn trong mt cch t ng cho ph hp vi ng cnh. Cng
thc (3.11) c son li dng lnh \left v \right nh sau:

r
=
1
I
r
B
__
1
A

1
C + A
_
h
1
h
3
+

I
r
(B + )
r

_
h
2
I
r

r
B +
__
(3.13)
Bn hy so snh cng thc (3.11) v (3.13) thy s khc bit, ch cc
khong trng gn cc du ngoc v trc bin h
1
h
3
.
Cc lnh \left v \right phi dng thnh tng cp, do vn t
ra l lm sao biu din cng thc (3.12) v n ch dng mt du [. Cu tr
li l bn phi dng mt du ngoc trng c to ra bi lnh \left.
hay \right., cng thc (3.12) tr thnh:
_
b
a
F

(x) dx = F(x)

a
b
vi F

(x) lin tc trn [a, b] (3.14)


hoc
_
b
a
F

(x) dx = F(x)

a
b
vi F

(x) lin tc trn [a, b] (3.15)


C hai trong chng th u ging vi cng thc (3.12) (theo ti, (3.12)
l cng thc c son tt nht). Bn c tng g cho vic son ra cng
thc (3.14) v (3.15) hay khng, hy suy ngh v lm th i !. Sau y l
mt v d v cc lnh \left v \right., n gip bn tr li cu hi trn.
$$D(x)=\left\{\begin{array}{ccl}
1 & \text{nu} & x\text{ hu t}\\
0 & \text{nu} & x\text{ v t} \\
\end{array}\right.$$
D(x) =
_
1 nu x hu t
0 nu x v t
Cui cng, bn s c thy mt s tht rng L
A
T
E
X khng phi lun lun
t ng iu chnh kch thc cc du ngoc mt cch chnh xc. lm
v d, bn hy so snh
4
hai dng ca cng thc sau
_

i
a
i
_1
p
v
_

i
a
i
_1
p
Tt nhin ti thch ci th hai hn. V d th hai xy ra vi cc nhm du
ngoc
z
1
((x
1
+ y
1
)(x
2
+ y
2
) + z
2
) v z
1
_
(x
1
+ y
1
)(x
2
+ y
2
) + z
2
_
trong ta thy biu thc th hai c cc du ngoc vi kch thc ph hp
hn. Tt nhin, tr khi bn nh ngha li du ngoc vung vi mt ngha
4
Tng cp trong ba v d t y n cui mc ny, biu thc th nht cc du ngoc
ngoi c iu chnh kch thc bi cp lnh \left, \right cn biu thc th hai du
ngoc ngoi c iu chnh kch thc bi lnh \big.
28 Son tho Ton trong L
A
T
E
X
no khc, trong trng hp thng thng ti thy biu thc th hai di
y hon thin hn ci th nht.
z
1
[(x
1
+ y
1
)(x
2
+ y
2
) + z
2
] v z
1
_
(x
1
+ y
1
)(x
2
+ y
2
) + z
2

Cc du ngoc c quan h vi nhau theo tng i


Hy cn thn v bn phi s dng ng cc lnh iu chnh ln ca
cp du ngoc m gia chng c mi quan h no . Hy xem s khc bit
gia hai cch nh dng sau:
x R[ x 2 v x R[x 2
trong cng thc th hai khng c cc khong trng trc v sau
du [ . Nu bn mun c cc du ngoc ln, bn c th dng cc dng
ca lnh \big
_
x

_
x
0
t
2
dt 5
_
nhng phi ch n di cc khong trng nhng v tr cn thit trong
cng thc. Cc lnh thm bt mt khong trng nh trong khi son tho s
c ni n trong Bng 3.3 Trang 32.
3.2.7 Hm s
Cc hm s c bn (sin, cos, tan, sup, inf, . . . ) c vai tr rt quan trng
trong Ton hc, do i vi L
A
T
E
X chng c nh dng khc bit so vi
cc bin. Bn c th nhp vo $sin x$ (khng c hai du nhy kp u)
v kt qu l sinx, khng c s phn bit gia hm v bin x. Thay v lm
nh vy, bn c th dng lnh \sin, nhp vo \sin x v ta c kt qu
l sinx. Quan st v d trn, tn hm dng font Roman thng ng bin
c in nghing, hn na c mt khong trng nh gia tn hm v bin,
tt c nhng iu ny l nh dng chun ca L
A
T
E
X i vi vic son tho
cc hm trong Ton hc.
Hu ht cc hm s s cp c bn u c /
/
o-L
A
T
E
X h tr v c th
nhp vo theo cch trn, tc l \<tn hm>, v d \tan, \cos, \log, \ln,
\exp, \lim, . . .
L
A
T
E
X phn bit hai loi hm
Cc hm khng c gii hn hay ch s m ch tc ng trc tip vo
bin sau n v d nh: sin, cos, tan, cotan, ln, log, exp, . . . , v d
cos x, log x, expx;
Cc hm c gii hn, ch s hay iu kin bn di: inf, sup, lim,
limsup, liminf, max, min . . . , v d nh limsup
x0
f(x), max
xA
g(x).
3.2 Cc ch hin th cng thc 29
Cc hm s c ch s di th ch s s c nh dng kiu subscript (xem
Mc 3.2.4), v d nh trong ch displaymath ta c
lim
x0
sinx
x
= 1
v trong ch in-line, bn s c lim
x0
sin x
x
= 1 hoc bn c th vit
lim
x0
(sinx/x) = 1.
Bn hy so snh cch t ch s (i vi cng thc trn l x 0)
trong ch in-line v ch displaymath, n tun theo cc qui lut ni
trong Mc 3.2.4 v subscript v superscript.
nh ngha tn hm mi
Mc d /
/
o-L
A
T
E
X h tr hu ht cc hm ph dng trong Ton hc,
nhng ta vn lun c nhu cu nh ngha hm mi cho ring mnh. Vi gi
amsmath ta c th nh ngha tn hm mi vi lnh \DeclareMathOperator.
V d, L
A
T
E
X v /
/
o-L
A
T
E
X nh ngha cc hm hyperbolic: \cosh, \coth,
\sinh v \tanh nhng khng c \sech v \csch. Bi vy, chng ta s nh
ngha hai hm ny:
\DeclareMathOperator{\sech}{sech}
\DeclareMathOperator{\csch}{csch}
N cho php son cng thc sau:
_

sinaxsech
2
bxtanhbxdx =
a
2
2b
3
csch(
a
2b
); b > 0 (3.16)
Bn hy l gii ti sao ta khng dng lnh \text{sech} cho vic son hm
sech ?
Cc ton t c kch thc ln
C vi ton t Ton hc nh

,
_
,

, . . . c L
A
T
E
X t ng iu chnh
kch thc cho ph hp ch hin th, i vi ch in-line chng thng
c biu din vi kch thc nh v trong ch displaymath th c
L
A
T
E
X s dng kch thc ln.
Khng c g phi ni nhiu v iu ny v L
A
T
E
X t ng iu chnh
kch thc chng mt cch thch hp, ch c mt iu l lm th no to
ra cc ch s nhiu hng
n

i=1

F
i
+
n

i=1
n

j=1
j=i

f
ij
=
n

i=1
m
i
a
i
, (3.17)
Cng thc trn c son vi lnh \substack nh sau
30 Son tho Ton trong L
A
T
E
X
Bng 3.1: Cc lnh to du nhn cho k hiu.
\acute{a} a
\bar{a} a \ddddot{a}
....
a
\breve{a} a \grave{a} ` a
\check{a} a \hat{a} a
\dot{a} a \widehat{a} a
\ddot{a} a \tilde{a} a
\dddot{a}
...
a \widetilde{a} a
\begin{equation}
\sum_{i=1}^{n} \vec{F}_i + \sum_{i=1}^{n}
\sum_{\substack{j=1 \\ j \neq i}}^{n} \vec{f}_{ij}
= \sum_{i=1}^{n} m_i \vec{a}_i,
\end{equation}
3.2.8 Cc du nhn trn mt k hiu
Trong Ton hc, biu din mt bin ph thuc vo bin x theo mt
ngha no , ta c th k hiu n l x. Cc k hiu nh x, x, a, x v rt
nhiu ci khc na lm cho cc k hiu Ton hc v cng phong ph. Cc
lnh v kt qu ca n v cc du nhn ny c cho trong Bng 3.1. C
hai dng ln hn ca lnh \hat v \tilde l \widehat v \widetilde, hai
lnh ny theo th t to ra du nhn c ln ph hp vi ln ca bin
s bn di n. V d
w,

wi,

wid,

wide,

wider,

widest.
Thm na, /
/
o-L
A
T
E
X lm rt tt trong vic chng cc du nhn, tc
l ta c th to ra bin

a nh lnh \hat{\hat{a}}. Hn na, cc
bin dng

x

1
hay

x
3
c son rt tt bi lnh $\dot{\hat{x}}_1$ hay
$\ddot{\vec{x}}_3$. V L
A
T
E
X s iu chnh du nhn nm bn trn
v chnh gia k hiu di n nn vi lnh \dot{\hat{x_1}} ta s c k
hiu

1
, n khng p v c th lm sai ngha nu cc du m c mt
ngha ring no .
3.2.9 Khong trng xung quanh cc k hiu
Thng thng, L
A
T
E
X bit cn phi t mt khong trng c di bao
nhiu xung quanh nhng k hiu khc nhau, c phn loi nh sau:
Cc k hiu Ton hc thng thng nh D, , x, . . . ;
Quan h hai ngi: =, , , [, , . . . ;
3.2 Cc ch hin th cng thc 31
Bng 3.2: Vai tr ca du [.
Lnh Vai tr
[ k hiu thng thng
\mid quan h hai ngi
\left[ ngoc bn tri
\right[ ngoc bn phi
Php ton hai ngi: +, , , , , . . . ;
Cc du ngoc: , (, [, . . . .
Mt khc, cc k hiu +, v [ c th xut hin trong nhng tnh hung
khng l php ton hai ngi, v d +, c th l du (sign) ging nh x.
Ln na, L
A
T
E
X chn vo khong trng rt ph hp nh dng qui lut +
hay l mt php ton hai ngi nu chng c ng trc v theo sau bi
mt k hiu hay mt nhm trng {} . Bn s thy nhiu v d khi ta son
cc cng thc nhiu hng.
K hiu [ c bn vai tr c ni Bng 3.2. C nhng trng hp m
L
A
T
E
X thm vo cc khong trng khng ph hp v chng ta d dng nhn
thy nhng ch , thng l khong trng hi hp, do ta c th yu cu
L
A
T
E
X thm vo mt khong trng nh bng lnh \,. V d, khi son cng
thc tch phn mt cch thng thng s c
_
2
0
cos
2
xdx =
Trong cng thc trn ta thy khng c s phn bit gia hm ly tch phn
cos
2
x v vi phn dx, do ta thm vo mt khong trng nh gia chng
_
2
0
cos
2
xdx =
L
A
T
E
X v /
/
o-L
A
T
E
X cung cp mt s lng ln cc lnh iu chnh khong
trng, chng c ni n trong Bng 3.3. Nu bn son $|-f(x)|$ s c
[ f(x)[, vic chn khong trng khng thch hp v L
A
T
E
X hiu nhm l
php ton hai ngi. c hon ho, bn phi son $\left|-f(x)\right|$
v ta c [f(x)[.
Nu bn son $\sin x/\log n$ c cng thc sinx/ log n ch
in-line, bn s thy rng c hi nhiu khong trng gia / v log n. Ta c
th sa n vi mt khong trng m thinspace nh $\sin x/\!\log n$ v
ta c sinx/log n.
Nu bn nhp vo $f(1/\sqrt{n})$ s c f(1/

n), bn thy rng k


hiu cn bc hai dnh vo du ngoc. C th sa iu ny bng cch nhp
$f(1/\sqrt{n} \,)$ v s cho ta kt qu p hn f(1/

n).
32 Son tho Ton trong L
A
T
E
X
Bng 3.3: Khong trng trong Ton hc. mu l n v v 18 mu = 1 em.
Khong trng Lnh ngn Lnh di
Thm vo
2 em \qquad
1 em \quad
Khong trng nh \; \thickspace
Khong trng nh hn \: \medspace
Khong trng nh nht \, \thinspace
1 mu \mspace{1mu}
Bt i
Khong trng nh \; \negthickspace
Khong trng nh hn \: \negmedspace
Khong trng nh nht \, \negthinspace
1 mu \mspace{-1mu}
Cui cng, lnh \colon c dng ph bin trong vic in ra du :
ca mt nh x. Nu bn nhp trc tip $$f:A\rightarrow B$$ ta c
f : A B
cn nu dng lnh ny $$f\colon A\rightarrow B$$ th
f : A B
Hy ch khong trng trc du : trong hai cng thc trn, r rng
cng thc th hai tt hn.
3.2.10 K t v k hiu Ton hc
L
A
T
E
X dng cc font Computer Modern in nging (CM italic) cho cc ch
ci trong Ton hc v dng font CM Roman cho s. Thm na, bn thng
mun dng cc font ch m biu din cc k hiu vect, ma trn, ten-x.
Bn cng c nhu cu dng cc ch trong cc bng ch ci khc biu din
cho cc k hiu Lagrangians, khng gian vect, cc tp hp c bit hay cc
i tng Ton hc khc. Tt nhin, L
A
T
E
X v /
/
o-L
A
T
E
X hon ton c th
tha mn nhng nhu cu trn.
Bng 3.4 cho ta cc bng ch ci c th dng trong Ton hc v chng
trng nh th no.
3.2 Cc ch hin th cng thc 33
Bng 3.4: Cc ch ci trong Ton hc.
Lnh Bng ch ci Kt qu Kiu ch
\mathbf in m abc de f g h Hoa, thng
\mathit in nghing a b c d e f g h Hoa, thng
\mathsf sans serif a b c d e f g h Hoa, thng
\mathrm Roman a bc de f g h Hoa, thng
\mathtt ch nh my a b c d e f g h Hoa, thng
\mathcal vit hoa /B( Tc T ( H Hoa
\mathscr Euler script ABCDEFGH Hoa
\mathfrak Euler Fraktur a b c d e f g h Hoa, thng
ABCDEFGH
\mathbb ch hai lp NZQRCP Hoa
\alpha\beta Ch ci Hi lp Hoa, thng

K hiu Ton in m
to ra cc ch ci in m trong cng thc Ton ta ch cn dng lnh
\mathbf v d dng to ra cng thc sau:
M() =
_

f (x
c
(t)) g(x
c
(t), t + ) dt. (3.18)
Ta khng th lm nh th c cc k hiu in m, do ta phi dng
lnh \boldsymbol nh sau:
, , B, D,
Bn c th to mt cng thc c in m ton b ging nh sau nh lnh
\mathversion{bold}

+
g
l
sin = 0
Lnh \mathversion t trc v bn ngoi mi trng son cng thc Ton
v c tc dng k t v sau, khi ta mun quay tr li ch thng cn t
li lnh \mathversion{normal}. Vi k hiu khng c dng in m, bn hy
so snh hai cng thc sau, ci th nht dng lnh \mathversion{bold}
v ci th hai ch thng
n

i=1
i
2
n

i=1
i
2
Quan st k s thy k hiu tng cng thc th nht ging nh cng
thc th hai, tc l n khng c in m hn. Bn c th to ra k hiu
34 Son tho Ton trong L
A
T
E
X
tng m hn nh lnh \pmb (vit tt ca ch poor mans bold). Lnh \pmb
lm ra cc k hiu m bng cch dch chuyn n v bn phi v chng ln
k hiu c sn, do ta c th lm k hiu rt m nh dng nhiu ln lnh
ny nhng hu qu l n s ph hy cu trc ca k hiu .
3.2.11 Phn s tng qut
Lnh \genfrac cung cp mt cng c tin li to cc phn s c cc du
ngoc bn ngoi v iu chnh cc khong trng. Cu trc ca lnh ny
\genfrac{ldelim}{rdelim}{thick}{style}{num}{den}
trong
ldelim du ngoc bn tri ca phn s;
rdelim du ngoc bn phi ca phn s;
thick dy ca k hiu phn s;
style the math style of fraction;
num t s;
den mu s.
dng lnh ny d hn ta hy nh ngha cc lnh sau u ti liu
\newcommand{\pfrac}[2]{\genfrac{(}{)}{}{}{#1}{#2}}
\newcommand{\bfrac}[2]{\genfrac{[}{]}{}{}{#1}{#2}}
\newcommand{\vfrac}[2]{\genfrac{|}{|}{}{}{#1}{#2}}
v hy so snh hai phn s c hai du ngoc sau, mt son vi lnh \genfrac
v mt son theo cch thng thng
_
a + b
c + d
_
v
_
a + b
c + d
_
R rng phn s th nht c cc khong trng c sp tt hn.
Chng 4
Cc phng trnh nhiu dng
4.1 Biu din cng thc Ton trn nhiu dng
ci thin s sng sa v d c ca mt bi vit c nhiu cng thc,
thng ngi ta t cc cng thc hay phng trnh ln nhiu dng. Cc ti
liu ngy nay thng c chia thnh nhiu ch , kt hp vi biu din
cc cng thc trn nhiu hng.
Mt cch t nhin, mc ch ca vic t chc cc cng thc thnh nhiu
hng l ngi c d tip cn n. V l do , cc cng thc nhiu hng
c sp ngay theo ct, c th mt hay nhiu ct. Gr atzer ngh to ra
mt mi trng Ton cho php ngi s dng nh dng cc cng thc trn
nhiu hng da vo hai tham s sau:
nh dng ct, khi cc cng thc c canh tri canh phi hay
canh gia.
Canh l ct, trong s sp xp cc cng thc c thit lp bi tham
s do ngi dng ch nh.
4.2 Gp nhm cc cng thc
Mi trng gather l mt trong nhng mi trng c th hin th nhm cc
cng thc m mi cng thc nm trn mt hng ring bit. Nhng cng
thc ny s xut hin trn nhng hng song song v c canh gia. V d,
bn hy xem cc h thc lng gic c bn sau:
sin
2
(x) + cos
2
(x) = 1, (4.1)
sin( + ) = sin() cos () + sin() cos () , (4.2)
cos ( + ) = cos () cos () sin() sin() . (4.3)
Cc cng thc trn c to ra bi on sau:
36 Cc phng trnh nhiu dng
\begin{gather}
\sin^{2}\left(x\right)+\cos^{2}\left(x\right)=1,
\label{TrigA1}\\
\sin\left(\alpha+\beta\right)=\sin\left(\alpha\right)\,\cos
\left(\beta\right)+\sin\left(\beta\right)\,\cos\left(\alpha
\right)\label{TrigB1}\\
\cos\left(\alpha+\beta\right)=\cos\left(\alpha\right)\,\cos
\left\beta\right)-\sin\left(\alpha\right)\,\sin\left(\beta
\right).\label{TrigC1}
\end{gather}
Chng ta quan tm n s khc nhau gia mi trng gather v mi trng
equation m cc cng thc di y dng:
sin
2
(x) + cos
2
(x) = 1 (4.4)
sin( + ) = sin() cos () + sin() cos () (4.5)
cos ( + ) = cos () cos () sin() sin() (4.6)
R rng khong trng dc gia cc cng thc (4.4), (4.5) v (4.6) l khng
u, v do trong trng hp ny mi trng gather tha mn tt hn
yu cu ca ta. Ti c vi ch cho bn v vic s dng mi trng gather:
Cc cng thc ring bit c xung hng bi lnh \\;
Cng thc cui cng trong mi trng ny khng bao gi c lnh \\;
Mi hng c nh s t ng tr khi c lnh \tag hoc \notag
trc lnh \\;
Nhn ca mi cng thc phi t trc lnh \\;
Khng c php c mt hng trng trong mi trng ny.
Nu mun tt c cc cng thc bn trong gather u khng c nh s,
chng ta c th dng mi trng gather* m cc cng thc trong mi trng
ny c th c nh s vi lnh \tag. S dng mi trng gather*, cng
thc trn c son li nh sau:
sin
2
(x) + cos
2
(x) = 1 (TrigID)
sin( + ) = sin() cos () + sin() cos ()
cos ( + ) = cos () cos () sin() sin()
Vi lnh \label theo sau lnh \tag ta c th tham chiu n cc cng thc
c t lnh \tag. V d ti c th nhc li cng thc (TrigID) bng lnh
\eqref.
Ch rng, mi trng gather ch cha cc one-line formula khng
c ngha l mi cng thc khng th biu th trn nhiu hng. iu ny c
ngha l mi cng thc ch nh s mt ln.
4.3 Ngt dng cc cng thc di 37
4.3 Ngt dng cc cng thc di
Mi trng multline l mi trng cho php ngt dng cc cng thc qu
di. Ch u tin l bn phi phn bit y l mi trng multline ch
khng phi l multiline (multi-line). Cch s dng ca mi trng ny khng
ging nh mi trng gather.
Bn hy xem xt v d sau:
(x+y+z)
2
(xy)
4
(xz)
2
= x
8
2 x
7
yx
6
y
2
+4 x
5
y
3
x
4
y
4
2 x
3
y
5
+x
2
y
6
2 x
6
y z+6 x
5
y
2
z4 x
4
y
3
z4 x
3
y
4
z+6 x
2
y
5
z2 xy
6
z2 x
6
z
2
+6 x
5
y z
2
3 x
4
y
2
z
2
8 x
3
y
3
z
2
+12 x
2
y
4
z
2
6 xy
5
z
2
+y
6
z
2
+2 x
4
y z
3
8 x
3
y
2
z
3
+12 x
2
y
3
z
3
8 xy
4
z
3
+2 y
5
z
3
+x
4
z
4
4 x
3
y z
4
+6 x
2
y
2
z
4
4 xy
3
z
4
+y
4
z
4
.
(4.7)
m n c nhp vo nh sau:
\begin{equation}
(x + y + z)^2 \, (x - y)^4 \, (x - z)^2 =x^8 - 2\,x^7\,y -
x^6\,y^2 + 4\,x^5\,y^3 - x^4\,y^4 - 2\,x^3\,y^5 + x^2\,y^6 -
2\,x^6\,y\,z + 6\,x^5\,y^2\,z - 4\,x^4\,y^3\,z-4\,x^3\,y^4\,z +
6\,x^2\,y^5\,z - 2\,x\,y^6\,z - 2\,x^6\,z^2 + 6\,x^5\,y\,z^2 -
3\,x^4\,y^2\,z^2 - 8\,x^3\,y^3\,z^2 + 12\,x^2\,y^4\,z^2 -
6\,x\,y^5\,z^2 + y^6\,z^2 + 2\,x^4\,y\,z^3 - 8\,x^3\,y^2\,z^3 +
12\,x^2\,y^3\,z^3 - 8\,x\,y^4\,z^3 + 2\,y^5\,z^3 + x^4\,z^4 -
4\,x^3\,y\,z^4 +6\,x^2\,y^2\,z^4 - 4\,x\,y^3\,z^4 + y^4\,z^4.
\end{equation}
R rng cng thc trn qu di n ni khng th trnh by trn mt hng
m phi ngt ra thnh tng hng ngn hn, ging nh sau:
(x + y + z)
2
(x y)
4
(x z)
2
= x
8
2 x
7
y x
6
y
2
+ 4 x
5
y
3
x
4
y
4
2 x
3
y
5
+ x
2
y
6
2 x
6
y z + 6 x
5
y
2
z 4 x
4
y
3
z
4 x
3
y
4
z + 6 x
2
y
5
z 2 xy
6
z 2 x
6
z
2
+ 6 x
5
y z
2
3 x
4
y
2
z
2
8 x
3
y
3
z
2
+ 12 x
2
y
4
z
2
6 xy
5
z
2
+ y
6
z
2
+ 2 x
4
y z
3
8 x
3
y
2
z
3
+ 12 x
2
y
3
z
3
8 xy
4
z
3
+ 2 y
5
z
3
+ x
4
z
4
4 x
3
y z
4
+ 6 x
2
y
2
z
4
4 xy
3
z
4
+ y
4
z
4
. (4.8)
\begin{multline}\label{MulLnEx1}
(x + y + z)^2 \, (x - y)^4 \, (x - z)^2 =x^8 - 2\,x^7\,y -
x^6\,y^2 + 4\,x^5\,y^3 - x^4\,y^4\\
- 2\,x^3\,y^5 + x^2\,y^6 -2\,x^6\,y\,z + 6\,x^5\,y^2\,z
- 4\,x^4\,y^3\,z\\-4\,x^3\,y^4\,z + 6\,x^2\,y^5\,z
- 2\,x\,y^6\,z - 2\,x^6\,z^2 + 6\,x^5\,y\,z^2\\
- 3\,x^4\,y^2\,z^2 - 8\,x^3\,y^3\,z^2 + 12\,x^2\,y^4\,z^2
- 6\,x\,y^5\,z^2 + y^6\,z^2\\
+ 2\,x^4\,y\,z^3 - 8\,x^3\,y^2\,z^3 + 12\,x^2\,y^3\,z^3
- 8\,x\,y^4\,z^3\\
+ 2\,y^5\,z^3 + x^4\,z^4 - 4\,x^3\,y\,z^4 +6\,x^2\,y^2\,z^4
38 Cc phng trnh nhiu dng
- 4\,x\,y^3\,z^4 + y^4\,z^4.
\end{multline}
Cc ch v mi trng multline:
Ni tt nht t lnh \label l ngay sau lnh \begin{multline};
Ngt dng bng lnh \\ , dng cui khng dng lnh \\ ;
Quan st cng thc (4.8) ta thy hng u tin c canh tri, hng
cui cng c canh phi v cc hng cn li c canh gia;
Cng thc lun c nh s t ng tr khi c lnh \tag hay \notag
v s th t c t bn phi ca hng cui cng (hay bn tri
hng u tin). Ta c th khng nh s n vi lnh \notag. Mi
trng multline* to ra cng thc nhiu hng khng nh s t ng
nhng vn c th dng lnh \tag. Bn nh rng khi dng mi trng
ny th c cng thc ch c nh s mt ln hoc khng c nh s.
4.4 Vi nguyn tc c bn
Sau y l nhng nguyn tc c bn son cc cng thc Ton nhiu hng:
1. Xung hng bi lnh \\ v khng dng lnh ny khi kt thc hng
cui cng;
2. Khng c php c hng trng bn trong cc mi trng ny;
3. Nu mt mi trng c cha nhiu hn mt cng thc th cc cng
thc c nh s song song. nh s t ng c th loi b bi lnh
\notag hay \tag.
4. Lnh \label hay \tag lun t trc lnh \\;
5. Mi mi trng son cng thc trn nhiu hng u c tng ng mt
mi trng dng * m vi n cc cng thc khng c nh s
t ng mc d lnh \tag vn c hiu lc.
4.4.1 Cng thc con
Vi mt cng thc di c ngt thnh nhiu hng bi mi trng multline,
ta gi mi hng nh l mt cng thc con (subformula) v chng cng c
th c tham chiu n nh l mt cng thc. Trong cc mi trng khc
th nh ngha ca cng thc con c thay i i cht. V d, trong cc mi
trng canh l, mi trng m trong n cc hng khc nhau ca cng thc
c t chc ngay ngn trong nhng ct, cng thc con l
4.4 Vi nguyn tc c bn 39
Bt c phn no ca cng thc m n nm gia v tr bt u v k
t & u tin; hoc
Nm gia hai k t &; hoc
Mt k t & v mt lnh \\; hoc
K t & cui cng v kt thc cng thc.
Trong mi trng canh l, k t & c dng ngn cch cc ct, bn cn
nh nhng nguyn tc sau khi dng cc mi trng loi ny to ra cc
cng thc con:
1. Mi cng thc con u phi l mt cng thc hon chnh m L
A
T
E
X
x l c lp;
2. Nu mt cng thc con kt thc vi mt trong cc php ton hai ngi
nh + hay , chng ta phi nhp vo +{} hay -{}, theo th t ta thu
c khong trng thch hp gia cng thc con v k hiu ;
3. Nu mt cng thc con bt u vi mt trong cc php ton hai ngi
nh + hay , chng ta phi nhp vo {}+ hay {}-, theo th t ta thu
c khong trng thch hp gia k hiu v cng thc con.
4.4.2 Ngt dng v sp theo ct cc cng thc
Dng nh y l mt vn i vi s thch v phong cch ring ca
mi c nhn, thc t, phi c mt s chp nhn cc nguyn tc in n ang
c s dng quyt nh ngt dng cc cng thc di khi no v ti
u, cng nh sp xp theo ct cc phn ca mt cng thc nhiu hng
nh th no. George Gr atzer, tc gi chnh ca sch Math into L
A
T
E
X,
cng vi Ellen Swanson, Arlene A. OSean, v Antoinette Tingley Schleyer
(American Mathematical Society, Providence, RI, 1999) quyt nh xut
bn sch hng dn vi ta Mathematics into Type, nh l mt s
gii thiu lm cch no nh dng cc cng thc c nhiu hng. Phn
nhiu trong sch chu nh hng bi phong cch ring ca h, y l mt
vi nguyn tc c bn m h ni n trong sch:
1. Cng thc phi c ngt dng trc php ton hai ngi nh + hay .
2. Nu du ngt xy ra trc du +, th dng k tip ta phi bt
u vi {}+ hay {}-.
3. Nu ngt dng xy ra bn trong cp du ngoc n, ngoc vung, . . .
th dng k tip phi tht vo ph hp, l, n phi bt u bn
phi ca du m ngoc.
4. Vic t chc cc cng thc trong cc ct ging nh cch cc ct c
sp v tr cc quan h hay php ton hai ngi.
40 Cc phng trnh nhiu dng
5. Nu cc ct c sp ti ch c cc php ton hay quan h hai ngi,
k t & phi c t trc tip bn tri php ton hai ngi .
6. Nu s sp hng c lm bi du + hoc - nh l mt php ton hai
ngi th n phi c nhp vo nh sau: &{}+ hoc &{}-.
4.4.3 nh s nhm cc cng thc
Mc d vic nh s cc cng thc c nhiu hng c lm t ng bi mi
trng m bn dng, nhng thng thng, chng ta c th thay i phong
cch nh s theo ring. V d, quan st cch nh s cc phng trnh
trong mi trng gather sau:
sin
2
(x) + cos
2
(x) = 1, (4.9)
sin( + ) = sin() cos () + sin() cos () , (4.9a)
cos ( + ) = cos () cos () sin() sin() . (4.9b)
Cch nh s phng trnh th hai v th ba thu c nh s dng hai
lnh \tag{\ref{TrigA3}a} v \tag{\ref{TrigA3}b}. Ch rng ta c
th tham chiu n c ba phng trnh trn bng cc lnh \label v \ref
(hay \eqref), ging nh hai phng trnh (4.9a) v (4.9b) c nh s
bn trong phng trnh (4.9). Mt cch khc thay i cch nh s cc
phng trnh trn l dng mi trng subequations nh sau
sin
2
(x) + cos
2
(x) = 1 (4.10a)
sin( + ) = sin() cos () + sin() cos () (4.10b)
cos ( + ) = cos () cos () sin() sin() (4.10c)
\begin{subequations} \label{SubEqEx1}
\begin{gather}
\sin^{2} \left( x \right) + \cos^{2} \left( x \right) = 1
\label{SubTrigA1} \\
\sin \left(\alpha+\beta\right) = \sin \left( \alpha \right)\,
\cos\left( \beta \right) + \sin \left( \beta \right) \, \cos
\left( \alpha \right) \label{SubTrigB1} \\
\cos \left(\alpha+\beta\right) = \cos \left( \alpha \right)\,
\cos\left( \beta \right) - \sin \left( \alpha \right) \, \sin
\left( \beta \right) \label{SubTrigC1}
\end{gather}
\end{subequations}
u th ca mi trng subequations l ta c th nh s cho c nhm cng
thc v cho tng cng thc nh trong nhm, do ta c th tham chiu
n tng cng thc hoc c nhm:
4.5 Canh ngay cc ct 41
Cc cng thc (4.10a), (4.10b) v (4.10c) l mt phn ca cng
thc (4.10).
v n c son nh sau:
Cc cng thc~\eqref{SubTrigA1}, \eqref{SubTrigB1} v
\eqref{SubTrigC1} l mt phn ca cng thc~\eqref{SubEqEx1}.
4.5 Canh ngay cc ct
Trong mc ny ta s xt cc mi trng m n cho php sp cc phng
trnh thnh nhiu ct.
4.5.1 Mi trng align
Mi trng align c dng sp cc phng trnh thnh nhiu ct. S ct
b hn ch bi rng ca trang giy, v khong trng gia cc ct c
iu chnh mt cch t ng. V d v mi trng align:
f(x, y) = x + y, g(y, z) = y + sin(z), h(x, z) = log x +

z, (4.11)
(x, y) = (x + y)
3
, (y, z) =
_
y + sin(z), (x, z) =
log x +

z
1 +[z[
, (4.12)
trong on lnh nhp vo l
\begin{align}
f(x,y) & = x + y, & g(y,z) &= y+\sin(z), & h(x,z) &= \log x +
\sqrt{z}, \label{AlignExA1}\\
\phi(x,y) &= (x + y)^{3}, & \psi(y,z) &= \sqrt{y+\sin(z)}, &
\zeta(x,z) &= \frac{\log x + \sqrt{z}}{1+|z|},\label{AlignExA2}
\end{align}
Da vo c php ca mi trng align, ta thy k t & c dng vi tc
dng ngn cch cc ct vi nhau. By gi ta s xem xt nhng v d khc.
Gi s ta mun canh ngay cng thc sau
y(t) + y(t) +
_
_
_
_
y(t)
1 +[ sin(t) +
_
y(t)[
+
_
t

y
2
(t) sin(t)
_
1 + log
_
1
1+

t
_
dt
_
_
_
_
= 0
v cng thc
_
_
_
_
(y(t), y(t), y(t)) +
_
t

y
2
(t) sin(t)
_
1 + log
_
1
(t)
_
dt
_
_
_
_
42 Cc phng trnh nhiu dng
Ta c th dng mi trng align canh ngay hai cng thc trn theo du
ngoc n nh sau:
y(t) + y(t)+
_
_
_
_
y(t)
1 +[ sin(t) +
_
y(t)[
+
_
t

y
2
(t) sin(t)
_
1 + log
_
1
1+

t
_
dt
_
_
_
_
= 0
(4.13)
_
_
_
_
(y(t), y(t), y(t)) +
_
t

y
2
(t) sin(t)
_
1 + log
_
1
(t)
_
dt
_
_
_
_
. (4.14)
\begin{align}
\dot{y}(t) + \ddot{y}(t) + & \left( \frac{\ddot{y}(t) }{1 +
|\sin(t) + \sqrt{y(t)}|} + \int_{-\infty}^{t}
\frac{y^{2}(t)\sin(t)}{\sqrt{1+\log\left(\frac{1}{1+
\sqrt{t}}\right)}} \, dt \right)=0\label{AlignExB1}\\
& \left( \psi\left(y(t),\dot{y}(t), \ddot{y}(t)\right) +
\int_{-\infty}^{t} \frac{y^{2}(t)\sin(t)} {\sqrt{1+\log \left(
\frac{1}{\zeta(t)} \right) }} \, dt \right).\label{AlignExB2}
\end{align}
hoc cng c th dng lnh \phantom
1
theo cch sau:
\begin{align}
& \dot{y}(t) + \ddot{y}(t) +
\left( \frac{\ddot{y}(t) }{1 + |\sin(t) + \sqrt{y(t)}|} +
\int_{-\infty}^{t}\frac{y^{2}(t)\sin(t)}
{\sqrt{1+\log\left(\frac{1}{1+\sqrt{t}}\right)}} \, dt
\right) = 0 \\
& \phantom{\dot{y}(t) + \ddot{y}(t) +{}}
\left( \psi\left(y(t),\dot{y}(t), \ddot{y}(t)\right) +
\int_{-\infty}^{t}\frac{y^{2}(t)\sin(t)}
{\sqrt{1+\log \left( \frac{1}{\zeta(t)} \right) }} \, dt
\right).
\end{align}
1
Lnh \phantom xut ra mt khong trng trong cng thc bng vi di ca tham
s ca lnh ny, v d lnh $\phantom{aaaaa} cho ta khong trng di bng di ca
nm ch a ging nh sau . Lnh ny c dng ph bin canh ngay nhiu cng
thc theo ct ti mt v tr no .
4.5 Canh ngay cc ct 43
V d ny thc hin vic canh ngay hai cng thc trn theo du tch phn
bn trong cp du ngoc n:
y(t) + y(t) +
_
_
_
_
y(t)
1 +[ sin(t) +
_
y(t)[
+
t
_

y
2
(t) sin(t)
_
1 + log
_
1
1+

t
_
dt
_
_
_
_
= 0
(4.15)
_
_
_
_
(y(t), y(t), y(t)) +
t
_

y
2
(t) sin(t)
_
1 + log
_
1
(t)
_
dt
_
_
_
_
. (4.16)
4.5.2 Mi trng flalign
Mi trng flalign l mt dng ca mi trng align trong ct th nht
c y v bn tri v ct cui cng y v bn phi nu c th. y l v
d trn nhng s dng mi trng ny:
f(x, y) = x + y, g(y, z) = y + sin(z), h(x, z) = log x +

z, (4.17)
(x, y) = (x + y)
3
, (y, z) =
_
y + sin(z), (x, z) =
log x +

z
1 +[z[
, (4.18)
4.5.3 Mi trng alignat
Mt bin th khc rt linh ng ca mi trng align l mi trng alignat.
Cu trc v cch s dng ca n gn ging vi mi trng align nhng phi
c ch l mi trng alignat yu cu ngi dng xc nh s ct ca mi
trng ny. So snh cng thc ny
f(x, y) = x + y,g(x, y) = log x +

y, (4.19)
(x, y) = (x + y)
3
+ log x,(x, y) =
_
y + sin(x) + log y +

x, (4.20)
vi cng thc sau
f(x, y) = x + y, g(x, y) = log x +

y, (4.21)
(x, y) = (x + y)
3
+ log x, (x, y) =
_
y + sin(x) + log y +

x, (4.22)
Mt ng dng rt hu ch ca mi trng alignat l thm vo ch sau
cng thc
f(x, y) = x + y, (y l mt cng thc) (4.23)
(x, y) = (x + y)
3
+ log x (v y l mt cng thc khc) (4.24)
44 Cc phng trnh nhiu dng
Lnh \intertext cho php ta thm mt on vn bn vo mi trng Ton
m n khng b sp xp nh mt ct, bn c th xem v d sau:
f(x, y) = sinxcos y + cos x + siny, (4.25)
hoc, bng vi,
= sin(x + y) , (4.26)
v n c nhp vo:
\begin{align}
f(x,y) &= \sin x \cos y + \cos x + \sin y, \\
\intertext{hoc, bng vi,} &= \sin\left( x + y \right),
\end{align}
4.6 Mi trng Ton con
Mi trng ton con l mt mi trng Ton m n ch c th c dng
bn trong mt mi trng Ton khc. Cc cng thc c to ra bi mi
trng Ton con c xem nh mt vt m ta c th tng tng nh l
mt k hiu Ton ln hay n gin l mt ci hp.
Cc mi trng align, alignat, v gather c cc mi trng Ton con
tng ng l aligned, alignedat, v gathered. Xem xt cc cng thc sau:
f(x, y) = x + y, g(y, z) = y + sin(z), h(x, z) = log x +

z,
(x, y) = (x + y)
3
, (y, z) =
_
y + sin(z), (x, z) =
log x +

z
1 +[z[
,
(4.27)
Cng thc (4.27) c to ra nh t mi trng aligned bn trong mi
trng equation.
im khc nhau c bn gia s bin din trn v nhng cng thc ny
son bng mi trng align ( trang 43) l cng thc trn c xem nh
mt phng trnh duy nht, c c trng l ch nh s mt ln.
By gi bn hy xem xt v d sau:
f(x, y) = x + y
(x, y) = (x + y)
3
sin
2
(x) + cos
2
(x) = 1
sin( + ) = sin() cos () + sin() cos ()
cos ( + ) = cos () cos () sin() sin()
(4.28)
Cng thc (4.28) c nhp vo nh sau:
\begin{equation}\label{Sub02}
\begin{aligned}
f(x,y) & = x+y \\
4.6 Mi trng Ton con 45
\phi(x,y) & =(x+y)^{3}
\end{aligned} \qquad \begin{gathered}
\sin^{2}\left(x\right)+\cos^{2}\left(x\right)=1\\
\sin\left(\alpha+\beta\right)=\sin\left(\alpha\right)\,\cos
\left(\beta\right)+\sin\left(\beta\right)\,\cos
\left(\alpha\right)\\
\cos\left(\alpha+\beta\right)=\cos\left(\alpha\right)\,\cos
\left(\beta\right)-\sin\left(\alpha\right)\,\sin
\left(\beta\right)
\end{gathered}
\end{equation}
Bn hy ch cch t mi trng gathered v aligned bn trong mi trng
equation, v c hai mi trng ny c canh gia theo chiu dc nh th
no. V tr ca cc mi trng con bn trong theo chiu dc c iu khin
bi tham s vertical alignment m n c th nhn cc gi tr sau: ccanh
gia, tcanh u v pha trn, bcanh u v pha di. V d, chng ta c
th nh dng li cng thc (4.28) u v pha trn nh sau:
f(x, y) = x + y
(x, y) = (x + y)
3
sin
2
(x) + cos
2
(x) = 1
sin( + ) = sin() cos () + sin() cos ()
cos ( + ) = cos () cos () sin() sin()
(4.29)
hay u v pha di:
f(x, y) = x + y
(x, y) = (x + y)
3
sin
2
(x) + cos
2
(x) = 1
sin( + ) = sin() cos () + sin() cos ()
cos ( + ) = cos () cos () sin() sin()
(4.30)
hay theo mt cch c bit:
f(x, y) = x + y
(x, y) = (x + y)
3
sin
2
(x) + cos
2
(x) = 1
sin( + ) = sin() cos () + sin() cos ()
cos ( + ) = cos () cos () sin() sin()
(4.31)
Mt hiu ng thng dng trong trnh din ca mi trng aligned l biu
th kt qu ca cc php tnh n gin, v d:
sin(2) = sin( + )
= sincos + cos sin
= 2 sincos
(4.32)
46 Cc phng trnh nhiu dng
4.6.1 Mi trng con split
Mi trng split c dng ngt mt cng thc c canh ngay theo mt
phn no . Mi trng ny cung cp hai thuc tnh quan trng lm cho
n tr nn hu ch, c bit khi dng bn trong mi trng align.
Mi trng Ton cha n ch xem c cng thc to ra bi mi trng
split nh l mt cng thc duy nht v ch nh s mt ln.
Mi trng split thc s l mi trng aligned vi mt ct, n cho php
ta nh ngha ch mt v tr canh ngay cc ct. Khi mi trng split
dng bn trong mi trng align th im canh ngay cc ct trong
mi trng split c chp nhn bi mi trng align v c dng
canh ngay tt c cc cng thc bn trong mi trng align.
V y l mt v d ng dng trc tip mi trng split:
y(t) + y(t) +
_
_
_
_
y(t)
1 +[ sin(t) +
_
y(t)[
+
_
t

y
2
(t) sin(t)
_
1 + log
_
1
1+t
_
dt
_
_
_
_
+
_
(y(t), y(t), y(t)) +
_
t

y
2
(t) sin(t)
_
1 + (t)
dt
_
= 0.
(4.33)
n c nhp vo nh sau:
\begin{equation} \label{SplitEx1}
\begin{split}
\dot{y}(t)+\ddot{y}(t) & {}+\left(\frac{\ddot{y}(t)}
{1+|\sin(t)+\sqrt{y(t)}|}+\int_{-\infty}^{t}
\frac{y^{2}(t)\sin(t)}{\sqrt{1+\log\left(
\frac{1}{1+t}\right)}}\,dt\right)\\
& {}+\left(\psi\left(y(t),\dot{y}(t),\ddot{y}(t)\right)+
\int_{-\infty}^{t} \frac{y^{2}(t)\sin(t)}
{\sqrt{1+\zeta(t)}}\,dt\right)=0.
\end{split}
\end{equation}
Nhng ta cng c th dng mi trng multline nh dng li cng thc
trn:
y(t) + y(t) +
_
_
_
_
y(t)
1 +[ sin(t) +
_
y(t)[
+
_
t

y
2
(t) sin(t)
_
1 + log
_
1
1+t
_
dt
_
_
_
_
+
_
(y(t), y(t), y(t)) +
_
t

y
2
(t) sin(t)
_
1 + (t)
dt
_
= 0. (4.34)
4.7 nh dng ct 47
Trong trng hp ny, theo ti, cng thc (4.34) trng p hn cng thc (4.33).
Cn y l v d s dng mi trng split bn trong mi trng align:
p
1
(x) = (x + sinx)
3
+ 3 log
_
1

x
_
,
p
2
(x) = (x + sinx)
3
+ 33 log
_
1

x
_
,
(4.35)
p(x)
3
= (x + sinx)
3
+ 4 log
_
1

x
_
,
p
4
(x) = (x + sinx)
3
+ 44 log
_
1

x
_
.
(4.36)
v y l on lnh nhp vo
\begin{align}
\begin{split}
p_{1}(x) & = (x + \sin x )^{3} \\
& {}+ 3 \log\left(\frac{1}{\sqrt{x}}\right),
\end{split}
&
\begin{split}
p_{2}(x) & = (x + \sin x )^{3} \\
& {}+ 33 \log\left(\frac{1}{\sqrt{x}}\right),
\end{split}
\\
\begin{split}
p(x)_{3} & = (x + \sin x )^{3} \\
& {}+ 4 \log\left(\frac{1}{\sqrt{x}}\right),
\end{split}
&
\begin{split}
p_{4}(x) & = (x + \sin x )^{3} \\
& {}+ 44 \log\left(\frac{1}{\sqrt{x}}\right).
\end{split}
\end{align}
4.7 nh dng ct
Khi bn lm vic vi nhng i tng c sp xp nhiu theo ct ging nh
ma trn, thng thng chng ta mong mun cc phn t ca ma trn c
canh gia bn trong ct cha n. thc hin vic ny, chng ta khng th
da vo cc mi trng canh ngay theo l m phi dng n cc mi trng
mi, c gi l mi trng Ton canh ngay theo nhiu ct. Cc mi trng
array, matrix v case u c th lm c yu cu ny.
Sau y l vi v d:
A =
_
A
11
A
12
A
21
A
22
_
48 Cc phng trnh nhiu dng
Mi trng matrix c th cho php son cc ma trn c th c ti 10 ct,
nu bn mun nhiu hn th bn phi iu chnh tham s MaxMatrixCols
xc nh s ct nhiu nht, bn hy nhn v d ny:
\begin{equation*}
\setcounter{MaxMatrixCols}{12}
\begin{matrix}
1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 \\
1 & 2 & \hdotsfor{8} & 11 & 12
\end{matrix}
\end{equation*}
v n xut ra kt qu l
1 2 3 4 5 6 7 8 9 10 11 12
1 2 . . . . . . . . . . . . . . . . . . . . . . . . 11 12
4.7.1 Cc dng ca mi trng matrix
Cc dng ca mi trng matrix cho php to ra cc ma trn vi cc du
ngoc vung, chun, du nh thc. Xem xt cc ma trn sau:
A
11
A
12
A
21
A
22
_
A
11
A
12
A
21
A
22
_ _
A
11
A
12
A
21
A
22
_

A
11
A
12
A
21
A
22

_
_
_
_
A
11
A
12
A
21
A
22
_
_
_
_
_
A
11
A
12
A
21
A
22
_
Chng ln lt c to ra bi cc mi trng matrix, pmatrix, bmatrix,
vmatrix, Vmatrix v Bmatrix.
4.7.2 Mi trng array
Mi trng array cung cp bi /
/
o-L
A
T
E
X c trong gi amsmath. Thc cht
n gn ging vi mi trng matrix nhng cho php ta iu chnh vic nh
dng cc ct trong mi trng ny. Cc tham s l c, l, r ln lt canh gia,
canh tri, canh phi cc ct trong mi trng ny. Sau y l mt v d c
bn ct, trong ct th nht c canh tri, hai ct gia canh gia v ct
cui cng canh phi
A =
_
_
_
_
1 A
12
A
13
1
11 A
22
A
23
11
111 A
32
A
33
111
1111 A
42
A
43
1111
_
_
_
_
n c nhp vo nh sau:
4.8 Ngt trang 49
\[
A=\left(\begin{array}{lccr}
1 & A_{12} & A_{13} & 1 \\
11 & A_{22} & A_{23} & 11 \\
111 & A_{32} & A_{33} & 111 \\
1111 & A_{42} & A_{43} & 1111
\end{array}\right)
\]
4.7.3 Mi trng cases
Mi trng cases l mt mi trng Ton con, c bit c ch trong trng
hp bn nh ngha cc hm c nhiu cng thc khc nhau ng vi nhng
tp xc nh khc nhau. V d
f(x) =
_

_
log(x), nu x < 0;
0, nu x = 0;
x
sin x
nu x > 0.
\begin{equation*}
f(x) =
\begin{cases}
\log(-x), & \text{nu } x<0; \\
0, & \text{nu } x=0; \\
x^{\,\sin x} & \text{nu } x>0.
\end{cases}
\end{equation*}
4.8 Ngt trang
Theo mc nh, cc mi trng Ton nhiu hng khng cho php ngt trang
gia n. V vy, khi dng cc mi trng ny, khng him khi ta c th thy
mt vi trang c lp y khng hon chnh. bt buc ngt trang xy
ra bn trong mi trng Ton nhiu hng, chng ta c th dng declaration
\allowdisplaybreaks nh v d sau:
{
\allowdisplaybreaks
\begin{multline}
\dot{y}(t) + \ddot{y}(t) {}+ \left( \frac{\ddot{y}(t) }
{1 + |\sin(t) + \sqrt{y(t)}|} + \int_{-\infty}^{t}
\frac{y^{2}(t)\sin(t)}{\sqrt{1+\log\left(\frac{1}{1+t}
\right)}} \,dt\right) \\
{}+ \left( \psi\left(y(t),\dot{y}(t), \ddot{y}(t)\right)+
50 Cc phng trnh nhiu dng
\int_{-\infty}^{t} \frac{y^{2}(t)\sin(t)}{\sqrt{1+\zeta(t)}}
\, dt \right) = 0,
\end{multline}
}
Chng 5
Hnh nh v cc i tng
c bit
5.1 Gi graphicx
Gi graphicx l mt trong nhiu gi h tr cho vic chn vo vn bn cc
hnh nh bn ngoi, l cc hnh nh c to bi cc chng trnh x l
nh khc m khng phi l bn thn L
A
T
E
X. Gi ny c th to ra mt s
kt qu thng dng, cho php ta thm vo ti liu hnh nh v hn th na,
n c th ty bin ln, hng, ni a nh vo. Cc lnh iu khin
vic a nh vo v iu chnh dng v ca n c tc dng ph thuc vo
s tng thch gia nh dng nh v driver dng hin th hay in kt qu
xut ra ca L
A
T
E
X. Bn cht ca vn ny l bn phi chn driver ph
hp ca gi graphicx vi yu cu ca bn. V d, khi np vo gi graphicx
u ti liu, hai la chn driver pdftex v dvips phi c xc nh, ph
thuc vo bn dng T
E
X hay pdfT
E
X.
Lnh c bn cung cp bi gi ny l \includegraphics, n cho php ta
a hnh nh vo ti liu. Nhng g sau y, chng ta xem nh l mt tho
lun tm tt v lnh ny v cc tham s ca n. Cc v d s gip bn thy
c kh nng cng nh minh ha tc dng ca tng ty chn m ti ni
n. c nhng thng tin chi tit hn bn c th tham kho Mc 6.2
ca Sch [4].
52 Hnh nh v cc i tng c bit
5.1.1 C bn v lnh \includegraphics
0.0 0.4 0.8 1.2 1.6 2.0
1
2
3
4
5
6
7
8
()
u
z
(

,
0
)
/

C
R
lim
v

0
u
z
(, 0)

CR
= 1.2165
Sensitivity to

CCOD vs. Temperature

= 500

= 5000

= 50000
C.Z. Constitutive Law
0.01
0.02
0.00
0.03
0.04
0.05
0.0 0.5 1.0 1.5 2.0

c
(

)
/

V d ny cho bn mt cch n gin dng lnh \includegraphics,


ch cn t tn file hnh v khng c mt ty chn no c dng.
\includegraphics{CCODMasterCurve}
5.1.2 Lnh \includegraphics: ty chn scale
Thu nh
0.0 0.4 0.8 1.2 1.6 2.0
1
2
3
4
5
6
7
8
()
u
z
(

,
0
)
/

C
R
lim
v

0
u
z
(, 0)

CR
= 1.2165
Sensitivity to

CCOD vs. Temperature

= 500

= 5000

= 50000
C.Z. Constitutive Law
0.01
0.02
0.00
0.03
0.04
0.05
0.0 0.5 1.0 1.5 2.0

c
(

)
/

\includegraphics[scale=0.75]{CCODMasterCurve}
5.1 Gi graphicx 53
Phng ln
0.0 0.4 0.8 1.2 1.6 2.0
1
2
3
4
5
6
7
8
()
u
z
(

,
0
)
/

C
R
lim
v

0
u
z
(, 0)

CR
= 1.2165
Sensitivity to

CCOD vs. Temperature

= 500

= 5000

= 50000
C.Z. Constitutive Law
0.01
0.02
0.00
0.03
0.04
0.05
0.0 0.5 1.0 1.5 2.0

c
(

)
/

\includegraphics[scale=1.25]{CCODMasterCurve}
54 Hnh nh v cc i tng c bit
5.1.3 Lnh \includegraphics: ty chn width, height, v keep-
aspectratio
iu chnh chiu rng v chiu cao
0.0 0.4 0.8 1.2 1.6 2.0
1
2
3
4
5
6
7
8
()
u
z
(

,
0
)
/

C
R
lim
v

0
u
z
(, 0)

CR
= 1.2165
Sensitivity to

CCOD vs. Temperature

= 500

= 5000

= 50000
C.Z. Constitutive Law
0.01
0.02
0.00
0.03
0.04
0.05
0.0 0.5 1.0 1.5 2.0

c
(

)
/

\includegraphics[width=5.3in,height=3in]{CCODMasterCurve}
Gi hnh cn i
0.0 0.4 0.8 1.2 1.6 2.0
1
2
3
4
5
6
7
8
()
u
z
(

,
0
)
/

C
R
lim
v

0
u
z
(, 0)

CR
= 1.2165
Sensitivity to

CCOD vs. Temperature

= 500

= 5000

= 50000
C.Z. Constitutive Law
0.01
0.02
0.00
0.03
0.04
0.05
0.0 0.5 1.0 1.5 2.0

c
(

)
/

\includegraphics[width=6in,height=3in,keepaspectratio=true]
{CCODMasterCurve}
5.1 Gi graphicx 55
5.1.4 Lnh \includegraphics: ty chn angle
0
.
0
0
.
4
0
.
8
1
.
2
1
.
6
2
.
0
1
2
3
4
5
6
7
8

)
u
z
(

,
0
)
/

C
R
l
i
m
v

0
u
z
(

,
0
)

C
R
=
1
.
2
1
6
5
S
e
n
s
i
t
i
v
i
t
y
t
o

C
C
O
D

v
s
.

T
e
m
p
e
r
a
t
u
r
e

=
5
0
0

=
5
0
0
0

=
5
0
0
0
0
C
.
Z
.
C
o
n
s
t
i
t
u
t
i
v
e
L
a
w
0
.
0
1 0
.
0
2
0
.
0
0
0
.
0
3 0
.
0
4 0
.
0
5
0
.
0
0
.
5
1
.
0
1
.
5
2
.
0

c
(

)
/

\includegraphics[angle=45,origin=tl]{CCODMasterCurve}
5.1.5 Lnh \includegraphics: ty chn bb
y, bb i din cho bounding box. Bounding box ca mt hnh nh
ngha ln ca n cho L
A
T
E
X phn phi lng khong trng t hnh
nh vo.
56 Hnh nh v cc i tng c bit
Gii hn mt phn v ct hnh
0.0 0.4 0.8 1.2 1.6 2.0
1
2
3
4
5
6
7
8
()
u
z
(

,
0
)
/

C
R
lim
v

0
u
z
(, 0)

CR
= 1.2165
Sensitivity to

CCOD vs. Temperature

= 500

= 5000

= 50000
C.Z. Constitutive Law
0.01
0.02
0.00
0.03
0.04
0.05
0.0 0.5 1.0 1.5 2.0

c
(

)
/

\includegraphics{CCODMasterCurve}
0.0 0.4 0.8 1.2 1.6 2.0
1
2
3
4
5
6
7
8
()
u
z
(

,
0
)
/

C
R
lim
v

0
u
z
(, 0)

CR
= 1.2165
Sensitivity to

CCOD vs. Temperature

= 500

= 5000

= 50000
C.Z. Constitutive Law
0.01
0.02
0.00
0.03
0.04
0.05
0.0 0.5 1.0 1.5 2.0

c
(

)
/

\includegraphics[bb=0.000 10.000 150.000 230.000]


{CCODMasterCurve}
5.1 Gi graphicx 57
0.0 0.4 0.8 1.2 1.6 2.0
1
2
3
4
5
6
7
8
()
u
z
(

,
0
)
/

C
R
lim
v

0
u
z
(, 0)

CR
= 1.2165
Sensitivity to

CCOD vs. Temperature

= 500

= 5000

= 50000
C.Z. Constitutive Law
0.01
0.02
0.00
0.03
0.04
0.05
0.0 0.5 1.0 1.5 2.0

c
(

)
/

\includegraphics[bb=0.000 0.000 150.000 200.000,


clip=true]{CCODMasterCurve}
Phng to
0.0 0.4 0.8 1.2 1.6 2.0
1
2
3
4
5
6
7
8
()
u
z
(

,
0
)
/

C
R
lim
v

0
u
z
(, 0)

CR
= 1.2165
Sensitivity to

CCOD vs. Temperature

= 500

= 5000

= 50000
C.Z. Constitutive Law
0.01
0.02
0.00
0.03
0.04
0.05
0.0 0.5 1.0 1.5 2.0

c
(

)
/

\includegraphics[bb=0.000 0.000 266.000 236.000]


{CCODMasterCurve}
58 Hnh nh v cc i tng c bit
0.0 0.4 0.8 1.2 1.6 2.0
1
2
3
4
5
6
7
8
()
u
z
(

,
0
)
/

C
R
lim
v

0
u
z
(, 0)

CR
= 1.2165
Sensitivity to

CCOD vs. Temperature

= 500

= 5000

= 50000
C.Z. Constitutive Law
0.01
0.02
0.00
0.03
0.04
0.05
0.0 0.5 1.0 1.5 2.0

c
(

)
/

\includegraphics[clip=true,scale=2.0,viewport=0.0 100.0
150.0 200.0]{CCODMasterCurve}
5.2 Gi lscape
Mt phn ca gi lnh x l hnh nh, gi lscape cung cp mt cch gii
quyt i vi nhng hnh nh ln m n phi hin th trong c mt trang
in ngang (landscape). Khi phi a vo ti liu mt hnh ln, ta thng
khng mun lm v cu trc xuyn sut ca c ti liu. V th, bo m
cu trc c ti liu trong khi c mt vi i tng c thm vo ti nhng
trang ring ch landscape, mi trng landscape c cung cp bi gi
lscape. Mt v d v vic s dng n l Hnh 5.1.
\afterpage{\clearpage
\begin{landscape}
\begin{figure}
\begin{center}
\includegraphics[scale=0.75]{Specter}
\end{center}
\caption{\label{fig:girls}y l mt nh trng en nhng rt p.}
\end{figure}
\end{landscape}
}
5
.
2
G

i
l
s
c
a
p
e
5
9
Hnh 5.1: y l mt nh trng en nhng rt p.
60 Hnh nh v cc i tng c bit
5.3 Cc vn xy ra khi chn hnh nh
Thnh thong, ph thuc vo cch to ra i tng hnh nh bn c th s
gp vi vn trong vic a hnh nh vo hay t n vo ti liu khng
ng nh. y, chng ti m t vi vn thng xy ra m nguyn
nhn ca n l kch thc ca hnh qu ln so vi kh giy. Bn hy xem
xt nhng v d sau.
5.3 Cc vn xy ra khi chn hnh nh 61
Hnh 5.2: y l mt v d v bc tranh theo phong cch hin i.
62 Hnh nh v cc i tng c bit
Hnh ny c a vo nh mt trang ring, iu bt tin ny c th
d dng sa cha bng cch chnh sa kch thc ca nh. V d, hnh trn
c to bi Adobe Illustrator 9.0 v lu tr dng file PDF. May mn
thay, bng cch m file PDF ny trong mt chng trnh son vn bn n
gin (a text editor, v d nh Notepad) ta c th thy cc kch thc ca
hnh (air box) rt khc v thm ch nh hn kch thc ca trang vn bn.
Bn c th m file nh v c th thy nhng dng gn trn nh sau:
/MediaBox [ 0 0 612 792 ]
/ArtBox [ 181.80859 473.23535 398.08789 637.84473 ]
%%BoundingBox: 181 473 399 638
%%HiResBoundingBox: 181.8086 473.2354 398.0879 637.8447
Ch rng /MediaBox chnh l kch thc ca trang giy 8
1
2
11 inch
(kch thc thc ca nh trong file PDF rt ln). Cc kch thc /ArtBox,
BoundingBox, v HiResBoundingBox xc nh bounding box ca hnh. Do
, ta c th d dng chnh sa cc thng s ny, bng cch sa li cc kch
thc xp x trong file PDF v s dng n cho cc gi tr ca bb. V d v
iu ny c kt qu l Hnh 5.3.
Hnh 5.3: y l mt v d v bc tranh theo phong cch hin i.
5.4 S dng mu vi gi color
Gi color l mt phn ca gi graphicx v c vi phn c s dng bi gi
graphicx, c bit, xa hn na mt s driver ca hai gi c lin quan n
nhau. thm vo mt s tnh nng cho gi graphicx, gi color c th c
np vi cc la chn sau:
monochrome: chuyn mi lnh xc nh mu thnh trng en;
5.4 S dng mu vi gi color 63
dvipsnames: lm cc tn mu ca ty chn dvips c th s dng cho
cc driver khc;
nodvipsnames: v hiu ha tn mu ca dvips ti kim b nh;
usenames: np tt c cc tn mu m ta nh ngha (Ti thng khng
dng n vi T
E
X).
5.4.1 nh ngha mu
Mu sc c th c ta nh ngha bng cch pha trn cc mu c bn
(model-component). V d:
[rgb]{1,0,0}
nh ngha mu mi theo h mu rgb vi {1,0,0} l cc tham s pha
trn mu. Trong v d c bit trn mu mi l mu . Nu mt h
mu c dng, mu mi c nh ngha nh sau:
[named]{ColorName}
trong ColorName l b gm tn mu v cc tham s trn mu. Hai
h mu thng dng l rgb hoc cmyk.
Mu mi c nh ngha bi lnh:
\definecolor{name}{model}{specs}
V d:
\definecolor{MyKindOfBlue}{rgb}{0.3,0.5,0.7}
nh ngha tn mu MyKindOfBlue cho bi h mu rgb vi cc thng s
{0.3,0.5,0.7}. Sau ta c th dng mu ny trong ti liu.
Cc lnh s dng mu c tho lun thng qua cc v d.
Mu nn ca trang vn bn
Lnh \pagecolor xc nh mu nn ca trang vn bn hin thi v c nhng
trang sau .
Mu ca ch
Mu ca ch c th xc nh bi lnh \color theo dng
\color{<tn mu> text}
hay
\textcolor{tn mu}{text}
64 Hnh nh v cc i tng c bit
V khi in ra tt c u c mu en nn ti khng a ra cc v d phn
ny.
tr li mu ch thng thng ta c th s dng lnh \normalcolor.
By gi ti c vi ch y.
Mu BurntOrange c nh ngha trong file dvipsnam.def, m n
c np t ng khi gi color c np vi ty chn dvipsnames.
thay i mu cho mt vi ch m khng l tt c ta c th dng
lnh \textcolor di dng sau:
\textcolor{tn mu}{text}
Bn hy son cc lnh ny v bin dch xem th kt qu th no.
\textcolor{red}{red},
\textcolor{green}{green},
\textcolor{blue}{blue},
\textcolor{yellow}{yellow},
\textcolor{cyan}{cyan},
\textcolor{magenta}{magenta},
\textcolor{black}{black}, and
\textcolor{white}{white}.
Nu mun to ra mt hp c mu nn va cha mt on ngn
th bn c th dng lnh \colorbox.
Nu mun thay i c mu nn v bin ca hp chc vn bn ta c
th dng lnh \fcolorbox vi hai tham s v mu, ci th nht cho
bin v th hai l mu nn.
5.4.2 Tn mu c trong ty chn dvips
Tn mu trong file dvipsnam.def
GreenYellow
Yellow
Goldenrod
Dandelion
Apricot
Peach
Melon
YellowOrange
Orange
BurntOrange
Bittersweet
RedOrange
Mahogany
Maroon
BrickRed
Red
OrangeRed
RubineRed
WildStrawberry
Salmon
CarnationPink
Magenta
VioletRed
Rhodamine
Mulberry
RedViolet
Fuchsia
Lavender
Thistle
Orchid
5.5 Mi trng float 65
DarkOrchid
Purple
Plum
Violet
RoyalPurple
BlueViolet
Periwinkle
CadetBlue
CornflowerBlue
MidnightBlue
NavyBlue
RoyalBlue
Blue
Cerulean
Cyan
ProcessBlue
SkyBlue
Turquoise
TealBlue
Aquamarine
BlueGreen
Emerald
JungleGreen
SeaGreen
Green
ForestGreen
PineGreen
LimeGreen
YellowGreen
SpringGreen
OliveGreen
RawSienna
Sepia
Brown
Tan
Gray
Black
White
5.5 Mi trng float
Chn hnh bng lnh \includegraphics s c thc hin chng bao lu
sau ni ta t lnh , cng ging nh ta to cc bng vi mi trng
tabular. Mt cch khc chn hnh hoc bng khng khc my so vi cch
trn l dng cc mi trng figure hay table lm cho T
E
X t cc i
tng ny ti mt v tr c th c vi mc ch l lm cho ti liu tr nn
sng sa. im khc l cc hnh hay bng ny c t tn v c th tham
chiu d dng. Cc mi trng figure v table l nhng dng t bit ca
mt mi trng float tng qut c cung cp bi gi floats.
5.5.1 Ni t i tng
Hnh nh v bng c th c xem l mt i tng linh ng bng cch
t chng vo cc mi trng figure, figure*, table, v table*. Dng * ca
hai mi trng trn ch dng khi bn ang dng cu trc vn bn hai ct
v n lm cho i tng a vo nm ngang c hai ct tc l khng chu
tc ng ca mi trng hai ct ny. Nhng trng hp khc bn nn dng
cc mi trng thng thng.
Hnh 5.4 c chn vo bng mi trng figure. V d ny s dng on
lnh sau:
\begin{figure}
\begin{center}
\includegraphics{TCCODExample}
\end{center}
\caption{\label{fig:AnExamFig}y l mt hnh nh hp dn.}
\end{figure}
Thnh phn c bn ca v d ny l hnh nh c sn, thm vo l tn
66 Hnh nh v cc i tng c bit
Zone I Zone II Zone III
0.0 0.4 0.8 1.2 1.6 2.0
1
2
3
4
5
6
7
8
()
u
z
(

,
0
)
/

C
R
CCOD vs. Temperature
v

= 0.01
v

= 0.05
v

= 0.025
v

= 0.1
v

= 0.2
v

= 0.3
v

= 0.4
v

= 0.5
v

= 0.6
a
b
v

= 0.7
v

= 0.8
v

= 0.9

= 5000
C.Z. Constitutive Law
0.01
0.02
0.00
0.03
0.04
0.05
0.0 0.5 1.0 1.5 2.0

c
(

)
/

Hnh 5.4: y l mt hnh nh hp dn.


hnh gii thch ni dung c bn hay mt nhn nh ca bn v n. Bng
cc lnh \label v \ref ta c th gn nhn v tham chiu n n d dng.
Vn chnh ca mc ny l tho lun v ni t i tng m c th
y l hnh nh. Cc tham s iu khin vic v tr t hnh gm c:
h (here): t hnh nh hay bng ging nh trng hp ta ch dng
lnh \includegraphics hay mi trng tabular;
t (top): quyt nh t i tng u trang hin ti hay u nhng
trang khc sau ;
b (bottom): t i tng cui trang hin ti hay cui nhng trang
k tip;
p (page): t cc i tng ny ln mt trang t bit ch cha cc
i tng linh ng, y l hnh hay bng;
!: khng quan tm n cc tham s bn trong nh hng n s sp
xp n.
Ln na, ta phi hiu rng tt c nhng ty chn trn y khng c
tnh tuyt i. Nu phi s dng nhiu th gi float c th gip nhiu cho
bn nh c thm ty chn H.
1
1
ty chn H c hiu lc tuyt i bt buc i tng phi c t ngay ti ni a
vo, s dng n bn cn c gi here.
5.5 Mi trng float 67
Khi s dng cc mi trng float chn hnh hay bng, ta c th dng
cc lnh \clearpage hay \cleardoublepage cha ra mt hay hai trang
trng xut cc hnh v bng cn trong hng i. im bt li khi dng
hai lnh ny l trang hin thi s c th b b trng mt phn lm cho trang
khng p. ci thin vn ny ta c th dng lnh \afterpage
cung cp bi gi afterpage. im li ca lnh ny l trang hin thi c
lp y bi phn vn bn tip theo, sau khi kt thc trang th trang
sau s b trng chn hnh vo. Ta c th lm vic ny bi lnh sau:
\afterpage{\clearpage}.
Cc lnh sau c nh ngha li thu c mt dng v tt hn cho
mi trng float.
\renewcommand{\floatpagefraction}{0.85}
\renewcommand{\topfraction}{0.85}
\renewcommand{\bottomfraction}{0.85}
\renewcommand{\textfraction}{0.15}
5.5.2 V d v mi trng table
y l mt v d minh ha vic s dng mi trng table. Bng 5.1 c
to bi cc lnh sau:
\begin{table}[b]
\begin{center}
\begin{tabular}{@{}p{1.7in}p{3.3in}@{}}
Course and Date & Brief Description \\
\hline
Introduction to LSEDIT\newline March 14 -- 16 &
Logging on ---
explanation of the VMS file system ---
explanation and intensive application of the VMS editor
LSEDIT --- user modifications \\
\hline
Introduction to \LaTeX{}\newline March 21 -- 25 &
Course and Date Brief Description
Introduction to LSEDIT
March 14 16
Logging on explanation of the VMS file system
explanation and intensive application of the VMS edi-
tor LSEDIT user modifications
Introduction to L
A
T
E
X
March 21 25
Word processors and formatting programs text and
commands environments document and page
styles displayed text math equations simple
user-defined structures
Bng 5.1: y l mt bng rt p.
68 Hnh nh v cc i tng c bit
Word processors and formatting programs ---
text and commands --- environments ---
document and page styles ---
displayed text --- math equations ---
simple user-defined structures
\end{tabular}
\end{center}
\caption{\label{TableExample1}y l mt bng rt p.}
\end{table}
Ch rng trong Bng 5.1 tn bng c t pha di. Ta c th t n
pha trn ca bng bng cch t lnh \caption trc mi trng tabular
ging nh Bng 5.2.
Bng 5.2: y l mt bng rt p.
Course and Date Brief Description
Introduction to LSEDIT
March 14 16
Logging on explanation of the VMS file system
explanation and intensive application of the VMS edi-
tor LSEDIT user modifications
Introduction to L
A
T
E
X
March 21 25
Word processors and formatting programs text and
commands environments document and page
styles displayed text math equations simple
user-defined structures
5.5.3 V d s dng mi trng figure
Xc nh ni t hnh nh ging nh lm i vi bng. Khi a vo cc
hnh nh chng ta mun t hai hnh trn mt hng ngang. Khi ta c
th dng mi trng minipage ging nh Hnh 5.5 v 5.6. Hnh 5.5 v 5.6
c to bi cc lnh sau:
\begin{figure}[ht]
\begin{minipage}[t]{2.7in}
\begin{center}
\includegraphics[scale=0.5]{TCCODExample}
\end{center}
\caption{\label{fig:CZFragmentation}y l tn ca
hnh ny. N c p khng?}
\end{minipage}
\hfill
\begin{minipage}[t]{2.7in}
\begin{center}
5.5 Mi trng float 69
Zone I Zone II Zone III
0.0 0.4 0.8 1.2 1.6 2.0
1
2
3
4
5
6
7
8
()
u
z
(

,
0
)
/

C
R
CCOD vs. Temperature
v

= 0.01
v

= 0.05
v

= 0.025
v

= 0.1
v

= 0.2
v

= 0.3
v

= 0.4
v

= 0.5
v

= 0.6
a
b
v

= 0.7
v

= 0.8
v

= 0.9

= 5000
C.Z. Constitutive Law
0.01
0.02
0.00
0.03
0.04
0.05
0.0 0.5 1.0 1.5 2.0

c
(

)
/

Hnh 5.5: y l tn ca hnh ny. N


c p khng?
0.0 0.4 0.8 1.2 1.6 2.0
1
2
3
4
5
6
7
8
()
u
z
(

,
0
)
/

C
R
lim
v

0
uz(, 0)
CR
= 1.2165
Sensitivity to

CCOD vs. Temperature

= 500

= 5000

= 50000
C.Z. Constitutive Law
0.01
0.02
0.00
0.03
0.04
0.05
0.0 0.5 1.0 1.5 2.0

c
(

)
/

Hnh 5.6: Mt tn qu di, hi vng n


c in ra trn nhiu hng.
\includegraphics[scale=0.5]{CCODMasterCurve}
\end{center}
\caption{\label{fig:StriationMarks} Mt tn qu di,
hi vng n c in ra trn nhiu hng.}
\end{minipage}
\end{figure}
Chng 6
Ti u cho ngi s dng
6.1 Ti u vic s dng L
A
T
E
X
Trong mc ny ti hng dn cc bn iu chnh, nh ngha cc lnh v
mi trng mi s dng vi mc ch ring ca mnh.
6.1.1 B m (Counters)
Mi b m ca L
A
T
E
X l mt bin dng m s ln xut hin ca mt
i tng no trong ti liu, v do n nhn gi tr l s nguyn; ngoi
ra mi gi lnh c th c thm cc bin m khc; khi bt u ti liu cc
bin m ny c gn mt gi tr nht nh, mi khi gp mt i tng
cng loi th bin m ny c cng thm 1. Bn thn L
A
T
E
X c sn
mt s b m v chng bao lu ta s phi s dng n n. Mt s trong
rt nhiu b m ca L
A
T
E
X cho trong Bng 6.1.
Trong Bng 6.1 enumi, enumii, enumiii v enumiv l cc b m ca
bn mi trng nh s. Khi bt u ti liu dng article tt c cc b
m k c b m s trang u c gn l 0, tt nhin mi b m c
tng ln hay khi ng li khi bn bt u mc mi hay mi trng mi.
Ta c th gn gi tr ca mt b m bi mt gi tr bt k bng lnh
\setcounter theo cch sau:
\setcounter{counter}{number}
Bng 6.1: Mt s b m c bn ca L
A
T
E
X.
section page table enumii
subsection equation footnote enumiii
subsubsection figure enumi enumiv
6.1 Ti u vic s dng L
A
T
E
X 71
V d, ti liu ca bn c nhiu chng c son ring l, khi bin dch
chng th tm ta phi gn li b m s chng bng lnh sau:
\setcounter{chapter}{8}
Bng cch ny ta c th thay i cch nh s phng trnh (theo dng
(1.1.3)) trong ti liu nh sau:
\renewcommand{\theequation}{\arabic{section}.%
\arabic{subsection}.\arabic{equation}}
nh ngha b m mi
Bn c th to mt b m mi bng lnh \newcounter theo cch sau:
\newcounter{name}[supercounter]
trong name l tn ca b m mi v tham s supercounter l tn ca mt
b m c (do bn nh ngha hay c sn). Nu tham s trn c dng
th b m name tr v gi tr 0 mi khi b m supercounter c tng
ln khi s dng mt trong hai lnh \stepcounter hay \refstepcounter.
Gi tr mc nh ca mt b m mi to ra l 0.
Thay i gi tr ca mt b m
Bn c th thay i gi tr ca mt b m vi cc lnh c trong Bng 6.2.
Lnh Tc dng
\setcounter{counter}{num} Lnh ny gn s nguyn num cho gi tr
ca b m counter
\addtocounter{counter}{num} Gi tr ca b m counter c cng
thm bi s nguyn num, m n c th
m hay dng.
\stepcounter{counter} Gi tr ca b m counter c tng
ln bi chng ta. Thm na, tt c cc
b m con, b m nhn counter lm
supercounter u tr v gi tr 0.
\refstepcounter{counter} Xem trong K&D.
Bng 6.2: Lnh lm thay i gi tr ca mt b m do ngi dng hay
L
A
T
E
X nh ngha.
Nu mun bit gi tr ca mt b m dng, ta c th dng lnh
\value{counter}. V d, bn c th nh s mc ny bng vi s trang
cha n bng cch dng lnh
72 Ti u cho ngi s dng
\setcounter{section}{\value{page}}
mc d ti ngh vic lm ny khng c ch li g nhng cng nu ra nh l
mt v d c bit.
Cui cng, bn c th in ra gi tr ca b m counter bng mt trong
cc lnh sau:
\arabic{counter} s thng thng;
\Roman{counter} s La M in hoa;
\roman{counter} s La M in thng;
\alph{counter} k t in thng;
\Alph{counter} k t in hoa;
\fnsymbol{counter} t 1 n 9 k hiu ch thch.
trong 9 k hiu ch thch theo th t l: , , , , , |, , , v . Bn
hy tm cch in ra cc k t trn.
Vi mi b m c nh ngha, ta c thm lnh \thecounter ging
nh lnh \thesection bit. Vi hu ht cc b m, lnh ny n gin
ch l lnh \arabic{counter}, nhng n c th c nh ngha li ty vo
kiu ti liu hay theo thch ca bn. V th, v d, \thesubsection cho
ta mc con hin thi l 6.1.1, \thepage cho ta s trang hin ti l 72, v
\thefootnote cho ta 0.
6.1.2 di
Chng ta bit rt nhiu i lng o chiu di trong L
A
T
E
X, mt v d
l cc thit lp ca trang giy in, gm c
\hoffset \voffset
\oddsidemargin \topmargin
\headheight \headsep
\textheight \textwidth
\marginparsep \marginparwidth
\footskip \marginparpush
\paperwidth \paperheight
Cc di trong L
A
T
E
X c th d dng thay i. V d ta c th gn
mt di bt k cho mt bin di bng lnh
\setlength{\length_cmd}{length_spec}
trong length_spec l mt di bt k nh 20mm hay mt di khc
nh \textwidth, khi , bin di length_cmd c gi tr l di cho
bi length_spec.
Ta cng c th tng thm gi tr ca mt bin di vi lnh:
\addtolength{\length_cmd} {length_spec}
6.1 Ti u vic s dng L
A
T
E
X 73
m n s thm vo gi tr ca length_cmd di length_spec. Ch rng
length_spec c th m.
Thm na, bn c th nhp vo di dng 3\baselineskip cho gi
tr ca length_spec vi ngha n gin l di length_spec l gi tr ca
\baselineskip nhn 3.
Cui cng, vi gi calc, ta c th dng cc php ton n gin trong vic
xc nh cc gi tr di ging nh hiu sau: \headsep-\topskip.
Bn c th dng lnh \settowidth{\length_cmd}{text} xc lp
di ca length_cmd cho chiu rng t nhin ca text.
Cui cng, bn cng c th nh ngha mt di mi bng lnh
\newlength{\new_length_cmd}
di mi ny c gn gi tr l 0 nhng ta c th dng cc lnh ni trn
thay i n khi cn dng.
6.1.3 nh ngha lnh mi
Chng ta c th nh ngha lnh mi bng lnh \newcommand v nh ngha
li lnh c bng lnh \renewcommand. Bn hy xem cc v d trong cc
mc sau.
Lnh khng c tham s
Loi ny c li khi trong ti liu bn phi thng nhp mt on ngn, thut
ng, hay mt t c nh dng phc tp. V d, bn phi thng xuyn nhp
vo cng thc tch phn sau:
_
b
a
f(x, t) dx.
Tht l di dng v mt mi khi phi nhp vo tch phn trn rt nhiu
ln. Do , ta c th to ra lnh mi t u ti liu c tn l intf bng
cch sau:
\newcommand{\intf}{\ensuremath{\int_a^b f(x,t)\,dx}}
v sau ta ch cn nhp vo \intf s thu c tch phn
_
b
a
f(x, t) dx.
Bn bit rng L
A
T
E
X kt thc mt lnh khi gp k t u tin khng
phi l ch ci v b qua mi khong trng ngay pha sau tn lnh, do
, nu ta nhp vo tch phn \intf bng, v ta s c tch phn
_
b
a
f(x, t) dxbng. Lnh \intf kt thc bi khong trng trc ch bng
v khong trng b b qua. khc phc n, ta phi nhp vo tch
phn \intf{} bng hoc tch phn \intf\ bng s c tch phn
_
b
a
f(x, t) dx bng. Vy lnh \ensuremath c tc dng g? N cho php
L
A
T
E
X t tham s ca lnh \ensuremath trong ch ton khi cn v
khng nu khng cn. Do c hai lnh $\intf$ v \intf u lm vic
tt.
74 Ti u cho ngi s dng
Lnh c tham s
Cc lnh c tham s rt c ch khi bn phi thng xuyn lp li mt cu
trc no nhiu ln. V d, bn cn son du tch phn trn nhng c
th thay i hai cn, khi ta c th nh ngha lnh sau:
\newcommand{\intfl}[2]{\ensuremath{\int_{#1}^{#2} f(x,t)\,dx}}
v ta c th t 3 v 3 vo hai cn ca tch phn
\intfl{-3\xi}{3\xi}
ta c:
_
3
3
f(x, t) dx.
Ch rng ti c mt t thay i tn lnh khi nh ngha lnh \intfl.
Ti sao? Nguyn nhn l trn ti nh ngha lnh \intf trong ti liu
v L
A
T
E
X khng chp nhn bn nh ngha li n ln na. Tt nhin, trong
trng hp ny ta c th dng lnh \renewcommand bo L
A
T
E
X b i nh
ngha c v thay bng nh ngha mi
\renewcommand{\intf}[2]{\ensuremath{\int_{#1}^{#2}f(x,t)\,dx}}
Mt s lnh sau c th c ch cho cc bn:
\newcommand{\pfrac}[2]{\genfrac{(}{)}{}{}{#1}{#2}}
\newcommand{\bfrac}[2]{\genfrac{[}{]}{}{}{#1}{#2}}
\newcommand{\vfrac}[2]{\genfrac{|}{|}{}{}{#1}{#2}}
\newcommand{\fig}[1]{Hnh~\ref{#1}}
\newcommand{\figtwo}[2]{Hnh~\ref{#1} v~\ref{#2}}
\newcommand{\tab}[1]{Bng~\ref{#1}}
Ch : mt lnh c th c nhiu nht 9 tham s v ngoi hai lnh trn ta
c th dng lnh \def nh ngha lnh mi.
6.1.4 Vi ch c bn
S dng lnh \input
Khi to ra cc ti liu ln, bn nn chia n ra thnh nhiu phn v lu tr
trn nhng file ring, v d nh layout.tex, chapter1.tex, chapter2.tex . . . v
file chnh ta c th dng lnh \input a ni dung cc chng vo ti
liu:
\documentclass{12pt}{book}
\input{layout}
\begin{document}
6.1 Ti u vic s dng L
A
T
E
X 75
\input{chapter1}
\input{chapter2}
...............
\end{document}
Mc ch ca vic nh ngha lnh mi
y l vi nguyn tc gip to ra cc lnh hay mi trng mi.
Cc lnh hay mi trng gi chung l cu trc c nh ngha u
ti liu th c tc dng trong sut ti liu .
Cc cu trc c nh ngha trong mt mi trng th ch c tc
dng trong mi trng . iu ny cho php chng ta to ra cc lnh
ch c hiu lc mt ni no .
Cc cu trc c nh ngha u ti liu c th c thay i
sau vi lnh \renewcommand hay \renewenvironment. Nu chng
c nh ngha trong mt mi trng th ch c tc dng trong mi
trng . Khi thot khi mi trng, cu trc s dng li nh
ngha u ti liu.
Chng 7
Danh sch ti liu tham kho
7.1 Ti liu tham kho & BIBT
E
X
7.1.1 To danh sch ti liu tham kho n gin
L
A
T
E
X cung cp mt mi trng n gin to ra danh sch ti liu tham
kho, l mi trng thebibliography. Trong mi trng ny, danh sch
ti liu tham kho c sp thnh nhiu mc, mi mc xc nh mt ti
liu. Mi lnh \bibitem (bibliography item) cho php to mt ti liu tham
kho v c L
A
T
E
X t ng nh s. hiu cch s dng mi trng ny
bn hy xem v d sau:
\begin{thebibliography}{xxx}
\bibitem{AndiaEtAl:mrs:2000:1}
P.~C. Andia, F. Costanzo, G.~L. Gray, and T.~J. Yurick (2000)
Calculation of Intrinsic Stresses and Elastic Moduli in
Nonhomogeneous Thin Films, In: L. Kubin, J.~L. Bassani,
K. Cho, H. Gao, and R.~L.~B. Selinger (eds.): \emph{Multiscale
Modeling of Materials--2000}, Vol.~653 of \emph{Materials
Research Society Symposium Proceedings}, Pittsburgh, PA:
Materials Research Society. In print and currently available
on the web via the Materials Research Society web site at
http://www.mrs.org.
\bibitem{GrayCostanzo:ijee:1999:1}
G.~L. Gray and F.~Costanzo (1999), The Interactive Classroom
and its Integration into the Mechanics Curriculum, \emph{
International Journal of Engineering Education}, \textbf{15}
(1), pp.~41--50.
\bibitem{GrayCostanzo:ijee:2000:1}
F.~Costanzo and G.~L.~Gray (2000), On the Implementation of
Interactive Dynamics, \emph{International Journal of
Engineering Education}, \textbf{16} (5), pp.~385--393.
\end{thebibliography}
7.1 Ti liu tham kho & BIBT
E
X 77
V y l vi ch cho bn:
1. xxx c thay bng s ti liu tham kho m bn khai bo, y l
thnh phn bt buc ca mi trng thebibliography.
2. Phn ch theo sau lnh \bibitem bt buc phi c, nhng ch l
nhn cho ti liu v n c dng tham chiu n ti liu
bng lnh \cite nh sau \cite{GrayCostanzo:ijee:1999:1}. Lnh
\cite gn ging vi lnh \ref hay \pageref, . . .
3. Khi dng mi trng thebibliography, phong cch th hin cc ti liu
tham kho l do ta t nh dng, do , khi mun thay i ta phi
sa li th cng hon ton.
4. Trong lp ti liu article, tn ca danh sch ti liu tham kho
l References i vi ting Anh, cn khi kch hot gi vietnam th
i thnh Ti liu, v n c nh dng nh l tn mt mc ln
(section). Trong lp ti liu book v report, tn ca danh sch ti liu
tham kho l Bibliography hay Ti liu tham kho v c nh
dng nh tn mt chng. Ta cng c th thay i tn danh sch ti
liu tham kho bng lnh
\renewcommand{\refname{YourBibName}
i vi lp ti liu article, v lnh
\renewcommand{\bibname}{YourBibName}
cho lp ti liu report hay book.
5. Lnh \bibitem cho php ta t vo mt tham s, l,
\bibitem[label ]{refkey}
khi ti liu ny khng c nh s th t t ng m s s
c thay th bng label m bn cung cp.
7.1.2 To danh sch ti liu tham kho vi BIBT
E
X
BIBT
E
X cung cp mt cch khc to v tham chiu n mt danh sch
ti liu tham kho ln bng cch s dng c s d liu cc ti liu tham
kho. Vi cc file c s d liu to ra trc v cc nh ngha cch
th hin danh sch ti liu tham kho (bibliography style definition) c sn,
L
A
T
E
X c th t ng to ra danh sch ti liu tham kho ph hp vi ti
liu ca bn. iu ny c ch trong v nhng l do sau:
78 Danh sch ti liu tham kho
Bn c th to ra v lu gi mt c s d liu gm tt c cc ti liu
tham kho thng s dng, v vi BIBT
E
X bn c th dng mt s
trong chng nu cn; c bit c ch khi bn dng chung mt danh
sch ti liu tham kho vi nhiu ti liu khc nhau;
BIBT
E
X c th lm vic vi mt hoc nhiu c s d liu v ta c th
nh ngha li cch in ra danh sch ti liu tham kho theo mnh
bng cch nh ngha li cc file .bst.
bo L
A
T
E
X v BIBT
E
X lm vic vi cc file c s d liu mun s
dng, ta ch cn thm vo ti liu lnh:
\bibliography{database1,database2,. . . }
ti ni m ta mun danh sch ti liu tham kho xut hin. Tt nhin, ta
vn c th dng lnh \cite{key} tham kho n mt ti liu no
trong c s d liu. Nhng file c s d liu: database1, database2, . . . l
nhng file text thng thng nhng lu li vi phn m rng l .bib . V d
bn to ra mt file c s d liu l Complex Analysis.bib lu danh sch
ti liu tham kho v mn Gii tch phc th khi mun dng n ta s dng
lnh
\bibliography{Complex Analysis}
Nh gii thiu trn, ta c th chn phong cch th hin danh sch ti liu
tham kho nh lnh:
\bibliographystyle{style}
trong style l cch th hin m bn chn, v theo ti tt nht l bn
nn t lnh ny ngay trc lnh \bibliography. Tham s style l tn ca
file .bst c trong h thng T
E
X ca bn v khng c phn m rng. C rt
nhiu cc file style .bst trong h thng T
E
X ca bn v trn Internet. V d,
kt hp vi lnh trn ta c th to danh sch ti liu tham kho bng hai
lnh sau:
\bibliographystyle{plain} % phi chc rng h thng TeX
% ca bn c file plain.bst
\bibliography{Complex Analysis}
Sau khi bin dch vi BIBT
E
X s c file .bbl v vi MikTeX 2.3 th file
ny s c t ng thm vo ti liu. Nu m file ra xem th ta s thy
trong l mt mi trng thebibliography vi cc ti liu tham kho m
bn c tham chiu n trong phn thn ti liu chnh ca bn.
Ch rng trong c s d liu c rt nhiu ti liu tham kho nhng
ch c nhng ti liu no c tham chiu n phn thn ti liu chnh
th mi c in ra trong danh sch.
7.1 Ti liu tham kho & BIBT
E
X 79
File c s d liu ca BIBT
E
X
File c s d liu ca BIBT
E
X l file text thng thng nhng c phn m
rng l .bib. Mi ti liu tham kho c lu trong file theo mu sau
@article{label,
author = {<tn cc tc gi>},
title = {<tn sch>},
journal = {<phin bn>},
year = {<nm in sch>},
volumn = {<tp ? ca b sch>},
number = {<s pht hnh>},
page = {<cc trang trch dn>}
}
trong label l nhn ca sch v c th dng vi lnh \cite{label}.
Ch rng khng nht thit phi c cc mc trong phn khai bo
trn. Ngoi loi ti liu l article, cn c th c cc loi khc nh: book,
incollection, techreport, misc,. . . ty thuc vo loi ti liu tham kho ca
bn. V d:
@article{MillerGray:jgcd:2001:1,
author = {Andrew J. Miller and Gary L. Gray
and Andre P. Mazzoleni},
title = {Nonlinear Spacecraft Dynamics with a
Flexible Appendage, Damping, and
Moving Internal Submasses},
journal = {Journal of Guidance, Control,
and Dynamics},
year = {2001},
volume = {24},
number = {3},
pages = {605--615}
@article{ AbrahamGao:prl:2000:1,
Author = {Abraham, F. F. and Gao, H. J.},
Title = {How Fast can Cracks Propagate?},
Journal = {Physical Review Letters},
Volume = {84},
Number = {14},
Pages = {3113-3116},
Abstract = {We have performed atomic simulations of
crack propagation along a weak interface
joining two harmonic crystals. The simulations
show that a mode II shear dominated crack
80 Danh sch ti liu tham kho
can accelerate to the Rayleigh wave speed
and then nucleate an intersonic daughter
that travels at the longitudinal wave speed.
This contradicts the general belief that a
crack can travel no faster than the
Rayleigh speed.},
Keywords = {fracture mechanics dynamics},
Year = {2000} }
}
.......................................
C nhiu cch to file .bib cho BIBT
E
X s dng, bn c th xem trong
ph lc B.2 ca Sch [4].
Ti liu tham kho
[1] Nguyn Hu in & Nguyn Minh Tun. L
A
T
E
X, Tra cu v Son tho.
2001.
[2] Nguyn Tn Khoa. Mt ti liu ngn gn gii thiu v L
A
T
E
X, Phin bn
ting Vit ca [3]. 2003.
[3] Tobias Oetiker. The Not So Short Introduction to L
A
T
E
X2

. 2003.
[4] Kopka v P. W. Daly. A Guide to L
A
T
E
X: Document Preparation for
Beginners and Advanced Users. 1999.
Ch mc
nh s, 36, 44
ln ca font, 8
B m
b m, 70
enumiii, 70
enumii, 70
enumiv, 70
enumi, 70
equation, 70
figure, 70
footnote, 70
page, 70
section, 70
subsection, 70
subsubsection, 70
table, 70
Command
\,, 31, 32
\:, 32
\;, 32
\=, 15
\>, 15
\Alph, 72
\Bigg, 26
\Big, 26
\DeclareMathOperator, 29
\Huge, 8
\LARGE, 8
\Large, 8
\Roman, 72
\\, 9, 15
\acute, 30
\addtocounter, 71
\addtolength, 72
\afterpage, 67
\allowdisplaybreaks, 49
\alpha, 33
\alph, 72
\arabic, 72
\bar, 30
\baselineskip, 16
\beta, 33
\bibitem, 76, 77
\bibliography, 78
\bibname, 77
\bigg, 26
\big, 26, 28
\boldsymbol, 33
\breve, 30
\cdots, 22
\centering, 9
\centerline, 9
\check, 30
\cite, 77, 78
\cleardoublepage, 67
\clearpage, 67
\colon, 32
\cosh, 29
\cos, 28
\coth, 29
\csch, 29
\ddddot, 30
\dddot, 30
\ddot, 23, 30
\def, 74
\dotsb, 23
\dotsc, 23
\dotsi, 23
\dotsm, 23
\dotso, 23
CH MC 83
\dots, 23
\dot, 23, 30
\emph, 8, 20
\ensuremath, 73
\eqref, 20, 36
\exp, 28
\fcolorbox, 64
\fnsymbol, 72
\footnotesize, 3, 8
\frac, 22
\framebox, 15
\frenchspacing, 4
\genfrac, 34
\grave, 30
\hat, 30
\huge, 8
\idotsint, 24
\iiiint, 24
\iiint, 24
\iint, 24
\includegraphics, 52
\input, 74
\intertext, 44
\int, 23
\item, 13
\kill, 15
\labelitemi, 13
\label, 20, 36, 38, 66
\large, 8
\ldots, 22
\left., 27
\leftroot, 24
\left, 26
\limits, 23
\lim, 28
\ln, 28
\log, 28
\mathbb, 33
\mathbf, 33
\mathcal, 18, 33
\mathfrak, 33
\mathit, 33
\mathrm, 33
\mathscr, 18, 33
\mathsf, 33
\mathtt, 33
\mathversion, 33
\mbox, 25
\medspace, 32
\mid, 31
\mspace, 32
\negmedspace, 32
\negthickspace, 32
\negthinspace, 32
\newcommand, 73
\newcounter, 71
\newlength, 73
\normalcolor, 64
\normalsize, 8
\notag, 36, 38
\numberwithin, 21
\oint, 24
\pagecolor, 63
\pageref, 77
\parbox, 15, 16
\par, 10
\phantom, 42
\pmb, 34
\prime, 22
\qquad, 32
\quad, 32
\refname, 77
\refstepcounter, 71
\ref, 66, 77
\renewcommand, 7375
\renewenvironment, 75
\right., 27
\right, 26
\roman, 72
\rule, 15
\scriptsize, 8
\sech, 29
\setcounter, 70, 71
\setlength, 72
\settowidth, 73
\sinh, 29
\sin, 20, 28
\small, 8
84 CH MC
\sqrt, 24
\stepcounter, 71
\substack, 29
\tag, 21, 36, 38
\tanh, 29
\tan, 28
\textcolor, 64
\textrm, 26
\textsl, 20
\textwidth, 15
\text, 25
\thecounter , 72
\thefootnote, 72
\thepage, 72
\thesubsection, 72
\thickspace, 32
\thinspace, 32
\tilde, 30
\tiny, 8
\uproot, 24
\widehat, 30
\widetilde, 30
Documentclass
article, 2, 21, 70, 77
book, 2, 77
headings, 18
letter, 2
report, 2, 77
Environment
Bmatrix, 48
Vmatrix, 48
alignat, 43
alignedat, 44
aligned, 4446
align, 41, 47
array, 47, 48
bmatrix, 48
cases, 49
case, 47
center, 3, 9
description, 12
displaymath, 19, 23
enumerate, 11
equation*, 21
equation, 20, 21, 36, 44
figure*, 65
figure, 65
flalign, 43
float, 65
gather*, 36
gathered, 44
gather, 35, 36, 40
itemize, 11
landscape, 58
list, 13
math, 19
matrix, 47, 48
minipage, 15, 68
multline*, 38
multline, 37, 38, 46
pmatrix, 48
quotation, 9
quote, 9
split, 46, 47
subequations, 40
tabbing, 14, 15
table*, 65
table, 65
thebibliography, 76
vmatrix, 48
Option
, 66
H, 66
angle, 55
bb, 55
b, 66
cmyk, 63
dvipsnames, 63, 64
dvips, 51
height, 54
h, 66
intlimits, 24
keepaspectratio, 54
landscape, 5
mathscr, 18
monochrome, 62
nodvipsnames, 63
CH MC 85
onecolumn, 5
pdftex, 51
portrait, 5
p, 66
rgb, 63
scale, 52
twocolumn, 5
t, 66
usenames, 63
width, 54
Package
afterpage, 67
amsbsy, 18
amsfonts, 18
amsgen, 18
amsmath, 18, 24, 29, 48
amsopn, 18
amssymb, 18
amstext, 18
calc, 73
color, 62
eucal, 18
exscale, 18
floats, 65
graphicx, 51
here, 66
lscape, 58
vietnam, 7
Thut ng Ting Anh
Computer Modern fonts, 8
Computer Modern, 1
Counters, 70
Declaration, 3
Ellipses, 22
Environment, 3
Equation, 20
Package, 5
air box, 62
bibliography style definition, 77
body, 5
box, 15
character, 4
class, 5
dash, 4
displaymath, 23, 24
emphasisze, 8
foot, 5
head, 5
in-line, 23
itemize, 12
item, 12
landscape, 58
noindent, 10
option, 5
paragraph, 4
prime, 22
rule box, 15
section, 77
sign, 31
subformula, 38
subscript, 22
superscript, 22
thinspace, 31
top margin, 3
word, 4
.bbl, 78
.bib, 7880
.bst, 78
.dvi, 2
.html, 1
.ps, 2
.sty, 5
.tex, 2
.bib, 78
Bng, 16
cu trc, 22
cng thc con, 38
cng thc khng nh s, 21
ch s di, 22
ch s trn, 22
cmex, 18
du ba chm, 22
du cn, 24
du ngoc, 26
du phy, 22
86 CH MC
Euler Script, 18
Font
cm..., 7
lazy..., 7
logo..., 7
vn..., 7
font, 1, 7, 8
font ch, 24
font m rng, 18
gi lnh, 18
hng trng, 19
k t Ton hc p, 18
mi trng, 3
mi trng Ton con, 44
ma trn, 48
nhn mnh, 8
nhn ring, 21
s m, 22
tch phn, 23
ti liu tham kho, 76
thay i font, 8

You might also like