L A TEX in a Nutshell



Similar documents
Software, Shareware and Opensource CSCU9B2

(La)TeX Support for manuscript preparation. Conference Paper Management System

OpenOffice.org Writer

(1) latex + dvipdfm (which is a DVI to PDF translator) or (2) pdflatex (a version of LaTeX that generates PDF output instead of DVI).

1 Using CWEB with Microsoft Visual C++ CWEB INTRODUCTION 1

STEGANOGRAPHY: TEXT FILE HIDING IN IMAGE YAW CHOON KIT CA10022

L A TEX Tips and Tricks

How to embed fonts in a PDF from LaTeX

Word Processing programs and their uses

How To Use L A T Ex On Pc Or Macbook Or Macintosh (Windows) With A L At Ex (Windows 3) On A Pc Or Ipo (Windows 2) With An Ipo Computer (Windows 4)

2. Basic operations

Multifactor Authentication and Session Support in OpenVPN

A short manual for TEXworks

software 4TEX 5.0 for Windows and the 4allTEX CDroms

An Introduction to the WEB Style of Literate Programming

XML. CIS-3152, Spring 2013 Peter C. Chapin

Guidelines for Seminar Papers and Final Papers (BA / MA Theses) at the Chair of Public Finance

A Tutorial on Creating Presentations Using Beamer

The Journal of Transport and Land Use: Guidelines for Authors

VFComb 1.3 the program which simplifies the virtual font management

L A TEX Presentations

InDesign CC : Introduction

LittleCMS: A free color management engine in 100K.

Contents 1. Introduction... 2

Preservation Handbook

Getting Started Guide. Chapter 10 Printing, Exporting, and ing

Bachelors of Computer Application Programming Principle & Algorithm (BCA-S102T)

Graphic Design for Beginners

Chapter 10 Using OpenOffice.org

GNU TeXmacs: A free, structured, wysiwyg and technical text editor

When older typesetting methods gave

Computer Programming. Course Details An Introduction to Computational Tools. Prof. Mauro Gaspari:

Pageflex Persona Cross Media Suite

Reverse Literate Programming

Research Data Management CODING

The gensymb package for L A TEX 2ε

Microsoft Word 2007 Module 1

L A TEX for Complete Novices

ELFRING FONTS UPC BAR CODES

Enhanced Formatting and Document Management. Word Unit 3 Module 3. Diocese of St. Petersburg Office of Training Training@dosp.

List of some usual things to test in an application

How to Use the Text Editor in Blackboard

fonts: tutorial How to install a Type1 Font using fontinst

The ogonek package. Janusz Stanisław Bień 94/12/21

Adobe Training Services Exam Guide. ACE: Illustrator CS6

#820 Computer Programming 1A

Preparing Your Thesis with Microsoft Word: How to use the Rensselaer Polytechnic Institute Template Files. Contents

Introduction to UNIX and SFTP

Guide for writing assignment reports

Information Technologies University of Delaware

Adobe Acrobat 9 Pro Accessibility Guide: Creating Accessible PDF from Microsoft Word

KX Driver User Guide

SAPScript. A Standard Text is a like our normal documents. In Standard Text, you can create standard documents like letters, articles etc

Print Stream Shootout AFP. Don Maxwell

Server-Based PDF Creation: Basics

Instructions to Authors

GUIDELINES FOR SCHOOL WEB PAGES

Submission guidelines for authors and editors

Beginning L A TEX. Dan Parker and David Schwein. Spring 2015

moresize: More font sizes with L A TEX

SOLO NETWORK (11) (21) (31) (41) (48) (51) (61) version Adobe PageMaker 7.

Links. Blog. Great Images for Papers and Presentations 5/24/2011. Overview. Find help for entire process Quick link Theses and Dissertations

Module 6 Other OCR engines: ABBYY, Tesseract

286 TUGboat, Volume 18 (1997), No. 4

Math into L A TEX. An Introduction to L A TEX and AMS-L A TEX

Best practices for producing high quality PDF files

PaperlessPrinter. Version 3.0. User s Manual

Writer Guide. Chapter 10 Working with Templates

May 20, MyCV * Author: Andrea Ghersi. Abstract

Creating a High Resolution PDF File with Adobe Acrobat Software

Context sensitive markup for inline quotations

TUGboat, Volume 31 (2010), No

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson

Master Module SNET2 Seminar & Project Summer Term 2010

Xerox Phaser 3610 Black-and-white Printer

