美赛论文LaTeX模板_第1页
美赛论文LaTeX模板_第2页
美赛论文LaTeX模板_第3页
美赛论文LaTeX模板_第4页
美赛论文LaTeX模板_第5页
已阅读5页,还剩32页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、documentclass icmmcmusepackageurl% for formatting urls and other web or % file references.usepackage mflogo% provides the metafont logo; you % won't need it for your reportusepackage graphicxusepackage natbib% for importing graphics.% sample icm/mcm contest submission% based on sample senior the

2、sis document% last modified by jeremy rouse% sununer 2000% and on the latex hints document% created by c.m. connelly <>%copyright 2002-2012% local command and environment definitions% if you have any local command or environment definitions, put them% here or in a separate style

3、 file that you load with usepackage% newtheorem declarationsnewtheorem theo 1 theoremne wtheorem theo2 theorem) sectionnewtheorem lemma theo2j lemma% each of the above defines a new theorem environment.% multiple theorems can be done in the same environment.% theo2rs number is defined by the subsect

4、ion ifs in.% theo3 uses the same numbering counter and numbering system as % theo2 (thafs the meaning of theo2).% you probably wont want any of the following commands, which are % here to allow various the names of commands, make examples typeset % properly, and so on. you can, of course, use them a

5、s examples for % your own user-defined commands.newcommand bslash 'symbol134 %backslash newcommandbsl textttbslash)newcommand com 1 bsltexttt # 1 xspace)newcommand file)ll texttt # 1 xspacenewcommand pdftex pdftexnewcommand pdflatex pdfmatex)newcommand acronym 1 j textsc #1 xspacenewcommand key

6、ljtextsf emph #1 xspacenewcommand class 1 textsf # 1 xspacenewcommand package ltextsf # 1 xspacenewcommand env )1 texttt#l xspace)newcommand prog 1 texttt # 1 xspacenewcommandcommand 1 textttbsl#1 xspacenewcommand ctt texttt comp.text.tex xspacenewcommand tex texxspacenewcommand latex latexxspace% n

7、ote that the xspace command comes from the xspace package it% allows you type a command that inserts text without having to% worry about how you、enct that command% without xspace, you would need to end a command with a backslash% followed by a space or with an empty set of braces 讦 you followed% the

8、 command with a space for example,% foo is a very important algorithm% might produce% the foobarbaz algorithmis a very important algorithm.% whereas with the xspace command, the same code would produce% the foobarbaz algorithm is a very important algorithm.% if you need to butt a command that produc

9、es text against a letter% of some sort say, to pluralize it you need to tell tex% where your command name ends so that it expands the correct% macro. so you might do% bar s are very busy creatures.% tex has an amazingly good hyphenation algorithm, but sometimes it% gets con fused and needs some help

10、% for words that only occur once or twice, you can insert hints% directly into your text, as in% our data-base system is one of the most complex ever devised% for words that you use a lot, and that seem to keep ending up at% the end of a line, however, inserting the hints each time gets to% be a dra

11、g. you can use the hyphenation command to globally tell % tex where to hyphenate words it can't figure out on its own.hyphenation white-space% end local command and environment definitions% title blocktitlelatex hints for icm/mcm contest reports)% which contest are you taking part in? (just one!

12、)contest icm/mcm% the question you answered. (again just the one.)questionreport sample)% your contest team control numberteam21247)% a normal document would specify the authors name (and possibly % their affiliation or other information) in an author command.% because the icm/mcm contest rules spec

13、ify that the names of the % team members, their advisor, and their institution should not% appear anywhere in the report, do *not* define an author command.% defining the date command is optional. if you leave it blank, % your document will include the date that the file is typeset, in % the form &q

14、uot;month dd, yyyy".% date)% end title block%begin document% summarybegin summary)this document is meant to give you a quick introduction to tex and latex. it covers a lot of material, but still barely manages to scratch the surface it should provide you with some inspiration and, i hope, with

15、some useful code you can copy, modify, and use in your report.you should use the file blank-template.tex file as a basis for your report rather than this file. be sure to change its name to something sensible (maybe your team control number), and to set the values of the comtitle, comquestion, and c

16、omteam commands to appropriate valuesgood luck!hfill-claireend summary% end summary% print title block, contents, et al.maketitletableofcontents% uncomment the following lines if you have figures or tables in% your report:mistoffigureslistoftables% end print title block, contents, et al.%section int

17、roduction: what is latex?%mabel sec:introductionlatex is a tool that allows you to concentrate on your writing while taking advantage of the tex typesetting system to produce high-quality typeset documents.'latex's benefits includebegin enumerateitem standardized document classesitem structu

