Upload
vuongmien
View
219
Download
0
Embed Size (px)
Citation preview
一份不太简短的 LATEX2ε 介绍
或 93分钟学会 LATEX2ε
原版作者:Tobias Oetiker
Hubert Partl, Irene Hyna and Elisabeth Schlegl
原版版本:Version 3.20, 09 August, 2001
中文翻译:¥I TEX^r|
中文版本: 3.20§oocÊ
ii
Tobias Oetiker Pk c© 2000±9LShort¤ku1"3¤k|"ù°©´¤¶3gd^|ÙGNUÏ^ÑNy^±e§
\±2½ö?U§"Ny±´1§½ö?ÛU£\¿¤"uÙù°©´F"§¬k^§¿ØJø?Ûæ¶$vk^uû½
ö·^,A½8V¹y"õ[!wGNUÏ^ÑNy"
\ATù°©Â°GNUÏ^ÑNy¶XJvk§&
gd^|§/µ675 Mass Ave, Cambridge, MA 02139, USA"
鸣谢!
3ù°0¥¦^Nõá5gc/|<¦^> LATEX2.090µ
Hubert Partl <[email protected]>
Zentraler Informatikdienst der Universitat fur Bodenkultur Wien
Irene Hyna <[email protected]>
Bundesministerium fur Wissenschaft und Forschung Wien
Elisabeth Schlegl <no email>
in Graz
XJ\é©©k,§\±édJorg Knappen éLATEX2ε #§3CTAN ´µCTAN:/tex-archive/info/lshort/german
3Où°©§·comp.text.tex¥;[?1\Î"·þ£A"e¡<Ï?1!ïÆÚJøU?á"¦GÑ49Ï·òù°©¢y¤y3ùf"·é¦¤k<L«©%a"g,/§\3Ö¥é/¤kØÑ´·Ø"$\éz©(üc§@½´e¡Ñù<·r(J"
iv 鸣谢!
Rosemary Bailey, Friedemann Brauer, Jan Busa, Markus Bruhwiler,David Carlisle, Jose Carlos Santos, Mike Chapman, Christopher Chin,Carl Cerecke, Chris McCormack, Wim van Dam, Jan Dittberner,Michael John Downes, David Dureisseix, Elliot, David Frey, RobinFairbairns, Jorg— Fischer, Erik Frisk, Frank, Kasper B. Graversen,Alexandre Guimond, Cyril Goutte, Greg Gamble, Neil Hammond,Rasmus Borup Hansen, Joseph Hilferty, Bjorn Hvittfeldt, MartienHulsen, Werner Icking, Jakob, Eric Jacoboni, Alan Jeffrey, ByronJones, David Jones, Johannes-Maria Kaltenbach, MichaelKoundouros, Andrzej Kawalec, Alain Kessi, Christian Kern, JorgKnappen, Kjetil Kjernsmo, Maik Lehradt, Alexander Mai, MartinMaechler, Aleksandar S Milosevic, Claus Malten, Kevin Van Maren,Lenimar Nunes de Andrade, Hubert Partl, John Refling, Mike Ressler,Brian Ripley, Young U. Ryu, Bernd Rosenlecher, Chris Rowley,Hanspeter Schmid, Craig Schlenter, Christopher Sawtell, GeoffreySwindale, Josef Tkadlec, Didier Verna, Fabian Wernli, Carl-GustavWerner, David Woodhouse, Chris York, Fritz Zaucker, Rick Zaccone,and Mikhail Zotov.
前言
LATEX[1]´«üXÚ§§~·^u)¤p<MþEÚêÆa©"ùXÚÓ·^u)¤lü&Ö7¤kÙ¦«a©"LATEX¦^ TEX[2]§ªzÚ"ù°á0£ã LATEX2ε ¦^§é LATEXõêA^5`A
T´v"ë©z [1, 3]é LATEXXÚJø£ã"éõêOŧl<OÅ£PC¤Ú Mac . UNIX Ú
VMSXÚ§LATEXÑk·^"3NõÆOÅŧ\¬uyXÚ¥®²SC LATEX¿U¦^"3 Local Guide [4]¥ATJø'uXÛ;/ LATEXSC&E"XJ\éXÛ\k¦¯§Jøùþf<\Î"ù°©I不是w\XÛSC¿ LATEXXÚ§ ´\XÛ?\©§¦§± LATEX?n"ù°0©¤ÊÙ!µ
第一章 w\'u LATEX2ε ©Ä("\¬): LATEX¤"ÖùÙ§\ATé LATEXkoÑ<"ù<==´µe§´§±¦\Ü3Ù¦Ù!¥Jø&E¤x¡"
第二章 &Äü©[!"§)ºÜ©Ä LATEX·-Ú¸"3ÖùÙ§\ÒU?\1°©"
第三章 )ºXÛ¦^ LATEXüúª"Ó§þ~f¬Ï\n)XÛ¦^ LATEXÌUå"3ùÙ!(§\¬é LATEX¥¤k^êÆÎÒL"
第四章 )º¢ÚÚë©)¤!EPSã/\ÚÙ¦k^*Ð"
第五章 ¹d3x&E§k'é LATEX)IO©ÙÛXÛJøÀ"§¬w\XÛUC LATEXwå5k:<sÀܧ¤ÑÑ"
vi 前言
UìëY^SÖùÙ!´é§ùÖ.¾Ø"½@ýÖ~f§3ùÖ¥\¬é¤k~f§Ï3«~fp¹Ü©&E"
XJ\I¼?Û LATEX'á§3?Û/¡ TEX8ä0£CTAN¤Õ:¥ééw"§Ì´ http://www.ctan.org"¤k÷±l ftp8Õ: ftp://www.ctan.orgÚHÙ¥ºÕ:¥¼"=3 ftp://ctan.tug.org£I¤§ ftp://ftp.dante.de
£I¤§ ftp://ftp.tex.ac.uk£=I¤é§"XJ\Ø3ùI[¥§@oÀJl\C8Õ:"3Ö¥\¬ék'CTANÙ¦ë]"AO/§Ñ\UI
e1^Ú©«"ùpvkÑ url§ ´==k\AT3CTANä(½ CTAN:&E"XJ\3gCOÅþ$1 LATEX §3 CTAN:/tex-archive/systems¥wwko"
XJ\k¿3ù°©¥O\!íؽöUCSN§Ï·"·él LATEXÐÆö"AOa,§'uù°0=Ü©éN´n)§=Ü©UIÐ/)º"
Tobias Oetiker <[email protected]>
Department of Electrical Engineering,Swiss Federal Institute of Technology
ù°©#±3CTAN:/tex-archive/info/lshort
"k'ù°©#¥©È§
http://bbs.ctex.org
é#&E"
目录
鸣谢! iii
前言 v
1 基本知识 1
1.1 iZ¶8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1 TEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.2 LATEX . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 LATEXÄ: . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2.1 ö!ãÖOöÚüö . . . . . . . . . . . . . . . 2
1.2.2 ¡O . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.3 `³ÚØv . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 LATEX © . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3.1 xål . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3.2 AÏiÎ . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3.3 LATEX·- . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3.4 5º . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4 ©( . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.5 ;.·-1L§ . . . . . . . . . . . . . . . . . . . . . . 8
1.6 ©ÙÛ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.6.1 ©a . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.6.2 ÷ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.7 a LATEX© . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.7.1 ¡ª . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.8 .© . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2 文档排版 15
2.1 ©Úó( . . . . . . . . . . . . . . . . . . . . . . . . 15
viii 目录
2.2 ä1Ú© . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.2.1 ãán . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.2.2 äi . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.3 ÆSiÎGü . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.4 AÏiÎÚÎÒ . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.4.1 ÚÒ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.4.2 »òÒÚëiÒ . . . . . . . . . . . . . . . . . . . . . 20
2.4.3 ÅLÒ(∼) . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.4.4 ÝÎÒ() . . . . . . . . . . . . . . . . . . . . . . . . 20
2.4.5 ÑÒ( . . . ) . . . . . . . . . . . . . . . . . . . . . . . 20
2.4.6 ëi . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.4.7 5ÑÎÒÚAÏiÎ . . . . . . . . . . . . . . . . . . . 21
2.5 |±¦^ISó . . . . . . . . . . . . . . . . . . . . . . . . 21
2.5.1 é|± . . . . . . . . . . . . . . . . . . . . . . . 24
2.6 ücm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.7 IK§ÙÚ! . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.8 Ú^ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.9 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.10 rN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.11 ¸ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.11.1 Itemize, Enumerate, and Description . . . . . . . . . . 29
2.11.2 Flushleft, Flushright, and Center . . . . . . . . . . . . 29
2.11.3 Quote, Quotation, and Verse . . . . . . . . . . . . . . 30
2.11.4 Åi< . . . . . . . . . . . . . . . . . . . . . . . . . 30
2.11.5 L . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.12 2ÄN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.13 oyf·- . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3 数学公式 37
3.1 ģ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
3.2 êƪ¥©| . . . . . . . . . . . . . . . . . . . . . . . . 39
3.3 ïáêÆúª¬ . . . . . . . . . . . . . . . . . . . . . . . . 39
3.4 êÆ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
3.5 Réà . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
3.6 K . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
3.7 êÆiN . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
目录 ix
3.8 ½n!½Â . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473.9 oNÎÒ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483.10 êÆÎÒL . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
4 特殊功能 57
4.1 ¹ EPSã/ . . . . . . . . . . . . . . . . . . . . . . . . . . 574.2 ë©z . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594.3 ¢Ú . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604.4 ½wÚ . . . . . . . . . . . . . . . . . . . . . . . . . . 614.5 Verbatim÷ . . . . . . . . . . . . . . . . . . . . . . . . . . . 614.6 e1¿SC LATEX÷ . . . . . . . . . . . . . . . . . . . . . . 62
5 定制LATEX 64
5.1 ïá#·-!¸Ú . . . . . . . . . . . . . . . . . . . . 645.1.1 ïá#·- . . . . . . . . . . . . . . . . . . . . . . . 655.1.2 ïá#¸ . . . . . . . . . . . . . . . . . . . . . . . 665.1.3 ïá\gC÷ . . . . . . . . . . . . . . . . . . . . 66
5.2 iNÚº . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675.2.1 iNC·- . . . . . . . . . . . . . . . . . . . . . . . 675.2.2 Danger, Will Robinson, Danger . . . . . . . . . . . . . 705.2.3 ïÆ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
5.3 ©émm . . . . . . . . . . . . . . . . . . . . . . . 705.3.1 1å . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705.3.2 ã᪠. . . . . . . . . . . . . . . . . . . . . . . . . 715.3.3 Y²ål . . . . . . . . . . . . . . . . . . . . . . . . . 725.3.4 Rål . . . . . . . . . . . . . . . . . . . . . . . . . 72
5.4 ¡ÙÛ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735.5 'uÝ[&E . . . . . . . . . . . . . . . . . . . . 755.6 Ýf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 765.7 IºÚ| . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
参考文献 80
索引 82
图形列表
1.1 TEXXÚ|¤Ü© . . . . . . . . . . . . . . . . . . . . . . . 21.2 ü LATEX © . . . . . . . . . . . . . . . . . . . . 81.3 Ø©a LATEX ©~f . . . . . . . . . . . . . . . . . . . 8
4.1 fancyhdr¢~" . . . . . . . . . . . . . . . . . . . . . . . 62
5.1 Example Package. . . . . . . . . . . . . . . . . . . . . . . . . 675.2 ¡ÙÛëê . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
表格列表
1.1 ©a . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.2 ©aÀ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3 LATEXuÙ÷ . . . . . . . . . . . . . . . . . . . 12
1.4 The Predefined Page Styles of LATEX. . . . . . . . . . . . . . . 13
2.1 5ÑÎÒÚAÏiÎ. . . . . . . . . . . . . . . . . . . . . . . . 22
2.2 AÏiÎ. . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.3 2Ä#Nëþ" . . . . . . . . . . . . . . . . . . . . . . . 34
3.1 êƪÑÎ . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.2 F1i1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.3 F1i1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.4 'XÎ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
3.5 $Î . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
3.6 º$Î . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
3.7 Þ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
3.8 ½.Î . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
3.9 º½.Î . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
3.10 Ù§ÎÒ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
3.11 êÆÎÒ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
3.12 AMS½.Î . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
3.13 AMSF1ÚFË5i1 . . . . . . . . . . . . . . . . . . . . . 53
3.14 AMS'XÎ . . . . . . . . . . . . . . . . . . . . . . . . . 54
3.15 AMSÞ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
3.16 AMSĽ'XÎÚÞ . . . . . . . . . . . . . . . . . . . 55
3.17 AMS$Î . . . . . . . . . . . . . . . . . . . . . . . . . 55
3.18 AMSÙ§ÎÒ . . . . . . . . . . . . . . . . . . . . . . . . . . 56
3.19 êÆi1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
xii 表格列表
4.1 graphicx÷¦^'c . . . . . . . . . . . . . . . . . . . . 584.2 ¢Ú'cª«~" . . . . . . . . . . . . . . . . . . . . . . 60
5.1 iN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685.2 iNº . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685.3 IO©a.¥iNýé . . . . . . . . . . . . . . . . . 695.4 êÆiN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 695.5 TEXÝü . . . . . . . . . . . . . . . . . . . . . . . . . . 73
第一章基本知识
Ù1Ü©0 LATEX2εÌgÚuФ"1Ü©8¥`² LATEX©Ä("3ÖÙ§\AT®²é LATEX
ónk)§ùòkÏu\3?ÚÖ¥Øäò#¼&EK\Nã¥"
1.1 游戏的名目
1.1.1 TEX
TEX´d Donald E. Knuth[2]?OŧS§^u©ÙÚêÆúªü"1977c Knuthm©? TEXüXÚÚÿ§´&¢m©?\Ñóêi<Mdå"¦AOF"UÏdÛ=@«üþeüª³§¦gCÖÚ©ÙÉÙ³"·y3¦^ TEXXÚ´3 1982cuÙ§1989cqÑU?§O?é 8i!iÎÚõó|±"TEX±äk`ɽ5§±3«ØÓa.OÅþ$1§±9AvkØ Í¡"TEXÒØäªCu π§y33.14159"
TEX uÑ “Tech”§Ù¥ “ch” ÑÚ “Ach” Ú=“Loch”¥ “ch”aq"3 ASCII©¸¥§TEXL« TeX"
1.1.2 LATEX
LATEX´÷§Ù8´¦öU|^ýk½ÂÐ;¡§l ±pþ/üÚ<¦¬"LATEX@´d LeslieLamport[1]?§¿¦^ TEXÙüXÚÚ"
1994c§ Frank Mittelbach+ LATEX 3|é LATEX÷?1#§Ï"®ÈU?§¿ò LATEX 2.09uÙ±5êcmÑy«ØÓÖ¶#Úå5"ù#¡ LATEX2ε §±«ÚΫO"ÖSNÒ´é LATEX2ε"
2 基本知识
²± ¯ °.pk?
METAfont?
²± ¯ °.mf
driverdvips
xdvi
...?
²± ¯°.dvi?
TEX PlainLATEX2ε
AMS-Package
...
?
²± ¯°.tex
6
?
editoremacsispell
...?
²± ¯°copy
- - printerscreen
PostScript 6
-²± ¯°.tfm - -
²± ¯°.log
¾ Fonts - ¾ Typesetting -
ã 1.1: TEXXÚ|¤Ü©
LATEX2ε uÑ “Lay-tech”½ “Lah-tech”"3 ASCII©¸¥L« LATEX2姱^ LaTeX"LATEX2ε uÑ “Lay-tech two e”§¤ LaTeX2e"
ã 1.1w« TEXÚ LATEX2ε ´XÛÓó"Tãg Kees vander Laan wots.tex"
1.2 LATEX基础
1.2.1 作者、图书设计者和排版者
Ñ1Ú´öò¦ÃvÑúi§,dãÖOö5û½Ö¡/ª£)9°!iN!IKcmå,,¤"ãÖOö¬r¦ü`²?Ãvp§åüö§üöâù`²¤ùÖüó"ãÖOöÁãn)ö¿ã"¦âÃvSN
Ú¦gC£û½Ù!IK!©zÚ^!~f!úª!"
1.2 LATEX基础 3
3 LATEX¸¥§LATEXOãÖOöÚ§TEXK´§üö"´ LATEX/==0´OŧS§§Iõ"ö7L3¦¬¥JøN\&E§^u£ã¬Ü6("ù&E´±/LATEX·-0/ª\©Ù¥"ù«ªÚ¤=¤£WYSIWYG1¤ª´ØÓ"éõy
©i?n§SÑæ^¤=¤ª§~X MS WordÚ Corel Wordper-fect"ö±|^ùA^§S§3Ñ\©ÙÓ§ÏLOÅpĪû½©ü/ª"3L§¥§ö±3¶4þw¬ª<Ñ5J"3¦^ LATEXÿ§5`´ØU3Ñ\©ÙÓwª
ÑÑJ"´ò©Ù^ LATEX?nL§´±3¶4þýAªÑÑJ"Ïd3ý<©c´±éÙ?1?"
1.2.2 版面设计
üO´²â""y²ö~~¬îüªØ§Ï¦@ãÖO==´Æ¯K))/XJü<Щl²âÝw5اÒ`²O´¤õ"0´Q,©´^5Ö Ø´^5!3xIpÐA§§Ö5Ún)5Ò'Ðw*õ"~Xµ
• 7LIKÀJ·iNÚSÒ§¦ÖöUÙ/n)Ù!("
• 1°Qvá±;Ööú«N§qv±±¡*"
¦^¤=¤XÚ§ö²~¬Ñwþ餧%"yß(½(Øë0©5";ùüªØ§LATEX¦ö²(`²Ù©逻辑(",§LATEX2â©(ÀJ·¡ª"
1.2.3 优势和不足
¦^/¤=¤0£WYSIWYG¤<Ú¦^ LATEX<3å²~!ØKÒ´/LATEX.'i?n^r´f0"¡éù«?ا\д±$N§ÏùFØéN´"ØL§éõÿ\ØU<;,,
1What you see is what you get.
4 基本知识
¤±§ùp\JøÉì"LATEX`ui?n^?±ü8BXeA:µ
• Jø;?üO§¦\©må5XÓ<MÐ"
• ±B/üêÆúª"
• ^r==IݺêN´n)§^5`²©Ü6(·-§ ÃLé¢S¡OÏ?Ö"
• ±éN´)¤5!¢Ú!8¹Úë©zE,("
• kþ¤/V\÷8§Ï\¤NõÄ LATEX|±ü?Ö"~X§|±3©¥\ PostScriptã/÷8ÚüÎÜaIOë©z÷8§"The LATEX Companion [3]¥Ñþ÷8`²"
• LATEXyöäkûÐ(©Ù§Ï LATEXÒ´ÏL[/`²©Ù(5?1Ùüó"
• TEX LATEXªzÚ´¤^§äk4p£5"Ïd§¦A±3?ÛM²þ$1"
LATEX,kØv?"=+·±(½Ù¦<UÑþz^§·%éJéÑ^'²" ;-)
• éuÑñÙ(µ<5`§LATEXØUéÐó2"
• ¦+3ýk½ÂС¥±N!ëê§O#¡´é(J§IѤþm3"
• LATEXØ·Üuü(z!ÃS©"
• =¦k-<¯m©§\kUÃݺٰ"
1.3 LATEX源文件
LATEX ©ªÊÏ ASCII©§\±¦^?Û©?6ì5Mï"LATEX ©Ø=)\¤ü©§) LATEX¤U£O§XÛüù©·-"
2©µ“LATEX does not work well for people who have sold their souls . . . ”§ØÈ´Ä("
3Dªùò´5 LATEX3XÚ|¤Ü©"
1.3 LATEX源文件 5
1.3.1 空白距离
LATEXòÚLÎxiÎÀÓxål£space¤"多个连续的空白字符ÓxiÎ"3 LATEX©¥§z1m©xiÎòѧ ü£ÎÀ"
LATEX¦^15(åãá§ü1©¥1Iþãá(åÚ#ãám©"XÓ§õ1¤å^Ú1^´Ó"e¡~f¥§>´ ©¥©§m>K´üÑÑ(J"
It does not matter whether you
enter one or several spaces
after a word.
An empty line starts a new
paragraph.
It does not matter whether you enter one orseveral spaces after a word.
An empty line starts a new paragraph.
1.3.2 特殊字符
e¡ùiδ LATEX3iΧ§½3 LATEX¥kA½^?§½Ø½¹3¤ki¥¥"XJ\3©¥¦^§§Ï~3ü(J¥òجùiΧ ¬ LATEX\ØF"u)¯"
# $ % ^ & _ ~ \
,§ùiÎc¡\þ§Ò±3©¥§"
\# \$ \% \^ \& \_ \ \ \~ # $ % ˆ & ˜
,ÎÒ±dAÏ·-½Ñ·-" \ØUÏL3ÙcV\,5§§\\´^5ä1·-"4
1.3.3 LATEX命令
LATEX·-£commands¤´¯a¿ke¡ü«ªµ
4ÁÁ·- $\backslash$§§ò)¤ \"
6 基本知识
• ± \m©§\þ¹i1iη-¶|¤"·-¶Î!êi½Ù§i1iÎIT·-(å"
• dÚAÏiÎ|¤"
LATEXÑ·-¡"XJ\F"3·-¡§±3·-¡\þ Ú§½ö\þAÏxål·-"ò LATEXó¶K·-¡"
I read that Knuth divides the
people working with \TeX into
\TeXnicians and \TeX perts.\\
Today is \today.
I read that Knuth divides the people workingwith TEX into TEXnicians and TEXperts.Today is 17th January 2003.
Nõ·-Iëê£parameter¤¿^é)Ò£curly braces¤
òÙ)å5u·-¶¡¡"k·-|±^)Ò£squarebrace¤)å5Àëê"e¡~f¥¦^ LATEX·-§¿ò3±é¦?1)º"
You can \textsllean on me! You can lean on me!
Please, start a new line
right here!\newline
Thank you!
Please, start a new line right here!Thank you!
1.3.4 注释
LATEX 3?n ©§XJz©ÒiÎ %§@o LATEXòÑ %T1©§©1α9e1m©xiÎ"ù§·Ò±3 ©¥5º§ جú%¦¬Ñy3ü(J¥"
This is an % stupid
% Better: instructive <----
example: Supercal%
ifragilist%
icexpialidocious
This is an example: Supercalifragilisticexpi-alidocious
%±^5©Ø#Nk½©1Ñ\©"
1.4 源文件的结构 7
XJI5º§\±¦^ verbatim÷8¤Jø comment¸",§\I3 ©ó«p\þ·- \usepackageverbatim"
%This is another
%\begincomment
%rather stupid,
%but helpful
%\endcomment
%example for embedding
%comments in your document.
ù´,\begincomment
~Q§, %ék"\endcomment
3\©¥¦^5À~f"
ù´,3\©¥¦^5À~f"
5¿ùØU¦^3êƸE,¸¥"
1.4 源文件的结构
LATEXI¤?n ©l½(§z LATEX©7L±Xe·-m©µ
\documentclass...
ù·-½\¤©aO"3d§\±\\©ª·-§½ö¦^Xe·-5N\÷8§? LATEXXÚOV#õU"
\usepackage...
¤¤k5§\|^Xe·-5m©\©µ
\begindocument
y3\±Ñ\\¤F"ü©Ú¤¦^ LATEX·-"3©\e¡·-5w LATEX\©d(å§l ¦ LATEXÑ©3d·-Ü©"
5\documentclassÚ \begindocumentm«¡ó«"
8 基本知识
\enddocument
ã 1.2Ыü LATEX ©"Xã 1.3¤« ©KéE,"
1.5 一个典型的命令行过程
·cÙ\½~"Á1 8¥á' LATEX ©"3d§e¡A:Ué\k¤Ï"I5¿´§LATEX==´?n\¤Jø ©§S§¿Øäkã/^r.¡½°UÜ"Uk LATEXSCJøã/^r.¡c০\±:ÂUÜ54 LATEX?È\ ©§ù¿Ø´ LATEXýóª"Ïd§ùpò`²XÛ3Äu©XÚe¦ LATEX?n\ ©",§cJ´\OÅp®²(SC LATEX"
\documentclassarticle\begindocumentSmall is beautiful.\enddocument
ã 1.2: ü LATEX ©
\documentclass[a4paper,11pt]article% define the title\authorH.~Partl\titleMinimalism\begindocument% generates the title\maketitle% insert the table of contents\tableofcontents\sectionStartWell, and here begins my lovely article.\sectionEnd\ldots and here it ends.\enddocument
ã 1.3: Ø©a LATEX ©~f
1.6 文档布局 9
1. Mï¿?6\ LATEX ©"T©7L´©£ASCII¤ª"3 Unix XÚe§¤k?6ìѬ¦^©ªMï©" 3WindowsXÚe§\UI²(/± ASCII½X©ª\©"À\ ©©¶§(Ù*ж .tex"
2. $1 LATEX ?n\ ©"XJ¤õ§\ò¬*ж.dvi©"
latex foo.tex
3. y3\±ýA¤ DVI©"
xdvi foo.dvi
½òÙ= PS©µ
dvips -Pcmz foo.dvi -o foo.ps
xdvi Ú dvips ^5?n .dvi ©m èóä^"cö3 X11¸eò DVI©w«¶4þ§öKò DVI©=PostScript©±^5<"XJ\ئ^ UnixöXÚ§ò¬JøÙ¦óä^5?n .dvi©"
1.6 文档布局
1.6.1 文档类
LATEX ?n ©§ÄkI´ö¤Mï©a."T&E±ÏL·- \documentclass5Jø LATEX"
\documentclass[options]class
ùp class ²¤Mï©a."L ??¥=Ñ©¤`²©a"LATEX2ε u1¥)&!¡Ù§©a"©aá5±ÏLÀ£options¤5\±N!§ØÓÀ^ÏÒm"L 1.2ÑIO©a~^À"
¢~µ LATEX ©±e¡1m©
\documentclass[11pt,twoside,a4paper]article
ù^·-½ LATEX¦^论文ª§11磅iN5üd©§¿·Ü<3 A4纸þÑÑ(J"
10 基本知识
L 1.1: ©a
article üEÏr!áw!§S©!¼"
report üõÙ!w!áÖ7!Ƭة"
book üÖ7"
slides ü¡"Ù¥¦^ sans serifiN"±Ä¦^ FoilTEX5ÓJ"a
aCTAN:/tex-archive/macros/latex/contrib/supported/foiltex
L 1.2: ©aÀ
10pt, 11pt, 12pt ©¤¦^iN"XJvk(²?ÛÀ§"ò¦^ 10ptiN"
a4paper, letterpaper, . . . ½Âܧ"letterpaper"d§±¦^a5paper§b5paper§executivepaperÚ legalpaper"
fleqn TÀò¦êÆúªéৠش¥méà"
leqno TÀò¦êÆúª?Òuý"
titlepage, notitlepage ½´Ä3©IK£document title¤m©#"article©a"Øm©#§ book©aK"
onecolumn, twocolumn ½ LATEX±ü£one column¤½V£two column¤ªü©"
twoside, oneside ½ LATEXü©V¡½ü¡ª"articleÚ report"¦^ü¡ª§ bookK"¦^V¡ª"I5¿´TÀ=^u©ª"twosideÀ不¬Ï\<Å4±V¡<ÑÑ"
openright, openany dÀû½#Ù´==3m>£Ûꤴ3e^m©"TÀé article©aØå^§ÏTa¥¿vk½Â/Ù0£Chapter¤"reporta¥#Ùm©ue^§ booka¥#Ùo´m©um>"
1.7 各类 LATEX文件 11
1.6.2 宏包
\ü©ÿ§\ò¬uykéõÿÄ LATEXØU)û\¯K"XJ\\ã/!çÚ©½ 詧\I¦^÷5Or LATEXõU"N\÷¦^Xe·-µ
\usepackage[options]package
ùp package ´÷¶¡§options ´^5>u÷¥AÏõU|'c"Ü©÷¹3 LATEXÄu1¥£ëL 1.3¤§,÷KüÕuÙ"\±3\¤SC LATEXXÚ¥éõk'÷&E"The LATEX Companion [3]¥Jø'u LATEX÷Ì&E¿)þz÷[£ã±9XÛ\gC LATEX2ε*Ð"
1.7 各类 LATEX文件
\¦^LATEXÿ§\Ué¯uy\«ØÓ*ж£extensions¤©t³Þ³M"5¿L¥¤Ñ*ж¿Ø§XJ\uyÙ¥d\@'§Ð3Ùe¡yI²"
.tex LATEX½ TEX ©"±^ latex?n"
.sty LATEX÷©"¦^·- \usepackageòÙ\1\ LATEX©¥"
.dtx ©z TEX©"ù´ LATEX÷uÙ̪"ÏL?n.dtx©Ò±T LATEX÷¥¤)÷è©"
.ins A .dtx ©SC©"XJ\3äþe1 LATEX ÷§\Ï~¬uy¬k .dtxÚ .ins©"¦^ LATEXé .ins©?1?n§±l .dtx©¥JÑ÷"
\$1 LATEX?n\ ©§¬e©µ
.dvi Ã'©"ù´ LATEX?È$1Ì(J"\±¦^ DVIýAìèAÙSN§½ö¦^ dvipsùA^§SÑÑ<Å"
.log P¹þg?È$1[&E"
12 基本知识
.toc ;¤kÙ!IK"T©ò3eg?È$1Ö\¿)¤8¹"
.lof aq .toc©§)¤ã/8¹"
.lot aq .toc©§)¤L8¹"
.aux ,^5eg?È$1D4&E9Ï©"ØÙ§&E§.aux©Ï~¹Ú^&E"
.idx XJ\©¥¹k¢Ú§LATEX ¦^d©;¤k¢Úc^"d©I¦^ makeindex?n"1 4.3!"
L 1.3: LATEXuÙ÷
normalfontdoc ü LATEX§S©" doc.dtxaÚ The LATEX Companion [3]"
exscale Jø êÆiN*Ð" ltexscale.dtx"
normalfontfontenc (² LATEX¤¦^iN?è£font encod-ing¤" ltoutenc.dtx"
ifthen JøXe/ª·-µ‘if. . . then do. . . otherwise do. . . .’ ifthen.dtxÚ The LATEX Companion [3]"
latexsym N\d÷3©¥¦^ LATEXÎÒ" latexsym.dtxÚ The LATEX Companion [3]"
makeidx Jø)¤¢Ú·-"1 4.3 !Ú The LATEXCompanion [3]"
syntonly ==?n©§¿ØéÙ?1ü"
inputenc #N(² ASCII!ISO Latin-1!ISO Latin-2!437/850IBM ?è!Apple Macintosh!Next!ANSI-Windows ½g½ÂÑ\?è" inputenc.dtx"
ad©AT®SC3\XÚ¥§\±3\k8¹e¦^·-latex doc.dtx dvi©"éuL¥J9Ù§©Ó·^"
1.8 大型文档 13
.ind ²L?n .idx©"3eg?È$1\\\©¥"
.ilg $1 makeindex)¤P¹©"
1.7.1 页面式样
LATEX|±n«ý½w!£header/footer¤ª§¡¡ª£page styles¤"·-
\pagestylestyle
¥ëê½Â¤¦^¡ª"L 1.4Ñýk½Â¡ª"
L 1.4: The Predefined Page Styles of LATEX.
plain w§dØ¥è|¤"ù´%@¡ª"
headings wdcÙ!IKÚè|¤§"£ù´©¤¦^¡ª¤
empty w!þ"
±¦^e¡·-UCc¡ªµ
\thispagestylestyle
k'XÛMï\gCwÚ[`²ë The LATEX Com-panion [3]Ú1 4.4!"
1.8 大型文档
?n.©§Ðò ©©¤AÜ©"LATEXkü^·-5?nù«¹"
\includefilename
3©©¥¦^d·-ò©¶ filename.tex SN)?5"5¿ LATEX3m©?n filename.tex SNcò¬m©#"
14 基本知识
1·-^3©ó«§§#N\ LATEX==Ö\,\included©"
\includeonlyfilename,filename,. . .
ù^·-3ó« LATEXÖ\1§3¤k \include·-¥§k \includeonly·-ëê¥Ñ©â¬1"5¿3ëꥧ©¶ÚÏÒmØUk"
\include·-3#þü)?5©§ùéu¦^ \includeonly
·-ékÏ"A=¦)©Ñ§©?جC"XJØ3#ü)?5©§¦^e¡·-µ
\inputfilename
T·-´ü/ò½©)?5§¿vkÙ§"¦^ syntonly÷±4 LATEX¯u\©µLATEXèA\
©§==uÚ¤¦^·-´Ä(§Ø¬) DVIÑÑ"3ù«ªe§LATEX$1~¯§±!*m"¦^~üµ
\usepackagesyntonly
\syntaxonly
第二章文档排版
ÖcÙ§Ò±) LATEX2ε©Ä("3ùÙ·òÖ¿ÙÜ©§±¦\U)¤¢^©"
2.1 文档和语言的结构
©£y DAAC1©ÆؤÌ3uÖöD4*:!&E½£"XJù*:|éЧÖöòUÐ/n)"XJüºNSNÜ6ÚÂ(§ÖöÒUwÚaú©Ùù«óä"
LATEXÙ¦üXÚØÓ3u\w§©Ü6ÚÂ(§§ÒUì©a.Ú«ª©½“5K”Ñ©üº"3 LATEX£3<M⤥ãá´©ü "·¤±¡
“©ü ”§Ïãá´Në0g½*:üº/ª"3e¡Ù!¥\òÆSXÛ^ \\r1ä1§ÏL3 ©¥31r1=ã"¤±§XJm©#g§Ò,åã§ÄK§A¦^ä1"XJgþ´ÄA=㧱r©*:ÚgD4ö"XJÎg´3UY§ÒØA=ã"XJÓã¥Ñy#g´§ÒAT,åã"õê<$T=ã:5"Nõ<$Ø=ã
:¹Â´o§½ö3 LATEX¥Ú?=ã:%¶,Ø"XJ3©¥¦^úª§ØAON´u)"wwe¡~f§ok3§c¦^õ1£=ã:¤§k%Ø^"£XJ\Øn)ù~f¥·-§ÖÙÚeÙ§,#Ö!SN"¤
% Example 1
1I#áÉØOd§Èg Swiss German UVA (Um’s Verrecken Anders)"
16 文档排版
\ldots when Einstein introduced his formula
\beginequation
e = m \cdot c^2 \; ,
\endequation
which is at the same time the most widely known
and the least well understood physical formula.
% Example 2
\ldots from which follows Kirchoff’s current law:
\beginequation
\sum_k=1^n I_k = 0 \; .
\endequation
Kirchhoff’s voltage law can be derived \ldots
% Example 3
\ldots which has several advantages.
\beginequation
I_D = I_F - I_R
\endequation
is the core of a very different transistor model. \ldots
e©ü ´éf"3=©¥§3éf(?éÒmu céÒm"LATEXÁã©EÑ\I@"XJ LATEX§\7Lw LATEX\.Io"3Ù¡òéd±)º"éfk("õêóäk~E,I:ÎÒXÚ§´3é
õó¥£)Ú=¤\P4§L«oµó6¥á6Êî§\ÒUC/¦^ÏÒ"XJ\ؽ3=p¦^ÏÒ§Ò(/KÖùéf§3zÏÒ?áá"3o/XJ\aOÛ§ÒíKùÏÒ¶XJ3o/§\a7L᣽á6Êî¤Ò\ÏÒ"§ÏL©¤Ù!!!f!/ª§©¥ãáATUÜ63
pg?1|"´§¦^ \sectionThe Structure of Text and
2.2 断行和分页 17
LanguageüJ´Xd²w§±XÛ¦^ùpY²(A´Øyg²"
2.2 断行和分页
2.2.1 段落整理
Ï~Ö7´^15ü"`zãáSN§LATEX3ücm\7ä1:£linebreak¤Úm"XJ1ücüØe§LATEX¬?17äi"ãáXÛü6u©aO"Ï~§zã11k ?§3üãmvkm"õ&Eë15.3.2!"3AÏ/e§k7·- LATEXä1
\\ or \newline
,å1§ Ø,åã"
\\*
3r1ä1§B©"
\newpage
,å#"
\linebreak[n], \nolinebreak[n], \pagebreak[n] and \nopagebreak[n]
þã·-J±l§¶¡wÑ5"ÏLÀëê n§ö±Kù·-J"n ± 0Ú 4mê"XJ·-Jwå5~§r n u 4꧱4 LATEXÀJÑù·-"Øù“break”·- “new”·-· "=¦\Ñ “break”·-§LATEXE,Áãéà¡m>."XJ\ý,å1§Ò¦^A·-"ßßT´o·-
LATEXo´¦U)Ðä1J"XJä1à LATEXpIO§Ò4ù13ãámýÄÑ",3?nÑ\©Ó§wÄÑE£“overfull hbox”¤"ùUu)3 LATEXéØÜ·/
18 文档排版
äiÿ"2\±¦^ \sloppy·-§w LATEXü$:IO",ªÑÑ(JØ´`§§ÏLO\ücmm§±ÑyL1"3ù«¹eÑ´w£“underfull hbox”¤"3õê¹e(Jwå5ج~Ð"\fussy·-r LATEX¡E"G"
2.2.2 断字
7Ò¬Ñyäi"XJäiØU(½(äi:§±¦^Xe·-w TEXXÛÖù"Ã"
·-
\hyphenationword list
¦uëþ¥üc=35k “-”:äi"·-ëþ=d~i1¤üc§½d-¹©¥À~i1ÎÒ|¤"A^u£AϤó®Ð§äi·-Ñy§Ò-¹ó;äiÀ:"ù¿XXJ\3©ó¥äi·-§§òK=©äi"XJäi·-u \begindocument¡§ \¦^aq babelISó|±÷§@oäiÀ:3d babel-¹ó¥Ò?u¹ÄG"
e¡~f#Né “hyphenation”Ú “Hyphenation”?1äi§%Ø#N “FORTRAN”, “Fortran”Ú “fortran”?1äi"3ëþ¥Ø#NÑyAÏiÎÚÎÒ"
~fµ
\hyphenationFORTRAN Hy-phen-a-tion
·- \-3üc¥\gÌäi:"§Ò¤ùüc¥#NÑyäi:"éu¹AÏiΣ5ÑiΤüc§ù·-´AOk^§Ïéu¹AÏiÎüc LATEXØgÄäi"
I think this is: su\-per\-cal\-%
i\-frag\-i\-lis\-tic\-ex\-pi\-%
al\-i\-do\-cious
I think this is: supercalifragilisticexpialido-cious
2u)£ÝfÄѤ§, LATEXÑ´w¿w«ÄÑ@1§´ØN´uyÄÑ1"XJ\3 \documentclass·-¥¦^À draft§LATEXÒ3ÄÑ1m>I±oç"
2.3 学习字符串排版 19
·-
\mboxtext
yrAücü3Ó1þ"3?Û¹e§ù·-r§ëþü3å£Ó1þ¤"
My phone number will change soon.
It will be \mbox0116 291 2319.
The parameter
\mbox\emphfilename should
contain the name of the file.
My phone number will change soon. It willbe 0116 291 2319.
The parameter filename should contain thename of the file.
·- \fboxÚ \mboxaq§d§U7SNxµ"
2.3 学习字符串排版
3c¡~f¥§\®²w^5üAÏiÎG~ü LATEX·-"
Command Example Description
\today 17th January 2003 Current date in the current language\TeX TEX The name of your favorite typesetter\LaTeX LATEX The name of the Game\LaTeXe LATEX2ε The current incarnation of LATEX
2.4 特殊字符和符号
2.4.1 引号
\不3iÅþ@§r "^ÚÒ"3<M¥k;ÚÒÚmÚÒ"3 LATEX¥§^ü ‘)ÚÒ§^ü ’)mÚÒ" ‘Ú ’)üÚÒ"
‘‘Please press the ‘x’ key.’’ “Please press the ‘x’ key.”
20 文档排版
2.4.2 破折号和连字号
LATEX¥mo«áyI:ÎÒ"ëY^ØÓê8áy§±Ù¥n«"1o¢SØ´I:ÎÒ§§´êÆ¥~Òµ
daughter-in-law, X-rated\\
pages 13--67\\
yes---or no? \\
$0$, $1$ and $-1$
daughter-in-law, X-ratedpages 13–67yes—or no?0, 1 and −1
ùáy¶¡´: ‘-’ ëiÒ§‘–’ á»òÒ§‘—’ »òÒÚ ‘−’~Ò"
2.4.3 波浪号(∼)
ÅLÒ²~Ú^3å"§3 LATEX ¥§^ \~ )§Ù(Jµ˜%Ø´\ý"Áeùµ
http://www.rich.edu/\~bush \\
http://www.clever.edu/$\sim$demo
http://www.rich.edu/˜bushhttp://www.clever.edu/∼demo
2.4.4 度的符号()3LATEX¥XÛüÝÎÒº
Its $-30\,^\circ\mathrmC$,
I will soon start to
super-conduct.
Its −30 C, I will soon start to super-conduct.
2.4.5 省略号( . . . )
3iÅþ§ÏÒ½éÒÓâmÚÙ¦i1"3Ö7<M¥§ùiÎ=Óâ:m§¿ci1b~;"¤±ØU\n:5ÑÑ‘ÑÒ’§Ïmy©Øé"k;·-ÑÑÑÒ"§¡
\ldots
2.5 支持使用国际语言 21
Not like this ... but like this:\\
New York, Tokyo, Budapest, \ldots
Not like this ... but like this:New York, Tokyo, Budapest, . . .
2.4.6 连字
i1|ÜØ´ü\i1§ ¢Sþ^AÏÎÒ"
JAff fi fl ffi. . . Ø´ ff fi fl ffi . . .
ùÒ´¤¢ëi§3üi1m\ \mbox§±Bëi"éudüc¤üc§ùU´7"
Ø´%Not
shelfful\\
´%but
shelf\mboxful
Ø´shelfful ´shelfful
2.4.7 注音符号和特殊字符
LATEX|±5gNõó¥5ÑÎÒÚAÏiÎ"L 2.1Òi1 oѤk5ÑÎÒ"éuÙ¦i1g,k"3i1 iÚ jþI5ÑÎÒ§§:7LK"ùd \iÚ
\j"
H\^otel, na\"\i ve, \’el\‘eve,\\
sm\o rrebr\o d, !‘Se\~norita!,\\
Sch\"onbrunner Schlo\ss
Stra\ss e
Hotel, naıve, eleve,smørrebrød, ¡Senorita!,Schonbrunner Schloß Straße
2.5 支持使用国际语言
XJ\I^=±óÖ©§LATEXkü/7L·µ
1. ¤kgÄ)¤iÎG37L·^u#ó"éuNõ«ó§ù?Öd Johannes Braams?÷ babel¤"
3L8¹, ã8¹, . . .
22 文档排版
2. éu«#ó§LATEX I§äi5K"òäi5KÑ\LATEXkJÝ"ù´`ØÓäiªïª©´1Ï"éd Local Guide [4]õ&E"
XJ\XÚ®²Ð§\±ÏL3·- \documentclassV\·-
\usepackage[language]babel
5-¹÷ babel"XÚ|±语言Au Local Guide [4]¥"éuÀ½ó§÷ babelògÄ-¹·äi5K"XJ LATEXª©Ø|±3¤ÀJó¥äi§ØäiõU§÷ babelEå^§ùéuüJkéK¡K"éuéõ«ó§÷ babelJø;#·-5zAÏiÎÑ
\"~X German§¹éõaqiΣaou¤"|^ babel§\U^ "o
Ø´ \"o5Ñ\ o"OÅXÚ#NÏLÑ\AÏiÎ"LATEXU?nù
iÎ"l 1994c 12uÙ LATEX2ε m©§LATEX2ε Ä)éA«Ñ\?è|±"u÷inputencµ
\usepackage[encoding]inputenc
¦^ù÷§ATÄÙ¦<3ÙOÅþ½NØUw«\Ñ\©§Ï¦¦^ØÓ?è"~X§ a3Åþ?è 132§
L 2.1: 5ÑÎÒÚAÏiÎ.
o \‘o o \’o o \^o o \~oo \=o o \.o o \"o c \c c
o \u o o \v o o \H o o \c oo. \d o o
¯\b o Äoo \t oo
œ \oe Œ \OE æ \ae Æ \AEa \aa A \AA
ø \o Ø \O Ãl \l ÃL \Lı \i \j ¡ !‘ ¿ ?‘
2.5 支持使用国际语言 23
´3¦^ ISO-LATIN 1 UnixXÚþ§§?è 228"¤±A%¦^ùõU"âXÚa.§Uke?è"
Operating system encoding
Mac applemac
Unix latin1
Windows ansinew
OS/2 cp850
iN?è´ØÓ¯K"§½Âu« TEX-iNzi1¤3 "©OÅy TEXiN=¹Î 7¨i! ASCIIiÎ8¥128iÎ"I5Ñi1ÿ§d TEX|^~i1Ú5ÑÎÒ)¤"ùÊé¹k5Ñi1üc?1äi§ÓyÑÑJwå5é"3$´õê TEXyk@ ECiN"ùiNwå5
yOÅiN§´¹^uî³óõê5Ñi1AÏiÎ"¦^ùiN§±U?=©¥äi"ECiNd¹u©ó¥ fontenc÷5-¹"
\usepackage[T1]fontenc
24 文档排版
2.5.1 对德语的支持
^ LATEX)¤©J«"±^·-
\usepackage[german]babel
\1é|±"
XJ LATEXXÚ®²A§ÒUyücäi"Ó§rgÄ©O§=r/Ù0C “Kapitel”" Jø@#·-¦Ñ\©\×"lL 2.2¥U¼(a"
L 2.2: AÏiÎ.
"a a "s ß
"‘ ” "’ “
"< ¿ "> À
\dq ”
2.6 单词的间隔
¦ÑÑm>.éà§LATEX3ücm\Øm"3éf"\mõ§Ïù¦©äÖ5"LATEXb½éf±éÒ!¯Ò½¯'Ò("XJéÒ;i1§§ÒØÀéf("Ï3k /§âÑyéÒ;i1¹"
ö7L[`²§ùb¥?Û~"cÎÒ)ØU"ÅLiÎ ‘~’)ØU§¿Bä1"éÒc·- \@`²ùéÒ´éf"§=¦§;i1"
Mr.~Smith was happy to see her\\
cf.~Fig.~5\\
I like BASIC\@. What about you?
Mr. Smith was happy to see hercf. Fig. 5I like BASIC. What about you?
2.7 标题,章和节 25
·-
\frenchspacing
UB3éÒ\m§§w LATEX3éÒ不\'~i1õm"Øë©z§ù3=ó¥~ÊH"XJ¦^ \frenchspacing§·- \@ÒØ7"
2.7 标题,章和节
BuÖön)§ATr©y©Ù§!Úf!"LATEX^AÏ·-|±ùó§ù·-r!IKëþ"\?Ö´U(gS¦^§"éarticleº©§ke©!·-µ
\section... \paragraph...
\subsection... \subparagraph...
\subsubsection...
é reportÚ bookº©§kÙ¦ü©!·-µ
\part... \chapter...
Ï articleº©Øy©Ù§¤±éN´r§Ù\Ö7©¥"!mm§!SÒÚIKiÒd LATEXgÄ"©!ü·-kAÏ5µ
• ·- \partØKÙSÒ"
• ·- \appendixØëþ§rÙSÒU^i1IP"4
LATEX3©?ÈÌ¥§J!IKÚè±)¤8¹"·-
\tableofcontents
3ÙÑy \8¹"(8¹SN§#©7L?Èüg"k?Èng"3 LATEX¬Ï\"
4é articleº©UC!SÒ"
26 文档排版
þ¡Ñ©!·-±/(0/ªÑy"/(0·-ÏL3·-¶¡\ *5¢y"§)¤!IKQØÑyu8¹§ØSÒ"~X§·- \sectionHelp/(0/ª \section*Help"
8¹ÑyIK§Ñ\©"kù´ØU§ÏIKüØ?8¹"3ù«¹e§8¹^8dý¢IKcÀëþ(½"
\chapter[Title for the table of contents]A long
and especially boring title, shown in the text
©IKd·-
\maketitle
)"IKSN7L3N^ \maketitle±c§d·-
\title..., \author... ÚÀ\date...
½Â"3·- \author¥§±Ñ\A^ \and·-©m¶i"
31 8ã 1.3¥§Uék'þã·-~f"
Øþ¡)º©!·-§LATEX2ε Ú?Ù¦n·-^u bookº©"§éy©ÑÔk^§UXUCÙIKÚèµ
\frontmatter AX·- \begindocument¦^"§rèÛêêi"éu©cSNÊH¦^(·-£~X§\chapter*Preface¤§± LATEXé§üS"
\mainmatter AÑy3Ö1Ù;c¡"§mC.ËèOê짿éèl#Oê"
\appendix IÖ¥N¹ám©"T·-ÙSÒU^i1IP"
\backmatter AT\֥ܩSN;c¡§Xë©zÚ¢Ú"3IO©a.¥§§é¡vkoJ"
2.8 交叉引用 27
2.8 交叉引用
3Ö7!wÚØ©¥§Iéã!LÚ©AÏãá?1Ú^"LATEXJøXeÚ^·-
\labelmarker, \refmarker and \pagerefmarker
Ù¥ marker ´¦^öÀJI£Î"XJ3!!f!!ã!L½½n¡Ñ\ \label·-§LATEXr \refOASÒ"\pageref·-ü< \labelÑ\?è"5 ÚÙ!IK§¦^SÒ´c¡?Ȥ)"
A reference to this subsection
\labelsec:this looks like:
‘‘see section~\refsec:this on
page~\pagerefsec:this.’’
A reference to this subsection looks like: “seesection 12 on page 27.”
2.9 脚注
|^·-
\footnotefootnote text
r5SNü<uc "5·-o´u£put¤6Ùüc½éf¡"5´éf½éfÜ©§¤±A^ÏÒ½éÒ("7
Footnotes\footnoteThis is
a footnote. are often used
by people using \LaTeX.
Footnotesa are often used by people usingLATEX.
aThis is a footnote.
55¿ù·-é§o¿vk¿£"·- \label´þggÄ)SÒ"
6“put”´~¦^=üc"75¿§5rÖö5¿ål©©Úm"·´ÐÛÄÔ§z<ѬÖ
5"¤±oØr\`¤kÀÜÑ\©¥"8
8´IØ7r§/ :-).
28 文档排版
2.10 强调
XJ©´^iÅ\§^ey5rNüc"
\underlinetext
´3<MÖ¥§^«斜体iNü<rNüc"LATEXJø·-
\emphtext
5rN©"ù·-éÙëþ¢S^J6u§þe©µ
\emphIf you use
emphasizing inside a piece
of emphasized text, then
\LaTeX uses the
\emphnormal font for
emphasizing.
If you use emphasizing inside a piece of em-phasized text, then LATEX uses the normalfont for emphasizing.
5¿¦ LATEX强调oÚ¦§¦^ØÓ字体ØÓJ:
\textitYou can also
\emphemphasize text if
it is set in italics,
\textsfin a
\emphsans-serif font,
\textttor in
\emphtypewriter style.
You can also emphasize text if it is set in ital-ics, in a sans-serif font, or in typewriter
style.
2.11 环境
\beginenvironment text \endenvironment
Ù¥ environment ´¸¶¡"±N^^S§¸±i@Ag"
\beginaaa...\beginbbb...\endbbb...\endaaa
3e¡Ù!¥§é¤k¸Ñ)º"
2.11 环境 29
2.11.1 Itemize, Enumerate, and Description
itemize¸^uüL§enumerate¸^uSÒL§description
¸^u£ãL"
\flushleft
\beginenumerate
\item You can mix the list
environments to your taste:
\beginitemize
\item But it might start to
look silly.
\item[-] With a dash.
\enditemize
\item Therefore remember:
\begindescription
\item[Stupid] things will not
become smart because they are
in a list.
\item[Smart] things, though, can be
presented beautifully in a list.
\enddescription
\endenumerate
1. You can mix the list environments toyour taste:
• But it might start to look silly.
- With a dash.
2. Therefore remember:
Stupid things will not become smartbecause they are in a list.
Smart things, though, can bepresented beautifully in a list.
2.11.2 Flushleft, Flushright, and Center
flushleft Ú flushright ¸©O)üÚmüãá"center¸)Ø¥©"XJ\ØÑ\·- \\½ä1:§LATEXòg1û½"
\beginflushleft
This text is\\ left-aligned.
\LaTeX is not trying to make
each line the same length.
\endflushleft
This text isleft-aligned. LATEX is not trying to makeeach line the same length.
\beginflushright
This text is right-\\aligned.
\LaTeX is not trying to make
each line the same length.
\endflushright
This text is right-aligned. LATEX is not trying to make each
line the same length.
30 文档排版
\begincenter
At the centre\\of the earth
\endcenter
At the centreof the earth
2.11.3 Quote, Quotation, and Verse
quote¸éäÚ~fÚ^é"
A typographical rule of thumb
for the line length is:
\beginquote
On average, no line should
be longer than 66 characters.
\endquote
This is why \LaTeX pages have
such large borders by default and
also why multicolumn print is
used in newspapers.
A typographical rule of thumb for the linelength is:
On average, no line should belonger than 66 characters.
This is why LATEX pages have such large bor-ders by default and also why multicolumnprint is used in newspapers.
küaq¸µquotationÚ verse¸"quotation¸^uLAãÚ^§Ï§éãá?1 ?"verse¸^uy§3y¥ä1é"31"^ \\ä1§3zã31"
I know only one English poem by
heart. It is about Humpty Dumpty.
\beginflushleft
\beginverse
Humpty Dumpty sat on a wall:\\
Humpty Dumpty had a great fall.\\
All the King’s horses and all
the King’s men\\
Couldn’t put Humpty together
again.
\endverse
\endflushleft
I know only one English poem by heart. It isabout Humpty Dumpty.
Humpty Dumpty sat on a wall:Humpty Dumpty had a great
fall.All the King’s horses and all
the King’s menCouldn’t put Humpty together
again.
2.11.4 逐字打印
u \beginverbatimÚ \endverbatimm©ò<§)¤kä1Úx§Ò3iÅþ\§Ø1?Û LATEX·-"
2.11 环境 31
3ãᥧaqõUd
\verb+text+
¤"+=´©Î~f"Ø *½§±¦^?¿iÎ"ùþf¥Nõ~f´^ù·-ü<"
The \verb|\ldots| command \ldots
\beginverbatim
10 PRINT "HELLO WORLD ";
20 GOTO 10
\endverbatim
The \ldots command . . .
10 PRINT "HELLO WORLD ";
20 GOTO 10
\beginverbatim*
the starred version of
the verbatim
environment emphasizes
the spaces in the text
\endverbatim*
theÃstarredÃversionÃof
theÃÃÃÃÃÃverbatim
environmentÃemphasizes
theÃspacesÃÃÃinÃtheÃtext
(·- \verbU±aqª¦^µ
\verb*|like this :-) | likeÃÃÃthisÃ:-)Ã
verbatim¸Ú \verb·-ØU3Ù¦·-ëꥦ^"
2.11.5 表格
tabular¸U^5ü<kY²ÚYL¤L"LATEXgÄ(½z°Ý"·-
\begintabulartable spec
ëþ table spec ½ÂLª"^ l)éà§^ r
)méà§^ c)Ø¥¶^ p宽度值width)A°Ý!¹gÄä1©¶|)YL"
32 文档排版
3 tabular¸¥§^ &a\e§^ \\m©#1§^ \hline
\Y²L"^ \clinej-iV\Ü©L§Ù¥ jÚ i©OL«Lå©ÚªSÒ"
\begintabular|r|l|
\hline
7C0 & hexadecimal \\
3700 & octal \\ \cline2-2
11111000000 & binary \\
\hline \hline
1984 & decimal \\
\hline
\endtabular
7C0 hexadecimal3700 octal
11111000000 binary
1984 decimal
\begintabular|p4.7cm|
\hline
Welcome to Boxy’s paragraph.
We sincerely hope you’ll
all enjoy the show.\\
\hline
\endtabular
Welcome to Boxy’s paragraph.We sincerely hope you’ll all en-joy the show.
L©Îd @...E"ù·-KLmm§üs)Òm?ÛÑ\"^å3ue¡)º?êéà¯K",UA^3u^ @Ø Lmàm"
\begintabular@ l @
\hline
no leading space\\
\hline
\endtabular
no leading space
\begintabularl
\hline
leading space left and right\\
\hline
\endtabular
leading space left and right
duvkSï¦?êUê:éà§9·±¦^ü/60ù8µêméà§êéà"\begintabular1
9XJXÚSC ‘tools’§we÷ dcolumn"
2.12 浮动体 33
¥·- @.^ “.”Lm~m§l ÑUê:LéàJ"Ø#P^L©Î (&)?êê:¦^·- \multicolumn3ê/L0þLI\"
\begintabularc r @. l
Pi expression &
\multicolumn2cValue \\
\hline
$\pi$ & 3&1416 \\
$\pi^\pi$ & 36&46 \\
$(\pi^\pi)^\pi$ & 80662&7 \\
\endtabular
Pi expression Valueπ 3.1416ππ 36.46
(ππ)π 80662.7
\begintabular|c|c|
\hline
\multicolumn2|c|Ene \\
\hline
Mene & Muh! \\
\hline
\endtabular
EneMene Muh!
^L¸ü<áo´3Óþ"XJü<L§±we supertabularÚ longtabular¸"
2.12 浮动体
8UõêÑÔ¹kNõã¡ÚL"duØUr§©3ØÓ¡þ§¤±I;?n"XJ㡽L3c¡üØe§)ûÒ´zg#m"ù3¡þ3eÜ©x§Jwå5é"éu3cüØe?Û㡽L§Ù)û´r§/2
Ä0e§dÓc¡^©©W¿"LATEXJøü2ÄN¸¶^u㡧^uL"¿©uùü¸`5§AT)LATEX?n2ÄNS3n"´2ÄU¤-<ßÔÌÏ§Ï LATEXoØr2ÄN3\/"
Äkweø2Ħ^ LATEX·-µ
34 文档排版
u¸ figure½¸ table¥?ÛáÑòÀ2ÄSN"ü2ĸÑ|±Àëê
\beginfigure[placement specifier] or \begintable[placement specifier]
¡放置说明符§§d浮动允许放置参量¤iÎG|¤"L 2.3"5¿µ0ptÚ 1.05emÑ´ TEXÝü "1 73¥L 5.5¹k
õk'&E"L±dXe·-§~X
\begintable[!hbp]
m©§`²Î [!hbp]#N LATEXrLÒc§½3,.Ü (b)§½3;2Äþ (p)§îUì`²Î=¦wå5ØÐ (!)XJvk½`²Î§" [tbp]"
LATEXòUìöJø`²Î§Sü§z2ÄN"XJ2ÄN3cØUSü§Òr§M3图片½表格S¥10"#m©ÿ§LATEXÄku´ÄU^S¥2ÄNW¿;/2Ä0¡"XJùØU§Òéf3©¥Ñy2ÄN§?nS¥12ÄNµLATEXl#ÁUìÙA`²Î£ØØ2U ‘h’¤5?n§"©¥Ñy?Û#2ÄNM3AS¥"éuz«2ÄN§LATEX±§Ñy^S"ùÒ`²oØUSüã¡r¤k5ã¡Ñí©"Ï"¤±µ
XJ LATEXvk\Ï"@Sü2ÄN§@o²~´=k2ÄN×lü¥,S"
10§´/k5kr0S
L 2.3: 2Ä#Nëþ"
`²Î 2ÄN#N . . .h 2ÄN就3c¡þ"ùÌ^u2ÄN"t 3¡顶部b 3¡底部p 3;¡§=¹2ÄN"! Ñ2ÄNõêSÜëêa"
a~X¥#N2ÄNê"
2.12 浮动体 35
=½ü`²Î´#N§ù¬Úå¯K"XJ3½ Süا§Ò¬¤æN§×4Y2ÄN"ØüÕ¦^ëþ[h]§3 LATEXC¥§§J±u [ht]gÄO"
,é2ÄN¯K®²`²§é tableÚ figure¸kSN"|^
\captioncaption text
·-§±2ÄN½ÂIK"SÒÚiÎG/ã0½/L0òdLATEXgÄV\"
ü·-
\listoffigures and \listoftables
^å5Ú \tableofcontents·-aq§©Oü<ã8¹ÚL8¹"3ù8¹¥§¤kIKÑòE"XJ¦^IK§Ò7LOU?8¹§áIK"=3 \caption·-¡)ÒSÑ\áIK"
\caption[Short]LLLLLoooooonnnnnggggg
|^ \labelÚ \ref§3©¥±2ÄNMïÚ^"e¡~fx/§¿ò§\©"XJ3¤©¥
\Êþã¡3m§\±|^ù~f"
Figure~\refwhite is an example of Pop-Art.
\beginfigure[!hbp]
\makebox[\textwidth]\framebox[5cm]\rule0pt5cm
\captionFive by Five in Centimetres. \labelwhite
\endfigure
3þ¡~f¥§rã¡就放在当前页面 (h)11§LATEXÁ真辛苦 (!) XJùØU§§òÁãã¡Sü3¡底部 (b)"XJØUòã¡Sü3c¡§§òû½´ÄUm#¡±SüùÜ㡧½5gLS¥L"XJvkváW¿;2Ä¡§LATEXÒm#§é©¥fÑy㡧2g?nùã¡"
11bã¡S®"
36 文档排版
3½¹e§UI¦^·-
\clearpage or even the \cleardoublepage
command. §·- LATEXá=SüS¥¤ke2ÄN§¿m#"·- \cleardoublepage$¬·- LATEX#mÛê¡"3Ö¡§ò0XÛ3 LATEX2ε©¥\ PostScriptã/"
2.13 保护脆弱命令
·-£X \caption½ \section¤ëþ©§U3©¥Ñyõg£~X§3©8¹Ú©¥¤"^uaq \section·-ëþ§·-¬"§¡yf·-"\footnote½ \phantom´yf·-~f. ùyf·-I§´o"r \protect·-3§c¡§ÒUo§"
\protect==o;Ùmý·-§ë§ëþب9"3õê/e§Lõ \protect¿ØN¯"
\sectionI am considerate
\protect\footnoteand protect my footnotes
第三章数学公式
OÐe5·Ò+Ñ TEXr¤3µêÆÎÒÚúªü"Ù¤0SNı÷vÜ©<I"=BXd§´édõUV)5£ã"XJØU3dÙ¥é\¤IüêÆúª§@o\±3 AMS-LATEX
1 ½Ù§÷8¥éY"
3.1 基本知识
LATEX¦^«AϪ5üêÆÎÒÚúª£mathematics¤"ãá¥êÆLªATu \( Ú \)§ $ Ú $ ½ö \beginmath Ú\endmathm"
Add $a$ squared and $b$ squared
to get $c$ squared. Or, using
a more mathematical approach:
$c^2=a^2+b^2$
Add a squared and b squared to get c squared.Or, using a more mathematical approach:c2 = a2 + b2
\TeX is pronounced as
$\tau\epsilon\chi$.\\[6pt]
100~m$^3$ of water\\[6pt]
This comes from my $\heartsuit$
TEX is pronounced as τεχ.
100 m3 of water
This comes from my ♥
éuêƪf§Ð´¦^显示式样5üµò§u \[Ú \]½ \begindisplaymathÚ \enddisplaymathm"ùüÑúª´vk?Ò"XJ\F" LATEXéÙV\?Ò§±¦^ equation¸5ù8"
1CTAN:/tex-archive/macros/latex/required/amslatex
38 数学公式
Add $a$ squared and $b$ squared
to get $c$ squared. Or, using
a more mathematical approach:
\begindisplaymath
c^2=a^2+b^2
\enddisplaymath
And just one more line.
Add a squared and b squared to get c squared.Or, using a more mathematical approach:
c2 = a2 + b2
And just one more line.
|^ \labelÚ \reféúª\±Ú^"
\beginequation \labeleq:eps
\epsilon > 0
\endequation
From (\refeq:eps), we gather
\ldots
ε > 0 (3.1)
From (3.1), we gather . . .
é'e^ØÓªü¤(Jµ
$\lim_n \to \infty
\sum_k=1^n \frac1k^2
= \frac\pi^26$
limn→∞∑n
k=11k2 = π2
6
\begindisplaymath
\lim_n \to \infty
\sum_k=1^n \frac1k^2
= \frac\pi^26
\enddisplaymath
limn→∞
n∑
k=1
1k2
=π2
6
数学模式Ú文本模式kéõØÓ?"~X3êƪ¥µ
1. Ú©1ÑòÑ"¤k½´dêÆLªÜ6û)§½´dAÏ·-X \,§\quad½ \qquad5"
2. Ø#Nk1§zúª¥Ukãá"
3. ziÎÑòw´Cþ¶¿±d5ü"XJ\F"3úª¥ÑyÊÏ©£¦^Ni¿±k¤§@o\7L¦^·- \textrm...5Ñ\ù©"
\beginequation
\forall x \in \mathbfR:
\qquad x^2 \geq 0
\endequation
∀x ∈ R : x2 ≥ 0 (3.2)
3.2 数学模式中的分组 39
\beginequation
x^2 \geq 0\qquad
\textrmfor all x\in\mathbfR
\endequation
x2 ≥ 0 for all x ∈ R (3.3)
êÆ[Ï~é¦^oÎÒ~]GµS.þ¦^/空心粗体0£blackboard bold¤5L«¢ê8Ü"ù«iN^ amsfonts ½amssymb÷¥·- \mathbb5"þ¡~fCµ
\begindisplaymath
x^2 \geq 0\qquad
\textrmfor all x\in\mathbbR
\enddisplaymath
x2 ≥ 0 for all x ∈ R
3.2 数学模式中的分组
êƪ¥·-=éÙ¡1iÎå^"¤±§XJ\F",·-^uõiΧ@o\Ò7Lò§u)Ò¥µ..."
\beginequation
a^x+y \neq a^x+y
\endequationax + y 6= ax+y (3.4)
3.3 建立数学公式模块
3ù!¥ò0üêÆÎÒÚúª·-"[·-Lë1 501 3.10!"小写希腊字母£Lowercase Greek letters ¤Ñ\·-µ\alpha,
\beta, \gamma, . . . §A/§/ªÑ\·-µ\Gamma, \Delta,. . ."2
$\lambda,\xi,\pi,\mu,\Phi,\Omega$ λ, ξ, π, µ,Φ,Ω
指数和下标^ ^Ú _\AiÎ5¢y"
2LATEX2ε vk½Â Alpha/ª§Ï§ÚÊÏÛêiN Aé"N#êÆ?褬k¤Cz"
40 数学公式
$a_1$ \qquad $x^2$ \qquad
$e^-\alpha t$ \qquad
$a^3_ij$\\
$e^x^2 \neq e^x^2$
a1 x2 e−αt a3ij
ex2 6= ex2
平方根£square root¤Ñ\·-µ\sqrt§n gA/:\sqrt[n]"ÎÒd LATEXgÄ\±N"^ \surd=ÑÎÒ"
$\sqrtx$ \qquad
$\sqrt x^2+\sqrty $
\qquad $\sqrt[3]2$\\[3pt]
$\surd[x^2 + y^2]$
√x
√x2 +
√y 3
√2
√[x2 + y2]
·- \overlineÚ \underline3Lªþ!exÑY²"
$\overlinem+n$ \qquad
$\underlinem+n$m + n m + n
·- \overbraceÚ \underbrace3Lªþ!eÑY²)Ò"
$\underbrace a+b+\cdots+z _26$a + b + · · ·+ z︸ ︷︷ ︸
26
êÆÑÎÒXÞÚ˜£tilde¤Ñ\·-ë1 50¥L 3.1"CXõiΰÑÎÒd \widetildeÚ \widehat"iÎ ’ò)¤ ′£prime¤"
\begindisplaymath
y=x^2\qquad y’=2x\qquad y’’=2
\enddisplaymathy = x2 y′ = 2x y′′ = 2
向量£Vectors¤Ï~^þkÞ£arrow symbols¤CþL«"ùd \vec",ü·- \overrightarrowÚ \overleftarrow
3½Âl A Bþ~k^"
\begindisplaymath
\vec a\quad\overrightarrowAB
\enddisplaymath~a
−−→AB
¹e§¦ª¥:αÑ", kÏÖö)ÖE,úª§k7^·- \cdotò:ÎL«Ñ5"
3.3 建立数学公式模块 41
\begindisplaymath
v = \sigma_1 \cdot \sigma_2
\tau_1 \cdot \tau_2
\enddisplaymath
v = σ1 · σ2τ1 · τ2
¼ê¶Ï~^ÛêiNNü§ Ø´Cþ¶^¿|Nü"Ïd§LATEXJøeã·-5ü¼ê¶"
\arccos \cos \csc \exp \ker \limsup \min
\arcsin \cosh \deg \gcd \lg \ln \Pr
\arctan \cot \det \hom \lim \log \sec
\arg \coth \dim \inf \liminf \max \sin
\sinh \sup \tan \tanh
\[\lim_x \rightarrow 0
\frac\sin xx=1\]limx→0
sinx
x= 1
ü¼ê£modulo function¤kü·-µ\bmod^u$Γa mod b”§\pmod^uLª§~X “x ≡ a (mod b)”"分数£fraction¤¦^ \frac...... ü"5`§1/2 ù«
/ªÉH§Ïéuþ©ª§§wå5Ð"
$1\frac12$~hours
\begindisplaymath
\frac x^2 k+1 \qquad
x^ \frac2k+1 \qquad
x^ 1/2
\enddisplaymath
1 12 hours
x2
k + 1x
2k+1 x1/2
üXê½aq(±¦^·- ... \choose ... ½... \atop ..."1·-1·-ÑÑÓ§´vk)Ò3"
\begindisplaymath
n \choose k\qquad x \atop y+2
\enddisplaymath
(n
k
)x
y + 2
éu'X§òÎÒæ3åUk^"\stackrelò1¥ÎÒ±þI3?u~ 1þ"
35¿ùη-3 amsmath ÷8¥B¦^§ ´^ \binomÚ \genfrac5O"ö´¤k'(8§~X±ÏL \newcommand\newatop[2]%\genfrac0pt1#1#25 \atopaq(
42 数学公式
\begindisplaymath
\int f_N(x) \stackrel!= 1
\enddisplaymath
∫fN (x) != 1
积分运算符£integral operator¤^ \int5)¤"求和运算符£sum
operator¤d \sum)¤"乘积运算符£product operator¤d \prod)¤"þÚe^ ^Ú _5)¤§aquþIÚeI4"
\begindisplaymath
\sum_i=1^n \qquad
\int_0^\frac\pi2 \qquad
\prod_\epsilon
\enddisplaymath
n∑
i=1
∫ π2
0
∏ε
éu括号£braces¤ÚÙ§©Î£delimiters¤§3 TEX¥k«ÎÒ£~X [ 〈 ‖ l¤")ÒÚ)Ò±^AÑ\"s)Ò^ \"Ù§©Î^;·-£~X \updownarrow¤5)¤"¤k¦^©ÎL±ë1 52¥L 3.8"
\begindisplaymath
a,b,c\neq\a,b,c\
\enddisplaymatha, b, c 6= a, b, c
XJò·- \left3m©Îc§TEX¬gÄû½©Î("5¿7L^éAm©Î \right5'4z©Î \left§¿kùü©Îü3Ó1â¬((½"XJØ3m>?ÛÀܧ¦^Ûõ ‘\right.’ !
\begindisplaymath
1 + \left( \frac1 1-x^2
\right) ^3
\enddisplaymath
1 +(
11− x2
)3
,¹ek7ÃóÑêÆ©Î(§ù±¦^·-\big, \Big, \bigg9 \Biggõê©Î·-cM5"
4AMS-LATEX,kõ1þI/eI"5XJ¦^UC·-½ö½ 11pt½ 12ptÀ§ù·-¿Øý@
å^"¦^ exscale½ amsmath÷85?ù«1"
3.4 数学空格 43
$\Big( (x+1) (x-1) \Big) ^2$\\
$\big(\Big(\bigg(\Bigg($\quad
$\big\\Big\\bigg\\Bigg\$\quad
$\big\|\Big\|\bigg\|\Bigg\|$
((x + 1)(x− 1)
)2
((((
∥∥∥∥∥∥∥∥∥∥∥∥∥∥
ò三个圆点£three dots¤Ñ\úª±¦^A«·-"\ldotsò:ü3Äþ"\cdotsò§Ø¥"Ød§^ \vdots·-¦ÙR§ ^ \ddotsòé.£diagonal dots¤"1 3.5!¥kÙ§~f"
\begindisplaymath
x_1,\ldots,x_n \qquad
x_1+\cdots+x_n
\enddisplaymath
x1, . . . , xn x1 + · · ·+ xn
3.4 数学空格
XJúª¥d TEXÀJØ-<÷¿§±ÏL\AÏ·-5?1N!"kA·-^uµ\, éAu \: éAu418 quad ( )§\;éAu 5
18 quad ( )"ølÎÒ \Ã)¤¥"\quad ( )Ú \qquad ( ))"\quadéAu8ciN¥iÎ ‘M’°Ý"\!·-)¤K − 3
18 quad ( )"
\newcommand\ud\mathrmd
\begindisplaymath
\int\!\!\!\int_D g(x,y)
\, \ud x\, \ud y
\enddisplaymath
instead of
\begindisplaymath
\int\int_D g(x,y)\ud x \ud y
\enddisplaymath
∫∫
D
g(x, y) dxdy
instead of∫ ∫
D
g(x, y)dxdy
5¿©¥ ‘d’U.~ÛêiN"AMS-LATEXJøNõÈ©ÎÒm,«ª§Ò´
\iint, \iiint, \iiiint Ú \idotsint ·-"¦^ amsmath ÷8§±þ~f±^e¡ù«ª5ü"
44 数学公式
\newcommand\ud\mathrmd
\begindisplaymath
\iint_D \, \ud x \, \ud y
\enddisplaymath
∫∫
D
dxdy
[0ë>f© testmath.tex£)3 AMS-LATEX¥¤½ “The LaTeX Companion”¥1lÙ"
3.5 垂直对齐
ü arrays ¦^ array ¸5ü数组£arrays¤"§kaqutabular¸§¦^ \\·-5©1"
\begindisplaymath
\mathbfX =
\left( \beginarrayccc
x_11 & x_12 & \ldots \\
x_21 & x_22 & \ldots \\
\vdots & \vdots & \ddots
\endarray \right)
\enddisplaymath
X =
x11 x12 . . .
x21 x22 . . ....
.... . .
array¸±¦^ “.”Ûõm©Î5ük©ÎLª"
\begindisplaymath
y = \left\ \beginarrayll
a & \textrmif $d>c$\\
b+x & \textrmin the morning\\
l & \textrmall day long
\endarray \right.
\enddisplaymath
y =
a if d > c
b + x in the morningl all day long
3 tabular¸¥§±3 array¸¥x"~X©Ý¥"
\begindisplaymath
\left(\beginarrayc|c
1 & 2 \\
\hline
3 & 4
\endarray\right)
\enddisplaymath
(1 23 4
)
3.5 垂直对齐 45
éu©ÙuA1úª½ö§|£equation system¤§±¦^eqnarrayÚ eqnarray*¸5O equation"3 eqnarray¥§z1Ѭk§?Ò"eqnarray*Øé§?1?Ò"
eqnarrayÚ eqnarray*¸aqu rcl/ªnL"¥m±^Ò½ØÒ§½öÙ§wå5·ÜÎÒ"¦^ \\·-©1"
\begineqnarray
f(x) & = & \cos x \\
f’(x) & = & -\sin x \\
\int_0^x f(y)dy &
= & \sin x
\endeqnarray
f(x) = cos x (3.5)
f ′(x) = − sinx (3.6)∫ x
0
f(y)dy = sin x (3.7)
5¿Òz>Ñé"ÏL½ \setlength\arraycolsep2pt
5~§Xe~f¥¤«"长方程جgÄ/©¤"ö7L½3=p©±9 ?õ
"±e´~¦^ü«"
\setlength\arraycolsep2pt
\begineqnarray
\sin x & = & x -\fracx^33!
+\fracx^55!-
\nonumber\\
& & -\fracx^77!+\cdots
\endeqnarray
sinx = x− x3
3!+
x5
5!−
− x7
7!+ · · · (3.8)
\begineqnarray
\lefteqn \cos x = 1
-\fracx^22! +
\nonumber\\
& & +\fracx^44!
-\fracx^66!+\cdots
\endeqnarray
cos x = 1− x2
2!+
+x4
4!− x6
6!+ · · · (3.9)
\nonumber·-ò LATEXd§)¤?Ò"¦^ùéJRéà§"amsmathJøk^
£ splitÚ align¸¤"
46 数学公式
3.6 幻影
·ÃwK£phantom¤§´§3Nõ<<¥E,¬Óâm"LATEXvkØÓ§·±¦^ùkE|"Ré੦^ ^ Ú _"LATEX k´k:Ï"¦^
\phantom ·-±Ø3ªÑÑ¥ÑyiÎý3m"Ðëe¡~f"
\begindisplaymath
^12_\phantom16\textrmC
\qquad \textrmversus \qquad
^12_6\textrmC
\enddisplaymath
126C versus 12
6 C
\begindisplaymath
\Gamma_ij^\phantomijk
\qquad \textrmversus \qquad
\Gamma_ij^k
\enddisplaymath
Γ kij versus Γk
ij
3.7 数学字体大小
3êƪ¥§TEXâþe©ÀJiN"~X§¦^iNüþI"XJ^ÛêiNü§¥Ü©§Ø¦^ \textrm
·-§Ï \textrm6øl©ªiNÅØå^"ù±¦^ \mathrm5(iNÅå^"´I5¿´§\mathrméuáâå^"E,Øå^§¿ÑiÎØå^6"
\beginequation
2^\textrmnd \quad
2^\mathrmnd
\endequation
2nd 2nd (3.10)
¦+Xd§k7Lw LATEX(iN"3êƪ¥§iN^o·-5½µ
6AMS-LATEX÷8¦ \textrm·-iNUCoN"
3.8 定理、定义 . . . 47
\displaystyle (123), \textstyle (123), \scriptstyle (123) and\scriptscriptstyle (123).
UCª¬Kþe.w«ª"
\begindisplaymath
\mathop\mathrmcorr(X,Y)=
\frac\displaystyle
\sum_i=1^n(x_i-\overline x)
(y_i-\overline y)
\displaystyle\biggl[
\sum_i=1^n(x_i-\overline x)^2
\sum_i=1^n(y_i-\overline y)^2
\biggr]^1/2
\enddisplaymath
corr(X, Y ) =
n∑
i=1
(xi − x)(yi − y)
[ n∑
i=1
(xi − x)2n∑
i=1
(yi − y)2]1/2
ù~f¥§·I'IO \left[ \right])Ò"
3.8 定理、定义 . . .
êÆ©kUI«ª5ü/Ún0!/½Â0!/ún0±9aq("LATEXdJøeã·-µ
\newtheoremname[counter]text[section]
name ´á'i§^uI£/½n0"text ½Â/½n0ý¢¶¡§¬3ª©¥<Ñ5")Ò¥À´?¿§±^u½/½n0¥¦^I
Ò"counter ±½kc(²/½n0 name",#/½n0¬UÓ^S?Ò"section ½/½n0?Ò¤3Ù!g"3©ó¥1 \newtheorem·-§3©¥±¦^Xe
·-"
\beginname[text]This is my interesting theorem\endname
nØþù´v"e¡~fk"¦ºc¦§¿¦<Ù/¿£§\newtheorem¸~E,§éJn)"
48 数学公式
% definitions for the document
% preamble
\newtheoremlawLaw
\newtheoremjury[law]Jury
%in the document
\beginlaw \labellaw:box
Don’t hide in the witness box
\endlaw
\beginjury[The Twelve]
It could be you! So beware and
see law~\reflaw:box\endjury
\beginlawNo, No, No\endlaw
Law 1 Don’t hide in the witness box
Jury 2 (The Twelve) It could be you! Sobeware and see law 1
Law 3 No, No, No
“Jury”½nÚ “Law”½n¦^ÓOêì"Ïd§?Ò´^Sü")Ò¥À^uù½n½IK½öaqÀÜ"
\flushleft
\newtheoremmurMurphy[section]
\beginmur
If there are two or more
ways to do something, and
one of those ways can result
in a catastrophe, then
someone will do it.\endmur
Murphy 3.8.1 If there are two or moreways to do something, and one of thoseways can result in a catastrophe, thensomeone will do it.
“Murphy”½n?Òc!ó"±¦^Ù§ü §~XÙ½!"
3.9 粗体符号
3 LATEX¥éJoNÎÒ"ùN´¿§Ïüöo´L°¦^oN"iNUC·- \mathbfÑoNi1§´ù´ÛêiN£ç¤§ êÆÎÒÏ~´N"k \boldmath·-§´这只能用于数学模式之外"éuÎÒ´Xd"
\begindisplaymath
\mu, M \qquad \mathbfM \qquad
\mbox\boldmath $\mu, M$
\enddisplaymath
µ,M M µ, M
5¿ÏÒ´oN§ùUØ´¤I"
3.9 粗体符号 49
¦^óä¥ amsbsy£)3 amsmath ¥¤Ú bm éN´ù:§Ï§¹\boldsymbol·-"
\begindisplaymath
\mu, M \qquad
\boldsymbol\mu, \boldsymbolM
\enddisplaymath
µ,M µ,M
50 数学公式
3.10 数学符号表
e¡L¥òÑ3数学模式¥~^¤kÎÒ"¦^L 3.12–3.167
¤ÑÎÒ§7L¯kSC AMSêÆi¥¿3©ó«\1÷µ amssymb"XJ\XÚ¥vkSC AMS÷ÚêÆi¥§eã/e1µCTAN:/tex-archive/macros/latex/required/amslatex
L 3.1: êƪÑÎ
a \hata a \checka a \tildea a \acutea
a \gravea a \dota a \ddota a \brevea
a \bara ~a \veca A \widehatA A \widetildeA
L 3.2: F1i1
α \alpha θ \theta o o υ \upsilon
β \beta ϑ \vartheta π \pi φ \phi
γ \gamma ι \iota $ \varpi ϕ \varphi
δ \delta κ \kappa ρ \rho χ \chi
ε \epsilon λ \lambda % \varrho ψ \psi
ε \varepsilon µ \mu σ \sigma ω \omega
ζ \zeta ν \nu ς \varsigma
η \eta ξ \xi τ \tau
L 3.3: F1i1
Γ \Gamma Λ \Lambda Σ \Sigma Ψ \Psi
∆ \Delta Ξ \Xi Υ \Upsilon Ω \Omega
Θ \Theta Π \Pi Φ \Phi
7ùL5g David Carlisle symbols.tex§â Josef TkadlecïÆUÄ"
3.10 数学符号表 51
L 3.4: 'XÎ
\±3eã·-c¡\þ \not5ÙĽ/ª"
< < > > = =
≤ \leq or \le ≥ \geq or \ge ≡ \equiv
¿ \ll À \gg.= \doteq
≺ \prec  \succ ∼ \sim
¹ \preceq º \succeq ' \simeq
⊂ \subset ⊃ \supset ≈ \approx
⊆ \subseteq ⊇ \supseteq ∼= \cong
< \sqsubset a = \sqsupset a 1 \Join a
v \sqsubseteq w \sqsupseteq ./ \bowtie
∈ \in 3 \ni , \owns ∝ \propto
` \vdash a \dashv |= \models
| \mid ‖ \parallel ⊥ \perp
^ \smile _ \frown ³ \asymp
: : /∈ \notin 6= \neq or \nea¦^÷ latexsym5ùÎÒ
L 3.5: $Î
+ + − -
± \pm ∓ \mp / \triangleleft
· \cdot ÷ \div . \triangleright
× \times \ \setminus ? \star
∪ \cup ∩ \cap ∗ \ast
t \sqcup u \sqcap \circ
∨ \vee , \lor ∧ \wedge , \land • \bullet
⊕ \oplus ª \ominus ¦ \diamond
¯ \odot ® \oslash ] \uplus
⊗ \otimes © \bigcirc q \amalg
4 \bigtriangleup 5 \bigtriangledown † \dagger
¢ \lhd a ¤ \rhd a ‡ \ddagger
£ \unlhd a ¥ \unrhd a o \wr
52 数学公式
L 3.6: º$Î∑
\sum⋃
\bigcup∨
\bigvee⊕
\bigoplus∏\prod
⋂\bigcap
∧\bigwedge
⊗\bigotimes∐
\coprod⊔
\bigsqcup⊙
\bigodot∫\int
∮\oint
⊎\biguplus
L 3.7: Þ
← \leftarrow or \gets ←− \longleftarrow ↑ \uparrow
→ \rightarrow or \to −→ \longrightarrow ↓ \downarrow
↔ \leftrightarrow ←→ \longleftrightarrow l \updownarrow
⇐ \Leftarrow ⇐= \Longleftarrow ⇑ \Uparrow
⇒ \Rightarrow =⇒ \Longrightarrow ⇓ \Downarrow
⇔ \Leftrightarrow ⇐⇒ \Longleftrightarrow m \Updownarrow
7→ \mapsto 7−→ \longmapsto \nearrow
← \hookleftarrow → \hookrightarrow \searrow
\leftharpoonup \rightharpoonup \swarrow
\leftharpoondown \rightharpoondown \nwarrow
\rightleftharpoons ⇐⇒ \iff (bigger spaces) ; \leadsto a
a¦^÷ latexsym5ùÎÒ
L 3.8: ½.Î
( ( ) ) ↑ \uparrow ⇑ \Uparrow
[ [ or \lbrack ] ] or \rbrack ↓ \downarrow ⇓ \Downarrow
\ or \lbrace \ or \rbrace l \updownarrow m \Updownarrow
〈 \langle 〉 \rangle | | or \vert ‖ \| or \Vertb \lfloor c \rfloor d \lceil e \rceil
/ / \ \backslash . (dual. empty)
L 3.9: º½.Î \lgroup
\rgroup
\lmoustache
\rmoustache \arrowvert
ww \Arrowvert \bracevert
3.10 数学符号表 53
L 3.10: Ù§ÎÒ
. . . \dots · · · \cdots... \vdots
. . . \ddots
~ \hbar ı \imath \jmath ` \ell
< \Re = \Im ℵ \aleph ℘ \wp
∀ \forall ∃ \exists 0 \mho a ∂ \partial′ ’ ′ \prime ∅ \emptyset ∞ \infty
∇ \nabla 4 \triangle 2 \Box a 3 \Diamond a
⊥ \bot > \top ∠ \angle√
\surd
♦ \diamondsuit ♥ \heartsuit ♣ \clubsuit ♠ \spadesuit
¬ \neg or \lnot [ \flat \ \natural ] \sharp
a¦^÷ latexsym5ùÎÒ
L 3.11: êÆÎÒ
ùÎÒ±3©ª¥¦^"
† \dag § \S c© \copyright
‡ \ddag ¶ \P £ \pounds
L 3.12: AMS½.Î
p \ulcorner q \urcorner x \llcorner y \lrcorner
| \lvert | \rvert ‖ \lVert ‖ \rVert
L 3.13: AMSF1ÚFË5i1
z \digamma κ \varkappa i \beth k \daleth ג \gimel
54 数学公式
L 3.14: AMS'XÎ
l \lessdot m \gtrdot + \doteqdot or \Doteq6 \leqslant > \geqslant : \risingdotseq
0 \eqslantless 1 \eqslantgtr ; \fallingdotseq
5 \leqq = \geqq P \eqcirc
≪ \lll or \llless ≫ \ggg or \gggtr $ \circeq
. \lesssim & \gtrsim , \triangleq
/ \lessapprox ' \gtrapprox l \bumpeq
≶ \lessgtr ≷ \gtrless m \Bumpeq
Q \lesseqgtr R \gtreqless ∼ \thicksim
S \lesseqqgtr T \gtreqqless ≈ \thickapprox
4 \preccurlyeq < \succcurlyeq u \approxeq
2 \curlyeqprec 3 \curlyeqsucc v \backsim
- \precsim % \succsim w \backsimeq
w \precapprox v \succapprox ² \vDash
j \subseteqq k \supseteqq ° \Vdash
b \Subset c \Supset ± \Vvdash
< \sqsubset = \sqsupset \backepsilon
∴ \therefore ∵ \because ∝ \varpropto
p \shortmid q \shortparallel G \between
` \smallsmile a \smallfrown t \pitchfork
C \vartriangleleft B \vartriangleright J \blacktriangleleft
E \trianglelefteq D \trianglerighteq I \blacktriangleright
L 3.15: AMSÞ
L99 \dashleftarrow 99K \dashrightarrow ( \multimap
⇔ \leftleftarrows ⇒ \rightrightarrows · \upuparrows
¿ \leftrightarrows À \rightleftarrows ¸ \downdownarrows
W \Lleftarrow V \Rrightarrow » \upharpoonleft
´ \twoheadleftarrow ³ \twoheadrightarrow ¹ \upharpoonright
¾ \leftarrowtail ½ \rightarrowtail ¼ \downharpoonleft
® \leftrightharpoons \rightleftharpoons º \downharpoonright
Á \Lsh  \Rsh à \rightsquigarrow
" \looparrowleft # \looparrowright ! \leftrightsquigarrow
x \curvearrowleft y \curvearrowright
ª \circlearrowleft © \circlearrowright
3.10 数学符号表 55
L 3.16: AMSĽ'XÎÚÞ
≮ \nless ≯ \ngtr & \varsubsetneqq
\lneq \gneq ' \varsupsetneqq
\nleq \ngeq " \nsubseteqq
\nleqslant \ngeqslant # \nsupseteqq
\lneqq \gneqq - \nmid
\lvertneqq \gvertneqq ∦ \nparallel
\nleqq \ngeqq . \nshortmid
\lnsim \gnsim / \nshortparallel
\lnapprox \gnapprox \nsim
⊀ \nprec \nsucc \ncong
\npreceq \nsucceq 0 \nvdash
\precneqq \succneqq 2 \nvDash
\precnsim \succnsim 1 \nVdash
\precnapprox \succnapprox 3 \nVDash
( \subsetneq ) \supsetneq 6 \ntriangleleft
\varsubsetneq ! \varsupsetneq 7 \ntriangleright
* \nsubseteq + \nsupseteq 5 \ntrianglelefteq
$ \subsetneqq % \supsetneqq 4 \ntrianglerighteq
8 \nleftarrow 9 \nrightarrow = \nleftrightarrow
: \nLeftarrow ; \nRightarrow < \nLeftrightarrow
L 3.17: AMS$Î
u \dotplus ¦ \centerdot ᵀ \intercal
n \ltimes o \rtimes > \divideontimes
d \Cup or \doublecup e \Cap or \doublecap r \smallsetminus
Y \veebar Z \barwedge [ \doublebarwedge
¢ \boxplus ¯ \boxminus Ä \circleddash
£ \boxtimes ¡ \boxdot \circledcirc
h \leftthreetimes i \rightthreetimes ~ \circledast
g \curlyvee f \curlywedge
56 数学公式
L 3.18: AMSÙ§ÎÒ
~ \hbar \hslash k \Bbbk
¤ \square ¥ \blacksquare s \circledS
M \vartriangle N \blacktriangle \complement
O \triangledown H \blacktriangledown a \Game
♦ \lozenge ¨ \blacklozenge F \bigstar
∠ \angle ] \measuredangle ^ \sphericalangle
\diagup \diagdown 8 \backprime
@ \nexists ` \Finv ∅ \varnothing
ð \eth 0 \mho
L 3.19: êÆi1
~f ·- ¤I÷ABCdef \mathrmABCdef
ABCdef \mathitABCdef
ABCdef \mathnormalABCdef
ABC \mathcalABC
A BC \mathcalABC mathrsfs
ABC \mathcalABC eucal with option: mathcal or\mathscrABC eucal with option: mathscr
ABCdef \mathfrakABCdef eufrak
ABC \mathbbABC amsfonts or amssymb
第四章特殊功能
\?n.©§ LATEXAÏõU§~X¢ÚgÄ)¤!ë©z+n§¬\±éÏ"['u LATEXAÏõU±9UOrõU£ã±3 LATEX Manual [1]Ú The LATEXCompanion [3]é"
4.1 包含 EPS图形
LATEXÏL figureÚ table¸Jø?nã½öã/2ÄéÄUå"kA«±ÏL¦^Ä LATEX·-½ö LATEX*Ð÷5)
¢Sã/"´õê^ruyù·-J±n)"Ïd·Ø3ùÃþp\0ùSN"XJIù¡[&E§ëThe LATEX Companion [3]Ú LATEX Manual [1]"'ü3©¥\\ã/Ò´¦^A½^ 1 )
¤ã/©§,òªã/©¹©¥" LATEX ÷JøNõ5¤ùó"3ùÃþp§·?Ø EncapsulatedPostScript(EPS)ã/©¦^"ϧ'ü 2/¦^"¦^ EPSªã¡§\7Lk PostScript<Å25ÑÑ(J"d D. P. Carlisle graphicx÷¹@éз-5¹ã
/"§´ “graphics”÷8¥Ü©3"b\¦^XÚSC PostScript<ÅÚ graphicx÷§@o\
Ò±ÏLe¡Ú½ÚÚ/rÌã¡\\\©¥µ
1. ^\ã^ÑÑ EPSªã/©4"1~X XFig, CorelDraw!, Freehand, Gnuplot, . . .2,±^5ÑÑ PostScript óä´ GhostScript ^§§±l
CTAN:/tex-archive/support/ghostscript" Windows Ú OS/2 ^rUU^GSview"
3CTAN:/tex-archive/macros/latex/required/graphics4XJ\^ØUÑÑ EPSª©§\±ÁSC PostScript<Å°Ä
58 特殊功能
2. 3Ñ\©ó¥\þe¡·-5C\ graphicx÷"
\usepackage[driver]graphicx
ùp driver ´\¦^“dvi postscript”=§S"~^´dvips"Ï TEX¥vk5½¹ã/IO§¤±§S¶i´7I" driver ¶i§graphicx÷Ò±ÀJÜ·3.dvi©¥\'uã/&E"ù<ÅâUn)ù&E¿(¹ù .eps©"
3. ¦^·-
\includegraphics[key=value, . . . ]file
5r© file \\\©"Àëê´XdÏÒm'c keys ÚA values"'c keys ±^5UC¹ã/°Ý!pݱ9^=Ý"L 4.1ÑÌA'c"
L 4.1: graphicx÷¦^'c
width rã/ ½°Ýheight rã/ ½pÝangle _^=ã/scale ã/
e¡ù~f±Ï·n)L§µ
\beginfigure
\begincenter
\includegraphics[angle=90, width=0.5\textwidth]test
\endcenter
\endfigure
ùãèr;3© test.eps¥ã/¹©p"首先 ã/^= 90ݧ然后?1 ¦ã/°ÝuIO¡°Ý 0.5"Ï
§S£~X Apple LaserWriter ¤§,ò\ã/ÏLù°Ä§S<©"$íЧù©U¬´ EPSª"5¿ EPS©ØU¹LSN"<ŰħS±²(/½ÑÑ EPS©"
4.2 参考文献 59
vk½ã/pݧã/p°Cz'~´ 1.0§Ò´±5p°'"pÝÚ°Ýëê±^ýéÝü 5½"[&E±31 73L 5.5¥é"XJ\õù¡£§Ö©z [8]Ú [11]"
4.2 参考文献
\±ÏL thebibliography¸5)ë©z"zë©z^8±Xe·-mÞ
\bibitemmarker
,¦^ marker 3©¥Ú^ùÖ!ù©Ù½öØ©"
\citemarker
ë©z^8?Ò´gÄ)¤" \beginthebibliography·-ëê?Ò°Ý"3e¡~f¥§ 99w LATEXë©z^8?Òج'êi 99°"
Partl~\citepa has
proposed that \ldots
\beginthebibliography99
\bibitempa H.~Partl:
\emphGerman \TeX,
TUGboat Volume~9, Issue~1 (1988)
\endthebibliography
Partl [1] has proposed that . . .
参考文献
[1] H. Partl: German TEX, TUGboat Vol-ume 9, Issue 1 (1988)
éu.8§\NI¦^ BibTEX§S" BibTEX¹3õê TEXu1¥"§U4\oë©zê⥧¿l¥)¤\Ø©Ú^©z^8" BibTEXéë©z£ã´Äu«ªLVg§§±4\UìþýkOЪ5Mï\ë©z"
60 特殊功能
L 4.2: ¢Ú'cª«~"
示例 索引项 注解
\indexhello hello, 1 ÊϪ¢Ú\indexhello!Peter Peter, 3 ‘hello’ef\indexSam@\textslSam Sam, 2 ½Â¢Úª\indexLin@\textbfLin Lin, 7 Óþ\indexJenny|textbf Jenny, 3 ½Âèª\indexJoe|textit Joe, 5 Óþ
4.3 索引
NõÖ7k^Ü©#Lu§¢Ú"¦^ LATEXÚ9Ïóämakeindex5§·UéN´)¤¢Ú"3ùÃþp§0Ä¢Ú)¤·-"?Ú)ë The LATEX Companion [3]"
¦^ LATEX¢ÚõU§÷ makeidx7L3óÜ©Ú\µ
\usepackagemakeidx
,3ó¥¦^
\makeindex
-¹¢Ú·-"
¢ÚSNÏL·-
\indexkey
½§ùp key ´¢Ú'c"\±3I¢Ú/\\ù^·-"L 4.2Þ~)º key ëê^"
LATEX?nÑ\©§z \index·-Ѭò·¢ÚÚcè\AÏ©¥"ù©¶iÚ LATEXÑ\©Ó§äkØÓ*жM (.idx)"ù .idx©I^ makeindex§S5
53©¶Ø#NL 8iÎöXÚþ§ù§S·¶ makeidx"
4.4 定制页眉和页脚 61
?n"
makeindex filename
makeindex§S)¤ ©Ó¶üS¢Ú©§ù©¦^ .ind*ж"2g^ LATEX?n ©§ùüS¢Ú©ò¹ ©¥
\printindex
·-Ñy "LATEX2ε N÷ showidx±3©><Ñ¢Ú"ùõ
U3é©Ú¢Ú©k^"
4.4 定制页眉和页脚
Piet van Oostrum? fancyhdr÷6§Jøü·-¦·±½©wÚ"wúºÜ§\ÒUuyù÷^?"½wÚ5ï#Luz¡¤áÙ!¶¡
"LATEXÏLüÚ½5¤ù?Ö"3½ÂwÚ§\±¦^ \rightmark·-5Lc!¶§¦^ \leftmark5LcÙ¶"ùü·-ò3?n chapter½ö section·-D"¼(¹5§ \chapter ·-¿Øé \rightmark
Ú \leftmark ?1#½Â§ ´ÏLN^ \chaptermark ·-½ö\sectionmark!\subsectionmark5½Â \rightmarkÚ \leftmark"Ïd§XJ\?Uwþw«Ù¶§Iü/#½Â
\chaptermark·-"ã 4.1w«XÛ fancyhdr5Ú©qw"ÃØXÛ·
´ïÆ\kÖe÷¤©"
4.5 Verbatim宏包
3©c¡Ü©\®² verbatim环境"3ù!¥§\òƬ¦^ verbatim宏包" verbatim÷#¢y verbatim¸§¿)û5 verbatim¸"ù¿vkoAO§ verbatim
6±3CTAN:/tex-archive/macros/latex/contrib/supported/fancyhdr"
62 特殊功能
\documentclassbook\usepackagefancyhdr\pagestylefancy% with this we ensure that the chapter and section% headings are in lowercase.\renewcommand\chaptermark[1]\markboth#1\renewcommand\sectionmark[1]\markright\thesection\ #1\fancyhf % delete current setting for header and footer\fancyhead[LE,RO]\bfseries\thepage\fancyhead[LO]\bfseries\rightmark\fancyhead[RE]\bfseries\leftmark\renewcommand\headrulewidth0.5pt\renewcommand\footrulewidth0pt\addtolength\headheight0.5pt % make space for the rule\fancypagestyleplain%
\fancyhead % get rid of headers on plain pages\renewcommand\headrulewidth0pt % and the line
ã 4.1: fancyhdr¢~"
÷¢y#OõU§ùâ´·3ùpJù÷Ï"verbatim÷Jø
\verbatiminputfilename
·-§ù·-#N\r ASCIIè©©¹\©¥5§ÒЧ´3 verbatim¸¥"
verbatim÷´ ‘tools’÷8Ü©§õêXÚ¥ÑýCù÷"XJ\õ/)ù÷§±Ö [9]"
4.6 下载并安装 LATEX宏包
õê LATEXSCÑkþýCª÷§kéõ±3þ"3péÏéª÷Ì/Ò´CTAN(http://www.ctan.org/)"«÷ ©§~X geometry § hyphenat§5`ѹ
ü©µ*ж .ins§,*ж .dtx"d§Ï~¬k readme.txté÷?1`²"\ATkÖù©"ÃØXÛ§\÷ ©§\é§?1?n¦
4.6 下载并安装 LATEX宏包 63
(a)\ TEXXÚù#÷§ (b))¤`²©"e¡´1Ü©Ú½µ
1. é .ins©$1 LATEX·-"ùò¬) .sty©"
2. r .sty©£XÚUé/"Ï~´3 .../localtexmf /tex/latex
f8¹e£Windows½ö OS/2^rATUC¤"
3. M#XÚ©¶êâ¥"äN·-ûu\¦^ LATEXXÚµteTeX, fpTeX – texhash; web2c – maktexlsr; MikTeX – initexmf
-update-fndb½ö¦^ã/.¡"
y3\±l .dtx©)¤`²©µ
1. é .dtx©$1 LATEX·-"ù¬)¤ .dvi©"5¿\UIõg$1 LATEX·-5(?nÚ^"
2. ue LATEX·-´Ä) .idx©"XJvuyù©§\Ò±11 5Ú"
3. )¤¢Ú§v\·-µmakeindex -s gind.ist name
(ùp name L«Ø*ж̩¶)"
4. 2gé .dtx©$1 LATEX·-"
5. ÚØ´7I§)¤ .ps©½ö .pdf©±BÖ"
k\¬w)¤ .glo(glossary)©"31 4ÚÚ1 5Úm$1e¡·-µmakeindex -s gglo.ist -o name.gls name.glo
(@311 5Úcé .dtx©$1H LATEX·-"
第五章定制LATEX
8c§$^\¤ÆL·-±ÑUýõêÖöÉ©"¦+ù©wþØÛ©§§ÌÐÑXÚ7LÅÄ5K"ù5K±¦©N´Ö§Ówå5~Ó·"
, 3¹e§LATEX N¿vkJø·Ü\I·-½ö¸§½ö|^®k·-)ÑÑÚ\ØÓ"3ùÙ¥§·òÁÑ#Eâ§$^ùEⱬ LATEX
#rZ§½ö±¦ LATEX)¯ØÓÑÑ"
5.1 建立新的命令、环境和包
\N®²5¿·3ùÖ¥0¤k·-ѹ3/µ¥§¿3©Ù¢Ú¥k¦IP"·¿vkæ^IO LATEX·-5¢yù§·M濫÷£package¤§¿3Ù¥½Â·¤I·-Ú¸"Ïd·±z·©µ
\beginlscommand
\cidum
\endlscommand
\dum
3ù~f¥§·¦^#¸ – lscommand"ù¸KI3·-±xÑÝ/µ"Ó·¦^·-µ\ci§ù·-KIÑÑ÷¶i§¿3¢Ú¥V\A^8"\±3©Ù¢Ú¥é·- \dum§,\¬uyk \dum^8§ù^8¥Ñ¹k \dum·-¤kè"·úù·-3Ý/µ¥?1ü1Ø2·Ü§·
±tUC lscommand¸½Â§¦·-ÑÑäk#*"ù«'åèA©Å?1ª?Utõ" XJ·
5.1 建立新的命令、环境和包 65
¦^ LATEXk·-5ù¯£3Ý/µ¥w«·-¿\\¢Ú¥¤§@Ò´èA¿ÃÄ?U"
5.1.1 建立新的命令
O\\gC·-§±¦^Xe·-µ
\newcommandname[num]definition
Äþ§ù·-Iüëê§1ëê name ´\ïá·-¶¡§1ëê definition ´·-½Â"1nëê num ´À§^u½·-¤Iëêê8£·-õ±k9ëê¤"XJØÑùëê§@o#ï·-òØÉ?Ûëê"e5ü~fòÏ\n)ù«Å"1~f½Â
#·- – \tnss"ù·-´éf “The Not So Short Introduction toLATEX2ε” "XJ\I3©¥õg¦^Ö¶¡§@o½Âù·-ò´~B"
\newcommand\tnssThe not
so Short Introduction to
\LaTeXe
This is ‘‘\tnss’’ \ldots
‘‘\tnss’’
This is “The not so Short Introduction toLATEX2ε” . . . “The not so Short Introduc-tion to LATEX2ε”
e~fü«XÛïáÉëê·-"3·-½Â¥§IP #1ò\½ëê¤O"XJ\¦^õëê§@o±g¦^ #2!. . .!#9IP"
\newcommand\txsit[1]
This is the \emph#1 Short
Introduction to \LaTeXe
% in the document body:
\beginitemize
\item \txsitnot so
\item \txsitvery
\enditemize
• This is the not so Short Introductionto LATEX2ε
• This is the very Short Introduction toLATEX2ε
LATEXØ#N\^ \newcommand#ïk·-¶·-"kAÏ·-;^u?nù«¹µ\renewcommand"§¦^·-\newcommandÓ"
66 定制LATEX
3,¹e§\U¬I¦^ \providecommand·-"§¤ \newcommand·-Óó"XJ·-®²3§LATEX2ε ò¬Ñù·-"?n LATEX·-k5¿¯§ëw1 6±
¼õù¡&E"
5.1.2 建立新的环境
\newcommand·-aq§k·-^uïá#¸"ù·-Ò´ \newenvironment§§Xe¤«µ
\newenvironmentname[num]beforeafter
\newcommand·-aq§\± \newenvironment·-JøÀëê"3ëê before ¥JøSNò3·-¹©c?n§ 3ëê after ¥JøSNòTÐ3 \endnamec¡?n"e¡~fü« \newenvironment·-^µ
\newenvironmentking
\rule1ex1ex%
\hspace\stretch1
\hspace\stretch1%
\rule1ex1ex
\beginking
My humble subjects \ldots
\endking
My humble subjects . . .
ëê num ¦^ª \newcommand ·-Ó"LATEX Óy\جØ%UC®k¸½Â"XJ\(¢F"UC3¸§\±¦^·- \renewenvironment§§¦^Ú·- \newenvironment
Ó"3ù~f¥^·-ò3)ºµ\rule·-)º±ëw
1 78§\stretch·-)º±ëw1 72§'u \hspace&E±31 72é"
5.1.3 建立你自己的宏包
XJ\ïáéõgC¸Ú·-§\©óÜ©òCé§3ù«¹e§ïá# LATEX5¤k\gC½Â·-
5.2 字体和尺寸 67
Ú¸ò´Ð?nª"\±3©¥¦^ \usepackage·-5Ú\g½Â÷¥¸Ú·-"
% Demo Package by Tobias Oetiker\ProvidesPackagedemopack\newcommand\tnssThe not so Short Introduction to \LaTeXe\newcommand\txsit[1]The \emph#1 Short
Introduction to \LaTeXe\newenvironmentking\beginquote\endquote
ã 5.1: Example Package.
÷ÄóÒ´ò\é©ó©l©¥§ù©I± .sty("\I¦^;^·-µ
\ProvidesPackagepackage name
ù·-AT3\c¡¦^"\ProvidesPackage ^uwLATEX÷¶¡l #N LATEX3\ÁügÚ\Ó÷ÿÑûÐØ&E§ã 5.1ѧ٥¹·c½Â·-"
5.2 字体和尺寸
5.2.1 字体变换命令
LATEXâ©Ü6(£Ù!!5!,,¤5ÀJÜ·iNÚiN"3,¹e§\U¬ÃóUC©¦^iN9Ù"¤ù8§\±¦^L 5.1ÚL 5.2¥Ñ@·-"ziN¢Sº´O¯K§¿§6u©¤¦^©a"L 5.3ÑùiNC·-3IO©a¥ýéº"
\small The small and
\textbfbold Romans ruled
\Large all of great big
\textitItaly.
The small and bold Romans ruled all ofgreat big Italy.
LATEX2ε A´iN«á5´pÕá§ù¿X\±UCiN E,3iNkoN½öNA5"
68 定制LATEX
3数学模式¥\±¦^iNC·-56òÑ数学模式§,Ñ\©i"XJ\F"UCêÆúª¤¦^iN§LATEXJø,@·-"ëwL 5.4"
¦^iN·-ÿ§)Ò£curly braces¤üÚ"§^uïᤢ组"|õê LATEX·-^Æ"
He likes \LARGE large and
\small small letters.He likes large and small letters.
XJãá3iN^Æ¥(å§@oiNº·-òUCãá¥1ål"Ïd^u©|)Ò ØAT@(å"5¿\par·-ü~f1"
1\paru1
L 5.1: iN
\textrm... roman \textsf... sans serif\texttt... typewriter
\textmd... medium \textbf... bold face
\textup... upright \textit... italic\textsl... slanted \textsc... small caps
\emph... emphasized \textnormal... document font
L 5.2: iNº
\tiny tiny font
\scriptsize very small font
\footnotesize quite small font
\small small font\normalsize normal font\large large font
\Large larger font
\LARGE very large font
\huge huge
\Huge largest
5.2 字体和尺寸 69
L 5.3: IO©a.¥iNýé
size 10pt (default) 11pt option 12pt option\tiny 5pt 6pt 6pt\scriptsize 7pt 8pt 8pt\footnotesize 8pt 9pt 10pt\small 9pt 10pt 11pt\normalsize 10pt 11pt 12pt\large 12pt 12pt 14pt\Large 14pt 14pt 17pt\LARGE 17pt 17pt 20pt\huge 20pt 20pt 25pt\Huge 25pt 25pt 25pt
\Large Don’t read this! It is not
true. You can believe me!\par
Don’t read this! It is not true.
You can believe me!
\Large This is not true either.
But remember I am a liar.\parThis is not true either. But re-member I am a liar.
XJ\F"UCã$õ©iN§\UAT¦^CiN¸"
L 5.4: êÆiN
Command Example Output
\mathcal... $\mathcalB=c$ B = c\mathrm... $\mathrmK_2$ K2
\mathbf... $\sum x=\mathbfv$∑
x = v\mathsf... $\mathsfG\times R$ G× R\mathtt... $\mathttL(b,c)$ L(b, c)\mathnormal... $\mathnormalR_19\neq R_19$ R 6= R19
\mathit... $\mathitffi\neq ffi$ ffi 6= ffi
70 定制LATEX
\beginLarge
This is not true.
But then again, what is these
days \ldots
\endLarge
This is not true. But then again,what is these days . . .
ùò¦\l¯õ)Ò¥)øÑ5"
5.2.2 Danger, Will Robinson, Danger
XÙmÞQ²`L@§3\©¥$^ù²(·-?Uª´~x¯§Ïù«ªÚ LATEXÄ:nggñ"3? LATEX©ÿ§©ª5¿©l©ÙÜ6(Ú¢Sª"ùÒ¿XXJ\3©Ùõ/æ^,«AϪ5?»²~¦^&E§\ÒAT¦^ \newcommand5½ÂÜ6µC·-§¿ÏLù·-5?U&ELª"
\newcommand\oops[1]\textbf#1
Do not \oopsenter this room,
it’s occupied by a \oopsmachine
of unknown origin and purpose.
Do not enter this room, it’s occupied by amachine of unknown origin and purpose.
ù«äk²w`:§XJ\±û½æ^ØÓu \textbf
ª5Lx&E§@o\ØI3\©Ù¥é \textbf·-§ØIò^uLx&E \texbf·-LÙ¦&E^Ó·-«©m5"
5.2.3 建议
o(ùÙ¥'uiNÚiNº·-§e¡´áïƵ
Remember! The MO RE fonts you use in a document, the
more readable and beautiful it becomes. \3©Ù¥¦^iNõ§©Ùwå5Ò*"
5.3 文档对象之间的间隔
5.3.1 行距
XJ\3©¥¦^1å§\±3ó¥¦^Xe·-?
5.3 文档对象之间的间隔 71
1½µ
\linespreadfactor
~X·- \linespread1.3ò) 1.51å§ ·- \linespread1.6
K)V1å""¹e1å 1"
5.3.2 段落格式
3 LATEX¥§kü·-±KãáÙÛ"3©óÜ©§±ÏLXe½Â5UCãáÙÛ"
\setlength\parindent0pt
\setlength\parskip1ex plus 0.5ex minus 0.2ex
ùü·-O\ãámål§¿òÄ1 ? 0"
~f¥§Ý½¥ plusÚ minusÜ©ò¦TEX3S½1å"¦ãá(w«3¡þ§TEXò3 0.8ex 1.5exmNãámål"
3ãáÏ~^©¿Ø?1Ä1 ?"5¿´§þ¡J·-éuL¥SN¬E¤K"L1å¬C~Õt§ùÏ~Ø´(J";ù«¹§\UIòþ¡·-l󥣩¥·Ü "½öئ^ù§Ï5`;Ö7Ñ´^ ?¿Ï~Ø^5©lãá"
XJ\ ?5vk ?ãá2§±3ãám©¦^·-µ
\indent
,§ù·-k3 \parindentØ"¹eâkJ"
MïØ ?ãá§\±3ãám©Ü©¦^·-µ
\noindent
2 ?Ù!IK1ã᧱¦^indentfirst"
72 定制LATEX
5.3.3 水平距离
LATEXXÚgÄû½ücÚéfmål"O\Y²ål§¦^·-µ
\hspacelength
XJùY²ål31Ľö1"AT§^·- \hspace*
O \hspace"·- length ëê3ü¹e´kü êi"Ýü3L 5.5¥Ñ5"
ù´\hspace1.5cmã1.5 fx"
ù´ ã1.5 fx"
e¡·-ò)AÏݵ
\stretchn
§ò)ò1°Ý¿÷Ý"XJü \hspace\stretchn·- uÓ1§@o§òâ Ïf©m"
x\hspace\stretch1
x\hspace\stretch3xx x x
5.3.4 垂直距离
3ãá!!!!,,mål´d LATEXXÚgÄû½"XJ7§±3üãmO\ål§¦^·-Xe¤«µ
\vspacelength
ù·-Ï~^uü1m"XJù1åØAT3uºÜÚ"§@o¦^·- \vspace*5O \vspace"·- \stretch Ú \pagebreak (ܦ^±31ÑÑ©
§±^5y©3¡þRØ¥"
Some text \ldots
\vspace\stretch1
ù1òÑy3"\pagebreak
5.4 页面的布局 73
L 5.5: TEXÝü
mm millimetre ≈ 1/25 inchcm centimetre = 10 mmin inch = 25.4 mmpt point ≈ 1/72 inch ≈ 1
3 mmem approx width of an ‘M’ in the current fontex approx height of an ‘x’ in the current font
Óã½ÓL¥ü1mål±^Xe·-5½µ
\\[length]
¦^·- \bigskip Ú \smallskip \±¼ý½ÂRål"
5.4 页面的布局
LATEX2ε#N\3 \documentclass·-¥½¡º£paper size¤",§ògÄÀJÙ§ëê"kÿ\UØ÷¿ LATEX ý§ùÿ\±gCUCùëê" ã 5.2¥w«¤kUUC¡ëê"ùã´^ layout÷¼3"先等等! . . . 3\m©/4ùdÄ¡wå5°:0c§ks
m"Ú LATEX¥õê5½§"¡ÙÛ´kÙS3Ï"(¢§éu\MS Word¡5`§§wþ~dÄ"´w
w\UÖ74¿ÚOzIO©1iÎê8"\¬uyz1iÎØL66"y3\ LATEX¡´Xd"²w«§XJ31¥l\õiΧÖòC(J"ù´Ïú«l1m©£Ä1(åC(J"ù´Ûü¤õ9/ªÏ"ÏdXJ\û½O\©°Ý§ÞM¥²x\3¦\¬C
J±Ö"´w®²`õ§e5·òw\XÛ"LATEXJøü·-5UCùëê"¦Ï~3©ÙóÜ©¦
^"3CTAN:/tex-archive/macros/latex/required/tools4·`´Rk(ÑûªÑÖ7
74 定制LATEX
Header
Body
Footer
MarginNotes
i8¾ -
i7
?
6
i1¾ -
¾-i3 i10¾ -
¾- i9
6
?
i11
i2?
6i46
?
i56
?
i66
?
1 one inch + \hoffset 2 one inch + \voffset
3 \oddsidemargin = 22pt 4 \topmargin = 22pt
5 \headheight = 13pt 6 \headsep = 19pt
7 \textheight = 595pt 8 \textwidth = 360pt
9 \marginparsep = 7pt 10 \marginparwidth = 106pt
11 \footskip = 27pt \marginparpush = 5pt (not shown)
\hoffset = 0pt \voffset = 0pt
\paperwidth = 597pt \paperheight = 845pt
ã 5.2: ¡ÙÛëê
5.5 关于长度的更详细的信息 75
1·-,ëê½µ
\setlengthparameterlength
1·-,ëêO\½"
\addtolengthparameterlength
1·-¢Sþ' \setlength·-¢^§Ï\±ÏL?U®k5¼¤I(J"©°ÝO\1f§·òXe·-óÜ©"
\addtolength\hoffset-0.5cm
\addtolength\textwidth1cm
3?1ùóÿ§\U¬wwcalc§§#N\3setlength ëê¥?1â$"§±$^?Û^êëê¼ê¥"
5.5 关于长度的更详细的信息
kU§·Ï~Ñ;3 LATEX©¥¦^ýéÝ"§·ÏL¡¥Ù§°Ý½pÝ5½Ý"'Xã/§·½ \textwidth§°Ýl ¦ã/Tп÷¡"
e¡n·-#N\¼©G°Ý!pݱ9Ý"
\settoheightlscommandtext\settodepthlscommandtext\settowidthlscommandtext
e¡~fw«ù·-U^åµ
76 定制LATEX
\flushleft
\newenvironmentvardesc[1]%
\settowidth\parindent#1:\
\makebox[0pt][r]#1:\
\begindisplaymath
a^2+b^2=c^2
\enddisplaymath
\beginvardescWhere$a$,
$b$ -- are adjunct to the right
angle of a right-angled triangle.
$c$ -- is the hypotenuse of
the triangle and feels lonely.
$d$ -- finally does not show up
here at all. Isn’t that puzzling?
\endvardesc
a2 + b2 = c2
Where: a, b – are adjunct to the right angleof a right-angled triangle.
c – is the hypotenuse of the triangleand feels lonely.
d – finally does not show up here atall. Isn’t that puzzling?
5.6 盒子
LATEXÏLÝf5ïá©ÙÛ"Äk§ziÎÑ´Ýf§ùÝfëå5¤üc§ücëå5¤1"5¿´§ücmë´ë§LATEXògÄ?1N¦ücòTФ1"
·«@§ùp£ã´¢S¹zNõ§:3u TEXÌöÝfÚë"Ø´ki1âU¤ë§\A±r?Û£)Ýfg¤Ýf¥", LATEXò¬?nüi1?nùÝf"
3LÙ!¥\®²Ýf¦^§¦+·¿vk²(`Ñ5"~X tabular¸Ú \includegraphics·-ÒÑEÝf"ùÒ¿X\±tòõLÚã¿ü"\IyÒ´§°ÝoÚØu©°Ý"
5.6 盒子 77
¦^Xe·-±rãáÝf¥µ
\parbox[pos]widthtext
±^e¡ù·-¤Ó¯µ
\beginminipage[pos]width text \endminipage
ëê pos±±eiÎ¥ c, t½ b§ùëê^uÝfé7©ÄR "ëê width^uNÝf°Ý"ùü¸ÌØÓ?3u\UÃ3 parbox¸¥¦^,·-½ö¸§ A?ÛÀÜѱ3 minipage¸¥¦^"
\parbox¥±¹ã᧤©13SA¤k¯"ØÓ§LATEX¥3,aÝf^u?nY²éàá"·®²Ù¥ – \mbox§§üòÙ§Ýf¹¤Ýf§±^u LATEXämüüc"ÏÝf¥±¹Ýf§Ïd§±ör(¹5"
\makebox[width][pos]text
ëê width ½Â)¤ÝflÜ*°Ý5"3?1ëêÿ§\±D4 \width! \height! \depth Ú \totalheight widthëê"ùA´ÿþÝfSÜ©5¼"ëê pos Éiεc –Ø¥!l –!r –mÚ s –ò©þ!©ÙÝf¥"
·- \frameboxÚ \makebox¤Óó§ØÓ?3u§3SÜ©±xÑÝ/µ"
e¡~fü«\¦^·- \makeboxÚ \frameboxU¤óµ
5ù¿X3ÝfSÜw5§Ýf°ÝU¬§\$±òÝf°Ý0pt§ù±¦Ýf¥SNØKÝfÜÙÛ"
78 定制LATEX
\makebox[\textwidth]%
c e n t r a l\par
\makebox[\textwidth][s]%
s p r e a d\par
\framebox[1.1\width]Guess I’m
framed now! \par
\framebox[0.8\width][r]Bummer,
I am too wide \par
\framebox[1cm][l]never
mind, so am I
Can you read this?
c e n t r a l
s p r e a d
Guess I’m framed now!
Bummer, I am too wide
never mind, so am ICan you read this?
y3·®²NoÝfY²Ý§e5Ú½´ÆSXÛR6"éu LATEX5`§·-
\raiseboxlift[depth][height]text
4\U½ÂÝfpÝ"\±c¡nëꥦ^ \width!\height!\depth
Ú \totalheight§ù±¦ÝfëêUÝfSÜ©"
\raisebox0pt[0pt][0pt]\Large%
\textbfAaaa\raisebox-0.3exa%
\raisebox-0.7exaa%
\raisebox-1.2exr%
\raisebox-2.2exg%
\raisebox-4.5exh
he shouted but not even the next
one in line noticed that something
terrible had happened to him.
Aaaaaaargh
he shouted but not eventhe next one in line noticed that somethingterrible had happened to him.
5.7 标尺和支撑
·cQ²¦^L·-
\rule[lift]widthheight
Ï~§^5ÑÑçÚÝ/"
6¡==´Y²ÚRÓ$^ . . .
5.7 标尺和支撑 79
\rule3mm.1pt%
\rule[-1mm]5mm1cm%
\rule3mm.1pt%
\rule[1mm]1cm5mm%
\rule3mm.1pt
ù·-±^5)Y²ÚR^"~Xþ^Ò´^ \rule·-Mï"«AÏA^Ò´vk°ÝkpÝIº"3;Ñâ
¥§ù¡| £Struts¤"§^5y©Ü©äk(½pÝ"\±3 tabular¸¥¦^| 5¦,1äkA½pÝ"\±3¸¥¦^§5y1äkpÝ"
\begintabular|c|
\hline
\rule1pt4exPitprop \ldots\\
\hline
\rule0pt4exStrut\\
\hline
\endtabular
Pitprop . . .
Strut
参考文献
[1] Leslie Lamport. LATEX: A Document Preparation System. Addison-Wesley, Reading, Massachusetts, second edition, 1994, ISBN 0-201-52983-1.
[2] Donald E. Knuth. The TEXbook, Volume A of Computers and Type-setting, Addison-Wesley, Reading, Massachusetts, second edition, 1984,ISBN 0-201-13448-9.
[3] Michel Goossens, Frank Mittelbach and Alexander Samarin. The LATEXCompanion. Addison-Wesley, Reading, Massachusetts, 1994, ISBN 0-201-54199-8.
[4] Each LATEX installation should provide a so-called LATEX Local Guidewhich explains the things which are special to the local system. It shouldbe contained in a file called local.tex. Unfortunately, some lazy sysopsdo not provide such a document. In this case, go and ask your localLATEX guru for help.
[5] LATEX3 Project Team. LATEX2ε for authors. Comes with the LATEX2ε
distribution as usrguide.tex.
[6] LATEX3 Project Team. LATEX2ε for Class and Package writers. Comeswith the LATEX2ε distribution as clsguide.tex.
[7] LATEX3 Project Team. LATEX2ε Font selection. Comes with the LATEX2ε
distribution as fntguide.tex.
[8] D. P. Carlisle. Packages in the ‘graphics’ bundle. Comes with the ‘graph-ics’ bundle as grfguide.tex, available from the same source your LATEXdistribution came from.
参考文献 81
[9] Rainer Schopf, Bernd Raichle, Chris Rowley. A New Implementationof LATEX’s verbatim Environments. Comes with the ‘tools’ bundle asverbatim.dtx, available from the same source your LATEX distributioncame from.
[10] Graham Williams. The TeX Catalogue is a very complete listingof many TEX and LATEX related packages. Available online fromCTAN:/tex-archive/help/Catalogue/catalogue.html
[11] Keith Reckdahl. Using EPS Graphics in LATEX2ε Documents whichexplains everything and much more than you ever wanted to knowabout EPS files and their use in LATEX documents. Available onlinefrom CTAN:/tex-archive/info/epslatex.ps
索引
\!, 43
", 19
$, 37
\(, 37
\), 37
\,, 38, 43
-, 20
−, 20
\-, 18
–, 20
—, 20
., space after, 24
. . . , 20
.aux, 12
.dtx, 11
.dvi, 11
.idx, 12
.ilg, 13
.ind, 13
.ins, 11
.lof, 12
.log, 11
.lot, 12
.sty, 11
.tex, 11
.toc, 12
\:, 43
\;, 43
\@, 24
\[, 37\\, 17, 29, 30, 32, 73\\*, 17\], 37~, 24
A4 paper, 10A5 paper, 10acute, 22\addtolength, 75æ, 22amsbsy, 49amsfonts, 39, 56amsmath, 41–43, 45, 49amssymb, 39, 50\and, 26\appendix, 25, 26\arccos, 41\arcsin, 41\arctan, 41\arg, 41array, 44arrow symbols, 40article class, 10\atop, 41\author, 26
B5 paper, 10babel, 18, 21, 22\backmatter, 26
索引 83
backslash, 6\backslash, 5base font size, 10\begin, 28\bibitem, 59\Big, 42\big, 42\Bigg, 42\bigg, 42\bigskip, 73\binom, 41blackboard bold, 39bm, 49\bmod, 41bold face, 68bold symbols, 48\boldmath, 48\boldsymbol, 49book class, 10braces, 42
calc, 75\caption, 35, 36\cdot, 40\cdots, 43center, 29\chapter, 25\chaptermark, 61\choose, 41\ci, 64\cite, 59\cleardoublepage, 36\clearpage, 36\cline, 32commands, 5
\!, 43\(, 37
\), 37
\,, 38, 43
\-, 18
\:, 43
\;, 43
\@, 24
\[, 37
\\, 17, 29, 30, 32, 73
\\*, 17
\], 37
\addtolength, 75
\and, 26
\appendix, 25, 26
\arccos, 41
\arcsin, 41
\arctan, 41
\arg, 41
\atop, 41
\author, 26
\backmatter, 26
\backslash, 5
\begin, 28
\bibitem, 59
\Big, 42
\big, 42
\Bigg, 42
\bigg, 42
\bigskip, 73
\binom, 41
\bmod, 41
\boldmath, 48
\boldsymbol, 49
\caption, 35, 36
\cdot, 40
\cdots, 43
\chapter, 25
84 索引
\chaptermark, 61
\choose, 41
\ci, 64
\cite, 59
\cleardoublepage, 36
\clearpage, 36
\cline, 32
\cos, 41
\cosh, 41
\cot, 41
\coth, 41
\csc, 41
\date, 26
\ddots, 43
\deg, 41
\depth, 77, 78
\det, 41
\dim, 41
\displaystyle, 47
\documentclass, 9, 18
\dq, 24
\dum, 64
\emph, 28, 68
\end, 28
\exp, 41
\fbox, 19
\footnote, 27, 36
\footnotesize, 68
\frac, 41
\framebox, 77
\frenchspacing, 25
\frontmatter, 26
\fussy, 18
\gcd, 41
\genfrac, 41
\height, 77, 78
\hline, 32
\hom, 41
\hspace, 66, 72
\Huge, 68
\huge, 68
\hyphenation, 18
\idotsint, 43
\iiiint, 43
\iiint, 43
\iint, 43
\include, 13, 14
\includegraphics, 58, 76
\includeonly, 14
\indent, 71
\index, 60
\inf, 41
\input, 14
\int, 42
\item, 29
\ker, 41
\label, 27, 38
\LARGE, 68
\Large, 68
\large, 68
\LaTeX, 19
\LaTeXe, 19
\ldots, 20, 43
\left, 42
\leftmark, 61
\lg, 41
\lim, 41
\liminf, 41
\limsup, 41
\linebreak, 17
\linespread, 71
\listoffigures, 35
索引 85
\listoftables, 35
\ln, 41
\log, 41
\mainmatter, 26
\makebox, 77
\makeindex, 60
\maketitle, 26
\mathbb, 39
\mathbf, 69
\mathcal, 69
\mathit, 69
\mathnormal, 69
\mathrm, 46, 69
\mathsf, 69
\mathtt, 69
\max, 41
\mbox, 19, 21, 77
\min, 41
\multicolumn, 33
\newcommand, 65, 66
\newenvironment, 66
\newline, 17
\newpage, 17
\newtheorem, 47
\noindent, 71
\nolinebreak, 17
\nonumber, 45
\nopagebreak, 17
\normalsize, 68
\overbrace, 40
\overleftarrow, 40
\overline, 40
\overrightarrow, 40
\pagebreak, 17
\pageref, 27
\pagestyle, 13
\par, 68
\paragraph, 25
\parbox, 77
\parindent, 71
\parskip, 71
\part, 25
\phantom, 36, 46
\pmod, 41
\Pr, 41
\printindex, 61
\prod, 42
\protect, 36
\providecommand, 66
\ProvidesPackage, 67
\qquad, 38, 43
\quad, 38, 43
\raisebox, 78
\ref, 27, 38
\renewcommand, 65
\renewenvironment, 66
\right, 42
\right., 42
\rightmark, 61
\rule, 66, 78, 79
\scriptscriptstyle, 47
\scriptsize, 68
\scriptstyle, 47
\sec, 41
\section, 25, 36
\sectionmark, 61
\setlength, 71, 75
\settodepth, 75
\settoheight, 75
\settowidth, 75
\sin, 41
\sinh, 41
86 索引
\sloppy, 18
\small, 68
\smallskip, 73
\sqrt, 40
\stackrel, 41
\stretch, 66, 72
\subparagraph, 25
\subsection, 25
\subsectionmark, 61
\subsubsection, 25
\sum, 42
\sup, 41
\tableofcontents, 25
\tan, 41
\tanh, 41
\TeX, 19
\textbf, 68
\textit, 68
\textmd, 68
\textnormal, 68
\textrm, 46, 68
\textsc, 68
\textsf, 68
\textsl, 68
\textstyle, 47
\texttt, 68
\textup, 68
\thispagestyle, 13
\tiny, 68
\title, 26
\tnss, 65
\today, 19
\totalheight, 77, 78
\underbrace, 40
\underline, 28, 40
\usepackage, 11, 22, 23, 67
\vdots, 43\vec, 40\verb, 31\verbatiminput, 62\vspace, 72\widehat, 40\widetilde, 40\width, 77, 78
comment, 7comments, 6\cos, 41\cosh, 41\cot, 41\coth, 41\csc, 41curly braces, 6, 68
\date, 26dcolumn, 32\ddots, 43\deg, 41delimiters, 42\depth, 77, 78description, 29\det, 41Deutsch, 24diagonal dots, 43\dim, 41dimensions, 72displaymath, 37\displaystyle, 47doc, 12document font size, 10document title, 10\documentclass, 9, 18dotless ı and , 22double line spacing, 71
索引 87
\dq, 24\dum, 64dvips, 9
\emph, 28, 68empty, 13Encapsulated PostScript, 57\end, 28enumerate, 29environments
array, 44center, 29comment, 7description, 29displaymath, 37enumerate, 29eqnarray, 45equation, 37figure, 34, 35flushleft, 29flushright, 29itemize, 29lscommand, 64math, 37minipage, 77parbox, 77quotation, 30quote, 30table, 34, 35tabular, 31, 76thebibliography, 59verbatim, 30, 61, 62verse, 30
eqnarray, 45equation, 37equation system, 45eucal, 56
eufrak, 56executive paper, 10\exp, 41exponent, 39exscale, 12, 42extension, 11
fancyhdr, 61, 62\fbox, 19figure, 34, 35flushleft, 29flushright, 29foiltex, 10font, 67font encoding, 12font size, 67, 68fontenc, 12, 23footer, 13\footnote, 27, 36\footnotesize, 68formulae, 37\frac, 41fraction, 41\framebox, 77\frenchspacing, 25\frontmatter, 26\fussy, 18
\gcd, 41\genfrac, 41geometry, 62German, 22GhostScript, 57graphicx, 57grave, 22Greek letters, 39grouping, 68
88 索引
header, 13
textttheadings, 13
\height, 77, 78
\hline, 32
\hom, 41
horizontal
brace, 40
line, 40
space, 72
\hspace, 66, 72
\Huge, 68
\huge, 68
hyphenat, 62
\hyphenation, 18
\idotsint, 43
ifthen, 12
\iiiint, 43
\iiint, 43
\iint, 43
\include, 13, 14
\includegraphics, 58, 76
\includeonly, 14
\indent, 71
indentfirst, 71
\index, 60
\inf, 41
\input, 14
input file, 8
inputenc, 12, 22
\int, 42
integral operator, 42
international, 21
italic, 68
\item, 29
itemize, 29
\ker, 41
Knuth, Donald E., 1
\label, 27, 38
Lamport, Leslie, 1
\LARGE, 68
\Large, 68
\large, 68
\LaTeX, 19
LATEX 2.09, 1
LATEX2ε, 1
LATEX3, 1
\LaTeXe, 19
latexsym, 12
layout, 73
\ldots, 20, 43
\left, 42
left aligned, 29
\leftmark, 61
legal paper, 10
letter paper, 10
\lg, 41
\lim, 41
\liminf, 41
\limsup, 41
line spacing, 70
linebreak, 17
\linebreak, 17
\linespread, 71
\listoffigures, 35
\listoftables, 35
\ln, 41
\log, 41
long quations, 45
longtabular, 33
lscommand, 64
索引 89
\mainmatter, 26\makebox, 77makeidx, 12, 60makeidx package, 60\makeindex, 60makeindex program, 60\maketitle, 26math, 37math font size, 46\mathbb, 39\mathbf, 69\mathcal, 69mathematical
accents, 40functions, 41minus, 20
mathematics, 37\mathit, 69\mathnormal, 69\mathrm, 46, 69mathrsfs, 56\mathsf, 69\mathtt, 69\max, 41\mbox, 19, 21, 77\min, 41minipage, 77Mittelbach, Frank, 1modulo function, 41\multicolumn, 33
\newcommand, 65, 66\newenvironment, 66\newline, 17\newpage, 17\newtheorem, 47\noindent, 71
\nolinebreak, 17\nonumber, 45\nopagebreak, 17\normalsize, 68
œ, 22one column, 10option, 9\overbrace, 40overfull hbox, 17\overleftarrow, 40\overline, 40\overrightarrow, 40
package, 11, 64packages
amsbsy, 49amsfonts, 39, 56amsmath, 41–43, 45, 49amssymb, 39, 50babel, 18, 21, 22bm, 49calc, 75dcolumn, 32doc, 12eucal, 56eufrak, 56exscale, 12, 42fancyhdr, 61, 62fontenc, 12, 23geometry, 62graphicx, 57hyphenat, 62ifthen, 12indentfirst, 71inputenc, 12, 22latexsym, 12
90 索引
layout, 73
longtabular, 33
makeidx, 12, 60
mathrsfs, 56
showidx, 61
supertabular, 33
syntonly, 12, 14
verbatim, 7, 61, 62
page layout, 73
page style, 13
empty, 13
headings, 13
plain, 13
\pagebreak, 17
\pageref, 27
\pagestyle, 13
paper size, 10, 73
\par, 68
\paragraph, 25
parameter, 6
\parbox, 77
parbox, 77
\parindent, 71
\parskip, 71
\part, 25
\phantom, 36, 46
plain, 13
\pmod, 41
PostScript, 57
\Pr, 41
prime, 40
\printindex, 61
\prod, 42
product operator, 42
\protect, 36
\providecommand, 66
\ProvidesPackage, 67
\qquad, 38, 43\quad, 38, 43quotation, 30quote, 30
\raisebox, 78\ref, 27, 38\renewcommand, 65\renewenvironment, 66report class, 10\right, 42\right., 42\rightmark, 61roman, 68\rule, 66, 78, 79
sans serif, 68Scandinavian letters, 22\scriptscriptstyle, 47\scriptsize, 68\scriptstyle, 47\sec, 41\section, 25, 36\sectionmark, 61\setlength, 71, 75\settodepth, 75\settoheight, 75\settowidth, 75showidx, 61\sin, 41\sinh, 41slanted, 68slides class, 10\sloppy, 18\small, 68
索引 91
small caps, 68\smallskip, 73space, 5\sqrt, 40square brace, 6square root, 40\stackrel, 41\stretch, 66, 72Struts, 79\subparagraph, 25subscript, 39\subsection, 25\subsectionmark, 61\subsubsection, 25\sum, 42sum operator, 42\sup, 41supertabular, 33syntonly, 12, 14
table, 34, 35\tableofcontents, 25tabular, 31, 76\tan, 41\tanh, 41\TeX, 19\textbf, 68\textit, 68\textmd, 68\textnormal, 68\textrm, 46, 68\textsc, 68\textsf, 68\textsl, 68\textstyle, 47\texttt, 68\textup, 68
thebibliography, 59\thispagestyle, 13three dots, 43tilde, 20, 40tilde ( ~), 24\tiny, 68title, 10\title, 26\tnss, 65\today, 19\totalheight, 77, 78two column, 10
umlaut, 22\underbrace, 40underfull hbox, 18\underline, 28, 40units, 72, 73upright, 68URL, 20\usepackage, 11, 22, 23, 67
\vdots, 43\vec, 40vectors, 40\verb, 31verbatim, 7, 61, 62verbatim, 30, 61, 62\verbatiminput, 62verse, 30vertical space, 72\vspace, 72
whitespaceafter commands, 6at the start of a line, 5
\widehat, 40
92 索引
\widetilde, 40\width, 77, 78www, 20WYSIWYG, 3
xdvi, 9
ë©z, 59
»òÒ, 20
yf·-, 36
, 24
ÏÒ, 20ÝÎÒ, 20á»òÒ, 20ä1:, 17
`²Î, 34
2ÄN, 33
~Ò, 20
éÒ, 20
mü, 29ü, 29
ëiÒ, 20
8¹, 25
ÑÒ, 20
¢Ú, 60¤=¤, 3
AÏiÎ, 21
ã/, 57
ÚÒ, 19
ó, 21
5ÑÎÒ, 21