Workshop on LATEX 2ε Asst. Prof. Dr. Kemal Bagzibagli Department of Economics 20 May 2015 1
Outline 1 Introduction 2 Some L A TEX Features 3 Input File Structure 4 The Layout of the Document 5 Special Characters and Symbols 6 Typesetting Text 7 Floating Bodies 8 Typesetting Mathematical Formulae 9 Customising L A TEX 10 Bibliography 11 Creating Presentations 12 Installing L A TEX, Documentation, Online Resources 2
Introduction What is L A TEX? a typesetting system that is very suitable for producing scientific and mathematical documents of high typographical quality. Article - Report - Book - Letter - Beamer Pronunciation TEX: Tech L A TEX: Lay-tech WYSIWYG What You See Is What You Get 3
Advantages and Disadvantages The main advantages of L A TEX over normal word processors are the following: Professionally crafted layouts are available, which make a document really look as if printed. The typesetting of mathematical formulae is supported in a convenient way. Users only need to learn a few easy-to-understand commands that specify the logical structure of a document. Even complex structures such as footnotes, references, table of contents, and bibliographies can be generated easily. Free add-on packages exist for many typographical tasks not directly supported by basic L A TEX. 4
Advantages and Disadvantages (cont.) The main advantages of L A TEX over normal word processors (cont.) L A TEX encourages authors to write well-structured texts, because this is how L A TEX works - by specifying structure. TEX, the formatting engine of L A TEX, is highly portable and free. Therefore the system runs on almost any hardware platform available. L A TEX s main disadvantage: It is very hard to write unstructured and disorganised documents! 5
Some L A TEX Features Spaces Special Characters Comments The % character %Your comment here comments out additional commentary texts # $ % ˆ & { } \ The % character comments out additional commentary texts 6
Input File Structure The input for L A TEX is a plain text file. Every input file must start with the command: \documentclass{...} Load packages that add new features to the L A TEXsystem: \usepackage{...} When all the setup work is done (i.e. preamble), you start the body of the text with the command: \begin{document} At the end of the document you add: \end{document} 7
A Sample Article - Input 8
A Sample Article - Output 9
The Layout of the Document Document Class Options \documentclass[11pt,twoside,a4paper]{article} 10pt, 11pt, 12pt a4paper, letterpaper, a5paper, b5paper, executivepaper fleqn: Typesets displayed formulae left-aligned instead of centred leqno: Places the numbering of formulae on the left hand side instead of the right onecolumn, twocolumn landscape 10
The Layout of the Document (cont.) Page Styles \pagestyle{style} \thispagestyle{style} plain: prints the page numbers on the bottom of the page, in the middle of the footer. This is the default page style. headings: prints the current chapter heading and the page number in the header on each page, while the footer remains empty. empty: sets both the header and the footer to be empty. Line Breaking \\ or \newline: starts a new line without starting a new paragraph. \newpage: starts a new page. 11
Special Characters and Symbols Quotation Marks You should not use the for quotation marks as you would on MS Word. Use two (grave accent) for opening quotation marks and two (vertical quote) for closing quotation marks. For single quotes use just one of each. The Euro Currency Symbol (e) \usepackage[official]{eurosym} \euro Ellipsis (... ) Not like this... but like this:\\ New York, Tokyo, Budapest, \ldots Not like this... but like this: New York, Tokyo, Budapest,... 12
Typesetting Text Titles, Chapters, and Sections \section{... } \section*{... } \subsection{... } \subsubsection{... } \paragraph{... } \subparagraph{... } \part {... } \chapter{... } \appendix Footnotes \footnote{footnote text} Emphasized Words \underline{text} \emph{text} \alert {text} 13
Typesetting Text (cont.) Cross References \label{marker} marker is an identifier chosen by the user \ref{marker} \pageref{marker} 14
Itemize, Enumerate, and Description 15
Itemize, Enumerate, and Description (cont.) 16
Flushleft, Flushright, and Center 17
Quote, Quotation 18
Tabular 19
Tabular (cont.) 20
Floating Bodies Figure \begin{figure}[placement specifier] \listoffigures Table \begin{table}[!hbp] \caption{caption text} \listoftables Table: Float Placing Permissions Spec Permission to place the float... here at the very place in the text where it occurred. h This is useful mainly for small floats t at the top of a page b at the bottom of a page p on a special page containing only floats without considering most of the internal parameters, which could otherwise stop this float from! being placed 21
Floating Bodies (cont.) \usepackage{graphicx} \includegraphics[key=value,... ]{file} Table: Key Names for graphicx Package width height angle scale scale graphic to the specified width scale graphic to the specified height rotate graphic counterclockwise scale graphic 22
Typesetting Mathematical Formulae AMS-L A TEX If you want to typeset (advanced) mathematics, you should use AMS-L A TEX. The AMS-L A TEX bundle is a collection of packages and classes for mathematical typesetting. AMS-L A TEX is produced by The American Mathematical Society \usepackage{amsmath} Single Equations 23
Typesetting Mathematical Formulae (cont.) 24
Typesetting Mathematical Formulae (cont.) 25
Math Mode 1 Spaces do not have any significance. Special commands for spacing: \, \quad \qquad 2 Empty lines are not allowed. Only one paragraph per formula. 3 If you want to typeset normal text within a formula \text{... } 26
Multiline and Multiple Equations \multiline Multiple Equations 27
Arrays and Matrices 28
Arrays and Matrices (cont.) 29
Theorems, Lemmas,... Preamble settings: \theoremstyle{definition} \newtheorem{law}{law} \theoremstyle{plain} \theoremstyle{remark} 30
List of Mathematical Symbols Math Mode Accents BIG Operators 31
List of Mathematical Symbols (cont.) Greek Letters 32
List of Mathematical Symbols (cont.) Binary Relations 33
List of Mathematical Symbols (cont.) Binary Operations 34
List of Mathematical Symbols (cont.) Arrows 35
List of Mathematical Symbols (cont.) Miscellaneous Symbols 36
Producing Mathematical Graphics (Chapter 5) 37
Customising L A TEX (Chapter 6) 38
Customising L A TEX (cont.) 39
Customising L A TEX (cont.) Table: Fonts Table: Math Fonts 40
Customising L A TEX (cont.) Line Spacing \linespread{1.3} one and a half line spacing \linespread{1.6} double line spacing setspace package \singlespacing \onehalfspacing \doublespacing 41
Customising L A TEX (cont.) Paragraph Formatting \setlength\{\parindent}{0pt} \setlength{\parskip}{1ex plus 0.5ex minus 0.2ex} 42
Bibliography thebibliography environment \begin{thebibliography} natbib package BibTeX \cite{marker} Natbib citation styles Bibliography Managers Mendeley JabRef BibDesk More @book{laubach2001inflation, title={inflation targeting: lessons from the international experience}, author={laubach, Thomas and Mishkin, Frederic S}, year={2001}, publisher={princeton University Press} } 43
Creating Presentations Beamer User Guide Beamer Theme Gallery 44
Creating Presentations (cont.) 45
Installing L A TEX What to Install MiKTeX for processing your L A TEX source files into typeset PDF or DVI documents. A text editor for editing your L A TEX source files. Comparison of TeX editors Documentation The Not So Short Introduction to L A TEX 2ε Online Resources L A TEXTemplates Academic Journals 46