
Introduction to LaTeX Instructor TA Prof. Navrati Saxena Mamta Agiwal Associate Professor Ph.D Research Scholar Sungkyunkwan University Sungkyunkwan Univesity [email protected] [email protected] Introducing LaTeX What is TeX & LaTeX Why use LaTeX Options other than LaTeX S/w required to setup LaTeX for windows Official help/tutorials (online & offline) Installation steps Hands on LaTeX Process to create a document using TeX How to use LaTeX to create documents Basic structure of a LaTeX document Templates Packages Paper body Lets create our own paper Conclusion References Introducing LaTeX What is TeX and LaTeX? TeX is essentially a Markup Language (like HTML, XML and RTF) TeX written by Donald Knuth in 70´s A revolution in typesetting Latex is an extension of TeX Macro packages to make TeX easier to use What is TeX and LaTeX? LaTeX is a typesetting systems suitable for producing scientific and mathematical documents. —LaTeX enables authors to typeset and print their work at the highest typographical quality. —LaTeX uses TeX formatter as its typesetting engine. —TeX is popular in academia, especially for writing research papers. Unique Advantages of LaTeX Professional typesetting Best output It is the standard for scientific documents Processing Mathematical (& other) symbols Meaning based structuring (rather than appearance) Knowledgeable and helpful user group Its FREE! Platform independent Disadvantages of using LaTeX “Hard to write disorganized documents”* Learning Curve Customizing is tedious. * Taken verbatim from Not so short introduction to LaTeX Latex vs. Word Processors High typeset quality Easy to include math formulas Source file format is not bounded to a particular OS or platform Latex implementations exists for all platforms (DOS, Windows, Unices,..) Latex is free Latex vs. Word Processors De facto standard for scientific publishing Very few bugs Good for large documents Can run even on 386 PC Spaces Why Use LaTeX? ¥ J[x(×),u(×)] = ò F(x(t),u(t),t)dt Word High quality t0 LaTeX Easy to use, especially for typing mathematical formulas Portability (Windows, Unix, Mac) Stability and interchangeability (Office 97 Office 2000) Most scientific journals have their LaTeX styles (just download and use them). Control: LaTeX is much more clever in positioning our images, text and tables with a lot of common sense. Points to Ponder In a LATEX environment, LATEX takes the role of the book designer and uses TEX as its typesetter. But LATEX is “only” a program and therefore needs more guidance. The author has to provide additional information to the text as “LATEX commands.” What is LaTeX? TeX LaTeX • TeX is a typesetter 2 •You write and TeX will place it on the page Parts of a LaTeX Document: \documentclass {article} \documentclass {report} Basic Classes {book} {letter} • First line of all LaTeX documents • Specifies the type of the document • Eg: \documentclass[journal]{IEEEtran} Packages \begin{document} \usepackage{algorithmic} \usepackage{array} \usepackage{fixltx2e} \usepackage{amsmath,amsfonts,amssymb} \usepackage{epsfig} \usepackage{graphicx} \usepackage{psfrag} \usepackage{epstopdf} \usepackage[utf8]{inputenc} \usepackage{multicol} \usepackage{multirow} \usepackage{cite} \usepackage{refstyle} \end{document} Special Characters The following symbols are reserved characters that either have a special # $ % ^ & _ { } ~ \ meaning under LATEX or are not available in all the fonts. If you enter them directly in your text, they will normally not print, but rather coerce LATEX to do things you did not intend. Special Characters These characters can be used in documents all the same by using a prefix backslash: \# \$ \% \^\{ \& \_ \{ \} \~{} # $ % ˆ & _ { } ˜ \ The backslash character \can not be entered by adding another backslash in front of it (\\); this sequence is used for line breaking. Use the \textbackslash command instead. Latex File Structure •Document Class Predefined Formats (article, report, book,..). •Packages used Added Functionality (graphics, reference style,...). •Main Body Text and Bibliography References. Parts of a LaTeX Document: Environment Start with \begin{. .} End with \end{. .} \begin{document} \begin{equation} … \end{equation} \end{document} Example of Latex document \documentclass{article} \title{Simple Example} \author{Mamta Agiwal} \date{March 2000} \begin{document} \maketitle Hello world! \end{document} Sections \section{Section Title} \subsection{Title} \subsubsection{Title} Options other than LaTeX • Adobe claims to be implementing technical publishing functionality in InDesign. • Lout A markup language with a completely different underlying architecture to TeX. • Troff/Groff. Originally designed for technical documentation within AT&T during the 1970s (actually a spinoff of the UNIX R&D work), it's still quite widely used for this today. For quite a long time most if not all O'Reilly books were typeset using it. • DocBook. This is an XML tag based format for structure documentation, and tends to work by rendering through foreign engines. • Wordperfect. This is a venerable word processing system that is considerably better at documentation-in-the-large than MS-Word. • Microsoft Word. Not recommended for serious technical publication tasks due to its instability on complex documents. Softwares required to Setup LaTeX for Windows • Download and install MikTeX LaTeX package http://www.miktex.org/ • Install Ghostscript and Gsview http://pages.cs.wisc.edu/~ghost/ PS device driver … • Install Acrobat Reader • Install Editor For MAC Users — WinEdt TeXShop http://www.winedt.com/ iTexMac — TexnicCenter Texmaker http://www.texniccenter.org/ … — Texmaker http://www.xm1math.net/texma ker/ Official help/tutorials (online & offline) • Learn as you go — “The not so short introduction to LaTeX2e” http://tobi.oetiker.ch/lshort/lshort.pdf — Comprehensive TeX archive network http://www.ctan.org/ — Beginning LaTeX http://www.cs.cornell.edu/Info/Misc/LaTeX-Tutorial/LaTeX-Home.html — Online help by Texmaker http://www.xm1math.net/texmaker/doc.html — Google Installation steps Step by step easy installation guide can be downloaded from our lab website i.e. MUSIC lab website. Following is the download link: http://lab.icc.skku.ac.kr/~navrati/latex.html Hands on LaTeX Process to Create a Document Using TeX TeX input file Your source LaTeX file.tex document Run LaTeX program DVI file Device independent file.dvi output Run Device Driver Unix Commands Out input file > latex file.tex runs latex file.ps or file.pdf > xdiv file.dvi previewer > dvips file.dvi creates .ps > pdflatex file.tex creates .pdf directly How to Use LaTeX to Create Documents? • Start with a skeleton document. • Fill stuff (text, formula, figure, table …) into your skeleton document • Run LaTeX to generate output and make modifications The above steps have been shown in the installation guide. Basic Structure of LaTeX Document \documentclass [12pt]{article} Define the types of the document (article, book, thesis …) \usepackage {color} Preamble. Incorporate packages or \usepackage {graphicx} define macros here \begin{document} Main body, stuff to be printed, title, authors, abstract, sections, references, …. \end{document} In the Preamble •You specify your document class. •Document classes: letter, article, report, book, slides(beamer, prosper) • \documentclass[12pt]{article} • Backslash – at the beginning of text markup command •Packages: numerous packages are available • \usepackage[margin=1in]{geometry} • \usepackage{setspace} • \usepackage{harvard} Templates Suppose you want to write a paper for IEEE journals •Download LaTeX template from IEEE website http://www.ieee.org/publications_stan dards/publications/authors/author_te mplates.html (Template should be used for all Transactions, except for the IEEE Transactions on Magnetics, IEEE Magnetics Letters, IEEE Photonics Journal, and IEEE Transactions on Dielectrics and Electrical Insulation. (quoted from IEEE website mentioned above) ) •Open example LaTeX file (bare_jrnl.tex) and modify it •No need to worry about things like margin, font, … bare_jrnl.tex click to open it in Texmaker Paper body \begin{document} \section{Introduction} \subsection{Subsection Heading Here} \end{document} In the Body To begin a new section \section{} Similarly, \subsection{}, \subsubsection{}, \subsubsubsection{} LaTeX does automatic numbering. If you don’t like it, use section*{} \emph{}, \textbf{} \singlespacing, \doublespacing, \onehalfspacing \centering or \begin{centering} & \end{centering} Lets Write our own paper! Content for writing paper will be referred from the following reference (just for demonstration): Reis, S.R.N.; Reis, AI, "How to write your first scientific paper," Interdisciplinary Engineering Design Education Conference (IEDEC), 3rd , 4-5 March 2013 Title \title{How to Write Your First Scientific Paper} Author section \author{\IEEEauthorblockN{Simone Rosa Nunes Reis} \IEEEauthorblockA{Instituto de Informática\\ UFRGS\\ Porto Alegre, Brasil\\ Email: [email protected]} \and \IEEEauthorblockN{André Inácio Reis} \IEEEauthorblockA{Instituto de Informática\\ UFRGS\\ Porto Alegre, Brasil\\ Email: [email protected]} } Abstract \begin{abstract} This paper presents a method to instruct students on how to write their first scientific paper. The method adopts a holistic approach that discusses several different aspects of paper writing. Covered issues include the choice of the paper subject, hypothesis formulation and the design of experiments to test it, the collection
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages71 Page
-
File Size-