Fonts for Displaying Program Code in L A TEX

TU/ePDFScreen. Presentations, Slides and Posters Marko Boon. 25th May /27. / department of mathematics and computer science

The Title of a Yale University Doctoral. Dissertation

Dissertation Template for Princeton. University

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives

Outline. hardware components programming environments. installing Python executing Python code. decimal and binary notations running Sage

GRAPHIC DESIGN BITES FOR MARKETERS

MULTIFUNCTIONAL DIGITAL SYSTEMS. Hardcopy Security Printing Guide

10 STEPS TO YOUR FIRST QNX PROGRAM. QUICKSTART GUIDE Second Edition

Chapter 3 Software. Computer Concepts Chapter Contents. 3 Section A: Software Basics

Experiences with 2-D and 3-D Mathematical Plots on the Java Platform

Introduction to OpenOffice Writer 2.0 Jessica Kubik Information Technology Lab School of Information University of Texas at Austin Fall 2005

Chapter 9. Documents 9-1

BLACKBOARD 9.1: Text Editor

Bring documents to mobile devices the new epub output for ebooks

CHAPTER 5: PRODUCTIVITY APPLICATIONS

Course Syllabus. Technical Writing Certificate - Basic

What's New in QuarkXPress 10

Evaluator s Guide. PC-Duo Enterprise HelpDesk v5.0. Copyright 2006 Vector Networks Ltd and MetaQuest Software Inc. All rights reserved.

Perfect PDF 8 Premium

Print File Formats: A Comparative Analysis of EMF, OpenXPS and PDF for Enterprise Printing

chemscheme Support for chemical schemes

Serif PagePlusX4. Group Listing

CS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study

Technical, Legal, Business and Management Issues

Transcription:

L A in a Nutshell Master on Libre Software 2011-12 Miguel Vidal http://gsyc.urjc.es/~mvidal Twitter: @mvidallopez September 22, 2011 1 / 48 Miguel Vidal LA in a Nutshell

(cc) 2011 Miguel Vidal This work is licensed under a Creative Commons Attribution 3.0 License http://creativecommons.org/licenses/by/3.0 2 / 48 Miguel Vidal LA in a Nutshell

Table of Contents LA Installing LA 1 L A Installing L A 2 Document Structure Fonts Environments A complete document 3 3 / 48 Miguel Vidal LA in a Nutshell

What is LA Installing LA A computer program (language and interpreter) created by Donald Knuth in 1977. Knuth wrote the typesetting engine to explore potential of the digital printing equipment. He aimed to revert trend of deteriorating typographical quality that affected his own books and articles. Two main aims: highest quality and highest durability. 4 / 48 Miguel Vidal LA in a Nutshell

What is LA Installing LA as we use it today was released in 1982, with some slight enhancements added in 1989 (8-bit characters support). One of the most sophisticated digital typographical systems ( The greatest contribution in the printing world since Gutenberg ). Popular in academia, especially in mathematics, computer science, engineering, and physics. Open Source Software ( public domain dedication): but any modified version must not be called! 5 / 48 Miguel Vidal LA in a Nutshell

What is LA Installing LA understands about 300 low-level commands ( primitives ). Primitives are rarely used directly by users. The smallest unit of length handled by TeX is 0,000005356mm! (scaled point, 1 mm = 186712sp) Functionality is provided by format files (predumped memory images of after large macro collections have been loaded). 6 / 48 Miguel Vidal LA in a Nutshell

What is LA Installing LA Written in a literate programming language called Web. TRIP and TRAP tests ( conformance test ): portable, same output with all versions. The design was frozen (and dedicated to Public Domain) in October 1990 (v3.1* π, no new features, only bug fixes). 7 / 48 Miguel Vidal LA in a Nutshell

METAFONT LA Installing LA Font description language to describe characters (glyphs) algorithmically with geometrical equations. It uses Bézier curves (vector graphics). Also created by Knuth but not strictly part of. It is possible to use and L A without METAFONT. Adobe PostScript fonts may be used instead. 8 / 48 Miguel Vidal LA in a Nutshell

Table of Contents LA Installing LA 1 L A Installing L A 2 Document Structure Fonts Environments A complete document 3 9 / 48 Miguel Vidal LA in a Nutshell

What is L A LA Installing LA Set of macros from primitives that abstracted away many of the complexities. A format originally developed by Leslie Lamport. It incorporates document styles for books, letters, slides, etc. The current version is L A 2e. L A is Open Source Software (LaTeX Project Public License - LPPL), OSI-compliant. 10 / 48 Miguel Vidal LA in a Nutshell

