Introduzione a LaTex. Fabrizio Messina

Similar documents
Using L A T E X for scientific writing

Workshop on LATEX 2ε. Asst. Prof. Dr. Kemal Bagzibagli Department of Economics. 20 May 2015

Introduction to Latex. A workshop by Dr. Ala Eshmawi

CS 189 L A TEX and Linux: Document Layout and Organization

L A TEX. COMPSCI 111 / 111G Mastering Cyberspace: An introduction to practical computing. LaTeX. Development. Why?

COMP496/901: Academic Presentation and Writing Skills Using LaTeX

An Introduction to LATEX

The Name of the Game. An Introduction to LATEX. Why L A TEX? The Name of the Game

L A TEX From The Ground Up

Helen Cameron. A Brief Overview of LATEX

Basic L A TEX. what is LaTeX?

GROUP ASSIGNMENT. L A TEX Assignment 1/3

Introduction to LaTex 2ε. Based on The Not So Short Introduction to LaTeX 2ε by Tobias Oetiker et al., April 2001

Introduction to L A TEX

Introduction to L A TEX

L A TEX Overview. Jiayi Liu. January 31, Colorado School of Mines

LaTeX A Tutorial. Mohsen Alimomeni, 2010

Formatting with LaTeX

عمادة البحث العلمي جامعة الملك سعود

Helen Cameron. A Brief Overview of LATEX

LaTeX. Information Literacy II EN(IL2) Course

(Yet Another) Introduction to L A TEX 2ε (V3)

What is LaTeX. Is a document markup language and document preparation system for the TeX typesetting program

T E X and L A T E X Document preparation tools

Dec. 27 th, 2010 University of Isfahan

Introduction to LAT E X

WYSIWYG Systems. CSCM10 Research Methodology Lecture 4 (11/2/16): A Taster of L A TEX WYSIWYM. Advantages/Disadvantages of WYSIWYG Systems

CSCM10 Research Methodology A Taster of L A TEX

Introduction to LAT E X

L A TEX Workshop. Don Brower

COMS 6100 Class note

Very Short Introduction to LaTeX

Introduction to Scientific Typesetting Lesson 1: Getting Started

CSCM10 Research Methodology A Taster of L A TEX

WYSIWYG Systems. CSCM10 Research Methodology A Taster of L A TEX WYSIWYM. Advantages/Disadvantages of WYSIWYG Systems.

VERY VERY SHORT GUIDE TO LATEX

L A TEX for Psychological Researchers

What is T E X? T E X and L A T E X Document preparation tools. Setting and casting type. What Knuth was setting. Setting and casting type

Introduction to L A T E X

Began as TeX, in 1982 (Knuth). Purely a typesetting tool. LaTeX added macros, maintaining TeX as it s typesetting engine (Lamport).

L A TEX for psychological researchers

L A TEX for Psychological Researchers

L A TEX Course at ICT School

Lecture 1: Short summary of LaTeX basics

Introduction to LaTeX. Paul Fodor Stony Brook University

Introduction to LaTeX. Christoph Pickl

David Helmbold, October 2005, Revised October 2007

Introduction to L A TEX

LAT E X week 2: Basics for Writing a Document

A Very Brief Introduction to L A T E X MAT 3535

An Introduction to L A TEX

A Beginner s guide to L A TEX for CSCA67/MATA67. Kohilan Mohanarajan

L A TEX-cursus 5th e session: thesis in L A TEX

The basics of LaTeX. Cédric Buron. April 25, 2016

Using LaTex and BibTex to Write Academic Documents. Ligang He Department of Computer Science University of Warwick

A Short L A TEX Introduction

Getting Started with L A T E X for a Technical Document or Thesis

Absolute L A TEX Beginner

Introduction to LATEX

Introduction to L A TEX

Meeting One. Aaron Ecay. February 2, 2011

L A TEX Workshop. An Introduction to L A TEX. Rakesh Jana Research Scholar Department of Mathematics IIT Guwhati

An introduction to L A TEX for students

Document Preparation Using L A TEX

L A TEX incollaboration

Latex Tutorial. CIS400 Senior Design 9/5/2013

Written & Oral Presentation: Computer Tools

L A T E X Workshop. Bijulal D & Anu Thomas Industrial Engineering and Operations Research Indian Institute of Technology

A Short Introduction to L A TEX

Introduction to LATEX

Math 291: Lecture 2. Presented by Prof. James for Prof. Fagerstrom

Part - I : Short Course Typing Text

Math 235: Introduction to LaTeX

Introduction to L A TEX

Introduction to L A TEX beamer

L A TEX for Philosophers

Excellent support for mathematical formatting. Automatically downloads/installs missing components as needed Updates somewhat frequently

CS 189 L A TEX and Linux: Displaying Text

