Latex 學(xué)習(xí)筆記.doc_第1頁
Latex 學(xué)習(xí)筆記.doc_第2頁
Latex 學(xué)習(xí)筆記.doc_第3頁
Latex 學(xué)習(xí)筆記.doc_第4頁
Latex 學(xué)習(xí)筆記.doc_第5頁
已閱讀5頁,還剩11頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

Latex 學(xué)習(xí)筆記Chap2 Typing text1. 多個空行等于一個空行,沒有空行表示連接著寫。所以要表示有回車新起一行,最好還是在script里面空出一行寫。2. 正文中的語句有三種:text, math(formulas) and instructions3. begin end 表示環(huán)境environment, 里面可以填寫 flushright, flushleft, or center。2.1 The keyword(1)合法的key:a-z, A-Z 0-9 + = * / ( ) 其它的標點:, ; . ? !: 以及空格鍵,Table鍵和回車鍵Enter(2)十三個常用的special keys in LATEX commands:# $ % & _ “ |對這些特別鍵要顯示它們,要在之前加上, 其中除外。2.2 your first note(1) 不區(qū)分多空行,不區(qū)分多個空格,不區(qū)分多個TABLE,即這些都當作一個。(2) 雙引號的用法: something 也就是前面是兩個, 后面是兩個單引號 (3) 強制連接符, 用 ,比如 Prof. Tian, 答應(yīng)效果就是 Prof. Tian。 這不同于直接加空格,直接加空格會比用的字距大些。2.3 Lines too wide當字段太長時需要加 - 來強制加短橫-, 又因為系統(tǒng)會自動在有短橫處換行。某一行太長的情況一般是不會出現(xiàn)的,系統(tǒng)會自動切成兩邊都對齊的情況,可是當該段中已經(jīng)含有連字符時,系統(tǒng)會認為該連字符就是被要求的切斷符號,所以是誤導(dǎo)了系統(tǒng)。這個時候就需要在之前就加連字符-, 以使得系統(tǒng)提前得到連字符而換行。而在不該有連字符的地方強制放入-是沒有效果的。只能加直接加-才有效果。2.4 More text features(1) today 表示插入日期, 如February 9, 2010(2)environments to right justify, or left justify, or center即 flushright, flushleft, centerbegin flushright。end flushright(3) 改變text style, a. textbf 表示粗體b. emph 表示 emphasize textc. texttt 表示typewrite style textLATEX命令格式:(1) 以 開始(2) If commands with arguments, 最好把arguments 用 括起來,否則會自動視下一個character為argument。(3) 命令是case-sensitive的(4) 雙-, 即-用來表示number range. 其中-叫做endash 即短破折號;三-,即-表示長破折號,emdash(5) 新行命令 或者 newline, 注意不是表示換兩行,表示換行,后面可以加換行的行距, 22pt 就是說22points的行距空行。 之所有用, 而不是, 是因為 后面可以加argument,也可以不加,是optional的。如果不加變量時,則只是表示換到新行。換行的行距單位可以是points (pt), centimeters (cm), or inches (in)(6) 特別的姓氏,如什么的, 可以用” aChap3 Typing Math所有的數(shù)學(xué)公式都可以從一些building block累積起來3.1 A note with math(1)除了十三個常用的special keys in LATEX commands:# $ % & _ “ |和regular text key 之外,還有(2)內(nèi)聯(lián)語句 inline,以$.$ 表示,如 $2 y $ 之間加空格和沒有空格無區(qū)別(3)顯示語句 display, 以 開始, 以結(jié)束。 切記命令都是以開始的,不可忘記反斜杠(4) 在math 環(huán)境中,LATEX 有自己的一套空格系統(tǒng),不取決于客戶自己輸入的空格。有兩個例外: (a) Space that terminate commands. (b) Spaces in the arguments of commands that temporarily revert to regular text.Rule: Spacing in text and math通常在text里面多個空格等同于一個空格,而在math里面空格會被忽略,除非the space terminates a command. 所有有時候忘記加關(guān)門,可能會被認為f(x) f(a) a g, 就可能被認為是f(x)-f(a)*a-g,而不是f(x)-f(a)a-g了。(1) 所有的數(shù)學(xué)符號都當作命令引用,所以必須以 開始,如無窮大, infty; 趨向于,to; (2) 有些命令需要一個argument, 如sqrt ; 有些需要多個,如frac; 所有的Display math environment 都必須以 開始,以 結(jié)束。3.2 Errors in math(1) 看到?時,先按回車鍵,看看能否執(zhí)行下面的部分 D.4(2) 注意數(shù)學(xué)符號a 和字母a的區(qū)別,數(shù)學(xué)符號a, 用$a$表示,字母則是直接用a表示3.3 Building Blocks of a FormulaBuilding Blocks: Arithmetic subscripts and superscripts; Binomial coefficients; congruence; Delimiters; Ellipses; Math accents, Matrices; Operators Large operators; Roots; Text(1) Arithmetic$ a+b$,$a b $, $ a / b $, $ - a $, $ a b $,$ a cdot b$,$ a times b$ 分別表示點乘形式和叉乘(不是矢量的點乘和叉乘)Subscripts and superscripts: $a_$ 表示a既有上標又有下標;$f(x)$ 表示f(x)的導(dǎo)數(shù)(2) Binomial coefficient $ binom $binom upperdown(3) Delimitersleft ( frac right ) 表示分式的冪left | frac right | 表示分式的模quad left | A right | 表示雙數(shù)線,這里必須加|, 不能只加|(4) Ellipse 省略號 dotsAZ 可以寫作 A dots Zx1+xn 可以寫作: $x_1 + dots + x_n$(5) Integrals $int_ 積分主體 , dx$其中 , 是非常重要的,做spacing command(6) Math accents四種常用的math accents:a bar $bar a$a hat $hat a$a tilde $tilde a$a vector $veca$(7) Matricesbeginmatrixa& b&cd&e&fendmatrix(8) OperatorSin x, 寫作: sin xLimx-0 f(x)=0 寫作:$lim_x to 0 f(x) = 0$(9) Large operatorSummation: sum_min indexmax index x_subscriptssuperscripts qquadqquad是spacing command, 表示空出兩格Muplication: prod_min indexmax index x_subscriptssuperscripts在顯示時,big operator在displayed下比在$模式下大一些(10) Roots$sqrt5a + 2b$(11) Text要寫出 a = b, by assumptiona = b, text qquad by assumption或者a = b, qquad textby assumption3.4 Displayed formulas3.4.1 Equations (1)首先是用到 equation environment, 它能產(chǎn)生equation 的math formula, 同時自動給方程編號。如果記不住給方程的號碼(因為刪減或者增加、調(diào)換之前的方程都可能會改變該方程的號碼),可以給方程標記label E:somthingbeginequation label E:somethingMain bodyendequation(2) 引用方程: see eqref E:something on pagepagerefE:somthing會顯示:see (2) on page 87 (a) 注意這里的()是自動加上的這里的eqref是引入待引方程的序號,pageref 是插入待引方程所在的頁碼(b) 注意如果不用eqref,而是用ref 那么不會自動加括號,要改成加括弧的,則為:see (ref E:something) on pagepagerefE:somthing(c) 此外,連接符,是為了保證see 和后面的在同一行顯示。如果沒有,那么顯示為see(2) on page87. 也就是在see和(2), 以及page和27之間沒有空格。(d) ref 可以被用在其它environment里面,比如equation, page, section, chapter. 如Sections refS:main and refS:subsidiary(3)3.4.2 Aligned formulas三種方法打印多行公式 simple alignment(簡單列隊), annotated alignment (有注解的列隊), and cases(分情況).(1) Simple alignmentbeginalignr2 &=s2 + t2, label E:Pyth2u+1 &=v+walpha, label E:alphax &= frac y + zsqrts+ 2u; label E:frach(x) &= int left ( frac f(x)+g(x)1+f2(x)+ frac 1+f(x) g(x)sqrt 1-sin xright) , dx label E:logInt &= int frac1+f(x)1+g(x) ,dx -2 tan-1 (x-2) notagendalign注意事項和Rules:(a) 使用 align environment(b) 此處的 &表示 alignment points of formulas, 也就是各個等式都以此作為“對齊”的位置, 每一行只能有一個&,切記&符號應(yīng)當在 =, +等前面以保證正確的spacing。(c) 每一行等式后面都要加 表示換行(d) 如果某一個等式太長寫不下,那么可以考慮斷行,具體做法是用 斷開,在新行接著寫,如果不夠?qū)?,再斷行? 不過從該等式的第二行開始都要加上 notag, 表示該行不列為新的等式序號(e) 在source里面的一行不夠?qū)懣梢噪S時換行接著寫,不用加 , 系統(tǒng)會自動認為和下面是在同以段落的。(f) 可以給每一行的等式加上 標記 label, 以備后面的ref, eqref, pageref(2) Annotated alignment 注釋列隊規(guī)則和simple alignment差不多,不同之處在于在每行的行末加上 & 然后再開始注釋x &= x wedge (y vee z) & text (by distributivity)(3) Cases 如分段函數(shù)可以在equation environment,或者 align environment規(guī)則基本與上面的相同,不同之處在于,如果要注釋的話,直接用單個 &, 而不是&Chap4 your first article and presentation4.1 the anatomy of an article 每一個Latex文件都是由兩部分組成,前言和主體部分。Preamble & BodyPreamble是 begindocument之前的所有源碼部分documentclass 這一行是必須的usepackage 這一行不必須序言部分還可以有其他的命令:proclamation definitions, user-defined commands, and so on.常見的proclamation: theorem(定理,命題), lemma(引理,輔助定理), definition(定義), corollary(推論), note(注意事項), or other similar construct. LATEX會自動給表達式編號。主體部分:begindocumentenddocumentTop matter注意事項:(1) datetoday表示今天的日期(2) title maketitle如果沒有title,只有maketitle,會報錯的(3) 在寫address, title時,如果多行的話,那么需要用 隔開,最后一行無需用 隔開(4) maketitle的位置很重要,不能放在section后面Section 部分引用文獻 cite 文獻部分beginthebibliographybibitemsF90endthebibliography報錯分析:(1) Runaway argument? 常見error message, 表示argument of a command要么太長,要么包涵不被接受的內(nèi)容。所以很可能是丟了之類的東西(2) 在displayed math environment里面不可以有空白行。(3)Chap 55.1 the keyboard5.1.1 basic keys(1) 52個字母Lettersa-z, A-Z(2) 10個數(shù)字Digits 0-9, 其中可以用 oldstylenums數(shù)字顯示舊體數(shù)字(3) 9個標點符號 Punctuation , ; . ? ! : -(4) 四種(兩組)括弧 Parentheses ( ) , 其中(and) 叫做 parentheses; and叫做(square) brackets (5) 7個數(shù)學(xué)符號 Math symbols* + = /注意-號和是同一個鍵,只是在math模式下會顯示(6) 空格鍵 space keys: space bar鍵, Tab鍵,Enter鍵非空格符號 5.1.2 13種特殊鍵#$%&_大多數(shù)是用于instructions to LATEX, 有些用于Math5.1.3 禁止符號出了上面之外的都是禁止用的,比如Alt, Ctrl, Escape,注意Enter鍵是end-of-line鍵,行末如果不包括標點符號,而下一行的行首有標點符號,那么會在標點符號之前會有一個空格。如果用了禁止符號,系統(tǒng)會報錯:!Text line contains an invalid character.l.* completely irreducible? ?5.2 Words, sentences, and paragraphs5.2.1 spacing rules in text(1) text中的多個空格表示一個(2) table和空格效果一致(3) 空白行表示一個段落paragraphs結(jié)束, 等價于 par(4) 一行的開頭有空格會被忽略5.2.2 字距和句距, interword space, intersentence spaceRule1: 大寫字母后面加一個點表示縮寫 S. DINGRule2:空格表示interword space,盡量用tie 符號, 如SDING但在文獻中無需如此 Acta Math. Acad. Sci. HungarRule3: 如果大寫字母后面有一個. 但是又不表示縮寫,而是表示句末,那么可以加該interword space 為intersentence spaceRule4: no space, thin space ( , ) and spaceE.J.BaerendE. J. BaerendsE.,J.,Baerends E., J., Baerends 5.3 Comands and environmentscommandnamebeginenvironmentnameendenvironmentnameRule 1 Command name 可以是空格,標點符號,但是command name內(nèi)部不能有空格字符和數(shù)字Rule 2 Latex是如何識別字符型command name還是單character的command name的:如果后面第一個charater不是字母,那么第一個character就是command name,如果后面第一個character是字母,那么其后面第一個不是字母的位置就表示command name終止處。Rule3如果command name是字符或者字符串,那么其直接后面的多個空格都會被忽略,當然也可以是沒有直接空格 input3和input 3等價。Rule 4 Command and environment 是case sensitive的Rule 5 Arguments are enclosed in braces Rule 6 Optional ones are enclosed in brackets Argument 可以是一個或者多個,比如 frac , 也可以包涵Optional的argument, 比如 sqrt 3 a,表示a的3次方根documentclass12pt, draft, leqnoamsartTip 使用命令出錯時,需要檢查 (1) 命令的拼寫錯誤(2) 是否指定了所有必需的argument(3) Optional argument是否在brackets里面,而不是parentheses or braces.(4) 命令結(jié)束是否正確,比如是否和后面的字符連在一起了(5) 命令所在的package是否被載入了,usepackagepackagename命令的適用范圍在最里面的命令只是從該命令到所在brace結(jié)尾,本brace之內(nèi)且在該命令之前的部分不受該命令作用,本brace之外也不受作用。some text bfseries bold text no more boldsome text bfseries bold text no more bold命令的種類:有些命令只作用于后面的argument, 而不作用與argument后面的部分,如textbfthis is bold; 而有的作用于其后面的部分,終止于第一個終極符,如bfseries作者稱 a command that declares change a command declaration. bfseries有些命令的argument里面不能包括空行,par, 如textbf 5.4 Symbols not on the keyboard5.4.1 Quotation marks 引號5.4.2 Dashes 有三種:(1) 短杠hyphen,用于connect words: Mean-Value Theorem(2) 中間大小的杠 en dash, 用-來表示, 如page2345, 在兩個名字連接符中,如果其中一個名字是兩個單詞組成,那么在兩個名字之間可以用en dash, 如 Lin LiSong-Yuan Ding(3) 長杠 em dash,即破折號,用-表示,is used to mark a change in thought or to add emphasis to a parenthetical clause, as in this sentence.5.4.3 Ties or nonbreakable spaces 具有interword space連接符兩端在每一行中不可斷。P.Neukomm, 或者 P.nobreakspace Neukomm, 注意后者的P后面不要加空格,前者可以,也就是說吸收兩邊的空格。5.4.4 Special charaters想要打印出出于中間的*, 用textasteriskcentered 打印, 用textbackslash 打印and 用 and Logos and datesTeXis goodLaTeX is good LaTeXe is goodAmS is goodtheyear, themonth, thedaydategood day, date good day 這樣顯示為: February 15, 2010 good daydate good day顯示為February 15, 2010good day5.5 Comments and footnotes5.5.1 Comments%后面(同一行)的內(nèi)容都是注釋%可以comment out the end-of-line character,這種用法特別適用于某些不允許有空行/空格的命令。documentclass%Twocolumn,% option for two-column pagesamsart5.5.25.6 字體5.6.1. 基本字體(1) Shape : upright or roman; slanted; italic; small caps(2) Monospaced and proportional: (3) Serifs: (4) Series: weight and width Light, medium (or normal) and bold often describe weightNarrow (or condensed), medium (or normal) and extended often describe width(5) Size5.6.2. 三種document font families(1) Roman (upright and serifed) document font family: Times Roman, default(2) Sans serif document font family: Helvetica Sans serif(3) Typewriter style document font family: Computer Modern typewriter意思是左邊的keyword 或者中間一列keyword 都可以。前者不能blank line or a par command, 適合和少量字體的改變;如果一大段落的字體改變,則最好用declarations5.6.3. Shape commands 五對改變font shape的命令一般emph 是強調(diào)字體,如果本體為normal, 即upright Roman, 那么強調(diào)字體則改為 italic shape or slanted

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論