Workshop P. Stallinga 16-X-2012

Similar documents
LaTeX A Tutorial. Mohsen Alimomeni, 2010

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

Introduction to LaTeX. Paul Fodor Stony Brook University

COMP496/901: Academic Presentation and Writing Skills Using LaTeX

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

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

L A TEX Tutorial. 1 Introduction. 2 Running L A TEX. J. E. Rice. May 2010

Introduzione a LaTex. Fabrizio Messina

An Introduction to LATEX

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

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

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

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

L A TEX for Psychological Researchers

Introduction to L A TEX

David Helmbold, October 2005, Revised October 2007

Dec. 27 th, 2010 University of Isfahan

An Introduction to L A TEX

Latex Tutorial. CIS400 Senior Design 9/5/2013

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

Helen Cameron. A Brief Overview of LATEX

Using L A T E X for scientific writing

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

COMS 6100 Class note

L A TEX. The Logo. Introduction to L A TEX. Overview. Primary Benefits. Kinds of Documents. Bill Slough and Andrew Mertz

Formatting with LaTeX

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

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

My Mathematical Thesis

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

Introduction to Latex. A workshop by Dr. Ala Eshmawi

Basic L A TEX. what is LaTeX?

GROUP ASSIGNMENT. L A TEX Assignment 1/3

Become a L A TEX Guru

A quick guide to L A TEX

Using L A TEX. A numbered list is just that a collection of items sorted and labeled by number.

Introduction to LATEX

Very Short Introduction to LaTeX

MATLAB for the Sciences

Guide to using L A TEX

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

An introduction to LaTeX

An Interactive Introduction to L A TEX

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

Introduction to LAT E X

Typing Mathematics. Darrin Doud

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

GENERAL INFORMATION INSTRUCTIONS FOR MANUSCRIPT SUBMISSION

Assessments for CS students:

1 Obtaining LyX and L A TEX

Word-to-L A TEX specification

An introduction to TeX. And other options for producing documents containing mathematics

Helen Cameron. A Brief Overview of LATEX

Effective Programming Practices for Economists

L A TEX: Eh? What is it, what isn t it, who cares? Andy Caird. LATEX: Eh? p.1/13

Written & Oral Presentation: Computer Tools

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

Tools for Scientific Writing with LAT E X. Johan Carlson

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

An introduction to L A TEX for students

Outline. Installing LaTeX. Opening TeXShop. Intro to LaTeX. Intro to LaTeX interface Working with text Tabbing and tables Figures Math and equations

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

Introduction to L A T E X

Introduction to L A T E X

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

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

An Introduction to. Andrew G. West, Jian Chang CIS400 Senior Design Tutorial September 15, 2009

Learning L A TEX. Patrick Lam

VERY VERY SHORT GUIDE TO LATEX

Math 235: Introduction to LaTeX

A Grasshopper s Approach to L A TEX

Outline. A Sneak Peek

Aalborg October 2014

Introduction to L A TEX

An introduction to LaTeX

Introduction to Scientific Typesetting Lesson 1: Getting Started

A Brief Introduction to L A TEX

Typesetting with TEX

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

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.

Getting started with Latex

A Short L A TEX Introduction

LaTeX. Information Literacy II EN(IL2) Course

Getting Started in L A TEX

Introduction to L A TEX

simpletex Documentation

Typing Your University of Georgia Thesis With L A TEX: Frequently Asked Questions

SOFTWARE ARCHITECTURE 4. TEXT FORMATTING SYSTEM

How to L A TEX. George Wong, David Mykytyn. 6 October 2016

Learning LaTeX: The Basics

L A TEX From The Ground Up

L A TEX for Psychological Researchers

Introduction to LATEX

A LAT E X Tutorial. Evangelos Milios. March 15, 2004

EGR 53L - Spring 2011

Electronic Production Guidelines

How to get started in L A TEX

Introduction to L A TEX

Transcription:

Workshop P. Stallinga 16-X-2012

What is LaTeX? A layer on top of TeX (Tau Epsilon Chi) of Donald Knuth* TeX is a typesetting system LaTeX is a set of 'macros' defined in TeX LA stands for 'Level of abstraction' LaTeX is very much like HTML. We define the text and its function, but never how it is actually displayed on the screen. Example is a hyperlink Click on this <a href= http://www.benfica.pt >link</a> to continue... Which normally becomes Click on this link to continue... LaTeX can thus produce high quality output with low amount of work Extremely useful for large documents and scientific communications *: The computer pioneer Knuth is also famous for Metafont, a system to parametrize fonts