An Introduction to L A T E X

LATEX TYPESETTING SYSTEM. CAAM 519, CHAPTER 3

SOFTWARE ARCHITECTURE 4. TEXT FORMATTING SYSTEM

A Brief Introduction to L A TEX

Lecture 1. MA2730: Analysis I. Lecture slides for MA2730 Analysis I. Study and Assessment Components. MA L A TEX: topics for Lecture 1

Why do I need LaTeX? What is LaTeX? Where can I get LaTeX? How can I use LaTeX? Who can help me with LaTeX? Why What Where How Who

Guide to using L A TEX

Math 291: Lecture 2. Justin A James. Minnesota State University Moorhead web.mnstate.edu/jamesju/

Useful L A TEX Commands

An Introduction to. Rado Ivanov CIS400 Senior Design Tutorial September 18, 2014

Mikkel Madsen

An Interactive Introduction to L A TEX

Introduction to LAT E X Part 1. marko/latex

Introduction to typesetting with L A TEX

An Interactive Introduction to L A TEX. Part 1: The Basics. John Lees-Miller. writel A TEX

Intro to LATEX I. Aaron Erlich POLS/CSSS 510, Why LATEX? Programming Document Structure Floats Tables Lists Math

Typesetting with TEX

Introduction to L A T E X

Introduction to L A TEX

Abstract A quick intro by examples to the document preparation language L A TEX.

Basics. Options. Commands

L A TEX minicourse. dstowell, mag, sar, scannell,... September Typeset by FoilTEX

Transcription:

Introduzione a LaTex Fabrizio Messina messina@dmi.unict.it www.dmi.unict.it/~fmessina

Tex and LaTex TEX is a formatting program created by Donald E. Knuth from 1977. Typesetting text and mathematical formulae. LaTex is based on the Tex formatting system, and allows typesetters to print their work at the highest typographical quality, using a predefined, professional layout. LaTex was originally written by Leslie Lamport, and is nowadays maintained by Frank Mittelbach.

LaTex vs WYSIWYG Authors usually send their own manuscripts to book designers. As a human book designer will decide chapter headings, citations, examples, formulae, basing on his professional knowledge and from the contents of the manuscript. LaTex takes the role of the book designer and uses TEX as its typesetter. Therefore, the author has to write only LaTex commands.

WYSIWYG vs LaTex In the WYSIWYG (What You See Is What You Get) approach, e.g. MS Word or LibreOffice, authors specify the document layout interactively while typing text: *They can see on the screen the final work as it will be printed *With LaTex it is not normally possible to see the final output while typing the text, which can be previewed on the screen after processing the source files with LaTex

LaTex advantages Professional layouts are available for everyone. Typesetting mathematical formulae is conveniently supported. Users learn a few easy-to-understand commands that specify the logical structure of a document, without having to deal with the actual layout of the document. Complex structures such as footnotes, references, table of contents, and bibliographies can be generated easily. Many packages exist for many typographical tasks not directly supported by basic LaTex, e.g. typeset bibliographies conforming to well known standards.

LaTex documentation Preliminary information: * https://www.tug.org/texlive/ * https://www.tug.org/texlive/acquire-netinstall.html (installation) LaTex distributions * Standard texlive installation: - http://mirror.ctan.org/systems/texlive/tlnet/install-tl-windows.exe * MIKTEX: http://miktex.org/download : up-to-date implementation of TeX/LaTeX and related programs for Windows.

Editors for LaTex Syntax highlighting, built-in commands * Texstudio: http://www.texstudio.org/ (Linux, Windows & Mac OS X) * Texmaker: http://www.xm1math.net/texmaker/ (Linux, Windows & Mac OS X) * TeXnicCenter http://www.texniccenter.org/ * More information at: https://en.wikipedia.org/wiki/comparison_of_tex_editors

LaTex document structure, special chars Input files must be plain text files with extension.tex. Spaces do not matter, i.e. multiple spaces are not included in the final document. Character "~" will introduce real spaces in the document. Special characters: # $ % ^ & _ { } ~ \ as they assume a special meaning, they have to be included by a backslash: \# \$ \% \^{} \& \_ \{ \} \~{} while the backslash itself will be printed by the command \textbackslash.

LaTex commands LaTex commands start with a backslash "\", and a name without numbers LaTex ignores white spaces after command. Use a ~ or "{} " after the command. Commands may require a mandatory parameter, given between "{ }". Some commands may take optional parameters, given between "[]". \command[optional parameter]{parameter} \textbf{bold} \newline A comments start with a character "%", thus the rest of the present line will be ignored.

Typical structure of a LaTex document \documentclass{...} %packages to load \usepackage{...} %start content \begin{document} % CONTENT START HERE % commands here \end{document} % END CONTENT

