Using L A T E X for scientific writing

Similar documents
Introduzione a LaTex. Fabrizio Messina

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

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

COMP496/901: Academic Presentation and Writing Skills Using LaTeX

Introduction to Latex. A workshop by Dr. Ala Eshmawi

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

Helen Cameron. A Brief Overview of LATEX

Basic L A TEX. what is LaTeX?

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

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

An Introduction to LATEX

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

Helen Cameron. A Brief Overview of LATEX

LaTeX A Tutorial. Mohsen Alimomeni, 2010

Formatting with LaTeX

Introduction to Scientific Typesetting Lesson 1: Getting Started

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

Introduction to L A T E X

Introduction to LATEX

Lecture 3-Introduction to Latex (II)

An Introduction to L A TEX

GROUP ASSIGNMENT. L A TEX Assignment 1/3

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.

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

L A TEX From The Ground Up

CSCM10 Research Methodology A Taster of L A TEX

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

Introduction to L A TEX

Document Preparation Using L A TEX

Introduction to LAT E X

Introduction to L A TEX

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

LaTeX. Information Literacy II EN(IL2) Course

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

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

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

Course A, Part 1 Basic Formatting in L A TEX

Meeting One. Aaron Ecay. February 2, 2011

VERY VERY SHORT GUIDE TO LATEX

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

Guide to using L A TEX

Latex Tutorial. CIS400 Senior Design 9/5/2013

A Brief Introduction to L A TEX

The Not So Short Introduction to LATEX 2ε

Introduction to LAT E X

LATEX. Leslie Lamport. Digital Equipment Corporation. Illustrations by Duane Bibby. v ADDISON-WESLEY

COMS 6100 Class note

My Mathematical Thesis

Useful L A TEX Commands

HOW TO TYPESET THESES. Using iiscthesis style for LAT E X

Workshop P. Stallinga 16-X-2012

Introduction to L A TEX

L A TEX for Psychological Researchers

Typing Mathematics. Darrin Doud

L A TEX: Online module 2

Absolute L A TEX Beginner

Effective Programming Practices for Economists

A Document Preparation System. User's Guide and Reference Manual. Leslie Lamport

Dec. 27 th, 2010 University of Isfahan

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

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

1 Executing the Program

L A TEX Class Holiday Inn Fisherman s Wharf San Francisco, CA July Cheryl Ponchin Sue DeMerritt

LATEX Primer. 1 Introduction (Read Me)

L A TEX for Psychological Researchers

A brief introduction to L A TEX

First UTA L A TEX Workshop part 1

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

Contents. More Tutorial at. Thank you! Preface

David Helmbold, October 2005, Revised October 2007

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

L A TEX Workshop. Don Brower

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

An Introduction to L A T E X

A Short Introduction to L A TEX

L A TEX Gotchas - Common Pitfalls and Debugging

Note di Matematica instructions for authors

Lecture 1: Short summary of LaTeX basics

Become a L A TEX Guru

Step by step instructions for layout for Theology papers Part 1 Setting up margins

Introduction to LaTeX. Paul Fodor Stony Brook University

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

Introduction to LaTeX. M&S Talk Series August 16 th, 2016 AH Sheikh

Preparation of ADSA and IJDE Manuscripts

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

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

The Not So Short Introduction to LATEX2ε

Without savetrees. An Example Document

The Joys of LAT E X. Vadim Ponomarenko. introducing the world s standard typesetting language.

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

Part - I : Short Course Typing Text

A DEMONSTRATION OF THE UNIVERSITY OF KENTUCKY MATHEMATICS DEPARTMENT DISSERTATION DOCUMENT CLASS

The memoir class. 1 Introduction. Peter Wilson

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

Essential L A TEX. Jon Warbrick Luis Rivera 1989/2014

L A TEX Primer. Randall R. Holmes. August 17, 2018

The AES Convention Paper LATEX class Adam H. Lewenberg (October 18, 2008) 1

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

Introduction to LAT E X Part 1. marko/latex

Transcription:

Using L A T E X for scientific writing (part 1) www.dcs.bbk.ac.uk/~roman/latex Roman Kontchakov roman@dcs.bbk.ac.uk

T E X and L A T E X T E X is a computer program created by Donald E. Knuth. It is aimed at typesetting text and mathematical formulas. T E X is pronounced Tech with a ch as in the Scottish Loch. L A T E X is a macro package which enables authors to typeset and print their work at the highest typographical quality, using a predefined, professional layout. L A T E X was originally written by Leslie Lamport. It uses the T E X formatter as its typesetting engine. L A T E X is pronounced Lay-tech or Lah-tech. No WYSIWYG What You See Is What You Get Using LaTeX for scientific writing (2018-1) 1

Advantages Several professional styles are available that make documents look like printed. Changing style requires changing one single line in the document, with consistency ensured. High-quality maths typesetting Only a few commands to define the structure of text, no knowledge of typography or book design required. Complex scientific documents can be created automatically: bibliography index cross-references table of contents, lists of figures, tables etc.... Operating-system independent Long-term storage of documents: plain-text (ASCII) rather than binary Free software with source code available: errors are corrected rapidly Using LaTeX for scientific writing (2018-1) 2