LA Installing LA How to pronounce and spell L A, L A, or LaTeX (ASCII), no Latex. Pronounced /látej/ or /látek/, no latex! It derives from the Ancient Greek: τ ɛχνη (tejné: skill, art, technique ) χ: Ji letter (voiceless velar fricative, as ojo or Bach ), Chi /kai/ in English. IPA (International Phonetic Alphabet): [x] phonem 11 / 48 Miguel Vidal LA in a Nutshell

Table of Contents LA Installing LA 1 L A Installing L A 2 Document Structure Fonts Environments A complete document 3 12 / 48 Miguel Vidal LA in a Nutshell

Advantages LA Installing LA Control Quality Flexibility Portability Scalability Stability 13 / 48 Miguel Vidal LA in a Nutshell

Advantages (2) LA Installing LA Typesetting, not word processing (LibreOffice, MS Office, etc.). Accurate, precise output (device independent). It prevents formatting errors (by forcing to declare logical structure). Separate content and styling. 14 / 48 Miguel Vidal LA in a Nutshell

Advantages (3) LA Installing LA Modular (add-on packages), powerful and highly portable (text files). Easy to make global changes; encourage content reuse. Complex structures (footnotes, references, table of contents, and bibliographies) can be generated easily. Professional output: look as if printed. 15 / 48 Miguel Vidal LA in a Nutshell

Caveats LA Installing LA Not WYSIWIG. Hard learning curve. Absolute space/positioning is tricky (it s very hard to write disorganized documents). Design of a whole new layout is difficult and takes a lot of time. Need to be compiled. 16 / 48 Miguel Vidal LA in a Nutshell

MS Word vs L A LA Installing LA Compare kerning: 17 / 48 Miguel Vidal LA in a Nutshell

MS Word vs L A LA Installing LA Compare kerning: 17 / 48 Miguel Vidal LA in a Nutshell

MS Word vs L A LA Installing LA Compare kerning: Compare Small Caps: 17 / 48 Miguel Vidal LA in a Nutshell

MS Word vs L A LA Installing LA Compare kerning: Compare Small Caps: 17 / 48 Miguel Vidal LA in a Nutshell

MS Word vs L A LA Installing LA MS Word (wrong default kerning) L A (correct kerning) 18 / 48 Miguel Vidal LA in a Nutshell

MS Word vs L A LA Installing LA MS Word (wrong default kerning) MS Word (fake small caps) L A (real small caps) L A (correct kerning) 18 / 48 Miguel Vidal LA in a Nutshell

MS Word vs L A LA Installing LA MS Word (wrong default kerning) MS Word (fake small caps) L A (real small caps) L A (correct kerning) Source images: Dario Taraborelli http://nitens.org/taraborelli/latex (CC-by-sa) 18 / 48 Miguel Vidal LA in a Nutshell

MS Word vs L A : ligatures LA Installing LA 19 / 48 Miguel Vidal LA in a Nutshell

MS Word vs L A : ligatures LA Installing LA 19 / 48 Miguel Vidal LA in a Nutshell

MS Word vs L A : ligatures LA Installing LA MS Word (wrong use of ligatures) L A (correct use of ligatures) 20 / 48 Miguel Vidal LA in a Nutshell

MS Word vs L A : ligatures LA Installing LA MS Word (wrong use of ligatures) L A (correct use of ligatures) Source images: Dario Taraborelli http://nitens.org/taraborelli/latex (CC-by-sa) 20 / 48 Miguel Vidal LA in a Nutshell

Table of Contents LA Installing LA 1 L A Installing L A 2 Document Structure Fonts Environments A complete document 3 21 / 48 Miguel Vidal LA in a Nutshell

Installing L A LA Installing LA For using L A you need: A text editor for editing your L A source files. A L A distribution for processing (compiling) your L A source files into PDF or DVI documents. A PDF/DVI viewer for previewing and printing documents. 22 / 48 Miguel Vidal LA in a Nutshell

Table of Contents LA Installing LA 1 L A Installing L A 2 Document Structure Fonts Environments A complete document 3 23 / 48 Miguel Vidal LA in a Nutshell

The simplest document LA Installing LA % Example #1 \ d o c u m e n t c l a s s { a r t i c l e } \ b e g i n { document } H e l l o World! This i s a minimal \LaTeX{} document. \ end { document } 24 / 48 Miguel Vidal LA in a Nutshell