18、ral frameworks for organizing documentsitem automatic numbering and cross-referencing of structural elements item "floating” figures and tablesitem high-level programming interface for accessing texrs typesetting capabilitiesitem access to latex extensions through loading "packages"en

19、d enumeratesectionstructured writing%mabel sec:structured-writing)like html,footnotehypertext markup language) latex is a markup language rather than a acronym wysiwyg footnote what you see iswhat you get. system. you write plain text files that use special keycommands and keyenvironments) that gove

20、rn the appearance and function of parts of your text in your final typeset document.subsectiondocument classes%mabel sec:document-classesthe general appearance of your document is determined by your choice of keydocument class document classes also load latex packages to provide additional functiona

21、lity.latex provides a number of basic classes, including class article 5 class letter, class report, and class book there are also a large number of other document classes available, including classamsart) and 'class amsbook, created by the american mathematical society cind providing some addit

22、ional mathematically useful structures and commands; classfoils, classprosper), andclassseminar, which allow you to create "slides” for presentations; the math department classthesis class, for formatting senior theses; and many journal- or company-specific classes that format your document to

23、match the 八house style1* of a particular periodical or publishe匚subsection packages) %mabel sec:packages %mabel sec:ctan)latex packages, or keystyle files, define additional commands and environments, or change the way that previously defined commands and environments work. by loading packages, you

24、can change the fonts used in your document, write your document in a non-english language with a non-acronym ascii font encoding, include graphics, format program listings, add custom headers and footers to your document, and much more.a typical tex installation includes hundreds of style files, and

25、 hundreds more are available from the comprehensive tex archive network (ctan), at url /subsection structural commands % mabel sec: structural-commands begin table) centeri ng& nolesbegin (tabular) 11 toprulecommandmidrulecompart)com chapter)com sectioncom subsection& class

26、book & classreport only &classbook & classreport only com subsubsection com paragraph com subparagraph bottomrule end tabularcaptionstructural commands in latex structural commands in latex.)%mabel tab:structural-commands)end tablelatex provides a set of structural commands for defining

27、sections of your document, as shown in table-vreftab:structural-commands.note that the argument to structural commands are moving arguments (see sectionrefsec:fragile-commands) because they can be reused in the table of contents or in page headers or footers. structural commands can take an optional

28、 argument in which you specify non fragile commands or a shorter version of the actual section ti什e that fits.yoitll generally know when you need to provide an optional argument by tex's behavior.subsectionlabels and references)%mabel sec:labels-and-referencessections are numbered automatically

29、by latex during typesetting if you change your mind and decide that a subsection should be promoted to a section, or moved to the end of your document, the sections will be renumbered so that the numbers are consistent.sections can also be commandlabel jed with a tag such asbegin quotebegin verbatim

30、sectionour complicated equations%mabel sec:complicated-eqsend verbatim)end quoteand referred to with a 'commandref or commandpageref command, as inbegin quotebegin verbatimin sectionrefsec:complicated-eqs, we pointed out.end verbatimend quoteorbegin quote)begin verbatimon page-pageref fig:gordia

31、n-knot, we illustrated.end verbatimend quote latex substitutes the correct section number when typesetting yourdocument.the same commands can be used with numbered environments such as env equation, envtheorem, and so forth.use emphmeaningful labels一labeling a section as textttsecl2 may seem useful,

32、 but it will be confusing if you end up moving it to a different place in the document and its number changes to section34. it s also easier to remember what reference you want if you use a meaningful nameyou may also want to impose some additional organization through the use of emph namespaces), a

33、s ive done in this document. rather than give different types of objects undistinguished labels, i precede section labels with textttsec:), equations with texttteq:, figures with textttfig:), tables with texttttab:j, and so on.emacs with auxtex and reftex gives you easy access to these labels, as do

34、 many other editors with tex-specific features. ifs much easier to find the particular label youte looking for if you have some additional information to help you. adding the prefixes also reminds you of what text should precede the comref command.subsection commandslatex uses commands for changes t

35、hat are very limited in scope (a few words) or are unlimited in scope (the rest of a document). for example, the commandsbegin quotebegin verbatimtex(bfboldemphitalic (emphasized)textsfsans serifend verbatim)end quoteproduce the following output in a typeset document:begin quote)textbfbold emphitali

36、c (emphasized) textsfsans serifend quotethese are commands with arguments11一the command itself starts with a backslash (bsl), and its keyargument) appears inside braces verb+ +) some commands may also have keyoptional arguments, which are typed inside brackets (verb+f +).there are also commands that

37、 take no arguments, such ascomma nd no indent), command raggedright, and command pagebreak you can define your own commands, as discussed insectio n ref sec:customizationsubsection environments %mabel sec:environmentslatex provides a number of key environments) that affect the appearanee of text, an