What is LaTeX? How to write the word LaTeX? logo created with \LaTeX How to pronounce LaTeX? Any way you want! lah-teck lay-teck lay-tecks lah-tecks lah-teχ How much does a license cost? Nothing!

What is LaTeX? Reasons to use LaTeX? - Very powerful. Better than Word. Flexible - High quality output (remember, you are not a typesetter!!). You don't need knowledge of typesetting to produce a nice document. - Unbeatable in equations! (see for instance comprehensive LaTeX symbol list) - Easy to use (after initial learning) - Standard all over the world - Free. Gratis. At no cost. There is such a thing as a free lunch! - Used in scientific communities - It is completely bug free!

What LaTeX is not? In contrast, LaTeX is not WYSIWIG as Word WYSIWYG

What LaTeX is not? In contrast, LaTeX is not WYSIWIG as Word WYSIWYG In practice, Word often turns out to be: WYGINWYW

What LaTeX is not? In contrast, LaTeX is not WYSIWIG as Word WYSIWYG In practice, Word often turns out to be: WYGINWYW or even worse: YWIYGI (or worse: TTFY) Word is good for writing short letters and memos LaTeX is more suited for large documents and scientific communications In LaTeX you have FULL CONTROL. The price to pay, of course, is that it can become rather complicated

LaTeX, like a language Imagine, in LaTeX you only write Text 1 Text 2 Text 3 etc. Together with specifying what the function is of each text. For example: \begin{equation} Text 1 \end{equation} You do not specify how the equation is to be displayed. This you leave up to the processor, or the printer/publisher of your book or article. Advantage: If you want to change the display style of all equations in your document, you only have to change the 'header' which is called preamble in LaTeX