Disadvantages Learning curve Major changes in layout may require rewriting the style file (blessing in disguise) One gets an eye for all the bad documents out there Using LaTeX for scientific writing (2018-1) 3

Plan Document structure: sections, cross-references, lists, figures, tables Mathematics: symbols, formulas, theorems Bibliographic references (BibTeX) MakeIndex Incorporating graphics Creating graphics and diagrams in L A T E X Thesis, report, article and customised styles Presentations Anything else? e-mail me: roman@dcs.bbk.ac.uk Using LaTeX for scientific writing (2018-1) 4

Resources Software CTAN www.tug.org, win: MiKTeX 2.9 www.miktex.org WinEdt 10.2 www.winedt.com T E XnicCenter 2.02 www.texniccenter.org mac: MacT E X 2017 www.tug.org/mactex web: ShareL A T E X www.sharelatex.com Introduction http://mirrors.ctan.org/info/lshort/english/lshort.pdf WikiBook http://en.wikibooks.org/wiki/latex Literature The L A T E X-companion (MITTELBACH et al, 2004) Symbols Comprehensive symbol list from CTAN http://tug.ctan.org/info/symbols/comprehensive/symbols-a4.pdf detexify: http://detexify.kirelabs.org/classify.html Using LaTeX for scientific writing (2018-1) 5

Your first L A T E X document \documentclass{article} \begin{document} My first \LaTeX{} document. \end{document} Using LaTeX for scientific writing (2018-1) 6

How does L A T E X work?.tex T E X compiler.dvi.pdf.log errors, warnings, etc. Using LaTeX for scientific writing (2018-1) 7

Spaces Whitespace characters such as blank or tab are treated uniformly as space. Several consecutive whitespace characters are treated as one space. Whitespace at the start of a line is generally ignored; a single linebreak is treated as whitespace. An empty line between two lines of text defines the end of a paragraph. Several empty lines are treated the same as one empty line. It does not matter whether you enter one or several spaces after a word. An empty line starts a new paragraph. Special characters It does not matter whether you enter one or several spaces after a word. An empty line starts a new paragraph. $ & % # _ { } ~ ^ \ These characters can be used in your documents by adding a prefix backslash: \$ \& \% \# \_ \{ \} $ & % # { } Using LaTeX for scientific writing (2018-1) 8

L A T E X commands L A T E X commands are case sensitive and take one of the following two formats: start with a backslash \ and then have a name consisting of letters only (e.g., \LaTeX) Command names are terminated by a space, a number or any other non-letter or consist of a backslash and exactly one non-letter character (e.g., \$) L A T E X ignores whitespace after commands: \LaTeX document LAT E Xdocument Some commands need a parameter which has to be given between curly brackets { } after the command name Some commands support optional parameters which are added after the command name in square brackets [ ] You can \textsl{lean} on me! You can lean on me! Using LaTeX for scientific writing (2018-1) 9

Comments When L A T E X encounters a % character while processing an input file, it ignores the rest of the present line, the linebreak, and all whitespace at the beginning of the next line This is an % stupid % Better: instructive <---- example: Supercal% ifragilist% icexpialidocious This is an example: Supercalifragilisticexpialidocious This can be used to write notes into the input file, which will not show up in the printed version The % character can also be used to split long input lines where no whitespace or linebreaks are allowed Using LaTeX for scientific writing (2018-1) 10

Document structure \documentclass[options]{class} \usepackage{... } (preamble) \begin{document}... \end{document} Using LaTeX for scientific writing (2018-1) 11

Document classes article for articles in scientific journals, presentations, short reports, program documentation, invitations, etc. report for longer reports containing several chapters, small books, PhD theses, etc. book for real books... Document class options 10pt, 11pt, 12pt sets the size of the main font in the document (10pt by default) a4paper, letterpaper,... defines the paper size twocolumn typesets the document in two columns twoside, oneside specifies whether double or single sided output should be generated (The article and report classes are single sided and the book class is double sided by default.)... Using LaTeX for scientific writing (2018-1) 12