LaTex document structure: minimal example \documentclass{article} \begin{document} Small is beautiful. \end{document}

Producing final document. Create document.tex in plain text format. ------------- $ latex document.tex #will produce document.dvi $ xdvi document.dvi # to view the results $ dvips document.dvi #will produce a postscript $ dvipdf document.dvi #will produce a PDF from the dvi ------------- DVI is the output file format of the TeX typesetting program: not human-readable binary data describing the visual layout of a document in a format hardware or printer independent.

Classes of documents \documentclass[options]{class} standard classes: article: scientific journal, presentations, short reports report: thesis and small books book: for real books slides: for slides, but very basic. May use the package "Beamer" instead. minimal: very small, with page size and base font, used for debugging.

Class Options \documentclass[options]{class} Options: - "10pt", "11pt", "12pt" - "a4paper", "a5paper", etc - "titlepage": a new page will start after the document title - "notitlepage:" a new page does not start after the title. - "onecolumn" or "twocolumn", "twoside" "oneside" - "landscape"

Page style \pagestyle{style} "plain": page numbers at the bottom center of each page "headings": chapter heading + page number in the header of each page "empty": set header and footer to be empty

Splitting document \include{filename} must be placed in the body of the document. The content of filename will be included in the document and a new page will start \includeonly{filename1, filename2,...} % if placed in the preamble, only the specified filenames can be included in the document by \include directive \input{filename} As \include{}, but it will not start a new page

Example \documentclass[a4paper,12pt,oneside,twocolumn]{article} % mainly used for hyphenation patterns \usepackage[english]{babel} % to generate random content \usepackage{blindtext} \author{latex student} \title{test} \begin{document} \maketitle

Example (continue) \tableofcontents \section{a first section} \blindtext %generate random text \section{another section} \blindtext %generate random text \end{document}

Paragraph The paragraph is the most important unit of a text. Paragraph break: leave blank lines This is a paragraph with one sentence. %end of paragraph This is another paragraph. A paragraph is made by sentences. Line breaks can be forced by the command "\\", while new pages can be forced by \newpage. This is a sentence in a paragraph, \\ %line breaks This is another paragraph. \newpage %new page

Hypenation (sillabazione) LaTex will do the work automatically by loading the appropriate language: \usepackage[italian]{babel} Nevertheless, if the hyphenation algorithm does not find the correct hyphenation points: \hyphenation{fortran Hy-phen-a-tion} Keeping a word in one line: \mbox{phone number: 095.738.3333}

Special characters Quotation marks. Don't use the character " for quotaton marks, use ` (grave accent) and ' (vertical quote) instead, in a double or single form: ``Please pres any key to continue, or `x' for '' Dashes, hyphens and symbols X-files % 1 dash (hyphen) pages 10--20 % 2 dashes (en-dash) yes---or no? % 3 dashes (em-dashes) $-10.2$ % 1 dash (minus sign)

Special characters (continue) Tilde \textasciitilde \texttildelow $\sim$ % produce a small tilde (high) % produce a small tilde (low) % centered tilde (web addresses) http://www.dmi.unict.it/$\sim$fmessina %

Special characters (continue) Euro currency symbol. \usapackage{eurosym} \euro % produce euro symbol Ellipses Usually indicates an intentional omission of a word, sentence, or whole section from a text without altering its original meaning. Es: New York, Rome, Budapest,... New York, Rome, Budapest, \ldots % produce a series of three dots \`o % produce ò (grave) \'o % produce ó (acuto)

Sections, subsections, paragraphs. \section{...} \subsection{...} \subsubsection{...} \paragraph{...} \subparagraph{...} \part{} % will not influence the numbering

Chapters, Appendix Chapter \chapter{...} % do not use this command with class article Appendix \appendix % From here, the numbering will be changed to A, B,... \chapter{...} % First appendix \chapter{...} % Second appendix

Title, date and ``starred parts \chapters*{...} % not included in toc, no numbering \title{...} % Set title \author{...} % Set author \date{...} % optional. To have no date, just use \date{}

Cross references \chapter{first chapter}\label{chap:1} In chapter~\ref{chap:pre} we discussed the... We discussed the state of the art at page~\ref{chap:pre} Footnotes In this context we discuss only the first issue\footnote{the remaining issue will be addressed in the next document}

Emphasized words In the \emph{first area} we have given \textbf{two} contributions: the \underline{first} is... Itemize \begin{itemize} \item first item \item second item \end{itemize}

Enumerate, description \begin{enumerate} \item first item... \end{enumerate} %description \begin{description} \item[one] first item \item[two] second item \end{enumerate}

Left, right, center alignment \begin{flushleft} % left Left-aligned text \end{flushleft} \begin{flushright} % right Right-aligned text \end{flushright} \begin{center} % center This text is centered. \end{center}