Document workflow LA Installing LA Editor ( foobar.tex ) L A processor ( foobar.dvi ) display (viewer/screen) drivers ( foobar.ps, printer) $ l a t e x f o o b a r. t e x ( t e x &l a t e x f o o b a r. tex ) $ d v i p s o f o o b a r. ps f o o b a r. d v i ( ps output ) $ p d f l a t e x f o o b a r. t e x ( pdf output ) $ hevea f o o b a r. t e x ( html output ) 25 / 48 Miguel Vidal LA in a Nutshell

DVI Output LA Installing LA Device independent file format (.dvi) Binary data independent on any specific image format, display hardware or printer. A L A distribution for processing (compiling) your L A source files into PDF or DVI documents. DVI is not a document encryption format. Not support embedded fonts (fonts must be already installed). 26 / 48 Miguel Vidal LA in a Nutshell

xdvi: DVI Previewer LA Installing LA 27 / 48 Miguel Vidal LA in a Nutshell

L A Distributions LA Installing LA There are pre-compiled L A distributions for different OS: TeX Live (Unix-like systems): Linux, BSD, Solaris, etc. MacTeX (TeX Live with the addition of Mac specific programs): http://www.tug.org/mactex MiKTeX (Windows): http://www.miktex.org 28 / 48 Miguel Vidal LA in a Nutshell

Table of Contents Document Structure Fonts Environments A complete document 1 L A Installing L A 2 Document Structure Fonts Environments A complete document 3 29 / 48 Miguel Vidal LA in a Nutshell

Document Structure Document Structure Fonts Environments A complete document Two main environments: Preamble: commands and macros that affect the entire document. Top matter: author, title, date, institution, etc. Document environment: body text 30 / 48 Miguel Vidal LA in a Nutshell

Preamble Document Structure Fonts Environments A complete document Everything from the start of the L A source file until the begin{document} command It normally contains global commands that affect the entire document. \ d o c u m e n t c l a s s [ o p t i o n s ] { c l a s s } \ usepackage [ o p t i o n s ] { package } class (mandatory): book, article, report package (optional): to utilize external macros (inputenc, amssymb...) 31 / 48 Miguel Vidal LA in a Nutshell

Top Matter Document Structure Fonts Environments A complete document Title, date Information about the authors, such as name, address, email etc. \ d o c u m e n t c l a s s [ 1 1 pt, a4 paper, o n e s i d e ] { r e p o r t } \ usepackage [ u t f 8 ] { i n p u t e n c } % utf 8 e ncoding \ usepackage {amssymb} % math symbols \ b e g i n { document } \ t i t l e {How to S t r u c t u r e a LaTeX Document} \ a u t h o r {Andrew R o b e r t s } \ date {December 2004} \ m a k e t i t l e \end{ document } 32 / 48 Miguel Vidal LA in a Nutshell

Body text Document Structure Fonts Environments A complete document Abstract Parts, chapters, sections, subsections, Appendices, Bibliography... \ b e g i n { document }... t e x t mixed with l o c a l commands... \ end { document } 33 / 48 Miguel Vidal LA in a Nutshell

Document Structure Fonts Environments A complete document How to Structure a L A Document L A allows to structure documents with a variety of hierarchical constructs: \ p a r t { Part T i t l e } \ c h a p t e r { Chapter T i t l e } %o n l y books and r e p o r t s \ s e c t i o n { S e c t i o n T i t l e } \ s u b s e c t i o n { S u b s e c t i o n T i t l e } \ s u b s u b s e c t i o n { S u b s u b s e c t i o n T i t l e } 34 / 48 Miguel Vidal LA in a Nutshell

Table of Contents Document Structure Fonts Environments A complete document 1 L A Installing L A 2 Document Structure Fonts Environments A complete document 3 35 / 48 Miguel Vidal LA in a Nutshell

Font Styles Document Structure Fonts Environments A complete document \ t e x t i t {... } % i t a l i c s \ t e x t b f {... } % bold \ t e x t t t {... } % monospace t e l e t y p e \ t e x t s c {... } % s m a l l c a p i t a l s Example: \LaTeX{} was \ t e x t t t { o r i g i n a l l y } w r i t t e n i n \ t e x t b f {1984} by \ t e x t s c { L e s l i e Lamport } and has become the \ t e x t i t { dominant } method f o r u s i n g \TeX. Output: 36 / 48 Miguel Vidal LA in a Nutshell

