A Tutorial of LaTex for CSCI-473/573 History of LaTex • Pronounced “lah-tech” or “lay-tech” • Originally written by Leslie B. Lamport • Enables authors to typeset and print their work at professional quality • Suited to large articles and books • Automatic numbering of: • Chapters • Sections • Theorems • Equations • etc • Front-end to TEX • Invented by Donald Knuth to typeset text and mathematical formulas 2 Use of LaTex What can we use LaTex for? • Like we said before: • Books • Articles • But also other things too! • CV / resume • Letters • Lab Write-ups / Reports • Slides (but I personally not a big fun of it for teaching…) • This list goes on! 3 LaTex vs Word Why use LaTex when we have word? • Cost: LaTex is free! • Quality • Separation of context and style • Portability • Stability • etc Source: http://ctan.org/ctan-portal/tex/ http://www.andy-roberts.net/writing/latex/benefits 4 How can I use LaTex online (recommended) • You may use an online LaTex Editor: https://www.overleaf.com/ • Mines offers Overleaf tutorials: https://libguides.mines.edu/LaTeX/OverLeaf 5 How can I Install and use LaTex offline • Download and install MikTeX • Then download and install an editor: • TexMaker: It comes with an integrated pdf viewer and all the bells and whistles that a modern editor should have. • TexStudio: it's a TexMaker ripoff with many more configuration options and it used to be called TexMakerX. • WinEdt: A very powerful editor (but not free) • TexWorks: comes with MikTex. Source: http://www.stat.pitt.edu/stoffer/freetex.html TexMaker: http://www.xm1math.net/texmaker TexStudio: http://texstudio.sourceforge.net/ WinEdt: http://www.winedt.com/ 6 Outline • Introduction • Typesetting Text • Environments • Typesetting Math 7 Hello, World! 8 Hello, World! \documentclass The \documentclass[11pt]{article} command is the first thing in any document, and tells LaTex the type of document you are writing • 11pt can be replaced with 12pt or 10pt depending on your desired font size, along with other “options” • Article specifies the type of document you are writing, choice include: • article – Articles in scientific journals, presentations, short reports, documentations, etc… • report – Longer reports spanning several chapters, small books, PhD these • book – For real books • Others but those are the most common 9 Hello, World! \begin{document} • The actual text portion of the document begins with a \begin{document} and ends with an \end{document} • Before the \begin{document} is where you define things such as the LaTex packages you are using, define any Macros you’d like to use in your document, or change any other settings. • Everything after the \end{document} in the file is ignored. 10 Hello, World! 11 Hello, World! 12 Hello, World! 13 Changing fonts • Use \emph{text} to emphasize a certain word in your text. • To italicize text use \textit{text}. • To bold text use \textbf{text}. • TO PUT ALL TEXT INTO CAPITAL LETTERS (SMALL CAPS) use \textsc{text}. • To typewriter-type text use \texttt{text} 14 “Special” Characters • Certain characters can not be used by themselves in LaTex 15 “Special” Characters • Other Special symbols can be looked up the corresponding • Command • http://www.ctan.org/tex- archive/info/symbols/comprehensive/symbols-a4.pdf • Or just google “latex <symbol-name>” 16 Outline • Introduction • Typesetting Text • Environments • Typesetting Math 17 Environments • Environment starts with: \begin{environment-name} • Environment ends with: \end{environment-name} 18 Text-Related Environments • document -- We've seen this before... All the text goes within the document environment. • itemize -- Bulleted List • enumerate -- Numbered List • list -- Creating a list with a specic label. \begin{list}{label}{spacing} • center -- Centered text • verbatim -- Print exactly what is entered in the verbatim environment • flushleft or flushright -- print the text flush with the respective side 19 Math-Related Environments • array -- Math Array (i.e. for creating Matricies in LaTex • eqnarray -- Display a series of numbered equations • ams math package \usepackage{amsmath} • Extremely common package for math and provides replacements for standard LaTex environments. • align -- replaces eqnarray, use align* to suppress numbered equations 20 Float Environments Table • Table is a foating environment (including caption) • Tabular is the actual table 21 Float Environments Figure • The figure environment is used for creating Figure Floats. • A figure can be pretty much anything: • A Picture • Text • An Algorithm • etc. 22 Float Placement • By default, LaTex does a pretty good job placing a figure in a good place in your document. However, you can tell LaTex where to put it (with priorities). 23 Float Placement 24 Outline • Introduction • Typesetting Text • Environments • Typesetting Math 25 Math Environments 26 Example Equations 27 Example Equations 28 Matrices 29 ASM Math • AMS Math is a LaTex package that provides more symbols and more powerful math environments than LaTex alone. • To use, place the following before your \begin{document} statement: \usepackage{asmmath} \usepackage{amsmath} \usapackage{asmsymb} 30 Symbols • Far too many symbols for me to show you. • Refer to the Comprehensive LaTex Symbol List: http://www.ctan.org/tex- archive/info/symbols/comprehensive/symbols-a4.pdf • Many LaTex editors will show a list of symbols that you can select graphically as well. • Often times, the command for the symbol makes sense: i.e. \Theta, \alpha, etc. 31 Template • You are required to use the LaTex template ieeeconf.zip offered by the IEEE Robotics and Automation Society: http://ras.papercept.net/conferences/support/tex.php • The Project 2 writeup is prepared using this template. So your project report should look similar or identical to the Project 2 writeup. • Brief instructions: create a project in Overleaf, upload all files in ieeeconf.zip to your Overleaf project, and start writing your report. • Mines resources on LaTex and Overleaf: https://libguides.mines.edu/LaTeX/OverLeaf 32.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages32 Page
-
File Size-