l a t ex lecture for unist
play

L A T EX Lecture for UNIST Jaewoong Lee Ulsan National Institute - PowerPoint PPT Presentation

L A T EX Lecture for UNIST Jaewoong Lee Ulsan National Institute of Science and Technology jwlee230@unist.ac.kr October 28, 2019 Jaewoong Lee (UNIST) UNIST L T EX October 28, 2019 1 / 38 A Overview Introduction myself 1 What is L A T


  1. L A T EX Lecture for UNIST Jaewoong Lee Ulsan National Institute of Science and Technology jwlee230@unist.ac.kr October 28, 2019 Jaewoong Lee (UNIST) UNIST L T EX October 28, 2019 1 / 38 A

  2. Overview Introduction myself 1 What is L A T EX? 2 Hello World Example 3 Introduction to L A T EX 4 Advanced typesetting of L A T EX 5 Equation, Figure and Table 6 Reference Control 7 Jaewoong Lee (UNIST) UNIST L T EX October 28, 2019 2 / 38 A

  3. I am... Jaewoong Lee Senior at UNIST L A T EX user since 2014 Graduated Gyeonggi Science High School for the Gifted in 2016 Full Member of GSHS TeX User Association Figure: GSHS TeX User Association Jaewoong Lee (UNIST) UNIST L T EX October 28, 2019 3 / 38 A

  4. What you could with L A T EX? From a simple report to a presentation. This presentation file is also made by L A T EX. You can do almost everything in written form. Jaewoong Lee (UNIST) UNIST L T EX October 28, 2019 4 / 38 A

  5. Refer this page https://fumire.moe/Lecture/latex/ You can easily get TeX code in this lecture from here! You can get a installation guide, also! Jaewoong Lee (UNIST) UNIST L T EX October 28, 2019 5 / 38 A

  6. L A T EX? LAH-tekh or LAY-tekh TeX-like editing tool In simple, that which is making a paper. Donald Knuth made TeX ⇛ L A T EX: a macro for TeX WYSIWYM Jaewoong Lee (UNIST) UNIST L T EX October 28, 2019 6 / 38 A

  7. WYSIWYG vs. WYSIWYM WYSIWYG WYSIWYM What you see is what you What you see is what you mean get HTML, L A T EX MS Word or HWP Jaewoong Lee (UNIST) UNIST L T EX October 28, 2019 7 / 38 A

  8. L A T EX (cont.) You write the contents, then L A T EXmakes it! Useful to write an equation As an equation editor, L A T EX is a de facto standard Convenient labeling & referencing After initial setting, you only think about contents; not design Table of contents, List of figures? ⇛ Only one line command! Cross-referencing: ’As figure 8a’ ⇛ You can see ’Big Picture’ Easily attach vector image like SVG & PDF Jaewoong Lee (UNIST) UNIST L T EX October 28, 2019 8 / 38 A

  9. L A T EX vs. MS word Figure: L A T EX vs. MS word Jaewoong Lee (UNIST) UNIST L T EX October 28, 2019 9 / 38 A

  10. L A T EX vs. MS word (cont.) L A T EX users were slower than Word users. L A T EX users wrote less text in the same amount of time. L A T EX users produced more typesetting, orthographical, grammatical, and formatting errors. L A T EX users more often report enjoying using their respective software. According to Knauff, M., & Nejasmic, J. (2014). An efficiency comparison of document preparation systems used in academic research and development. PloS one, 9(12), e115069. Jaewoong Lee (UNIST) UNIST L T EX October 28, 2019 10 / 38 A

  11. Hello World for L A T EX Example (Hello World) \documentclass{article} 1 This is an article. \title{Hello world} 2 The title is ’Hello world’. \author{John Doe} 3 The author is ’John Doe’. \date{September 2019} 4 Written in September 2019. \begin{document} \maketitle 5 This document contains a title Lorem ipsum dolor sit amet. and a sentence. \end{document} Jaewoong Lee (UNIST) UNIST L T EX October 28, 2019 11 / 38 A

  12. Structure of L A T EX Preamble In simple, a header of document. Declare class of document, packages, et cetera . Make a declaration of settings, also. Body Whole thing after \ begin { document } Similar as editing mode in Wikipedia. Jaewoong Lee (UNIST) UNIST L T EX October 28, 2019 12 / 38 A

  13. Hierarchy of Document 1 \ document 2 \ part 3 \ chapter 4 \ section 5 \ subsection 6 \ subsubsection 7 \ paragraph 8 \ subparagraph Jaewoong Lee (UNIST) UNIST L T EX October 28, 2019 13 / 38 A

  14. Table of Contents Only one line command is required to make ’Table of Contents’. Example (ToC code) \documentclass{article} \begin{document} \tableofcontents \section{one} \subsection{two} \end{document} As the example, just add \ tableofcontents command where you want. Jaewoong Lee (UNIST) UNIST L T EX October 28, 2019 14 / 38 A

  15. Special Characters You cannot use these character directly: Special Characters \ , #, $, %, &, { , } , As following block, this problem has been solved by adding backslash in front of the character: Using Special Characters \ textbackslash, \ #, \ $, \ %, \ &, \{ , \} , \ EX. Please refer here 1 when Moreover, % means one line comment in L A T you want multiple line comment. 1 http://bit.ly/2iZi3yn Jaewoong Lee (UNIST) UNIST L T EX October 28, 2019 15 / 38 A

  16. Spacing & Line Break Even if there are so many spaces in L A T EX code, there is only one space in the result. If you want to use many spaces, use ’ \ ’ instead. In the same way, there are so many line breaks in L A T EX code, there is only one line break. When you want to line breaks, use ’ \\ ’ instead. Furthermore, twice of line break start new paragraph in L A T EX. Jaewoong Lee (UNIST) UNIST L T EX October 28, 2019 16 / 38 A

  17. Page Break Use \ newpage or \ clearpage . When make a book, use \ cleardoublepage . Jaewoong Lee (UNIST) UNIST L T EX October 28, 2019 17 / 38 A

  18. Text Aligning Align Text Left. Use flushleft . Justify Text. Use center . Align Text Right. Use flushright . In using flushleft , center or flushright , please refer following: Text Aligning \begin{flushright} Right Aligned Text is here. \end{flushright} Jaewoong Lee (UNIST) UNIST L T EX October 28, 2019 18 / 38 A

  19. Text Color This example shows different examples on how to user the xcolor package to change the color of elements in L A T EX. Example (xcolor code) \documentclass{article} \usepackage{xcolor} \begin{document} Example (color showing) \textcolor{green} {Hello,} Hello, world! \colorbox{orange} {world!} \end{document} 1 Reference: http://bit.ly/2UssO6a Jaewoong Lee (UNIST) UNIST L T EX October 28, 2019 19 / 38 A

  20. Font Styles Bold : \ textbf { ... } Italic : \ textit { ... } Sans-serif : \ textsf { ... } Underline: \ underline { ... } Small Capitals : \ textsc { ... } Jaewoong Lee (UNIST) UNIST L T EX October 28, 2019 20 / 38 A

  21. Strikethrough There are two ways to add strikethrough. First, use ulem package. Example ( ulem code) \documentclass{article} \usepackage{ulem} Example ( ulem showing) \begin{document} Hello, world! \sout{Hello, world!} \end{document} Jaewoong Lee (UNIST) UNIST L T EX October 28, 2019 21 / 38 A

  22. Strikethrough (cont.) Second, use cancel package. Example ( cancel code) Example ( cancel showing) \documentclass{article} \usepackage{cancel} x + ✓ y = 0 \begin{document} \[ x + \cancel{y}=0 \] x + ❙ y = 0 \[ x + \bcancel{y}=0 \] x + ✓ y = 0 ❙ \[ x + \xcancel{y}=0 \] 0 \[ x + \cancelto{0}{y}=0 \] x + ✓ y = 0 ✼ ✓ \end{document} Jaewoong Lee (UNIST) UNIST L T EX October 28, 2019 22 / 38 A

  23. Page Setup Suppose you have to create a document in a4paper and text should not exceed 18 cm in width and 20 cm in height. To create it with geometry package is easy, include this one line in the preamble. geometry Example \usepackage[a4paper, total={18cm, 20cm}]{geometry} If you need detailed page setting, you can do like this: geometry Detailed Example \usepackage{geometry} \geometry {a4paper, left=20mm, right=25mm, top=3cm, bottom=4in} 1 Reference: http://bit.ly/34nbbJC Jaewoong Lee (UNIST) UNIST L T EX October 28, 2019 23 / 38 A

  24. Multi-Column In L A T EX, you can use multi-column as: Example (Multi-column Example) \documentclass[twocolumn]{report} If you want to change columns in the document, you can use Example (Multi-column Example 2) \twocolumn \onecolumn However, this commands always starts new pages. Jaewoong Lee (UNIST) UNIST L T EX October 28, 2019 24 / 38 A

  25. Multi-Column (cont.) In case of that problem, use multicol package. Example ( multicol code) \documentclass{article} \usepackage{multicol} \setlength{\columnseprule} {0.4pt} \begin{document} Example ( multicol showing) \begin{multicols}{2} Lorem ipsum Lorem ipsum dolor sit amet, \newpage consectetur dolor sit amet, \newline consectetur \end{multicols} \end{document} Jaewoong Lee (UNIST) UNIST L T EX October 28, 2019 25 / 38 A

  26. Text Box You can add text box with tcolorbox package. Example ( tcolorbox code) \documentclass{article} \usepackage{tcolorbox} Example ( tcolorbox showing) \begin{document} \begin{tcolorbox} The quick brown fox jumps The quick brown fox right over the lazy dog. jumps right over the lazy dog. \end{tcolorbox} \end{document} Jaewoong Lee (UNIST) UNIST L T EX October 28, 2019 26 / 38 A

  27. Equation For entering equation, amsmath package is required. \ ( ... \ ): In-line equation. e i π + 1 = 0 \ [ ... \ ]: Equation without number. e i π + 1 = 0 \ begin { equation } ... \ end { equation } : Equation with number. e i π + 1 = 0 (1) You can reference the number of equation. (In advance) Jaewoong Lee (UNIST) UNIST L T EX October 28, 2019 27 / 38 A

Recommend


More recommend