Академический Документы
Профессиональный Документы
Культура Документы
. .
LATEX
e-mail: E.M.Baldin@inp.nsk.su
TEX METAFONT, , .. .
1. LATEX
1.1. . . . . . . . . . .
1.1.1. . .
1.1.2. .
1.1.3. .
1.1.4. LATEX . . . .
1.2. LATEX . . . . . . . . . .
1.3. . . . . .
1.4. LATEX- . . . . . . . . . . .
1.5. . . . . . . . . . . . . .
1.5.1. . . . . . . . . . .
1.5.2. .
1.5.3. LaTeX . . . . . .
1.6. . . . . . . . . . .
1.7. . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1
1
1
2
2
3
5
7
8
10
11
11
12
12
12
2.
2.1. . . . . .
2.2. . . . . . . .
2.2.1. LATEX-
2.2.2. . . . .
2.2.3. . . . . . . . . . .
2.2.4. . . . .
2.3. . . . . . . . . .
2.3.1. . . . . .
2.3.2. . . . . . . .
2.4. . . . . . .
2.4.1. . . . .
2.4.2. . . .
2.4.3. .
2.4.4. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
13
13
15
15
16
17
18
18
18
19
21
21
22
23
23
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
ii
3.
3.1. . . . . . . . . . .
3.2. . . . . .
3.3. . . . . .
3.3.1. . . . . . . . . . .
3.3.2.
3.3.3. . . . . . . . . . . .
3.3.4. . . . . . . . . . . .
3.3.5. .
3.3.6. . . . . . . . . . .
3.3.7. . . . . . . . . .
3.3.8.
3.4. . . . . . . . . .
3.5. . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
27
28
29
30
30
31
32
32
33
33
34
35
36
37
4.
4.1. Encupsulated PostScript . .
4.2. EPS
4.3. graphicx . . . . . . . . . . .
4.4. . . . .
4.5. . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
39
39
41
42
44
49
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
5.
5.1. . . . . . . . . . . . . .
5.1.1. keystroke . . . . . . . . . . .
5.1.2. LCD- . . . . . . . . .
5.1.3. . . . . . . . .
5.2. . . . . . . . .
5.2.1. verbatim . . . . . . . . . . . .
5.2.2. listings . . . . . . . . . . . . .
5.3. . . . . .
5.3.1. algorithms . . . . . . . . . . .
5.3.2. algorithm . . . . . . .
5.3.3. clrscode . . . . . . . . . . . .
5.3.4. pseudocode . . . . . . . . . .
5.4. . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
51
51
51
52
53
54
55
55
58
58
59
60
60
60
6.
6.1.
6.2. . . . . . . . . . . . . . . . . . . .
6.3. . . . . . . . . . . . . . . . . . . . .
6.3.1. . . . . . . . . . . . . . .
6.3.2. . . . . . . . . . . . . . . .
6.4. . . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
63
63
66
69
69
71
72
iii
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
6.5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7. LATEX
7.1. ? . . . . . . . . . . . . .
7.2. . . . . . . . . . . . . . . . . . . . .
7.3. . . . . . . . . . . . . . . . . . . .
7.3.1. . . . . .
7.3.2. . . . . . . . . .
7.3.3. . . . . . . . . . . . . . . . .
7.3.4. . . . . . . . . . . . . . . .
7.3.5. . . . . . . . . . . . . . . .
7.3.6. . . . . . . . . . . . . .
7.3.7. . . . . . . . . . . .
7.3.8. . . . . . . . . . . . . .
7.3.9.
7.3.10. . . . . . . . . . . . . . . .
8. I
8.1. slides . . . . . . . . . . . . . . .
8.2. PDF . . . . . . . . .
8.2.1. . . .
8.2.2. . . . . .
8.2.3. . . . .
8.3. beamer . . . . . . . . . . . . . .
8.4.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
9. -
9.1. . . . . . . . . .
9.2. . . . . . . . . . . .
9.2.1. . . . . . . . . .
9.2.2. . . . . .
9.3. . . . . . . . . . . . . . . . .
9.4. . . . . . . . . . . . . . . .
9.4.1. BibTEX . . . . . . . . . . . . . . .
9.5. . . . . . . . . . .
10.
10.1. . . . . . . . . . . .
10.2. tabbing . . . . . . . . . . . . . . . .
10.3. tabular array . . . . . . . . . . . .
10.3.1.
10.3.2. . . . . . . . . . . . .
10.3.3. . . . . .
10.3.4. . . . . . .
iv
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
75
.
.
.
.
.
.
.
.
.
.
.
.
.
76
76
77
78
78
79
80
80
81
81
82
83
83
84
.
.
.
.
.
.
.
86
86
87
87
88
89
89
96
.
.
.
.
.
.
.
.
97
98
100
100
101
102
102
103
107
.
.
.
.
.
.
.
111
111
112
113
115
115
117
117
10.3.5. tabular . .
10.4.
10.5. . . . . . . . . . . .
10.6. ? . .
10.7.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
11.
11.1. . . . . . . . . . . . .
11.2.
11.3. . . . . . . .
11.3.1. ins- .
11.3.2. dtx- . . .
11.3.3. . . . . . .
11.4. . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
117
118
119
120
120
.
.
.
.
.
.
.
121
121
123
126
126
127
129
130
LATEX
LATEX TEX.
.
.
.
, . // . LATEX
,
, , ,
.
- , ; ,
. .
1.1.
, ,
. , . ,
- .
1.1.1.
, .
, . , ,
. . .
1 LATEX
1.1.2.
(Donald Ervin Knuth) , . ,
1 . 1975
, .
: , , . . , ,
. , , , , .
,
. ,
, , .
. ,
.
. . . .
METAFONT
( ) TEX ( )
( 2.7 METAFONT 3.1 TEX). . METAFONT TEX
. METAFONT 2.71828,
TEX 3.141592. , e ,
.
TEX, , .
TEX TeX: The Program (ISBN: 0201134373),
. TEX
,
GPL.
- ! . . . .
. , .
.
1.1.3.
TEX . TEX
(box) (glue). , 1
http://www-cs-faculty.stanford.edu/~knuth/ .
1 LATEX
-, , , -,
- . , / .
, ,
, .
, ,
. , .
.
, TEX ,
-TEX TEX . TEX . ,
, TEX .
, 80- LATEX, TEX. LATEX
TEX, .
, . , ,
. LATEX, TEX
, .
1.1.4. LATEX
LATEX , , Linux, . LATEX /, , , .
LATEX , CTAN The Comprehensive TeX Archive Network (http://www.ctan.org).
CTAN , - TEX. CTAN
. , perl, CPAN The Comprehensive Perl Archive Network.
GNU/Linux teTeX2 .
, , , ,
teTeX. (Thomas Esser). 1994 . (2006)
http://www.tug.org/teTeX/
1 LATEX
. 1.1. .
.
1 LATEX
TEX- (TUG http://www.tug.org/ TEXUser Groups) TEX Live3 .
TEX Live ,
CD. teTeX. TEX Live
1996 . 2003 TEX Live DVD. .
. TEX Live - . TEX .
TEX Live . ,
(http://www.gnu.org/philosophy/free-sw.html Free Software Foundations definition) Debian (http://www.debian.org/social_contract Debian
Free Software Guidelines). FSF.
DVD, Linux Format ( 9 (79)
2006), TEX Live.
.
1.2. LATEX
, LATEX
. , .
.
. GNU/Linux tetex. TEX Live.
, !!!. 4 helloworld.tex :
%h e l l o w o r l d . t e x
%
\documentclass{ a r t i c l e }
%
%
\ usepa cka g e [ warn ] { mathtext }
% TEX ( )
\ usepa cka g e [T2A] { f o n t e n c }
% .
% cp 1251 k o i8r .
\ usepa cka g e [ u t f 8 ] { i n p u t e n c }
3
4
http://www.tug.org/texlive/
, emacs ,.
1 LATEX
% .
\ usepa cka g e [ e n g l i s h , r u s s i a n ] { b a b e l }
% .
\ usepa cka g e { i n d e n t f i r s t }
% .
\ b e g i n { document}
% .
\LARGE , ! ! !
% .
\end { document}
, % . ,
\begin{document}, .
.
. tex-. :
> l a t ex helloworld . tex
This i s pdfeTeXk , V e r s i o n 3 .1 4 1 5 9 2 1 .3 0 .3 2 .2 (Web2C 7 . 5 . 5 )
%&l i n e p a r s i n g e n a b l e d .
e n t e r i n g ext ended mode
( . / helloworld . tex
LaTeX2e <2003/12/01>
...
( . / h e l l o w o r l d . aux ) [ 1 ] ( . / h e l l o w o r l d . aux ) )
Output w r i t t e n on h e l l o w o r l d . d v i ( 1 page , 240 b y t e s ) .
T r a n s c r i p t w r i t t e n on h e l l o w o r l d . l o g .
>
LATEX helloworld.dvi. :
xdvi:
> xdvi h e l l o w o r l d . d v i
dvi PostScript5 gv,
PostScript- ( , ):
> dvips helloworld
> gv h e l l o w o r l d . ps
> l p r h e l l o w o r l d . ps
5
PostScript , Adobe
Systems. PostScript, (ghostscript), .
1 LATEX
PDF6 , , , Acrobat Reader:
> dvips helloworld
> ps2 pdf h e l l o w o r l d . ps h e l l o w o r l d . pdf
> a c r o r e a d h e l l o w o r l d . pdf
:
, !!!
. 1.2. , LATEX.
1.3.
, ,
EX .
latex ,
:
LAT
> latex
This i s pdfeTeXk , V e r s i o n 3 .1 4 1 5 9 2 1 .3 0 .3 2 .2 (Web2C 7 . 5 . 5 )
%&l i n e p a r s i n g e n a b l e d .
LATEX , .
C. latex,
, LATEX ,
:
! Undefined c o n t r o l s e q u e n c e .
l . 11 \ e r r o r i n b o d y
? h
The c o n t r o l s e q u e n c e a t t he end of t he top l i n e
of your e r r o r message was never \ def ed . I f you have
m i s s p e l l e d i t ( e . g . , \ hobx ) , type I and t he c o r r e c t
s p e l l i n g ( e . g . , I \hbox ) . O t her wise j u s t c o n t i n u e ,
and I l l f o r g e t about whatever was u n d e f i n e d .
? x
6
1 LATEX
(?) h, ,
, x, .
.
, ?.
: .
.
LATEX , .
, LATEX, .
1.4. LATEX-
LATEX . ,
.
LATEX-.
tex.
,
, dvi. dvi device independent ( ) , , .
dvi- dvi-.
xdvi dvi- .
. ,
.
dvi- dvips. dvips PostScript,
( PostScript ), ghostscript. dvi-, , dvi2tty
dvi , dvilj dvi PCL
HP, dvipdf dvi pdf. dvi
/ dvi .
Ghostscript (gs), , PostScript (.ps) . PDF
PostScript ps2pdf.
LATEX eps-. EPS Encapsulated PostScript
,
PostScript . , eps-
(BoundingBox). eps-, , !!!:
%! PSAdobe2 . 0 EPSF2 . 0
1 LATEX
.eps
.bbl
.ind
.aux
.idx
.toc
.lof
.lot
.tex
(.fmt)
(.cls, .sty)
LATEX
(.tfm)
(.fd)
log- (.log)
.dvi
.pk(.mf), .pfb
dvips
.ps
ps2pdf
. 1.3. LATEX-.
%%C r e a t o r : d v i p s ( k ) 5 . 95b Co pyr ig ht 2005 R a d i c a l Eye S o f t w a r e
%%T i t l e : h e l l o w o r l d . d v i
%%BoundingBox : 148 651 288 668
%%DocumentFonts : SFRM1728
%%EndComments
, :
1)
fmt . , , LATEX
. . TEX
: texconfig init.
cls,sty . (.cls)
\documentclass. (.sty), \usepackage.
tfm . .
fd
, LATEX.
1 LATEX
pfb Type1-.
pk (mf) pk- mf- (METAFONT) .
, - .
2) , LATEX-. latex. ,
,
.
log . ,
. .
aux .
toc (table of contents)
lof (list of gures)
lot (list of tables)
bbl BibTEX.
TEX,
.
ind , MakeIndex. .
idx-.
.
LATEX-. latex
pdatex, pdf, png pdf.
, .
1.5.
LATEX .
. , TEX,
. , LATEX
.
LATEX . ,
,
, , . LATEX
, .
10
1 LATEX
. -, LATEX
. CTAN
(http://www.ctan.org) TUG (http://www.tug.org).
1.5.1.
. . TEX [1]. TEX. LATEX
, , . TEX , , . . .
. . METAFONT [2]. , TEX, METAFONT.
MetaPost, .
. . [3]. . , TEX METAFONT. ,
TEX ,
. .
1.5.2.
. LATEX [4]. .
, . .
. , . . LATEX
LATEX 2 [5].
LATEX. . , .
LATEX.
. , . . . LATEX
. TEX
PostScript [6]. ,
. . : ,
PostScript MetaPost. , .
. , . . LATEX Web-
[7]. LATEX. IMHO
. , , PDF
. XML.
LATEX 2 LATEX 2 94 1999 .
: http://xtalk.msk.su/tex/. . .
11
1 LATEX
: .
.
1.5.3. LaTeX
. . . LATEX [8] . , , , .
. . . LATEX. [9]. . . ,
, .
, : http://www.mccme.ru/free-books/.
. . , . . . LATEX -. [10].
. , , .
: http://www.tutor.nsu.ru/books/tex/.
. . LATEX [11]. .
. : .
, ,
. : http://www-sbras.nsc.ru/win/docs/TeX/LaTex2e/docs_koi.html.
1.6.
LATEX CyrTeX-ru.
: https://info.vsu.ru/Lists/CyrTeX-ru/.
CyrTeX-ru-feed@vsu.ru Subscribe me! ( ). .
, , , ,
( , ).
1.7.
.
, . , .
, TEX.
, LATEX.
, .
12
GNU/Linux
.
? LATEX ,!
2.1.
,
.
LATEX .
,
, .
, , , -
.
.
.
LATEX .
: \, $, %, _, {, }, &, #, .
.
.
:
: <<\textbackslash >>, <<\$>>, <<\%>>, <<\_>>1 ,
<<\{>>, <<\}>>, <<\&>>, <<\#>>, <<\^{}>> <<\~{}>>.
.
1
underscore
_ .
13
2
: { }.
.
,
(, ) .
LATEX \ (backslash
) ,
2 . ,
. . ,
: \command{}. , LATEX ( \LaTeX)
\LaTeX{}.
LATEX :
\command [ param 1 ] [ param 2 ] { param3}{ param4}
(param1 param2),
(param3 param4).
LATEX . , \textbf{} .
LATEX .
, , .
%
\ bfseries
%
\ thispagestyle {empty}
, \begin{} \end{} .
\ begin{ c e n t e r }
\end{ c e n t e r }
, .
2
. , ,
, .
14
2.2.
. , .
2.2.1. LATEX-
tex- : , , , :
%
% , a r t i c l e book
\ d o c u m e n t c l a s s {. . . }
%
\usepackage [ k o i 8r ] { i n p u t e n c }
\usepackage [ e n g l i s h , r u s s i a n ] { b a b e l }
\usepackage{ i n d e n t f i r s t }
%
\usepackage{. . . }
...
%
\newcommand{\mycommand}{. . . }
\renewcommand{\ oldcommand}{. . . }
...
%
...
%
\ b e g i n { document}
%
\end { document}
\documentclass . .
,
inputenc , , koi8-r.
babel, ,
. , (\No),
(\S) . , , indentrst.
, babel
.
15
2
, LATEX, .
TEX Live GNU/Linux, .
texcong3 . HYPHENATION, latex.
4 language.dat. :
e n g l i s h hyphen . t e x
r u s s i a n ruhyphen . t e x
.
babel. , ,
.
, - :
r u s e n g ruenhyph . t e x
=r u s s i a n
=e n g l i s h
, LATEX
. .
2.2.2.
\documentclass[]{} .
,
. article.
.
report, book.
. .
. ,
revtex4. eskd ( ),
3
texconfig dialog- .
. texconfig
.
, , : texcong init .
4
$EDITOR.
, vi. vi
:q .
16
2
CTAN TEX Live. , LATEX-,
KOMA-script (scrartcl, scrreprt scrbook article, report
book, ).
. , , .
, (
) , .
, , , :
\ d o c u m e n t c l a s s [ a4 paper , 1 2 pt , o n e s i d e ] { s c r b o o k }
a4paper ( , , a5paper),
12pt ( 10pt
11pt), oneside (
).
NC C . . . ncc
. CTAN
TEX Live.
2.2.3.
(.sty) , - .
\usepackage[]{}.
,
. LATEX
. TEX Live
.sty-,
, .
LATEX . lh,
Computer Modern. ,
. 2001
METAFONT- Type1, ,
pdf- .
LATEX inputenc.
17
2
. : koi8-r, koi8-u, cp866, cp1251 8859-5. , . , - , ,
LATEX T2A 5 . .
:
> locate t 2 f i l t e r . c
{TEXMF}/ texmfd i s t / doc / g e n e r i c / t 2 / e t c / t 2 f i l t e r . c
> cd {TEXMF}/ texmfd i s t / doc / g e n e r i c / t 2 / e t c /
> g cc Wall O2 s o ~/ bin / t 2 f i l t e r t 2 f i l t e r . c
> l a t e x { } . t e x | t 2 f i l t e r
2.2.4.
, document, .
- , ,
, \end{document}.
2.3.
: .
4000 .
, !
.
.
2.3.1.
// , . .
% .
,
.
comment verbatim.
cp1251,
.
18
2
LATEX
. . .
:
%
. .
:
.
2.3.2.
. .
, , ,.
, , , , , , , .
, LATEX , .
LATEX
.
:
, . . ,
\, ,
\ .
,
, , :
. \ ,.~ " <<>> \@. :
. \ , . , .~ , .~ 1 ~ . \ , . \ ~ . \ , .
LATEX , ,
.
. , \ .
19
2
,
( ).
\@.
, , TEXe - (hyphen), (en-dash), (em-dash)
.
, , ,
-, .
babel russian
.
( , ) ,
(1015, 2001 2006) ,
( \LaTeX{} " ) ,
( $ ab=c $ ) .
\ t e x t p k g { b a b e l }
. /
"~, , "~ ,
"~ .
", . \ , .
.
":
" .
, ,
.
LATEX .
, , .
,
.
\,
: \\ , \TeX\\ .
\ t e x t p k g { b a b e l }
"= , ,
"= .
.
20
2
\hyphenation{ =}. ,
. ,
, .
\hyphenation , .
\mbox{ }.
\ldots. , .
1.52
. ,
.
\ textbf { } " \ textbf { }
, "
\ textbf { } .
\emph{ : } \ , \ .
. babel .
, .
: << , , Linux Format > >.
2.4.
LATEX . , 20 ,
, ,
.
2.4.1.
. titlepage.
21
2
, , . , ,
. , :
\ t i t l e {\LaTeX, Unix }
\author{ . \ ,.~ \thanks{ ema il : E .M. Baldin@inp . nsk . su }}
\date {2006}
\ maketitle
\maketitle , (\title), (\author)
(\date). (\thanks) . ,
(\and)
.
( article) , abstract.
2.4.2.
\tableofcontents.
.
\ s u b s e c t i o n { }
\ label { s e c : ba se : s e c }
. . .
.
\part{} \chapter{}.
, , ,
article report,
book.
:
\ s e c t i o n { }
\ label { ex : s e c t i o n }
\ s u b s e c t i o n { }
\ label { ex : s u b s e c t i o n }
\ s u b s u b s e c t i o n [ ] { }
\ label { ex : s u b s u b s e c t i o n }
\paragraph {}
22
2
\ label { ex : paragraph }
\subparagraph {}
\ label { ex : subparagraph }
,
.
. , -
,
*, , \section{}.
2.4.3.
LATEX TEX TEX .
\label{}.
:
~\ r e f { ex : s e c t i o n } ~\pageref { ex : s e c t i o n } . . .
,
LATEX .
, ,
. \label
.
2.4.4.
.
.
,
.
\input{ } tex-
. LATEX ,
, \endinput.
\input.
.
.tex.
:
\input { preheader }
\includeonly {
% intro ,
base ,
% presentation
23
2
}
\ b e g i n { document}
%
\include { intro }
%
\ i n c l u d e { ba se }
%
\include { presentation}
\end { document}
\include tex- (
.tex ). \includeonly .
. , .
24
:
.
. , . ,
,
. .
.
!
.
ispell,
(Neal Dalton) 1992 .
4000 ,
,
, , ,
, ax- .
.
, . GNU/Linux
ispell. .
,
. ,
. : / . , :
.
, . :
http://semiconductors.phys.msu.su/~swan/orthography.html
25
: TEX-
. . TEX .
. ,
. TEX .
, .
. TEX- TEX-.
TEX
LATEX
LATEX 2
AMS-TEX
METAFONT
BibTEX
NC C
\TeX
\LaTeX \LATEX
\LaTeXe
\AMSTeX \AmSTeX
\METAFONT \MF
\BIBTeX \BibTeX
\NCC
2.1. TEX-
\NCC ncclatex.
texnames.
26
. . .
. . . .
TEX , LATEX
. TEX , LATEX ,
.
.
, . . .
.
.
LATEX , TEX-.
- (http://ru.wikipedia.org :).
TEX (The American Mathematical Society AMS),
TEX AMS-TEX. 1987 AMS-TEX LATEX amsmath.
amsmath LATEX , .
amsmath:
\ usepa cka g e {amsmath}
, .
27
3
, , , .
. - LATEX
. ,
.
3.1.
.
. LATEX ,
. , , E = mc2 .
.
1 $$ - \(\).
,
, . ($) ,
- , $ 2 .
equation.
, . :
\begin{equation}
\label{eq:math:ex1}
\int\limits_{-\infty}^{\infty}
e^{-x^2/2}dx=\sqrt{2\pi}
\end{equation}
ex
2 /2
dx =
(3.1)
,
\eqref{eq:math:1}3 .
, equation*4 .
1
: \begin{math} \end{math}.
.
2
LATEX, /.
. , \protect.
, .
3
\label.
4
equation . . * .
28
3
. LATEX . :
\displaystyle , ,
\textstyle ,
\scriptstyle ,
\scriptscriptstyle .
, . :
\begin{equation*}
\frac{1}{1+
\frac{1}{1+
\frac{1}{1+
\frac{1}{2}}}}
\end{equation*}
1
1+
\begin{equation*}
\frac{1}{\displaystyle 1+
\frac{1}{\displaystyle 1+
\frac{1}{\displaystyle 1+
\frac{\displaystyle 1}
{\displaystyle 2}}}}
\end{equation*}
1
1+
1
1
1+ 2
1
1
1+
1+
1
1+
1
2
,
LATEX, , .
3.2.
, , . , .
mathtext ( t2),
. warn
. mathtext babel / fontenc.
\ usepa cka g e [ warn ] { mathtext }
29
3
\[
v_{}=\frac{S_{}-S_{}}
{\delta t}
\]
v =
S S
t
\[\]
equation*.
.
:
\ DelareSmbolFont{T2 A l e t t e r s }{T2A}{cmr }{m}{ i t }
amstext ( amsmath)
\text, .
:
\[v_{}=
\frac{\text{ }\text{ }}
{\text{ }}\]
v =
, \text . \text .
3.3.
, . ,
, -
. .
3.3.1.
, .
, , ,
:
\[A_{\text{ }}\quad
B^{\text{ }}\quad
C_n^k\]
30
Cnk
3
, ,
. :
\(a^2+b^2=c^2\)
a2 + b2 = c2
c
b
3.3.2.
. . amsfonts :
\begin{itemize}
\item \(ABCD\) "--- ,
% \item \(\mathbf{ABCD}\) "--- ,
\item \(\mathbb{ABCD}\) "--- ,
% \item \(\mathcal{ABCD}\) "--%
.
\end{itemize}
ABCD ,
ABCD ,
.
(, \mathfrak).
. , ,
. LATEX
\alpha
\zeta
\lambda
\pi
\phi
\Delta
\Sigma
\beta
\gamma
\eta
\theta
\mu
\nu
\rho
\sigma
\chi
\psi
\Theta
\Lambda
\Upsilon \Phi
\delta
\iota
\xi
\tau
\omega
\Xi
\Psi
\epsilon
\kappa
o
\upsilon
\Gamma
\Pi
\Omega
.
amssymb:
% \kappa, \epsilon \phi
31
3
\renewcommand {\kappa}{\ varkappa }
\renewcommand {\ epsilon }{\ varepsilon }
\renewcommand {\ phi }{\ varphi }
LATEX . TEX Live
LATEX (The Comprehensive LaTeX Symbols
List symbols-a4.pdf) 3300 , LATEX. ,
, . , .
amssymb .
a
\hat{a}
\pm
\lor
\le
\equiv
\parallel
\infty
a
\bar{a} ~a \vec{a} a \dot{a}
\mp
\times
\cdot
\land
\neg
\forall
> \ge
\ ll
\gg
\sim
\simeq \approx
\perp
\angle
\triangle
P
Q
\ell
\sum
\prod
6=
\tilde{a}
\div
\exists
\neq
\propto
\ sphiricalangle
\varnothing
:
% \le \ge
\renewcommand {\ l e }{\ l e q s l a n t }
\renewcommand {\ge }{\ g e q s l a n t }
3.3.3.
\frac5 :
\[
=\frac{}{}
\]
LATEX
.
3.3.4.
5
fraction .
32
\ sqrt [ ] { }
. .
\[
\overline{
\underline{\Large
\sqrt[3]{a}+\sqrt[2]{b}+\sqrt[99]{g}
}
}
\]
2
a + b + 99 g
, . ,
, ,
, .
\mathstrut6 .
:
\[\Large
\sqrt[3]{\mathstrut a}+
\sqrt[2]{\mathstrut b}+
\sqrt[99]{\mathstrut g}
\]
p
3
p
p
2
99
a+ b+
g
3.3.5.
ax2 + bx + c = 0:
\[
x_{1,2}=\frac{-b\pm\sqrt{b^2-4ac}}{2a}
\]
x1,2 =
b2 4ac
2a
,.
3.3.6.
. , 6
strut .
33
3
, . \left \right
:
\[\left(
\left[
\left\langle
\left\{
\left\uparrow
\left\lceil
\left|
\left\lfloor
\text{-}^{10}
\right\rfloor^9
\right|^8
\right\rceil^7
\right\downarrow^6
\right\}^5
\right\rangle^4
\right]^3
\right)^2\]
2
6 5 + 4 3
*x
8 7
10 9
, :
l ( \left),
r ( \right) m.
3.3.7.
,
. , . babel
. : cos, arccos,
sin, arcsin, tg, arctg, ctg, arcctg, sh, ch, th, cth, exp, ln, log, lim, min max.
:
34
\begin{equation*}
\begin{split}
&\log_2 10=\ln10/\ln2\simeq3.32 \\
&\lim_{x\to0}\frac{\sin x}{x}=1\\
&(a+b)^n=\sum_{k=1}^n C^k_n a^kb^{n-k}
\end{split}
\end{equation*}
log () lim
().
\DeclareMathOperator:
%
\ DeclareMathOperator {\ logl i k e }{ lo g l i k e }
\ DeclareMathOperator {\ liml i k e }{ liml i k e }
( ) ( ).
3.3.8.
-
. ,
, . ,
, .
.
, .
\frac{d F(x)}{dx}.
d \partial:
\[ f\quad f\quad
\dot{f}\quad \ddot{f} \quad
\frac{d f}{d x}\quad
\frac{\partial f}{\partial x} \]
f f
df
dx
f
x
:
\[
\frac{d}{dx}\int F(x) dx=F(x)
\]
d
dx
F (x)dx = F (x)
, ,
,
35
3
. , , wasysym
integrals. .
,
.
, . .
\[
\int_0^{\infty}\quad
\int\limits_0^{\infty}\quad
\sum_{i=1}^n\quad
\sum\nolimits_{i=1}^n\quad
\]
Z
0
n
X
i=1
Xn
i=1
. \limits. \nolimits .
3.4.
,
,
. :
a + b =
= c
.
7 , :
%
\newcommand{\hm} [1 ]{ #1 \ nobreak\ discretionary {}%
{\hbox{$\mathsurround=0pt #1$}}{}}
\hm, , , : \(a + b \hm{=} c\).
.
.
(=, >, <, 6, >, 6=, ); ,
; . - ,
.
do7.ru.tex.
36
3.5.
.
. , .
37
:
WikiTeX. , , http://wikisophia.org/.
LATEX, WWW
, , ,
, .
TEX , , ,
. . .
TEX .
. 3.1. WikiTeX .
, LATEX.
38
Q. LATEX
?
A. ,
.
, TEX .
, . . . .
TEX , - .
. .
LATEX
Encapsulated PostScript.
39
4
LATEX , :
%! PSAdobe2 . 0 EPSF2 . 0
%%C r e a t o r : d v i p s ( k ) 5 . 95b Co pyr ig ht 2005 R a d i c a l Eye S o f t w a r e
%%T i t l e : p i c t u r e . d v i
%%BoundingBox : 127 464 430 667
%%DocumentFonts : SFRM1200 SFRM0800
%%EndComments
PostScript1 . BoundingBox . , .
(bp=1/72 in), 0.351 . .
PostScript- EPS , , BoundingBox. ps2eps .
,
Ghostscript PostScript:
> g s q dSAFER dNOPAUSE dBATCH sDEVICE=bbox
bbox.
-q, -dNOPAUSE -dBATCH
. -dSAFER Ghostscript
2 .
EPS- . , PostScript, - . PostScript .
, / epstool .
EPS pstoedit
, , . , - PostScript- 1
.
PostScript- . .
2
, ,
read-only. , Ghostscript .
40
4
. ,
.
4.2. EPS
EPS.
. -, , . ,
convert ImageMagick, .
: latexdvips[ps2pdf] pdatex,
PNG3 JPEG4 PDF5
. , . ,
. pdatex .
JPEG jpeg2ps, CTAN6 - nonfree/support/jpeg2ps.
JPEG-, eps-. JPEG PostSript-7 . , , .
sam2p bmeps. CTAN graphics/sam2p
support/bmeps, . sam2p , ,
bmeps PNG JPEG.
eps- .
.
bmeps , 8
eps-, sam2p .
CTAN graphics/a2ping perl- a2ping.pl.
3
Portable Network Graphics .
4
Joint Picture Experts Group .
5
Portable Document Format , Adobe System.
6
The Comprehensive TeX Archive Network. http://www.ctan.org.
7
PostScript Level 2
8
, EPS.
41
4
sam2p Ghostscript, -
PostScript .
. LATEX, GNU/Linux-.
4.3. graphicx
graphicx9 , \includegraphics:
% \TeX{} \METAFONT{},
% , .\,.~.
LATEX
% \texttt{ps2pdf}
% Rolf Niepraschk
\includegraphics[width=\textwidth]{title.1.eps}
. =,
. keyval. :
bb BoundingBox , eps.
, : [bb=127 464 430 667]. bb,
: [bbllx=127,bblly=464,bbrx=430,bbry=667],
.
BoundingBox viewport BoundingBox,
trim
, , .
clip BoundingBox.
,
.
false. clip
true. .
9
graphicx graphics .
, .
42
4
angle , .
origin . origin : l,
b, r t , , .
. , : lt, rt, rb lb. c .
width .
height .
scale .
keepaspectratio .
.
\includegraphics[trim=110 0 105 100,clip,
width=0.49\textwidth]{title.1.eps}
\hspace{0.5cm}
\includegraphics[viewport=0 0 100 200,clip,
width=0.49\textwidth,
height=3cm,keepaspectratio,
angle=180,origin=c]{title.1.eps}
\includegraphics . .
graphicx
. , png-:
\ D e c l a r e G r a p h i c s R u l e { . png }{ eps } { . bb } { bmeps p3 c #1}
,
. .png. . eps dvips
. BoundingBox. :
%%BoundingBox : 0 0 848 979
png- , ,
:
bmeps b . png . bb
43
4
, . .
#1 . dvi-.
, . dvi-
xdvi -allowshell. ,
. PostScript dvips -R0. -
eps-.
eps :
\ D e c l a r e G r a p h i c s R u l e {}{ eps }{}{}
MetaPost, . , ,
BoundingBox , .
4.4.
. \includegraphics
, .
LATEX : (oat10 ).
, .
gure:
\ begin{ f i g u r e } [ ht ]
\ centering%
\ i n c l u d e g r a p h i c s {}
\ caption {}\ label { f i g : metka }
\end{ f i g u r e }
gure :
h ,
t ,
10
, ,
float. floatraw,
.
44
4
b ,
p , .
. h, LATEX
. t b,
.
LATEX
, .
, , , ,
: [b!].
, . , .
clearpage LATEX ,
. -
- . \clearpage.
.
, . afterpage,
:
\ a f t e r p a g e {\ clearpage }
\afterpage
.
suppressoats \suppressoats .
t b .
placeins placeins . \FloatBarrier.
,
. .
(section) [section] :
45
\usepackage [ s e c t i o n ] { p l a c e i n s }
endoat
. endoat
. .
oat
. ,
\parbox minipage:
\parbox [ ] { }{}
\ begin{ minipage } [ ] { }
\end{ minipage }
.
( [c] ), ([t])
([b]).
:
\ begin{ f i g u r e } [ ht ] \ centering
\parbox [ b ] { 0 . 4 9 \ textwidth }{\ centering
\ i n c l u d e g r a p h i c s {-1}
\ caption {-1}\ label { f i g : metka 1}}
\ h f i l \ h f i l%
\ begin{ minipage } [ b ] { 0 . 4 9 \ textwidth}
\ centering
\ i n c l u d e g r a p h i c s {-2}
\ caption {-2}\ label { f i g : metka 2}
\end{ minipage }
\end{ f i g u r e }
\parbox minipage
.
.
:
subg .
.
46
4
miniplot subg, .
gsize
.
dpoat ,
. .
, . . L TEX
. , . .
.
: oatt wrapg.
oatt
. 4.1. .
,
. . oatinggure wrapgure, .
A
. 1.
\ begin{ f l o a t i n g f i g u r e } [ ] { }
...
\end{ f l o a t i n g f i g u r e }
:
rt ,
lt ,
vt ( ).
\ begin{ w r a p f i g u r e } [ ]
{}{}
...
\end{ w r a p f i g u r e }
oatinggure wrapgure
. : ({r}), ({l}), ({i}) ({o}).
,
,
.
47
4
, . . , , .
nccoats11 :
\ s i d e f i g ( ) ( )
{\ i n c l u d e g r a p h i c s {}}{}
\ sideg ,
. . .
nccfloats.pdf.
\caption,
.
. ,
. .
. \protect. \caption ,
, .
\caption .
caption ccaption.
.
\usepackage[russian]{babel} . .
.
, , :
\usepackage{ c c a p t i o n }
% : .
\ c a p t i o n d e l i m { . } % !
, , .
. mcaption margincap:
11
nccfloats ncctools, . .
48
\ begin{ f i g u r e } [ ht ]
\ begin{ margincap }{}
\ i n c l u d e g r a p h i c s {}
\end{ margincap }
\end{ f i g u r e }
, .
4.5.
. ,
, , , .
,
. , LATEX
, .
49
: OpenSource .
.
. ? TpX , .
? , .
wine . Inkscape
xg. , .
, (http://sourceforge.net/projects/tpx/)
GPL.
LATEX.
- .
.
(http://www.nsu.ru/ef/tsy/)
. ,
Delphi, , . 4.2. TpX .
GPL
( ) ,
.
.
,
. ,
. .
, Lazarus, -
Linux - . , , -
, . ,
50
+++ .
+++
.
: -
Linux . . LATEX .
, .. TEX .
5.1.
. , .
LATEX .
5.1.1. keystroke
:
Esc. \keystroke,
keystroke, , :
\keystroke{<< >>}.
, -
51
5
. .
\Spacebar
\Esc
\Alt
\Shift
\End
\Ins
\UArrow
\ Scroll
\keystroke{}
Esc
Alt
Shift
End
Ins
Scroll
\Enter
\BSpace
\AltGr
\PgUp
\Ctrl
\LArrow
\DArrow
\Break
\keystroke{}
Enter
7
AltGr
Page
Ctrl
Break
\Return
\Tab
\Del
\PgDown
\Home
\RArrow
\PrtSc
\NumLock
\keystroke{F1}
Del
Page
Home
PrtSc
Num
F1
. 5.1. , keystoke
5.1.2. LCD-
LCD- . ,
- .
LATEX lcd.
\definecolor{darkgreen}{rgb}{0.22,0.26,0.19}
\definecolor{lightgreen}{rgb}{0.05,0.97,0.55}
\LCDcolors{darkgreen}{lightgreen}
\centering
\LARGE\textLCD{12}|Linux Format|\\[2mm]
\LCDcolors{lightgreen}{darkgreen}
\small\textLCD{12}|Linux Format|
52
5
\DefineLCDchar{yo}{01010000001111110001111001000111111}
. 5.2. LCD
\LCD , , - .
,
:
\DefineLCDchar{yo}{01010000001111110001111001000111111}
\definecolor{lightblue}{rgb}{0.9,0.91,0.99}
\definecolor{darkblue}{rgb}{0.14,0.2,0.66}
\LCDcolors{darkblue}{lightblue}
\LCDframe
\setlength{\LCDunitlength}{1.5mm}
\LCD{2}{4}|LF {yo} |
|zone |
5.1.3.
,
,
. byteeld.
byteeld :
\ begin{ b y t e f i e l d }{ }
\end{ b y t e f i e l d }
byteeld \wordbox \bitbox,
, :
\ wordbox [ ] { }{}
\ b i t b o x [ ] { }{}
. [lrtb] ,
: l , r , t b . \\.
53
5
0
15 16
31
hhh
h
h
hhhhhhhhhh
h
hhh
hhhhhhhhhh
h
hhh
hhhhhhhhhh
hh
hhhh
hhh hhhh
hhhhh
h
65.527
5.1. UDP
UDP1 :
\ begin{ b y t e f i e l d }{32}
\ bitheader {0 ,15 ,16 ,31}\\
\ wordgroupr { }
\ b i t b o x {16}{ }\ b i t b o x {16}{ }\\
\ b i t b o x {16}{ }\ b i t b o x {16}{ }
\ endwordgroupr \\
\ wordbox [ l r t ] { 1 } { }\\
\ skippedwo r ds \\
\ wordbox [ l r b ] { 1 } { 6 5 { . } 5 2 7 }
\end{ b y t e f i e l d }
UDP \bitheader,
\wordgroupr \skippedwords .
\bitheader , , , {0-31}.
\wordgroupr
\wordgroupl , , . .
5.2.
LATEX . , ,
54
5
.
, .
5.2.1. verbatim
verbatim, .
.
\verb!!.
\verb ( !),
. ,
*.
verbatim tools ,
.
\verbatiminput,
.
,
, verbatim* \verb* \verbatiminput.
*- ,
.
\begin{verbatim*}
\textbf{verbatim}
\end{verbatim*}
\textbf{verbatim}\LaTeX{}
\LaTeX{}
altt , verbatim,
LATEX ,
, .
\begin{alltt}
\textbf{altt}
\end{alltt}
altt
\LaTeX{}
LATEX
fancyvrb. .
5.2.2. listings
listings .
2 . , , , ,
.
2
listings.pdf
55
5
listings :
Listing 5.1. listings
\usepackage{ l i s t i n g s }
% listings
\ l s t l o a d l a n g u a g e s { [ LaTeX ] TeX , bash , MetaPost , Fortran , Per l ,C++,make}
%
\ l s t s e t { la ng ua g e =[LaTeX ] TeX , %
e x t e n d e d c h a r s=t r ue , %
e s c a p e c h a r =| ,
% | LATEX|
frame=tb ,
%
commentstyle=\itshape , %
s t r i n g s t y l e =\b f s e r i e s } %
3 \lstloadlanguages. .
\ lstset .
:
, ,
extendedchars=true4 .
escapechar LATEX
. , , LATEX. , (
|) ,
. escapechar .
frame=<POSITION> . t , b , l r
3
1.3c ( ): ABAP, ACSL, Ada (83, 95), Algol (60, 68), Ant, Assembler (x86masm), Awk (gnu, POSIX),
bash, Basic (Visual), C (ANSI, Handel, Objective, Sharp), C++ (ANSI, GNU, ISO, Visual), Caml
(light, Objective), Clean, Cobol (1974, 1985, ibm) Comal 80, csh, Delphi, Eiel, Elan, erlang,
Euphoria, Fortran (77, 90, 95), GCL, Gnuplot, Haskell, HTML, IDL (empty, CORBA), inform, Java
(empty, AspectJ), JVMIS, ksh, Lisp (empty, Auto), Logo, make (empty, gnu), Mathematica (1.0,
3.0), Matlab, Mercury, MetaPost, Miranda, Mizar, ML, Modula-2, MuPAD, NASTRAN, Oberon-2,
OCL (decorative, OMG), Octave, Oz, Pascal (Borland6, Standard, XSC), Perl, PHP, PL/I, Plasm,
POV, Prolog, Promela, Python, R, Reduce, Rexx, RSL, Ruby, S (empty, PLUS), SAS, Scilab, sh,
SHELXL, Simula (67, CII, DEC, IBM), SQL, tcl (empty, tk), TeX (AlLaTeX, common, LaTeX,
plain, primitive), VBScript, Verilog, VHDL (empty, AMS), VRML (97), XML, XSLT.
4
, LATEX .
56
5
, . frame=trbl . frame= .
frame=TRBL,
. .
, listings, lst.
\ lstinline !!
\verb!!.
lstlisting:
\begin{lstlisting}[language=Perl,
caption={ }]
Listing 5.2.
#
#
if (open(CHECK,"<$file")) {
i f ( open (CHECK, "< $ f i l e " ) ) {
$cmd=$term->
$cmd=$term>
readline("Overwrite (yes/NO): ");
r e a d l i n e ( " Ov erwrite ( y e s /NO) : " ) ;
if (lc($cmd) ne "yes") {die;}
i f ( l c ( $cmd ) ne " y e s " ) { die ; }
close(CHECK);}
cl ose (CHECK) ; }
\end{lstlisting}
,
. , language , caption
.
\ lstinputlisting :
%
\ l s t s e t { numbers=l e f t , la ng ua g e=MetaPost ,
b a c k g r o u n d c o l o r=\ c o l o r { y e l l o w } ,
frame=shadowbox , r u l e s e p c o l o r =\ c o l o r { b l a c k }}
%
\ l s t i n p u t l i s t i n g [ f i r s t l i n e =16 , l a s t l i n e =24 ,
emph={ f o r s u f f i x e s , t e x t , bpath } , emphst yle={\ c o l o r { r ed } } ,
emph = { [ 2 ] f i l l , u n f i l l } , emphst yle = { [ 2 ] \ b f s e r i e s \underbar } ,
] { i n t r o .mp}
16 vardef drawshadowed ( expr dx , dy ) ( t e x t t ) =
17
fixsize ( t );
18
f o r s u f f i x e s s=t :
19
f i l l bpath . s shift ed ( dx , dy ) ;
20
u n f i l l bpath . s ;
21
drawboxed ( s ) ;
22 %
draw p i c ( s ) w i t h c o l o r r ed ; %
23
endfor ;
24 enddef ;
57
5
firstline secondline ,
. .
numbers=left .
color.
- , backgroundcolor.
emph=< >.
, . emphstyle
.
,
, .
float,
.
. , ,
\lstdenelanguage. ,
.
5.3.
, , . . TEX. LATEX .
, ,
. .
5.3.1. algorithms
algorithms ,
.
. algorithmic.
. ,
. 1,
, 2 , .
\STATE . \IF{<>}, \ELSIF{<>}, \ELSE \ENDIF. \FOR \FORALL,
\ENDFOR. \WHILE{<>} \ENDWHILE,
\REPEAT \UNTILL{<>} \LOOP \ENDLOOP. \REQUIRE, , , \ENSURE, \RETURN,
\PRINT \COMMENT.
58
5
Algorithm 1 algorithm
\begin{algorithmic}[1]
\IF{\(i\leqslant0\)} \STATE \(i\gets1\) \ELSE
\IF{\(i\geqslant0\)} \STATE \(i\gets0\)
\COMMENT{ }
\ENDIF
\ENDIF
\ENSURE \(i\geqslant0\)
\FORALL{\(\xi \in \mathcal{A}\)}
\STATE \(\mathcal{B}\gets\xi^2\)
\ENDFOR
\RETURN \(\mathcal{B}\)
\end{algorithmic}
1: if i 6 0 then
2:
i1
3: else
4:
if i > 0 then
5:
i 0 {
}
6:
end if
7: end if
Ensure: i > 0
8: for all A do
9:
B 2
10: end for
11: return B
, . . ,
.
: algorithms.pdf.
algorithmic
algorithm,
. algorithm
\caption \label.
5.3.2. algorithm
algorithm, algorithmicx.
. , . Pascal,
, .
, algorithm, .
algorithm2e. C-.
. .
algorithm, algorithm.
59
5.3.3. clrscode
clrscode ,
: . , . , . 5 .
. ,
LATEX .
\begin{codebox}
\Procname{
$\proc{ }$}
\li \For $j \gets 2$ \To $\id{length}[A]$
\li \Do $\id{key} \gets A[j]$
\li $i \gets j-1$
\li \While $i > 0$ and $A[i] > \id{key}$
\li \Do $A[i+1] \gets A[i]$
\li $i \gets i-1$ \End
\li $A[i+1] \gets \id{key}$ \End
\end{codebox}
1 for j 2 to length[A]
2
do key A[j]
3
ij1
4
while i > 0 and A[i] > key
5
do A[i + 1] A[i]
6
ii1
7
A[i + 1] key
. 5.3. clrscode
5.3.4. pseudocode
. (Donald L. Kreher) . (Douglas
R. Stinson) Combinatorial Algorithms: Generation, Enumeration and
Search.
, : pseudocode. . ,
2005 . .
5.4.
LATEX
. . ,
. LATEX , , ,
.
60
5
\begin{pseudocode}{C2F\_}
{\text{}, \text{}}
\PROCEDURE{C2F}{c}
\COMMENT{
$^\circ$$\to$$^\circ$F}\\
f \GETS {9c/5} + 32\\
\RETURN{f}
\ENDPROCEDURE
\MAIN
x \GETS \text{} \\
\WHILE x \leqslant \text{} \DO
\BEGIN
\OUTPUT{x, \CALL{C2F}{x}}\\
x \GETS x+1
\END
\ENDMAIN
\end{pseudocode}
. 5.4. pseudocode
LATEX
LATEX- . .
. Subversion svn,
svn6 .
\usepackage{ svn }
\SVN $ Date $
\SVN $Rev$
, \SVN. Subversion
:
> svn p r o p s e t svn : keywords " Date Rev"
> svn commit m " "
svn
commit. Date Rev ,
.
> svn h e l p p r o p s e t
6
61
5
\SVN $Date$ \SVNDate \SVNTime,
. \SVN $Keyword$,
Keyword svn, \SVNKeyword.
:
\SVN $Date: 2006-11-25 21:02:20 +0600 $
\SVN $Rev: 265 $
\SVNDate\ \SVNTime
25 2006 .
21:02:20
265
\SVNRev
svninfo.
62
,
,
.
.
.
. , , , , .
, .
() , ,
, , . . . ,
.
6.1.
LATEX . , \textwidth ,
, .
\newlength.
. , -:
63
6
\newlength{\MyLen}
\setlength{\MyLen}{1cm plus 2.5fill minus 5mm}
\addtolength{\MyLen}{5em}
\lstinline!\MyLen! \the\MyLen.
\MyLen 82.89214pt
plus 2.5ll minus 14.22636pt.
LATEX -
. plus, minus. TEX
.
\setlength . \addtolength , . \the .
LATEX - . , . , (in)
2.54 72.27 (1 pt 0.35 mm). (cm)
(mm). LATEX (bp), (dd), (pc) (cc)
, . LATEX (sp), 1/65536
.
: 1ex x, 1em
M. ,
. ,
, \quad, \hspace{1em}.
\setlength{\MyLen}{1ex}
x \the\MyLen\par
\Large \setlength{\MyLen}{1ex}
x \the\MyLen
x 4.71341pt
x 7.43707pt
ll . TEX , :
l, ll lll, l ll lll. .
, \settowidth:
64
6
\settowidth{\MyLen}{ }
\addtolength{\MyLen}{1em}
\centering
\framebox[1.2\MyLen]{ }\par
\framebox[1.2\MyLen]{ }
\settoheight , \settodepth .
.
FAQ LATEX:
\ makeatletter
\newcommand{\ maxwidth}{%
\ ifdim \Gin@nat@width >\linewidth
\ linewidth
\ else
\Gin@nat@width
\fi
}
\makeatother
\maxwidth ,
:
\ i n c l u d e g r a p h i c s [ width=\maxwidth ] { }
:
( BoundingBox) .
, , .
calc calc
. calc .
\setlength{\MyLen}{
(1em+\widthof{ })*\real{1.2}}
\centering
\framebox[\MyLen]{ }\par
\framebox[\MyLen]{ }
65
6
width
reference
, . 6?
height
depth
width = 288.7318pt
height = 17.27356pt
6
depth = 4.83911pt
6.2.
. 6.2 \layout . .
. , ( ). , , .
,
.
, .
(1 2)
.
. \hoset \voset ( ),
, .
, :
\texthight (7) \textwidth (8).
\columnwidth. \linewidth .
\oddsidemargin (3) .
. \oddsidemargin,
\evensidemargin.
66
i
?
i
?
?
6
6
6i
6
i
i
-
10i
-
i
-
i
?
11
1i-
1
3
5
7
9
11
+ \hoffset
\oddsidemargin = 2pt
\headheight = 18pt
\textheight = 635pt
\marginparsep = 12pt
\footskip = 50pt
\hoffset = 0pt
\paperwidth = 597pt
2
4
6
8
10
+ \voffset
\topmargin = -41pt
\headsep = 21pt
\textwidth = 448pt
\marginparwidth = 49pt
\marginparpush = 6pt (not shown)
\voffset = 0pt
\paperheight = 845pt
67
6
\topmargin (4)
, \headheight (5), \headsep (6).
\footskip
.
\marginparwidth (10)
\marginparsep (9). : \marginparpush.
\paperwidth \paperheight. LATEX (article, book,
report letter) ,
letter. ,
A4 (210297 ). ,
a4paper :
\ d o c u m e n t c l a s s [ a4 paper , 1 2 pt , o n e s i d e ] { s c r b o o k }
A5 ( A4) a5paper.
. 6.3. lscape .
-
. (, slides).
. 6.4. rotpages .
,
landscape lscape. ,
90
. pdatex ,
( )
68
6
pdftex - pdscape.
, ,
portland. portland
, . \portrait \landscape
. .
.
- 180 1 rotpages.
\rotboxpages \endrotboxpages,
. , .
rotpages-doc.pdf
6.3.
TEX , LATEX
article, book, report latter.
, . . , scrartcl,
scrbook, scrreprt scrlettr KOMA-Script, , A4. . . ncclatex (NC C)
ncc, TEX.
6.3.1.
, , . , - . ,
.
, : geometry vmargin.
geometry geometry
, :
\usepackage [ h e i g h t =25cm , a 4 paper , hmargin={3cm , 2 cm } ] { geometry }
, ,
.
69
6
keyval, 4 (). ,
calc.
. geometry.pdf
. , .
, .
. .
vmargin vmargin . :
\ s e t p a p e r s i z e [ ] { }
: A0, A1, . . . , A9, B0, B1, . . . , B9, C0, . . . , C9, USletter, USlegal USexecutive.
landscape ( ) portrait ( ). custom
:
\ s e t p a p e r s i z e { custom }{}{}
:
%
\ s e t m a r g i n s { }{ }%
{ }{ }%
{}{}%
{}{}%
%
\ set ma r g no hf { }{ }%
{ }{ }%
%
\ setmarg { }{ }%
{ }{ }%
vmargin : \setmarginsrb,
\setmargnohfrb, \setmargrb.
. vmargin.pdf.
70
6.3.2.
.
.
.
, :
\ pagestyle { }
, \thispagestyle{ }.
:
empty - .
plain .
headings , .
, .
fancyhdr .
fancyhdr
\pagestyle
..
112
..
cxii fancyheadings
. 6.5. fancyhdr.
fancyhdr . :
, , , \textwidth, , ,
( , , ).
fancyhdr:
71
\usepackage{ f a ncyhdr }
...
\ b e g i n { document}
\ pagestyle {empty} %
\ pagestyle { f a n c y } %
\ l h e a d {. . }
%
\ chead{~\arabic { page}~} %
\ rhead {}
%
%
\ c f o o t{~\roman{ page}~}
\ l f o o t {\hspace { 0 . 7 cm} }
\ r f o o t { \ textbf { f a n c y h e a d i n g s }}
page .
fancyhdr.pdf.
6.4.
. LATEX
. , ,
. , ,
.
,
, - .
. 6.6. (). [12].
TEX (Undefull)
(Overfull), log- , :
O v e r f u l l \hbox ( 2 6 . 1765 pt t o o wide ) in paragraph a t l i n e s 347356
[ ] [ ] \T2A/cmr/m/n/12
. geometry . pdf
draft:
72
\ d o c u m e n t c l a s s [ d r a f t , a 4 paper , 1 2 pt , o n e s i d e ] { s c r b o o k }
. ,
. 6.7. . draft.
, LATEX - .
, ,
2 ( ).
\linebreak \\. \linebreak \\
.
,
,
.
. \hspace. .
\hspace ,
, .
:
\quad 1em. \qquad \quad, \endspace \quad.
\hfill . \ hll
, . \hl.
\hrulefill , \ hll , .
\dotll.
.
\pagebreak \newpage. ,
.
/ - , :
73
,
.
74
6
spacing .
6.5.
. , LATEX
, . , LATEX , , , .
75
LATEX
. . .
. Tremulous.
, .
.
.
.
7.1. ?
documentclass.
:
\ d o c u m e n t c l a s s [ a4 paper , 1 2 pt ] { a r t i c l e }
paper TeX
XI
SECTION A
Second heading. Fusce porttitor erat aliquam felis. Integer scelerisque enim at augue.
MAIN INDEX
, . .cls. LATEX TeX Live 2005
175 . , , .
. 7.1. papertex
.
. ,
.
.
,
Second subheading. Facilisis sit amet, elementum nec, interdum
vitae, nunc.
10:23 h Second text. Lorem ip- dui, vel eleifend nibh velit ut felis.
sum dolor sit amet, consectetuer adip- Pellentesque elementum massa at nisi
iscing elit. In vitae augue. Mor- dapibus mollis. Etiam cursus. Mauris
bi fermentum, felis accumsan rhon- gravida nibh ut sapien. Vestibulum
cus malesuada, metus eros adipiscing pretium, felis et.
SECTION B
paper
WEATHER FORECAST
TODAY
13 k 9 C
76
TOMORROW
15 k 11 C
FRIDAY
12 k 6 C
TeX
EDITORS
Ignacio Llopis
lloptor@gmail.com
http://nachollopis.com
7 LATEX
TEX . (2007 )
papertex (. 7.1 Ignacio Llopis)
LATEX 1 , , LATEX . CTAN
{CTAN}/macros/latex/contrib/papertex/.
7.2.
, LATEX 6 : article (), book
(), report (), proc (), letter () slides ().
article. section ().
( abstract). book
chapter (). book
, . report book. ,
, . proc,
, article,
. letter
,
. slides .
, .
minimal,
. minimal .
, LATEX .
, . , , .
. , .
, . ,
-
.
, , .
:
1
-
, .
77
7 LATEX
10pt|11pt|12pt . .
a4paper . ,
LATEX letter.
draft .
(
) ,
.
oneside|twoside , .
twocolumn .
7.3.
, , .
7.3.1.
. -
- , extsizes
(extarticle, extbook, extletter, extproc, extreport), 10-12pt2. , -
. AMS (amsart, amsbook,
amsproc), . ntgclass3
, , .
KOMA-Script
KOMAscript. . ,
( ), - , LATEX-.
scrartcl, scrbook, scrlttr2,
scrreprt.
2
78
7 LATEX
KOMA-script
9pt, 14pt 17pt. ,
, KOMA-script .
. ,
KOMA-script . The KOMA-Script bundle
(scrguien.pdf) .
NC C
NC C.
NC C . : 4 LATEX, 2005 (ISBN
5-901548-25-6).
ncc
: article ( ),
preprint (), book () report ().
: ncclatex.pdf.
7.3.2.
, . , , .
,
5 .
eskdx,
. : eskdtext ( ), eskdbtab ( )
eskdgraph ( , ).
(eskdx.pdf) - . 7.2. . CTAN eskdx
{CTAN}/macros/latex/contrib/eskdx/, : http://lostclus.linux.kiev.ua/eskdx/.
eskdx . , eskd
1
1.1 eskdx . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 . . . . . . . . . . . . . . . . . . . . . . .
2
2.1 . . . . . . . . . . . . . . . . . .
2.2 . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.1 . . . . . . . . . . . . . . .
2.2.2 eskdtext . . . . . . . . . . . . . . . . .
2.2.3 eskdgraph . . . . . . . . . . . . . . . .
2.2.4 eskdtab . . . . . . . . . . . . . . . . . .
2.3 . . . . . . . . . . . . . . . . . . . .
2.4 . . . . . . . . . . . . . . . . . . . . . . . . .
2.5
2.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.7 , . . . . . . . . . .
2.8 . . . . . . . . . . . . . . . . . .
2.9 . . . . . . . . . . . . . . . . . . . . . . . .
2.10 . . . . . . . . . . . . . . . . . . . . . . . . . .
2.11 . . . . . . . . . . . . . .
2.12 . . . . . . . . . . . . . . . . . . . . . . . .
2.13 , , , .. . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
5
5
6
6
8
9
10
11
13
14
17
18
18
18
19
19
19
20
3
3.1 . . . . .
3.2 . . . . . . . . . .
3.3 . . . . .
3.4
.
.
.
.
.
.
.
.
.
.
.
.
21
21
22
23
24
. .
.
.
. .
.
. .
.
4
5
, .
, .
79
4
4
4
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
eskdx v0.97
32
7 LATEX
( x ). eskd.cls
pscyr6 .
.
? isov2.cls iso
. isoman.pdf ISO.
ISO 10303 iso10303.
7.3.3.
letter LATEX . .
, , . ,
. LATEX
letter.
FAQ LATEX (http://www.tex.ac.uk/faq)
newlfm . lfm letter (), fax () memoranda ( ).
README .
akletter . lettereng.pdf
.
KOMA-script letter scrlttr2. ntgclass brief.
- . ,
cdpbundl, .
7.3.4.
book.
.
book
octavo. scrbook KOMA-script
book. .
.
pscyr . , .
LATEX.
. :
ftp://ftp.vsu.ru/pub/tex/font-packs/pscyr/.
80
7 LATEX
memoir (memman.pdf) , . , , , , .
.
- , .
. .
(memmanadd.pdf)
.
,
,
sms .
7.3.5.
, .
scrreprt KOMA-script, report.
- Eli Billauer LATEX- HiTech-
, , hitec. . , ,
.
298, sms, .
manual nassow Center for the Automation of Weapon and Command Systems, Royal Netherlands
Navy.
7.3.6.
, Householder formula
The Householder formula below lets you compute f (x) for an
. arbitrary f .
,
. where n 2 and is an arbitrary function.
seminar sides .
Formula (1) gives an iteration of order n converging towards x such
that: f (x ) = 0.
. LATEX , .
prosper seminar . 7.3. prosper
, ,
pdf7 . ppr-prv
prosper.
1
xk+1 7 n (xk ) = xk + (n 1)
1
f (xk )
n2
n1
1
f (xk )
+ f (xk )n+1
(1)
Acrobat Reader,
.
81
7 LATEX
texpower, powersem, slides, texpower.
prosper .
J/ +
, beamer. cos()<0.75, ,
p
<0.5
beamer 3.0 < M < 3.2 , M
cos( ; ) < 0.9
(Till Tantau)
. . . 200 - . 7.4. beamer
. 11
.
LyX .. WYSIWYM , - . !
. -.
,
powerdot,
LyX.
talk, ,
.
.
a0poster, .
,
LATEX . ,
sciposter .
1
2
3
+ ;
rec
rec
J/ +
5/7
7.3.7.
, . ,
. ,
ucthesis (UC Berkeley).
disser. CTAN {CTAN}/macros/latex/contrib/disser. , .
.
82
7 LATEX
7.3.8.
curriculum vitae
.
johndoe
, .
europecv.
vita .
IT- . curve
. curve .
. 7.5. moderncv
morderncv , .
CTAN {CTAN}/macros/latex/contrib/moderncv.
, , . ,
. currvita .
Any intelligent fool can make things bigger, more complex,
and more violent. It takes a touch of genius and a lot of
courage to move in the opposite direction.
Education
20032006
20012003
3rd year:
Master thesis
title
supervisors
description
Study of the complex design of a curriculum vit, also known as rsum. In my opinion,
a good design needs to be show the personality of its author. Some people will thus prefer a
more classic style, and others will be more audacious. . .
Experience
February 2006
current
20052006
Maintainer of the moderncv package, meant to ease the production of beautiful curriculum
vits.
Supervision of practical sessions for a mathematical course given to second year engineering
See www.legat-online.be/b2q1/num.
students (course FSAB1104: Numerical Methods).
20042006
Leader of a student home with a cultural project, requiring day to day management as well
See www.organe.be.
as the organization of public events.
19992001
Advanced mathematical training, as Belgian preselected candidate for the International MathSee
ematical Olympiads, selected by the Belgian mathematical society.
imo.math.ca/belgium.html.
Languages
French
Native
Dutch
Near-native
English
Very good
7.3.9.
LATEX. , - , , , /, : http://www.maik.ru/pub/tex/.
LATEX. , asaetr American Society for Agricultural Engineers
(ASAE). Maple Technical Newsletter mtn. jpsj2 . sibjnm.
elsart Elsevier. nature pdf-
Nature.
revtex4.
, ,
, combine.
83
7 LATEX
7.3.10.
. , CD (cd), (qcm), (assignment),
(ConcProg), (courseoutline coursepaper),
(labbook), (stage), (pecha),
(ashcards), . ,
.
.y
l,
ig,nx, xm,z
e,d
g,px, cxn,
es,x,i
g,d
g,
e.
im,bdxg,c
ig,lxs,bx, x,
ig,b-
es,t
e.
bdxg,n
i,zxn,zx,
e.
rxb,d
,db
l,
os,px, bzx,bx, dx,.
in,px
r,xd,nxs,bx, x,d
e,
id,d
e,
im,bdxg,d
ei
,
im,d
,s
o,bx, dx,.
d
g,px, cxn,
is,bx, x,d
e,
im,
i,nx,d
,btx,bx, dx,.
bdxg,d
e,zxn,d
eo
,zs,nxs,lxs,px, dx,.
bg
o,m
ed,px,i
g,g
o.
bx, x,
o,gxn,d
,s
o,nxs,
or,r
o..
d
e,nx, bx, x,mx, m
o,nxs,d
es,d
g,px, cxn,lx, x,gx, r
e,
es,xs,px, dx,.
d
es,
d
e,nx,
im,
page 2
This is the short excerpt from the Brahma Story, taken from the Documentation of the cTibTEX package:
im,
d
es,xs,
. 7.6. - pecha.
.
. ,
-, , LATEX , ,
.
84
7 LATEX
: CTAN
Q. CTAN?
A. CTAN . CTAN Comprehensive TeX Archive Network. CTAN ,
TEX .. ,
CTAN :
ftp://ftp.dante.de/tex-archive/
ftp://ftp.tex.ac.uk/tex-archive/
ftp://ctan.tug.org/tex-archive/
CTAN , , :
ftp://ftp.chg.ru/pub/TeX/CTAN/
ftp://ftp.nsu.ru/mirrors/ftp.dante.de/tex-archive/
, , , TEX. ( )
. , . CPAN8 perl CRAN9 R PyPI10
python CTAN, , .
85
I
: , ;
, , ;
, .
? .
? .
, ,
.
. , .
.
8.1. slides
LATEX .
. slides.
.
.
. landscape . 8.1. slides
. slide. .
T C ,
(C)
T = T
(C)
C + T
(1)
(1 C ),
(C)
T T , C
( J/),
(C)
T , C
( J/ + (X)).
(T )
C = C
(T)
T + C
(2)
(1 T ).
86
8 I
\ d o c u m e n t c l a s s [ a4 paper , l a n d s c a p e ] { s l i d e s }
...
\ b e g i n { document}
\ begin{ s l i d e }
\ begin{ c e n t e r }
\Large
\end{ c e n t e r }
...
\end{ s l i d e }
\end { document}
seminar slides - (1993 .),
( sem-user.pdf)
slide .
-
- , slide seminar .
8.2. PDF
PDF Portable Document Format
Adobe Systems 1993 . 2007 PDF, ISO. 2006
1.7. PDF-
,
(, ). PDF
, JavaScript. 1.6
3D , .
PDF
, :
.
.
. PDF.
.
.
8.2.1.
, PostScript- .
ghostscript, ps2pdf (man ps2pdf)
PDF:
87
8 I
8.2.2.
Adobe Reader Ghostscript. - , . Adobe Reader Adobe
Systems. PDF
. , ,
.
Adobe Reader,
, ,
.
pdfopen pdfclose ( TEXLive):
> p d f c l o s e f i l e .pdf
# .pdf
> pdfopen f i l e .pdf
88
8 I
Ghostscript .
Ghostscript PDF , . :
. () .
xpdf (http://www.foolabs.com/xpdf/) PDF
X Window. 3.02 xpdf
PDF 1.7. xpdf , , kpdf. r.
.
8.2.3.
PDF.
: ,
.
.
8.3. beamer
, , -
. .
beamer ,
slides, . , ,
, LATEX. (Till Tantau)
. beamer ,
(200) (beameruserguide.pdf)
http://sourceforge.net/projects/latex-beamer.
beamer pdatex latex + dvips
+ ps2pdf. beamer LyX. TEXLive
beamer . Debian
:
> sudo aptg e t i n s t a l l l a t e x beamer
beamer, :
\ d o c u m e n t c l a s s [ h y p e r r e f ={u n i c o d e=t r u e } ] { beamer }
\ usepa cka g e [ k o i8r ] { i n p u t e n c }
beamer hyperref. ,
.
89
8 I
UTF-8,
beamer:
\ d o c u m e n t c l a s s [ u t f 8 ] { beamer }
\ usepa cka g e [ u t f 8 ] { i n p u t e n c }
. beamer frame:
%
\ usetheme { Madrid}
\ useo ut er t heme { shadow }
\ t i t l e {}
\date{ }
\author{}
\ b e g i n { document}
%
\begin { frame }
\titlepage
\end{ frame }
J/e + e Br(J/ e + e )
..
J/e + e Br(J/ e + e )
..
frame t, .
.
beamer section. frame.
, , .
\tableofcontents.
pausesections, , .
%
\ section {}
\begin { frame }
%
\ f r a m e t i t l e {
( . ) }
...
\ a l e r t {GBee}. . . \ a l e r t {Gee}
...
\end{ frame }
( .)
+
d e e
d
1 n 9 2e + e
3
1 + (1 + cos2 )Imf
M 2 4 M
4
(1 + cos2 )2
11
3 e + e
1 + (1 + cos2 )
Ref +
2 M
12
(1 cos )
o
2
2
2
(3 + cos )
13
+
,
1+
4
12
(1 cos )2
f =
M
2
W + M
i
2
!1
ln
1
W
me
2
:
mLum (GBee jpsiee + Gee (inter1 + inter2) + bhabha) .
..
J/e + e Br(J/ e + e )
90
8 I
,
.
\pause.
PDG 2006
\begin { i t e m i z e }
\item . . .
\ pause
\item . . .
\end{ i t e m i z e }
PDG 2006
e + e e + e / total 6% (DASP-1979)
e + e e + e / total 6% (DASP-1979)
e + e + / total
PDG 2006 0.335 0.007 (2.1%)
BaBar (2004) 0.3301 0.0077 0.0073
2.3% 2.2% ISR
CLEO-c (2006) 0.3384 0.0058 0.0071
1.7% 2.1% ISR.
..
J/e + e Br(J/ e + e )
..
J/e + e Br(J/ e + e )
beamer . :
beamer
theorem, proof, block enumerate
%
\newtheorem{ r ust heo r em }{ }
()
A = B
.
1
\begin { frame }
\ f r a m e t i t l e {
\ textbf { beamer }}
%
\ f r a m e s u b t i t l e { theorem , pr o o f ,
b l o c k enumerate }
%
\begin { r ust heo r em } [ ]
\ c o l o r <34>[rgb ] { 1 , 0 , 0 }
{ \ (A=B\ ) }
\end{ r ust heo r em }
%
\begin { p r o o f }
\begin { enumerate }
\item<2> \ (A=C\ )
\item<2> \ (B=C\ )
\item<3,4> \ (A=B\ ) \ qedher e
\end{ enumerate }
\end{ p r o o f }
%
\ uncover <4>{ \ beamerbutton { }}
%
\begin { b l o c k }<1,3>{ }
\end{ b l o c k }
\end{ frame }
91
A=C
..
J/e + e Br(J/ e + e )
beamer
theorem, proof, block enumerate
()
A = B
.
1
A=C
B =C
..
J/e + e Br(J/ e + e )
beamer
theorem, proof, block enumerate
()
A = B
A=B
..
J/e + e Br(J/ e + e )
beamer
theorem, proof, block enumerate
()
A = B
A=B
..
J/e + e Br(J/ e + e )
8 I
beamer < > /.
. \color<34> 3 4 .
. : -3,5-9,12,17- , : 3, 5 9, 12,
17 .
, . :
\color{} .
\item
itemize enumerate.
theorem. \newtheorem
.
prof. , . QED (quod erat
demonstrandum ). \qedhere
QED , . QED
, .
beamer ,
:
\alert {} .
\only \ visible .
\ invisible \only.
\uncover , \only,
, .
\alt<>{}{ } .
block . theorem.
. \label. c
\hyperlink :
92
8 I
\ label {metka }
...
\ h y p e r l i n k {metka }{}
LATEX-,
, \beamerbutton.
:
\ h y p e r t a r g e t < >{}{}
,
.
verbatim lstlistings. frame fragile.
, , :
Users Guide
to the
Beamer
Class
Till Tantau
Users Guide
to the
Beamer
Class
Till Tantau
}
return 0;
return 0;
}
Users Guide
to the
Beamer
Class
Till Tantau
Users Guide
to the
Beamer
Class
Till Tantau
. 8.2. ( Hannover)
\ begin{ frame } [ f r a g i l e ]
%
\newcommand{\un}{\ unco ver }
\newcommand{\ a l }{\ a l e r t }
\ f r a m e t i t l e {An Algorithm For F inding Primes Numbers . }
\ begin{ semiver ba t im }
\un<1>{\a l <0>{ i n t main ( v o i d ) } }
\un<1>{\a l <0>{\{}}
\un<1>{\a l <1>{ \ a l <4>{s t d : : } v e c t o r <bool>i s_prime ( 1 0 0 , t r u e ) ; } }
\un<1>{\a l <1>{ f o r ( i n t i = 2 ; i < 1 0 0 ; i ++)}}
\un<2>{\a l <2>{ i f ( i s_prime [ i ] ) } }
\un<2>{\a l <0>{ \{}}
\un<3>{\a l <3>{ \ a l <4>{s t d : : } co ut << i << " " ; } }
\un<3>{\a l <3>{ f o r ( i n t j = i ; j < 1 0 0 ; } }
\un<3>{\a l <3>{
i s_prime [ j ] = f a l s e , j+=i ) ; } }
\un<2>{\a l <0>{ \}}}
\un<1>{\a l <0>{ r e t u r n 0 ; } }
\un<1>{\a l <0>{\}}}
93
8 I
beamer
Users Guide
to the
Beamer
Class
beamer
theorem, proof, block enumerate
Till Tantau
Till Tantau
()
()
()
A = B
A = B
A = B
beamer
Users Guide
to the
Beamer
Class
A=B
3
Till Tantau
A=B
beamer
theorem, proof, block enumerate
A=B
beamer
Users Guide to
the Beamer Class
Till Tantau
beamer
theorem, proof, block enumerate
()
A = B
()
A = B
()
A = B
.
3
3. A = B
A=B
3. A = B
Users Guide to the Beamer Class
Till Tantau
3/3
. 8.3. beamer. .
\end{ semiver ba t im }
\ v i s i b l e <4>{Note t he use o f \ a l e r t {\ t ext t t { s t d : : } } . }
\end{ frame }
beamer :
. \usetheme. ,
, . beamer
2007 : AnnArbor, Antibes, Bergen,
Berkeley, Berlin, Boadilla, CambridgeUS, Copenhagen, Darmstadt, Dresden, Frankfurt,
Goettingen, Hannover, Ilmenau, JuanLesPins, Luebeck, Madrid, Malmoe, Marburg,
Montpellier, PaloAlto, Pittsburgh, Rochester, Singapore, Szeged Warsaw.
. \usecolortheme. : albatross,
beaver, beetle, crane, dolphin, dove, y, lily, orchid, rose, seagull, seahorse, sidebartab,
structure, whale wolverine.
. \usefonttheme. : professionalfonts, serif, structurebold, structureitalicserif structuresmallcapsserif.
, . \useinnertheme. : circles,
inmargin, rectangles, rounded.
94
8 I
. \useoutertheme. : infolines, miniframes, shadow, sidebar, smoothbars,
smoothtree, split tree.
.
.
draft . .
(
\includeonly):
\ i n c l u d e o n l y f r a m e s { ex 1 , ex 3}
\frame [ l a b e l=ex 1 ]
{ . }
\ begin{ frame } [ l a b e l=ex 2 ]
ex 2 .
\end{ frame }
\frame{ . }
\againframe:
%ex 1
\ a g a i n f r a m e { ex 1}
128 98 ,
.
Adobe Reader A4 .
pgfpages pgf:
\usepackage{ p g f p a g e s }
\ p g f p a g e s u s e l a y o u t { r e s i z e t o } [ a 4 paper , b o r d e r s h r i n k=5mm, l a n d s c a p e ]
A4
5 . ,
:
\ p g f p a g e s u s e l a y o u t {2 on 1 } [ a4 paper , b o r d e r s h r i n k=5mm]
95
8 I
beamer multimedia.
\movie \sound
. ,
Adobe Reader Windows MacOS.
PDF, xpdf Adobe System .
.
beamer .
\ animate< >
. Adobe Reader .
8.4.
.
:
.
.
.
. .
(\frametitle)
2040 80.
block, theorem, proof example. .
.
96
-
.
, ,
,
, .
.
,
. .
, .
. , .
- 1.
1.1.
. , , , , , ,
.
. A.
,
. 9.1.
.
1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1. . . . . . . . . . . . . . . . . . . . . . . . . . . 1
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
A. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1. -
. .
.
. .
, , 1.1 1
, .
97
9 -
9.1.
?
: , , .
. .
. .
\section, \subsection, \subsubsection, \paragraph \subparagraph.
. ,
- ,
, :
\ d o c u m e n t c l a s s [ a4 paper , 1 2 pt ] { ncc }
\ usepa cka g e [ warn ] { mathtext }
\usepackage [T2A] { f o n t e n c }
\usepackage [ k o i 8r ] { i n p u t e n c }
\usepackage [ e n g l i s h , r u s s i a n ] { b a b e l }
\usepackage{ i n d e n t f i r s t }
\ t i t l e { }
\author{. \ ,.~ }
\ b e g i n { document}
\ m a k e t i t l e {}
\ t a b l e o f c o n t e n t s {}
\ section { }
\ label { s e c : s e c t i o n }
.
\ s u b s e c t i o n { }
\ label { s e c : s u b s e c t i o n }
.
\ s u b s u b s e c t i o n [ ] { }
\ label { s e c : s u b s u b s e c t i o n }
.
.
\ paragraph {}
\ label { s e c : paragraph }
.
\ subparagraph {}
\ label { s e c : subparagraph }
98
9 -
.
\ section { , }
. .
\ section { }
\ label { s e c : a f t e r w o r d s }
\ addcontentsline { t o c }{ s e c t i o n }{ }
, , ~\ r e f { s e c : s u b s e c t i o n }
~\pageref { s e c : s u b s e c t i o n } ,
.
\appendix
\ section {}
\ label { appendix }
\end { document}
. 9.1. , , . \tableofcontents. ,
tex-, toc. .
tocdepth, , :
\ setcounter { t o cdept h }{2}
.
\section , \subsection
.
\ listogures
\ listoftables . lof lot.
-
\ addcontentsline { t o c }{ }{ }
.
(toc, lof lot), . , section, subsection -
99
9 -
. LATEX
\protect, .
\appendix .
. \appendix .
9.2.
- . -
.
9.2.1.
,
\label. ASCII-. aux.
, ( \ref)
(\pageref) latex .
xr.
:
\usepackage{ xr }
\ ext er na ldo cumen t [EXT]{ e x t e r n a l d o c }
externaldoc.tex.
, , \ref/\pageref, EXT-. ,
, - .
. , equation ( 1 ) theorem (), . ( gure)
( tabular). \label
\caption, .
.
\url :
\ref \eqref
100
9 -
WWW- http://www.inp.nsk.su/~baldin/.
WWW-
\url{http://www.inp.nsk.su/~baldin/}.
%, #,
\.
, \verb :
\url !http://www..ru!.
hyperref
pdf-, :
% h y p e r r e f
\usepackage [ u n i c o d e=t r u e ] { h y p e r r e f }
9.2.2.
\footnote. .
. , , .
.
minipage, :
\begin{minipage}{1.0\linewidth}
\footnote{.}
\footnote[26]{ .}.
\end{minipage}
a z .
a
z
.
.
\footnote
.
\footnote \protect:
\ section { \ protect \ footnote { . } }
.
, ,
, :
\footnotemark [ num ]
\ footnotetext [ num ] { }
101
9 -
num \footnote
.
footnote.
9.3.
. , myheadings :
\ pagestyle { myheadings }
\markboth{ }{ }
, \markright,
.
fancyhdr. 6.3.2.
9.4.
,
, .
. .
.
.
. -, , -, -,
. .
\ c i t e [ ] { }
thebibliography
\ c i t e [ ] { rozenko 2005}.
\ begin{ t h e b i b l i o g r a p h y }{9}
\bibitem { rozenko 2005} ..
\LaTeX . \ newblock : . ~,
2 0 0 5 . 398~ .
\end{ t h e b i b l i o g r a p h y }
102
9 -
[1, ].
[1] .. LATEX. : .
, 2005. 398 .
. 9.2. .
BibTEX. \newblock .
thebibliography
. , 10 ,
, , 9, 99 .
aux.
LATEX.
, - :
\ c i t e { 2004}
...
\bibitem { 2004}
citehack:
\usepackage{ c i t e h a c k }
.
.
9.4.1. BibTEX
. - , , - 7.80-002 7.1-84.
. , , , www-.
,
,
.
2
, 2000 .
, - - .
103
9 -
le.tex le.bib
.bst
LATEX
.aux BibT X
E
LATEX
.bbl
.aux
.blg
LATEX
. 9.3. LATEX+BibTEX. tex LATEX-, bib
, bst , blg log- BibTEX, bbl , aux .
BibTEX, thebibliography, . BibTEX ,
Google Scholar (http://scholar.google.com/), ,
http://xxx.lanl.gov BibTEX.
, BibTEX Emacs RefTeX JabRef http://jabref.sourceforge.net/.
, Emacs Java gBib KBib Gnome KDE, .
bibtex2html html-. ,
.
, BibTEX
bib. \bibliography
LATEX- :
\ bibliographystyle {}
\ bibliography { bib-}
LATEX :
plain .
. bibtex -
104
9 -
[1] , . LATEX LATEX 2 : .
. / . , . , . . .: , 1999. 606 .
[2] , . . LATEX. / . . . .:
, 2003. 448 . 3- ., . .
[3] , . . LATEX . / . . , . . .
: , 2004. 496 . 3- ., . .
[4] , . . LATEX. / . . ; . . . : . , 2005. 398 .
. 9.4. BibTEX. gost780u.
bibtex8 --csfile
3 .
unsrt . plain
.
alpha .
. .
abbrv . ,
.
plain.
BibTEX 7.80-00
7.1-84: gost780s/gost71s plain gost780u/gost71u unsrt.
gost780.pdf gost71.pdf.
LATEX BibTEX-. TEXLive 2007
200 .
\cite \nocite. \nocite
, .
:
@book{Gussens 1999 ,
a ut ho r = {. and . and . } ,
t i t l e = { \LaTeX{}
\LaTeXe : . . } ,
3
LATEX cp866
cp866rus.csf. .
105
9 -
y e a r = {1999} ,
i s b n = {5030033254} ,
p u b l i s h e r = {} ,
a d d r e s s = {. } ,
numpages = {606} ,
la ng ua g e = { r u s s i a n } ,
OPTnote = {}
}
at @ .
-. BibTEX
, 4 . ,
BibTEX .
(BibTEX ):
ritcle . : author, title, journal, year.
: volume, number, pages, month, note, annote.
Book . : author editor, title, publisher, year.
: volume, number, series, address, edition, month, note,
annote.
Booklet . : title. : author,
howpublished, address, month, year, note, annote.
Conference InProceedings . : author, title. : crossref, booktitle,
pages, year, editor, volume, number, series, address, month, organisation, publisher,
note, annote.
Proceedings . : title, year. : booktitle, editor, volume, number, series, address, month, organisation,
publisher, note, annote.
InBook , ,
. : author editor, title,
chapter , publisher year. : volume number, series, type,
address, edition, month, pages, note, annote.
InCollection . : author,
title, booktitle. : crossref, pages, publisher, year, editor,
volume number, series, type, chapter, address, edition, month, note, annote.
4
OPT (noteOPTnote),
, .
106
9 -
Manual . : title. : author, organistaion, address, edition, month, year, note, annote.
PhdThesis . : author, title, school, year. : address, month, note, annote.
MastersThesis .
PhdThesis.
TechReport . : author, title, institution, year. : type, numer, address, month, note, annote.
Unpublished . : author,
title, note. : month, year, annote.
Misc , .
. : author, title, howpublished, month, year,
note, annote.
. , crossref, BibTEX
. ,
author, and.
- gost780u/gost71u gost780s/gost71s
numpages language plain. language russian, ukrainian
english .
9.5.
, ,
, .
. .
\makeindex
C, ,
\index.
\index { } . . .
107
9 -
le.tex
LATEX
.tex
LATEX
.idx
.ist
MakeIndex
.ind
.ilg
108
9 -
MakeIndex, 110
, 110111
makeindex, . rumakeindex
rumakeindex, 110, 111
xindy, 111
. 9.6. .
,
LATEX-.
\index !, ", @ |.
. \index
" ( ). . 9.6 . .
!:
% 110 111
\index { ! rumakeindex }
\index .
| . \see ( ),
makeidx, :
\index { ! makeindex | s e e { rumakeindex }}
:
% 110
\ index { | ( }
% 111
\ index { | ) }
- .
:
% 110
\ index {MakeIndex@ \ t e x t i t { MakeIndex}textbf
109
9 -
@
\index. ,
.
. .
- . . , .
110
10
,
.
, .
.
.
.
10.1.
() , ,
. :
( ) , 1 (
), ( ), ( ) ( ).
10.1. .
:
1
- . . ,
.
111
10
,
.
.
.
. .
, ,
. 0.1, .1.
. . . , ..
,
.
, , . .
, LATEX-
.
. ,
,
. ,
.
10.2. tabbing
,
tabbing.
\begin{tabbing}
MMMMM \= MMMMM \=
\kill
\textbf{\ } \> \>
\> \> \\
\> \>
\end{tabbing}
\\
\=.
\kill, , , . , \>, \\.
, , .
tabbing . , ,
112
10
. LATEX .
, . tabbing .
LATEX tabbing .
(\) (\ \). /
\pushtabs/\poptabs.
& &
\end{tabular}
&.
\\.
. .
tabular . table:
\ begin{ t a b l e } [ ht ]
\ centering%
\begin { t a b u l a r } [ ] { }
\end{ t a b u l a r }
\ caption {}\ label { tab : metka }
\end{ t a b l e }
. tabular
:
t , ,
113
10
c ,
b .
,
.
:
l (left) ,
c (center) ,
r (right) ,
p{} . .
, :
{n}{ }
n . .
\centering
\begin{tabular}{|*{3}{c|}}
\textbf{} & & \\[2mm]
\hline\hline
& & \\
& &
\end{tabular}
|. || . \hline. . @{}
. , .
- ,
.
\centering
\begin{tabular}{c||p{2cm}@{$\pm$\ }r|}
\textbf{} & & \\[2mm]
\cline{2-3}
& & \\
\cline{1-1}\cline{3-3}
114
10
\cline{ }.
array ,
tabular, :
m{} , p{}, ,
b{} , m{},
.
array
array.pdf tools.
, , Publication quality tables in LATEX (booktabs.pdf),
(Simon Fear) booktabs.
, .
10.3.1.
(), , . :
.
.
,
, .
.
hhline tools \hhline,
, . hhline.pdf.
arydshln
. arydshln-man.pdf .
10.3.2.
\multicolumn{n}{ }{}:
\centering
\begin{tabular}{|*{3}{c|}}
\textbf{} & & \\[2mm]
\hline\hline
& \multicolumn{2}{c}{} \\
& &
\end{tabular}
115
10
, , .
multirow
:
\centering
\begin{tabular}{|*{3}{p{1.2cm}|}}
\textbf{} & & \\[2mm]
\hline\hline
& \multirow{2}{1.2cm}{} & \\
&
&
\end{tabular}
README .
:
\ multirow { }{}{}
\ multirow { }{}
, , ,
. .
. ,
colortbl:
\centering
\begin{tabular}{c>{\columncolor{yellow}}cc}
\backslashbox{}{} & & \\
\rowcolor{yellow}
&
& \\
PP
PP
PP
PP
P
colortbl . colortbl.pdf .
\backslashbox{}{},
, slashbox. . slashbox.tex.
lh
makecell. \makecell,
, .
. .
(makecell.pdf) (makecell-rus.tex).
116
10
10.3.3.
. ,
.
dcolumn tools :
\centering
\begin{tabular}{|c|l|D{.}{,}{5}|}
0.3141 & 0.3141 & 0.3141 \\
3.141 & 3.141 & 3.141 \\
31.415 & 31.415 & 31.41 \\
\end{tabular}
0.3141
3.141
31.415
0.3141
3.141
31.415
0,3141
3,141
31,41
: D{delim}{output}{nfruc}, delim (
), output delim (,
), nfrac
( .
dcolumn.pdf.
rccol , dcolumn, .
. rccol rccol.pdf . ,
.
warpcol . warpcol.pdf
.
10.3.4.
CSV ( . Comma Separated Values , )
, .
csvtools. csvtools.pdf , tex-.
10.3.5. tabular
tabularx tools tabular
, X.
117
10
\centering
\begin{tabularx}{\textwidth}{|D{.}{,}{4}|X|c|}
0.3141 & & 0.3141 \\
3.141\footnote{ tabularx
}
& 3.141 & 3.141
\end{tabularx}
0,3141
3,141a
3.141
0.3141
3.141
tabularx
tabularx .
X p{},
. , X,
. , ,
(tabularx.pdf).
tabulary tabular, array. . tabulary.pdf.
.
ctable . \ctable, tabular
table. \ctable
. ctable.pdf.
10.4.
tabular ,
. : supertabular longtable . , .
,
. : supertabular.pdf supertabular longtable.pdf
longtable tools.
longtable supertabular , LATEX.
, .
supertabular supertabular
mpsupertabular,
118
10
minipage, .
, , xtab.
supertabular .
xtab.pdf
10.5.
,
. \tableofcontents,
\ listogures \ listoftables .
\centering
\begin{tabular}{p{0.7\textwidth}@{}r}
1\dotfill & 2 \\
2\dotfill & 10 \\
3\dotfill & 124
\end{tabular}
1 . . . . . . . . . . . . . . . . . . . . 2
2 . . . . . . . . . . . . . . . . . . . . 10
3 . . . . . . . . . . . . . . . . . . . . 124
\dotll ( ).
listliketab
, .
:
\ s t o r e s t y l e o f { enumerate }
\ begin{ l i s t l i k e t a b }
\newcounter{tabenum }\ setcounter { tabenum }{0}
\newcommand{\nextnum }{\ addtocounter {tabenum }{1}\ thetabenum . }
\ begin { t a b u l a r }{L>{\ b f }l@{~~~~}>{\ b f }l@{~~~~}>{\ b f } l }
\nextnum &
& & \\
\nextnum & & & \\
\nextnum & &
& \\
\end{ t a b u l a r }
\end{ l i s t l i k e t a b }
1.
2.
3.
listliketab.pdf
119
10
10.6. ?
tableaux tabvar .
. !
32
x
f (x)
f (x) +
&
0 +
+
+
3
& & 2 %
tabvar tableaux.
tabvar.pdf demo.tex.
, - :
pb-diagram , :
9.3%
65 .
c0
6104
420
6.6103
J/
5
710-
50
12%
J/
10.7.
.
, .
. . ,
, .
120
11
- ,
. ,
. , .
100% .
.
LATEX ,
, , . .
.
11.1. . . .
. . . , . , , .
:
\newcommand{\ ee }{\ensuremath{ e^{+}e ^{}}\xspace }
. \ensuremath
:
\(J/\psi\to\ee\)
\ee-.
J/ e+ e e+ e -.
121
11
\xspace
, , .
,
:
\newcommand{ } [ N ] [ . . ] { }
\renewcommand{ } [ N ] [ . . ] { }
\providecommand{ } [ N ] [ . . ] { }
\newcommand . ,
. \renewcommand . \providecommand ,
, ,
.
. /,
(1) (9).
3.4
(\(a + b \hm{=} c\)):
\newcommand{\hm} [1 ]{ #1 \ nobreak\ discretionary {}%
{\hbox{$\mathsurround=0pt #1$}}{}}
(#) .
, #1.
(*) \newcommand \hm :
\par. .
:
\newcommand{\exmpl}[1][]%
{<< #1>>}
\exmpl{} \exmpl[].
\newenvironment,
:
\newenvironment{outlined}{\hrule\begin{center}}%
{\end{center}\smallskip\hrule}
\begin{outlined}
.
\end{outlined}
122
11
\newcommand:
\newenvironment { } [ N ] [ . . ]%
{ }%
{ }
, \newcommand, .
. \renewenvironment.
8.3, beamer \newtheorem:
\newtheorem{Texmpl}{}
\begin{Texmpl}[ ]\label{th:1}
.
\end{Texmpl}
1 ( ).
.
\begin{Texmpl}\label{th:2}
2. , . , .
\end{Texmpl}
:~\ref{th:1},
:~\ref{th:2}
: 1, : 2
\newtheorem :
\newtheorem{ } [ ] { }
\newtheorem{}{ } [ ]
.
.
. , ,
.
11.2.
6.1
.
\newlength, \setlength \addtolength. LATEX
:
123
11
\newcounter{MyCount}\setcounter{MyCount}{5}
MyCount \arabic{MyCount},
~\alph{MyCount}, \Asbuk{MyCount}.\par
\addtocounter{MyCount}{1550}
\arabic{MyCount} \Roman{MyCount}.
MyCount 5,
e, .
1555 MDLV.
\newcounter.
. , ,
. \setnewcounter, -
\addtocounter.
, - , - . . \arabic{}.
\Roman \roman , . : \alph
, \asbuk \asbuk
.
( page), (, part, chapter,
section, subsection, subsubsection . .), (
footnote), ( gure table) (equation).
\the
. .
, ,
, , \the-,
, , :
\renewcommand{\thepage}{\Roman{ page }}
, :
\newcounter{Main}\addtocounter{Main}{10}
\newcounter{Dep}[Main]\addtocounter{Dep}{10}
: \theMain.\theDep\par
\stepcounter{Main}
: \theMain.\theDep
: 10.10
: 11.0
,
.
124
11
Dep Main. ,
(Main)
\stepcounter, (Dep) . ,
(section).
\refstepcounter{} \stepcounter, , , \refstepcounter ,
\ref, , \the-:
% " "
\newcounter{ Problem } [ s e c t i o n ]
\renewcommand{\ theProblem }{\ t h e s e c t i o n . \ arabic { Problem }}
\newenvironment { Problem } [ 0 ] {%
\par\ refstepcounter { Problem }%
\ theProblem \ ,}%
{\par }%
Problem . Problem
. \theProblem
. Problem
\refstepcounter{}. :
\begin{Problem}\label{ex:1}
\end{Problem}
\begin{Problem}\label{ex:2}
\end{Problem}
~\ref{ex:1} ~\ref{ex:2}.
11.2.1
11.2.2
11.2.1 11.2.2.
LATEX :
calc tools , 6.1. \newcounter
, , . calc.pdf.
ifthen \ ifthenelse
\whiledo. ifthen.pdf. xifthen.
fmtcount (, , . .) (fmtcount.pdf).
multido \multido (multido.pdf).
tokenizer (tokenizer.pdf).
totpages
(totpages.pdf).
125
11
xkeyval keyval, / key=value (xkeyval.pdf).
11.3.
, LATEX.
, .
, .
: TEX ,
. .
1 .
,
.
LATEX
dtx (dtx-).
, ins (ins-). How to Package Your LATEX Package, (Scott
Pakin). dtxtut.pdf, , LATEX
CTAN. [c]skeleton.dtx
[c]skeleton.ins.
dtx- doc
DOCSTRIP ( docstrip.pdf). doc , .
11.3.1. ins-
dtx- . :
%% ( LPPL/GPL)
%%
%% DOCSTRIP .
\ input d o c s t r i p . t e x
%%
%% .
\ keepsilent
1
listings,
listing lstlisting.
126
11
%% .
%%
%% $(TEXMF) .
\ u s e d i r { t e x / l a t e x /{ }}
%% ,
%% . ,
%% .
\ preamble
\ endpreamble
%% dtx . ,
%% .
\ g e n e r a t e {\ f i l e { }{\ from {dtx-}{}}}
...
...
%% .
%% .
\obeyspaces
\Msg { }
\Msg{
, .
}
\Msg{
!
}
\Msg { }
%% .
\ endbatchfile
11.3.2. dtx-
dtx- , . dtx- latex
. .
(literate programming).
. LATEX-,
. %
LATEX, () \ ialse -\ .
, , :
%\ i f f a l s e metacomment
% LATEX . metacomment
%
127
11
% , ( ) .
%\ f i
ins- \generate .
DocStrip, , <> <> </>.
:
% \iffalse
%<> \NeedsTeXFormat {LaTeX2 e }
%<> \ Pr o videsPa cka g e { }
%<>
[ <>/<>/<> v<> < > ]
<>/<>/<> v<> < > , , .
, :
%< d r i v e r >
\documentclass{ ltxdoc }
\ usepa cka g e { }
\ b e g i n { document}
\ DocInput {dtx-}
\end { document}
%</ d r i v e r >
% \fi
,
(%).
.
,
EX . , .
dtx- LATEX- , (%)
LAT
%
%
%
%
\ t i t l e { \ t e x t s f { }}
\ a ut ho r { \\ \ t e x t t t { e-mail}}
\ maketitle
LATEX- paragraph
\DescribeMacro{} \DescribeEnv{}
128
11
, , .
(literate programming).
:
%\ S t o p E v e n t u a l l y {\ P r i n t I n d e x }
%\ b e g i n { environment }{ }
% .
% , macros, .
% \ b e g i n { macrocode }
, :
\newenvironment { }{ }{ }
% \ end { macrocode }
%\ end { environment }
...
%\ F i n a l e
\endinput
\StopEventually{} , , , \PrintIndex.
macrocode.
. , , :
% \begin{macrocode} (4) . \end{macrocode},
, %.
environment macros
.
11.3.3.
LATEX- dtx-. ins- :
%< b a t c h f i l e >
\begingroup
ins-
129
11
\endgroup
%</ b a t c h f i l e >
\endbatchle,
LATEX .
. CTAN.
http://www.ctan.org/upload.
README . pdf-
.
11.4.
. ,
. , . (literate
programming).
LATEX- . ,
. . .
, .
.
130
131