Page styles \pagestyle{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 It is possible to change the page style of the current page with the command \thispagestyle{style} NB. You can create your own headers and footers (more later). Using LaTeX for scientific writing (2018-1) 13

Big documents \input{filename} simply includes the contents of the file specified (does not start a new page) \include{filename} inserts the contents of another file named filename.tex (LAT E X will start a new page before processing the material input from filename.tex) \includeonly{filename,filename,... } after this command is executed in the preamble of the document, only \include commands for the filenames which are listed in the argument of the \includeonly command will be executed Using LaTeX for scientific writing (2018-1) 14

Paragraphs The most important text unit in L A T E X (and in typography) is the paragraph. We call it text unit because a paragraph is the typographical form which should reflect one coherent thought, or one idea. Often books are typeset with each line having the same length (justified paragraphs). L A T E X inserts the necessary linebreaks and spaces between words by optimising the contents of a whole paragraph. If necessary, it also hyphenates words that would not fit comfortably on a line. How the paragraphs are typeset depends on the document class. Normally the first line of a paragraph is indented, and there is no additional space between two paragraphs. L A T E X always tries to produce the best linebreaks possible. If it cannot find a way to break the lines in a manner which meets its high standards, it lets one line stick out on the right of the paragraph. L A T E X then complains ( overfull hbox ) while processing the input file. This happens most often when L A T E X cannot find a suitable place to hyphenate a word. You can instruct L A T E X to lower its standards a little by giving the \sloppy command. It prevents such over-long lines by increasing the inter-word spacing even if the final output is not optimal. In this case a warning ( underfull hbox ) is given to the user. In most such cases the result doesn t look very good. The command \fussy brings L A T E X back to its default behaviour. Using LaTeX for scientific writing (2018-1) 15

Linebreaking and pagebreaking \\ or \newline starts a new line without starting a new paragraph \\* additionally prohibits a pagebreak after the forced linebreak \newpage starts a new page \linebreak[n], \nolinebreak[n], \pagebreak[n] and \nopagebreak[n] do what their names say. They enable the author to influence their actions with the optional argument n. It can be set to a number between 0 to 4. By setting n to a value below 4 you leave L A T E X the option of ignoring your command if the result would look very bad. Using LaTeX for scientific writing (2018-1) 16

More special characters and symbols quotation marks Please press the x key. Please press the x key. hyphen daughter-in-law daughter-in-law en-dash pages 13--67 pages 13 67 em-dash yes---or no? yes or no? minus sign $1$ and $-1$ 1 and 1 ellipsis Not like this... Not like this... but like this: London, Rome, \ldots but like this: London, Rome,... Using LaTeX for scientific writing (2018-1) 17

Space between words L A T E X inserts slightly more space at the end of a sentence, as this makes the text more readable. It assumes that sentences end with full stops, question marks or exclamation marks. If a full stop follows an uppercase letter, this is not taken as a sentence ending (full stops after uppercase letters normally occur in abbreviations). \ produces a space which will not be enlarged ~ produces a space which will not be enlarged and additionally prohibits a linebreak (e.g.~live football matches) e.g. live football matches \@ in front of a full stop says that this full stop terminates a sentence (even if it follows an uppercase letter) \ldots\ on the NHS\@. Most\ldots... on the NHS. Most... NB. The additional space after full stops can be disabled with the command \frenchspacing Using LaTeX for scientific writing (2018-1) 18

Sectioning \section{insect evolution and biology} \subsection{five factors in a winning formula} \subsubsection{flight} \paragraph{the origin of wings} \subparagraph{...} 1. Insect evolution and biology 1.1 Five factors in a winning formula 1.1.1. Flight The origin of wings The following can be used in the report and book classes: \part{...} \chapter{...} Using LaTeX for scientific writing (2018-1) 19

Document title The title of the whole document is generated by issuing \maketitle The contents of the title have to be defined by the commands \title{...}, \author{...} and optionally \date{...} before calling \maketitle In the argument of \author, you can supply several names separated by \and Using LaTeX for scientific writing (2018-1) 20

Cross references \label{marker} \ref{marker} creates a label with the name marker prints the number of the section, subsection, figure, table, etc. after which the corresponding \label command was issued \pageref{marker} prints the page number of the page where the \label command occurred label \section{introduction}\label{sec:intro} In this paper, we study the problem of\dots \section{preliminaries}\label{sec:prelims} We consider structures of the form\dots \section{complexity of the Problem} \label{sec:cmplx} The structures introduces in Section~\ref{sec:prelims} on p.~\pageref{sec:prelims} enjoy\dots 1. Introduction In this paper, we study the problem of... 2. Preliminaries We consider structures of the form... 3. Complexity of the Problem The structures introduces in Section 2 on p. 4 enjoy... Using LaTeX for scientific writing (2018-1) 21

Footnotes Footnotes\footnote{This is a footnote.} are often used by \LaTeX{} people. Footnotes 1 are often used by L A T E X people. 1 This is a footnote. Footnotes\footnote{\label{fn:latex}This is a footnote.} are often used by \LaTeX{} people (one may also refer to footnote numbers: e.g.,~\ref{fn:latex}). Footnotes 1 are often used by L A T E X people (one may also refer to footnote numbers: e.g., 1). 1 This is a footnote. NB: \label is placed inside the \footnote command (but it can be placed either after \section,... or inside those commands) Using LaTeX for scientific writing (2018-1) 22

Lists An example: \begin{enumerate} \item You can mix the list environments to your taste: \begin{itemize} \item But it might start to look silly. \item[-] With a dash. \end{itemize} \item Therefore remember: \begin{description} \item[stupid] things will not become smart because they are in a list. \item[smart] things, though, can be presented beautifully in a list. \end{description} \end{enumerate} An example: 1. You can mix the list environments to your taste: But it might start to look silly. - With a dash. 2. Therefore remember: Stupid things will not become smart because they are in a list. Smart things, though, can be presented beautifully in a list. Using LaTeX for scientific writing (2018-1) 23