ShortCourseOfL A T E X Lecture I LukaG.Poniatowski ½ ¾ ½ DepartmentofPhysics,FacultyofExactandNaturalSciences, Tbilisi State University ¾ AbastumaniAstrophysicalObservatory, Ilia State University August 17, 2017 L A T E X Workshop LATEX WorkshopAugust 17, 20171/27
Outline 1 L A T E X Simply Document First Compilation Different document classes 2 L A T E X environmentsandmodes Modes Environments 3 Usefulstuff Text Formatting Math Formatting 4 Extraenvironments LATEX WorkshopAugust 17, 20172/27
WhyL A T E X 1. Powerful Tool For Text Formatting Á Full text formatting control Á Piloting, Data manipulation Á Compatible with most calculation platform Á Master- slave support 2. Plane Text Editor 3. Small Memory Consumption 4. CrossplatformforthemostexistingOS 5. Best Math and Text visualization Æ Ë ½ ¼ ¼ Î Â Ë ¼ ¼ Ø Ë LATEX WorkshopAugust 17, 20173/27
WhyL A T E X 1. Powerful Tool For Text Formatting Á Full text formatting control Á Piloting, Data manipulation Á Compatible with most calculation platform Á Master- slave support 2. Plane Text Editor 3. Small Memory Consumption 4. CrossplatformforthemostexistingOS 5. Best Math and Text visualization Æ Ë ½ ¼ ¼ Î Â Ë ¼ ¼ Ø Ë LATEX WorkshopAugust 17, 20174/27
WhyL A T E X 1. Powerful Tool For Text Formatting Á Full text formatting control Á Piloting, Data manipulation Á Compatible with most calculation platform Á Master- slave support 2. Plane Text Editor 3. Small Memory Consumption 4. CrossplatformforthemostexistingOS 5. Best Math and Text visualization Æ Ë ½ ¼ ¼ Î Â Ë ¼ ¼ Ø Ë LATEX WorkshopAugust 17, 20175/27
WhyL A T E X 1. Powerful Tool For Text Formatting Á Full text formatting control Á Piloting, Data manipulation Á Compatible with most calculation platform Á Master- slave support 2. Plane Text Editor 3. Small Memory Consumption 4. CrossplatformforthemostexistingOS 5. Best Math and Text visualization Æ Ë ½ ¼ ¼ Î Â Ë ¼ ¼ Ø Ë LATEX WorkshopAugust 17, 20176/27
WhyL A T E X 1. Powerful Tool For Text Formatting Á Full text formatting control Á Piloting, Data manipulation Á Compatible with most calculation platform Á Master- slave support 2. Plane Text Editor 3. Small Memory Consumption 4. CrossplatformforthemostexistingOS 5. Best Math and Text visualization Æ Ë ½ ¼ ¼ Î Â Ë ¼ ¼ Ø Ë LATEX WorkshopAugust 17, 20177/27
WhyL A T E X 1. Powerful Tool For Text Formatting Á Full text formatting control Á Piloting, Data manipulation Á Compatible with most calculation platform Á Master- slave support 2. Plane Text Editor 3. Small Memory Consumption 4. CrossplatformforthemostexistingOS 5. Best Math and Text visualization Æ Ë ½ ¼ ¼ Î Â Ë ¼ ¼ Ø Ë LATEX WorkshopAugust 17, 20178/27
HowdoesL A T E X work? Script Òbegin equation ÒoiintÒlimits ÒpartialÒOmega Òmathbf E Òcdot Òd S = Òfrac 1 Òepsilon 0 ÒiiintÒlimits ÒOmega ÒrhoÒmathbf Òd V Òend equation µ L A T E X µ Æ S º ½ ¼ V º LATEX WorkshopAugust 17, 20179/27
HowdoesL A T E X work? Script Òbegin equation ÒoiintÒlimits ÒpartialÒOmega Òmathbf E Òcdot Òd S = Òfrac 1 Òepsilon 0 ÒiiintÒlimits ÒOmega ÒrhoÒmathbf Òd V Òend equation µ L A T E X µ Æ S º ½ ¼ V º Donotforget! Here: Òrenewcommand*ÒdÒmathrm d wasneededtoget ËandnotS º 10/27
Script 1. Header \documentclass[<options>]{<class>} 2. Additional Packages \usepackage[<options>]{<package>} 3. Document Body Òbegin document document Òend document 11/27
Simple Document 1. Create source file simple.tex 2. Add script Á Header Á No extra packages Á Document body [user@host DIR]$ vi simple.tex... Òdocumentclass[12pt,a4paper] article Òbegin document The simplest document with text Òend document... 12/27
Compilation 1. Compile script file: somename.tex µ somename.dvi 2. Generate postscript: simename.dvi µ somename.ps 3. Convert to PDF: simename.ps µ somename.pdf 4. View dvi/ps/pdf [user@host DIR]$ latex simple.tex... [user@host DIR]$ dvips simple.dvi... [user@host DIR]$ ps2pdf simple.ps [user@host DIR]$ xdvi simple.dvi 13/27
Document classes Different classes different tools, different look Common classes: article, beamer, book 14/27
Document classes Different classes different tools, different look For now ARTICLE 15/27
Coffee Tea ßÞ Ð Break 16/27
L A T E X ModesI L A T E X supports:2mainmodes,2supplementarymode I Textmode Á Titles, subtitles, sections... Á Paragraphs, captions, descriptions... II Mathmode Á Mathformulas,intextentries... Á Tables,plots... III Commands Á Textsize,font,stile... Á Special characters, lines, boxes... IV Comments 17/27
L A T E X ModesII I Text mode- normal environment Òbegin document Text here is treated as a normal text in document body Òend document II Mathmodes-tobecalled $ expression $ Ò[ expression Ò] $$ expression $$ III Commands-tobecalled \<command> Òdots Òsmall Òit IV Comment % it treated as a comment 18/27
Practical use of modes 1. Edit source Òdocumentclass[12pt,a4paper] article Òbegin document This is text. This is command Òdots This is $f(y)=3 y$ math inline expression Ò[ g(x) =k x+b Ò] $$ fog=3 k x+3 b $$ %and this will not bee seen Òend document 2. Compile latex dvips ps2pdf 3. View 19/27
Environments Environment defines how is treated and formatted text or set of commands within there body Òbegin environment environment body Òend environment Á Equations Á Alignment Á Equ. array Á Cases Á Enumeration Á Itemization Á Tabulation Á Figures Donotforget! Some environments need special packages \usepackage{<some package>} 20/27
Some common environments Environment Function equation single line numbered equation eqnarray array of numbered equations multline multiple line numbered equations align specially aligned equation array cases forcases Table: Math mode environments Environment Function figure tools for formatting figures table tools for formatting tables tabular creating tables array creating arrays minipage create minipage within current page Table: Text/General mode environments 21/27
Text formatting Á Text sizing: \Huge \LARGE \Large \small \footnotesize \tiny Á Font style: \texit/\it \textbf/\bf \emph \underline \texttt Á Spacing: \newpage \pagebreak \\ \bigskip \medskip \vspace Á Sectioning: \part \section \subsection \subsubsection Á Titling: \title \author \date \today \maketitle Á Placing: \begin{} <center> <fleshleft> <fleshright> \end{} Á Listing: \begin{} <itemize> <enumerate> <list> \end{} \item Á Special Characters: \& \_\% \# \{ \} \S \textbackslash \textasciitilde 22/27
Math formatting Á Font style: \mathrm \mathbf \mathit \mathbb \mathcal \mathfrak Á Spacing: \, \: \; \quad \qquad \vspace{} Á Labeling and Referencing: \label \ref \cite Á Accents: \bar \dot \ddot \vec \tilde \hat Á Formatting: \frac{}{} \dfrac{}{} ^{} _{} \sqrt[]{} \left\right Á Greek Alphabet: \alpha \beta \Psi \gamma \Gamma \zeta \vartheta Á Relations: \pm \sim \equiv \propto \sum \int \oint \gg \ll \prime Á Special Characters: \hbar \infty \partial \Delta \nabla \square \bot \ 23/27
Not standard environments& commands Á Òcencle - Package cencle Á <multline> - Package asmmath Á Òoint - Package esint Á <multicols> - Package multicol Á Òcolor - Package color Á <empheq> - Package empheq Á Òincludegraphics - Package graphic 24/27
25/27
Thank you! tobecontinued... fornexttime? (multiple environment use, functions, styles, bibtex, include, titlepage,practicalwork,...?) CreatedwithL A T E X 26/27