The input file All input text is standard ASCII. That is, the 7-bit code for 128 characters No problem with versions, or styles, or service packs. You can send your file to your colleague anywhere in the world, and it will work! Difference with Word: The 'formatting' statements are visible as they are also written in ASCII (But, don't forget that Word also has formatting codes in the middle of the document!) If you want to write Portuguese you can include a so-called 'package'

The input file (But, don't forget that Word also has formatting codes in the middle of the document!) Word hello.docx document opened with archive manager and word/document.xml displayed in Firefox

example \documentclass[a4paper]{article} \begin{document} Hello world! \end{document} commands Preamble Text to be displayed Commands start with a backslash \ One of 'reserved' special meaning characters: $, &, { } ~ % # _ ^ \ { } is to join things together, to make them one logical element

process latex -interaction=nonstopmode hello.tex test.tex test.aux test.log test.dvi auxiliary log file device-independent file

process dvips -o hello.ps hello.dvi test.dvi test.ps postscript (printers)

process ps2pdf hello.ps test.ps test.pdf portable document format

process latex -interaction=nonstopmode hello.tex dvips -o hello.ps hello.dvi test.tex test.dvi test.ps test.pdf test.log ps2pdf hello.ps test.aux

IDE This is 2012!! Integrated development environments: Texmaker (Linux Gnome) Kile (Linux KDE) WinEdt (Windows) Let's generate some random text: http://johno.jsmf.net/knowhow/ngrams/index.php

IDE Texmaker (Linux Gnome) Spellchecking in Texmaker copy en_us.dic to /usr/share/myspell/dicts/ https://dl.dropbox.com/u/22018719/en_us.dic https://dl.dropbox.com/u/22018719/en_us.aff

packages To add functionality, many many packages are written. Nearly all of them are part of the 'distribution' Example: writing Portuguese documents: \documentclass[a4paper]{article} \begin{document} Olá mundo! \end{document}

packages To add functionality, many many packages are written. Nearly all of them are part of the 'distribution' Example: writing Portuguese documents (Look on-line for solution): \documentclass[a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[portuges]{babel} \begin{document} Olá mundo! \end{document} Be sure to save your file in UTF-8 format (in other words, you lose the compatibility with rest of world) Do not use this! Write in English. LaTeX is for scientific papers. English

books LATEX A document preparation system - Leslie Lamport The LATEX Companion - Goossens, Mittelbach, Samarin https://dl.dropbox.com/u/22018719/latex%20-%20a %20simplified%20introduction%20to%20LaTeX.pdf

floats A float is an element which you leave up to the typesetter to decide where to place LaTeX basically has two: figure table Look at any high quality book. Figures and tables are placed on the top of the page (or at the bottom). Never where the writer inserted them in the text. In the extreme (stupid!) case that you still want the floats not to float, you can force them to appear there where you inserted them. But, even then, LaTeX will sometimes completely ignore your demands

tabular A tabular environment is used to align things. Put things on top of eachother \begin{tabular}{xxxx...} A & B C & D \\ E F & G H & I J...\\ \end{tabular} x: alignment code (l, c or r} &: item separation character Examples to show: example above lines multicolums

sectioning Sectioning: \chapter{chaptername} \section{sectionname} \subsection{sectionname} \subsubsection{sectionname} \newpage Empty line: start new paragraph A linebreak in LaTeX source has same effect as a space, or 100 spaces Benfica will win this years supercup for sure, beating Porto in the final Force newline?: \\

formatting Italics: \textit{my text in italics} DO NOT USE THIS. Do not use formatting commands in the body of the doucment. Remember, in LaTeX the idea is to specify the function of text, not its format. Probably you wanted to emphasize some text (like in sentence here), so then tell it you want to emphasize: {\emph my text emphasized} Imagine that you want to emphasize something in a text that itself is typeset as italics (by the editor). (Emphasis in italics is. upright text!) Abstract In this paper, we focus on the Portuguese part of the Iberian Peninsula only. Bold: \textbf{text} or {\bf my text} \texttt{typewriter style... } \textsf{sans serif text, Arial or something like that) \tiny \large \Large \LARGE \huge \Huge

references References \label{labelname} \ref{labelname} Can be used for equations, figures, sections, tables \pageref referencing to page of object \eqref for formatting equation refes: Eq. (3.20) instead of Eq. 3.20 Remember (if it is a forward reference): LaTeX normally is a two-pass compiler, with normally only one pass executed. You need to rerun the compiler to get the references correct! Given the fact that LaTeX is like programming, use programming techniques: Chose your label-names well \label{eq:maxwell} \label{fig:noisesources} \label{ch:introduction} \label{sec:software}

equations Two types of equations - inline - separate line Both use Greek letters, like \alpha, etc. Outside equations, use \textmu, etc. Inline: $equation text$ Separate line \begin{equation} Equation text \end{equation} or \begin{eqnarray} Equation text\\ Equation 2 \end{eqnarray} Examples to show: $$ equation eqnarray labels and refs functions fractions, sqrt subscript/superscript often made mistake a_i0 (no)numbering \left( \right) Do not use fractions in in-line equations

Greek Intermezzo: If you are using Word, to write a μ don't use 'm' with symbol font, write an m on a Greek keyboard (install a Greek keyboard!) This is a correct Greek letter 'mu' with Arial font (like rest), when typed with Greek keyboard: μ This is a Latin letter 'm' in Symbol font: µ

Mathematics vs. physics LaTeX was designed by mathematicians A i vs. A i Mathematics: i-th element of vector A Physics, Engineering: Initial Gain If a letter represents a value, it should be written as italics, otherwise not LaTeX: default: mathematics % To have roman subscripts: \catcode`\_=\active \def_{\sb\mathrm} % roman subscripts with $X_{ff}$ and italic subscripts with % $X\sb{ff}$. % Be careful: no underscore _ can be used in filenames and labels!

graphics \includegraphics{grafix.eps} \scalebox{factor}{objecttoscale} \rotatebox{angle}{objecttorotate} Only encapsulated postscript! Use GIMP or ImageMagic ( convert image.jpg image.eps )

lists \begin{itemize} \item Benfica \item Sporting \item Porto \end{itemize} Benfica Sporting Porto \begin{enumerate} \item Benfica \item Sporting \item Porto \end{enumerate} 1 Benfica 2 Sporting 3 Porto

packages Useful packages: color: for color text picins: inline graphics; wrap text around images multicol: Multi-column format amsmath: American mathematical society mathematical symbols Etc. etc. etc. etc. Read the LaTeX companion, or the LaTeX Graphics Companion

Large projects \input{chapter1/chapter1} \input{chapter2/chapter2} \input{chapter3/chapter3} \input{chapter4/chapter4} \input{chapter5/chapter5} \input{refs/refs.tex}

bibliography At the end \begin{thebibliography}{99} % % 1 \bibitem{wikitransducer} Wikipedia: Transducer (July 2010). % 2 \bibitem{almeida} G.\ de Almeida in "Sistema Internacional de Unidades (SI)", 3rd edition, Pl\'{a}tano Edi\,{c}\~{o}es T\'{e}cnicos (2002), ISBN 972 707 162 7. % 3 \bibitem{si} E.\ R.\ Cohen, P.\ Giacomo, Physica 146A, 1 (1987). % \end{thebibliography} Note the.\ (because it is not an end-of-line dot) And in the text See Almeida\cite{almeida} for a complete reference.

examples pagestyle textwidth setcounter parbox minipage multicolumn double spacing article/abstract