Document Structure Fonts Environments A complete document Font Sizes \ t i n y \ s c r i p t s i z e \ f o o t n o t e s i z e \ s m a l l \ n o r m a l s i z e \ l a r g e \ Large \LARGE \ huge \Huge Size related to font size default, declared in preamble (documentclass) 37 / 48 Miguel Vidal LA in a Nutshell

Font Sizes. Example Document Structure Fonts Environments A complete document \LaTeX{} was \ t i n y o r i g i n a l l y w r i t t e n \ n o r m a l s i z e i n \ l a r g e 1984 \ n o r m a l s i z e by \LARGE L e s l i e Lamport \ n o r m a l s i z e and has become the \ f o o t n o t e s i z e dominant method \ n o r m a l s i z e f o r u s i n g \ huge \TeX. Output: L A was originally written in 1984 by Leslie Lamport and has become the dominant method for using. 38 / 48 Miguel Vidal LA in a Nutshell

Some special features Document Structure Fonts Environments A complete document Text aligned n > 1 blank lines and empty spaces: one line or one space Start a new paragraph: \\ Hyphenate the word (exceptional cases): man\-u\-script \newline, \newpage 39 / 48 Miguel Vidal LA in a Nutshell

Table of Contents Document Structure Fonts Environments A complete document 1 L A Installing L A 2 Document Structure Fonts Environments A complete document 3 40 / 48 Miguel Vidal LA in a Nutshell

Environments Document Structure Fonts Environments A complete document \ b e g i n { environment name} \ end { environment name} Environments: center, itemize, enumerate, figure, flushright, quotation... 41 / 48 Miguel Vidal LA in a Nutshell

Environments: example Document Structure Fonts Environments A complete document Some FOSS L i c e n s e s : \ b e g i n { enumerate } \ item BSD l i c e n s e \ item GPL l i c e n s e \ item CDDL l i c e n s e \ end { enumerate } Output: 42 / 48 Miguel Vidal LA in a Nutshell

Table of Contents Document Structure Fonts Environments A complete document 1 L A Installing L A 2 Document Structure Fonts Environments A complete document 3 43 / 48 Miguel Vidal LA in a Nutshell

A complete document \ usepackage [ u t f 8 ] { i n p u t e n c } \ t i t l e {The beauty o f \TeX} \ a u t h o r { Donald E. Knuth} \ date {\1979} Document Structure Fonts Environments A complete document \ b e g i n { document } \ m a k e t i t l e % This i s the comment body. Mathematical books and j o u r n a l s do not l o o k as b e a u t i f u l as t h e y used to. I t i s not t h a t t h e i r mathematical c o n t e n t i s u n s a t i s f a c t o r y, r a t h e r t h a t the o l d and w e l l d e v e l o p e d t r a d i t i o n s o f t y p e s e t t i n g have become too e x p e n s i v e. F o r t u n a t e l y, i t now a p p e a r s t h a t mathematics i t s e l f can be used to s o l v e t h i s problem. \ end { document } 44 / 48 Miguel Vidal LA in a Nutshell

A complete document Document Structure Fonts Environments A complete document 45 / 48 Miguel Vidal LA in a Nutshell

Lamport, Leslie. L A : A document preparation system, Addison-Wesley, Reading, Massachusetts, second edition, 1994. Knuth, Donald E. The book, Volume A of Computers and Typesetting, Addison-Wesley, Reading, Massachusetts, second edition, 1984. CTAN: the authoritative collection of materials related to the TeX typesetting system. http://www.ctan.org Guide to the L A markup language: http://en.wikibooks.org/wiki/latex 46 / 48 Miguel Vidal LA in a Nutshell

(Spanish) Sanguino-Botella, Javier. Iniciación a L A 2e: Un sistema para preparar documentos, Addison-Wesley, 1997. VV.AA. L A : Una imprenta en sus manos, ADI, 2000. y tipografía (web de Javier Bezos): http://www.tex-tipografia.com CervanTeX: Grupo de usuarios hispanohablantes de : http://www.cervantex.es/ 47 / 48 Miguel Vidal LA in a Nutshell

L A in a Nutshell Master on Libre Software 2011-12 Miguel Vidal http://gsyc.urjc.es/~mvidal Twitter: @mvidallopez September 22, 2011 48 / 48 Miguel Vidal LA in a Nutshell