美赛论文LaTeX模板

上传人:m**** 文档编号:183397353 上传时间:2023-01-30 格式:DOCX 页数:37 大小:53.84KB
返回 下载 相关 举报
美赛论文LaTeX模板_第1页
第1页 / 共37页
美赛论文LaTeX模板_第2页
第2页 / 共37页
美赛论文LaTeX模板_第3页
第3页 / 共37页
点击查看更多>>
资源描述
documentclassicmmcmusepackageurl% For formatting URLs and other web or % file references.usepackagemflogo% Provides the METAFONT logo; you % wont need it for your report.usepackagegraphicxusepackagenatbib% For importing graphics.% Sample ICM/MCM Contest Submission% Based on sample senior thesis document% Last modified by Jeremy Rouse% Summer 2000% and on the LaTeX Hints document% created by C.M. Connelly vcmcmath.hmc.edu% 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 file that you load with usepackage.% newtheorem declarationsnewtheoremTheolTheorem newtheoremTheo2Theoremsection newtheoremLemmaTheo2Lemma % Each of the above defines a new theorem environment.% Multiple theorems can be done in the same environment.% Theo2s number is defined by the subsection its in.% Theo3 uses the same numbering counter and numbering system as% Theo2 (thats 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 as examples for % your own user-defined commands.newcommandbslashsymbol134%backslash newcommandbsltextttbslash newcommandcom1bsltexttt#1xspace newcommandfile1texttt#1xspacenewcommandpdftexPDFtexnewcommandpdflatexPDFlatex newcommandacronymltextsc#lxspace newcommandkeyltextsfemph#lxspace newcommandclass1textsf#1xspace newcommandpackage1textsf#1xspace newcommandenv1texttt#1xspace newcommandprog1texttt#1xspace newcommandcommand1textttbsl#1xspace newcommandctttextttcomp.text.texxspace newcommandtexTeXxspace newcommandlatexLaTeXxspace% Note 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 end 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 if you followed % the 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 produces 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% bars are very busy creatures.% TeX has an amazingly good hyphenation algorithm, but sometimes it% gets confused and needs some help.% 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 drag. You can use the hyphenation command to globally tell % TeX where to hyphenate words it cant figure out on its own.hyphenationwhite-space% End Local Command and Environment Definitions% Title Blocktitlelatex Hints for ICM/MCM Contest Reports% Which contest are you taking part in? (Just one!)contestICM/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 specify 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 Month dd, yyyy.% date% End Title Block%begindocument% SummarybeginsummaryThis 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 some useful code you can copy, modify, and use in your report.You should use the fileblank-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 comteam commands to appropriate values.Good luck!hfill- Claireendsummary% End Summary% Print Title Block, Contents, et al.maketitletableofcontents% Uncomment the following lines if you have figures or tables in% your report:listoffigureslistoftables% End Print Title Block, Contents, et al.%sectionIntroduction: What Is latex?% labelsec: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.latexs benefits includebeginenumerateitem Standardized document classesitem Structural frameworks for organizing documentsitem Automatic numbering and cross-referencing of structural elementsitem Floating figures and tablesitem High-level programming interface for accessing texs typesetting capabilitiesitem Access to latex extensions through loading packages endenumeratesectionStructured Writing%labelsec:structured-writingLike HTML,footnoteHyperText Markup Language latex is a markup language rather than a acronymWysiwygfootnoteWhat Ybu See IsWhat Ybu Get. system. You write plain text files that use special keycommands and keyenvironments that govern the appearance and function of parts of your text in your final typeset document.subsectionDocument Classes% labelsec:document-classesThe general appearance of your document is determined by your choice of keydocument class. Document classes also load latex packages to provide additional functionality.latex provides a number of basic classes, including classarticle, classletter, classreport, and classbook. There are also a large number of other document classes available, including classamsart and classamsbook, created by the American Mathematical Society and providing some additional mathematically useful structures and commands; classfoils, classprosper, andclassseminar, which allow you to create slides for presentations; the math departments classthesis class, for formatting senior theses; and many journal- or company-specific classes that format your document to match the house style of a particular periodical or publisher.subsectionPackages% labelsec:packages% labelsec:ctanlatex packages, or keystyle files, define additional commands and environments, or change the way that previously defined commands and environments work. By loading packages, you can change the fonts used in your document, write your document in a non-English language with a non-acronymAscii 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 hundreds more are available from the Comprehensive tex Archive Network (CTAN), at urlhttp:/www.ctan.org/.subsectionStructural Commands% labelsec:structural-commandsbegintablecenteringbegintabularlltopruleCommand& Notes& classbook & classreport only &classbook & classreport only midrule compart comchapter comsection comsubsection comsubsubsection comparagraph comsubparagraph bottomruleendtabularcaptionStructural commands in latexStructural commands in latex.% labeltab:structural-commandsendtablelatex provides a set of structural commands for defining sections of your document, as shown in Tablereftab: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 argument in which you specify nonfragile commands or a shorter version of the actual section title that fits.Youll generally know when you need to provide an optional argument by TeXs behavior.subsectionLabels and References% labelsec:labels-and-referencesSections are numbered automatically 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 commandlabeled with a tag such as beginquotebeginverbatimsectionOur Complicated Equations%labelsec:complicated-eqsendverbatimendquoteand referred to with a commandref or commandpageref command, as inbeginquotebeginverbatimIn Sectionrefsec:complicated-eqs, we pointed out.endverbatimendquoteorbeginquotebeginverbatimOn pagepagereffig:gordian-knot, we illustrated.endverbatimendquotelatex substitutes the correct section number when typesetting yourdocument.The same commands can be used with numbered environments such as envequation, envtheorem, and so forth.Use emphmeaningful labels-labeling a section as textttsecl2 may seem useful, but it will be confusing if you end up moving it to a different place in the document and its number changes to Section34. Its also easier to remember what reference you want if you use a meaningful name.You may also want to impose some additional organization through the use of emphnamespaces, as 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:, and so on.Emacs with Auxtex and Reftex gives you easy access to these labels, as do many other editors with tex-specific features. Its much easier to find the particular label youre 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.subsectionCommandslatex uses commands for changes that are very limited in scope (a few words) or are unlimited in scope (the rest of a document). For example, the commandsbeginquote beginverbatim textbfboldemphitalic (emphasized)textsfsans serifendverbatimendquoteproduce the following output in a typeset document:beginquotetextbfbold emphitalic (emphasized) textsfsans serif endquoteThese are commands with arguments-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+ +).There are also commands that take no arguments, such as commandnoindent, commandraggedright, and commandpagebreak.You can define your own commands, as discussed in Sectionrefsec:customization.subsectionEnvironments% labelsec:environmentslatex provides a number of keyenvironments that affect the appearance of text, and 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-commandbegin and commandend, followed by the name of the environment in braces, as inbeginquotebeginverbatimbeginquoteThis is disgusting-cant eat this. That arugala is so bitterldots Its like my algebra teacher on bread. flushright - Julia Roberts in emphFull Frontalendquoteendverbatimendquote producingbeginquoteThis is disgusting-I cant eat this. That arugala is so bitterldots Its like my algebra teacher on bread. flushright - Julia Roberts in emphFull FrontalendquoteSome environments may take additional arguments in braces (required) or brackets (optional).Note that the order in which environments nest is extremely important.If you type an environment inside another environment, the inner environment must be commandended emphbefore the secondenvironment is closed. Its also vitally important that you have an commandend line for each commandbegin line, or latex will complain.subsubsectionThe envdocument Environment and the Preamble% labelsec: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 includes the all-powerful commanddocumentclass command, which loads a particular document class (see Sectionrefsec:document-classes); optional commandusepackage commands, which load in additional latex packages (see Sectionrefsec:packages); and other setup commands, such as user-defined commands and 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 commandbeginverb+document+, before the commandmaketitle command, which creates the title block of your document.subsubsectionMath Environments% labelsec: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. These environments are used so often that there are shorthands provided for typing them. Inline math environments, such as $aA2 + bA2 = cA2$, can be typed as beginquote beginverbatim beginmath aA2+ bA2 =cA2endmath endverbatim endquote orbeginquotebeginverbatim$aA2 + bA2= cA2$.endverbatim endquoteDisplay math environments set your equation apart from your running text. Theyre generally used for more complicated expressions, such asf(x) = int left( fracxA2 + xA31 right)dxwhich can be typed asbeginquotebeginverbatimbegindisplaymathf(x) = int left( fracxA2 + 乂人31 right)dx enddisplaymathendverbatimendquoteorbeginquotebeginverbatimf(x) = int left( fracxA2 + 乂人31 right)dxendverbatimendquoteGenerally, youll want to use the verb+$+ %$ - fool font-lock-mode delimited form for inline math, and the com com form for display math environments. Besides being easy to type, these forms are keyrobust, which means that they can be used in keymoving arguments, elements that tex may need to typeset in more than one place (such as a table of contents) or adjust (such as footnotes).paragraphThe envequation Environment% labelsec:equation-environmentYoull probably want to use the envequation environment for any formula you plan to refer to. latex not only typesets the contents of an envequation environment in display mode, it also numbers it, as inbeginequationlabeleq:myequationf(x) = int left( fracxA2 + xA31 right)dxendequation written asbeginquotebeginverbatim beginequation labeleq:myequation f(x) = int left( fracxA2 + 乂人31 right)dx endequationendverbatimendquoteNote that you can refer to this formula as Equationrefeq:myequation with beginverbatimrefeq:myequation.endverbatimsubsectionFonts% labelsec:fontsGenerally youll want to let latex handle the fonts for you-Knuths Computer Modern fonts are 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; see Sectionrefsec:fuzzy-fonts), you can use Type1 PostScript fonts, such as Times, Palatino, Utopia, and so forth. These font sets are accessible with packages with names like packagetimes, packagepalatino, and packageutopia. There are others, as well-a command such as comlocate psnfss I grep sty will find most of them.You can also get fonts from CTAN (see Sectionrefsec:ctan), both bitmap and Type 1. Theres even support for TrueType fonts in some TeX systems.subsubsectionFont Commands%labelsec:font-commandsMost of your concern about fonts is probably related to what youre 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 out-by default, text set in typewriter text isnt hyphenated, which can lead to some unattractive line breaks).You can also set text in textsfsans serif or textscsmall caps. Tablereftab:font-commands shows you some of the most commonly used font commands provided by latex.begintablehtbpcenteringbegintabularlltopruleCommand& Resultmidrulecomemph& emphemphasized textcomtextsf&textsfsans-serif textcomtexttt&texttttypewriter textcomtextbf&textbfbold textcomtextsc&textscsmall caps textcomtextsl&textslslanted textcomtextit&textititalic textbottomruleendtabularcaptionCommonly used font commandsCommonly used font commands. labeltab:font-commandsendtableI recommend that you use comemph in preference to comtextit, and use comtextbf sparingly. comemph is a smarter command than comtextit-it switches back to the roman font when necessary. For example, emphShe loved emphScooby Doo. versus textitHe loved textitTitanic.For complicated font changes, or for special font usages that youre typing a lot, creating a macro (Sectionrefsec:customization) is the way to go. I often just write, tossing in custom commands as I go, and waiting to define them until just before I compile the document.subsectionCustomization% labelsec:customizationThe main advantage of using commands and environments is that they allow you to organize your writing. A useful side-effect is that you can change your mind about the way an element is typeset, and change all the appearances of that element in document by editing one piece of code. For example, in this document the names of environments have been set in typewriter text, using a command I created called commandenv, which is defined as beginquote beginverbatim newcommandenvltexttt#lxspace endverbatim endquoteAll I have to do to make the names of all the environments in the document appear in sans-serif type instead is to change that one line to beginquote beginverbatim newcommandenv1textsf#1xspace endverbatim endquoteYou can do the same with almost anything you can conceptualize-ke
展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 建筑环境 > 机械电气


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!