38、d are generally used for more structurally significant purposes for example, the commands listed above are typeset inside a envverbatim environment typed inside a envquote environment. their results were typeset inside a envquote environment.environments use special commands to start and close-acomm

39、andbegin) and 'commandend, followed by the name of the environment in braces, as inbegin quote)begi n verbatimbegin quote"this is disgustingi can't eat this that arugala is so bitterldots ifs like my algebra teacher on bread/ flushright julia roberts in emphfull frontalend quoteend verb

40、atimend quote producingbegin quote、this is disgusting-i canl eat this that arugala is so bitterldots ifs like my algebra teacher on bread/ flushright 一 julia roberts in emphfull frontalend quotesome environments may take additional arguments in braces (required) or brackets (optional).note that the

41、order in which environments nest is extremely important.if you type an environment inside another environment, the inner environment must be commandend ed eniphbefore the second environment is closed. it's also vitally important that you have an commandend line for each commandbegin line, or lat

42、ex will complain.subsubsectionthe envdocument environment and the preamble% mabel sec:document-environmentthe most important environment is the envdocument environment, which encloses the keybody of your document. the code before the commandbeginverb+document+ line is called the keypreamble), and in

43、cludes the all-powerful command documentclass command, which loads a particular document class (seesectionref sec:document-classes); optional commandusepackage) commands, which load in additional latex packages (seesection-refsec:packages); and other setup commands, such as user-defined commands and

44、 environments, counter settings, and so forth.i generally also include the commands defining the title, author, and date in my preambles, but other people include them just after commandbegin verb+ document+, before the commandmaketitle) command, which creates the title block of your document.subsub

45、section math environments%mabel sec: math-environmentsone of the major hallmarks of tex is its ability to typeset mathematical equations.the two primary ways of doing so are with the use of keyinline and keydisplay math environments) tliese environments are used so often that there are shorthands pr

46、ovided for typing them. inline math environments, such as $aa2 + ba2 = ca2$, can be typed as begin quote begin verbatim beginmath) aa2 +ba2 =ca2 endmath end verbatim end quote orbegin( quotebegin verbatim$aa2+ba2=ca2$.end verbatim end quote)display math environments set your equation apart from your

47、 running text. they're generally used for more complicated expressions, such asf(x) = int left( fracxa2 + xa31 right)dxmwhich can be typed asbegin quote)begi n verbatimbegin displaymathf(x) = int left( frac xa2 + xa3 1) right)dxenddisplaymathend verbatimend quoteorbegin quotebegi n verbatimf(x)

48、= int left( fracxa2 + xa31 right)dxend verbatimend quotegen erally, youll want to use the veb+$+ %$ <- fool font-lock-modedelimited form for inline math, and the com com form for display math environmentsbesides being easy to type, these forms are keyrobust, which means that they can be used in k

49、eymoving arguments, elements that tex may need to typeset in more than one place (such as a table of contents) or adjust (such as footnotes).paragraph the env equation environment %mabel sec: equation-environment)youll probably want to use the envequation environment for any formula you plan to refe

50、r to. latex not only typesets the contents of an env equation environment in display mode, it also numbers it, as inbegi n equationmabel eq: my equationf(x) = int left( fracxa2 + xa3) 1 right)dxend equationwritten asbegin quotebegin verbatimbegi n equationmabel eq: my equation)f(x) = int left( fracx

51、a2 + xa31 right)dxend equation)end verbatimend quote)note that you can refer to this formula asequationrefeq:myequation withbegin verbatimref eq:myequation.end verbatimsubsection fonts %mabel sec: fontsgenerally youll want to let latex handle the fonts for you一-knuth's computer modern fonts are

52、used by default, and include a wide range of variations that can cover most any use you can think of.if you want to get fancy (and portable; seesectionref sec:fuzzy-fonts), you can use type1 postscript fonts, such as times, palatino, utopia, and so forth. these font sets are accessible with packages

53、 with names like packagetimes), package palatino, and package utopia there are others, as wella command such as comlocate psnfss | grep sty) will find most of themyou can also get fonts from ctan (see sectionref sec:ctan), both bitmap and type 1. there's even support for truetype fonts in some t

54、ex systems.subsubsectionfont commands%mabel sec: font-commandsmost of your concern about fonts is probably related to what yoifre writing. you might want some emphemphasized or textbfbold text to stress a point or highlight a key term. filenames might be set in texttttypewriter text (although you should consider using the packageurl package to help you outby default, text set in typewriter text isn't hyphenated、which can lead to some unattractive line br

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论