Semantics. Doug Arnold (L A TEX for Linguists) September 25, 2007

Similar documents
2. Unlock the Customization Features: The Edit Button Click the "Edit" button on the Dashboard Home Page to unlock the customization features.

Quick Start Instructions on using MyOMLab with the JAWS Screen Reader*

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

Introduction to L A TEX

Tabella dei caratteri ASCII e UNICODE

Kristoffer H. Rose. Version /01/07

Appendix B: Latex survival guide

The Mathematics of Banking and Finance By Dennis Cox and Michael Cox Copyright 2006 John Wiley & Sons Ltd

Character Entity References in HTML 4 and XHTML 1.0

News from the Wrapper

Drawing Trees with PStricks

Typesetting with TEX

An Introduction to LATEX

Simple Math. Adam Dishaw 2011 September 21. Suppose you want to include some math in your documents. Just follow these basics steps:

LaTeX in SLATE. Common Symbols. 1. Subscripts & Superscripts Fractions & Roots. 4. Brackets.. 5. Multiline Formulas.. 6. Matrices..

Paul Gartside. March 2, 2013

Name: Dr. Fritz Wilhelm Lab 1, Presentation of lab reports Page # 1 of 7 5/17/2012 Physics 120 Section: ####

The package paresse. Le TEXnicien de surface February 16, 2013

VerTeX User s Manual

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

L A TEX examples. a b c a b c b b a c b c c b a. This table was typeset with the following commands.

Lab1: Use of Word and Excel

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

Getting started with L A TEX on XP

Extrapolating TEX4ht. TEX4ht Project

EMP: Encapsulated METAPOST for L A TEX

PHYS 87. Check that it works by typesetting the tripple ensted list of the pervious exercise.

Become a L A TEX Guru

L A TEX for Psychological Researchers

The LibertinusT1 Math Package

Template and Tutorial for Math Modelers

Less naive type theory

Topic Training Engineering Report

Getting Started with LATEX

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

An Introduction to L A 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.

How to get started in L A TEX

David Helmbold, October 2005, Revised October 2007

L A TEX and Linguistics

A Short Introduction to L A TEX

Introduction to L A T E X

Context-free Grammars

Nutthapat Kaewrattanapat. Lecture in Principle of Web Design

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

The multicap L A TEX2ε package

My Mathematical Thesis

L A TEX and Linguistics

The MathType Window. The picture below shows MathType with all parts of its toolbar visible: Small bar. Tabs. Ruler. Selection.

COMP496/901: Academic Presentation and Writing Skills Using LaTeX

Getting Started with L A TEX

Introduction to L A TEX for MCS-236

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

LING 130: Quantified Noun Phrases

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

SOFTWARE ENGINEERING DESIGN I

INTRODUCTION TO L A TEX

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

Practical Mathematical Handwriting

Introduction to L A TEX

Square cells: an array cooking lesson

All Greek Women: All UGA: All Panhellenic: All NPHC: All Greek Men: 3.01

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

The Legacy Continues GREEK LETTERS AND EMBLEMS

APPM 2460 PLOTTING IN MATLAB

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

An Interactive Introduction to L A TEX

L A TEX Introduction. 1 Basic Resources: Melissa Desjarlais (amended by Dr. Dena Morton)

A Demonstration of the L A TEX 2ε Class File for the Oxford University Press Ltd Journal. First Author 1 and Second Author 2.

A Brief Introduction to L A TEX

Quick Start with CASSY Lab. Bi-05-05

Measurement and Geometry (M&G3)

Introduction to L A TEX

LaTeX A Tutorial. Mohsen Alimomeni, 2010

Style template and guidelines for SPIE Proceedings

PCL Greek-8 - Code Page 869

ISO 31 conforming typesetting in L A TEX

My LaTeX Document. July 7, Introduction 2

LATEX Seminar Week 2 Jonathan Blair & Evan Ott. Document classes, basic math formatting, basic pictures, tables and matrices

file:///export/home/apostolo/work/tex/mkindex/mkgrki...

Rotating Text, Tabulars and Images. Herbert Voß March 3, 2007

L A TEX Document Formatting Examples

Excellence in Community Service & Philanthropy

Latex Tutorial. CIS400 Senior Design 9/5/2013

Typing Math: Symbols and Graphing

Version List of tables Tbl. 5.1 Additional fonts... 5 Tbl Types of index entries... 10

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

F08: Intro to Composition

MITOCW watch?v=kz7jjltq9r4

INTRODUCTION TO L A TEX WHAT IS L A TEX?

The tensor package for L A TEX2e

Getting Started Guide Chapter 9 Getting Started with Math

Typing Math: Symbols and Graphing

Creating Tables and Figures with L A T E X

Math typesetting guide

Palatino. Palatino. Linotype. Palatino. Linotype. Linotype. Palatino. Linotype. Palatino. Linotype. Palatino. Linotype

T E X and L A T E X For the Uninitiated

CSE 150: Notation Examples

Transcription:

Semantics Doug Arnold (L A TEX for Linguists) September 25, 2007 1 Introduction TEX and L A TEX are very good at typesetting logic so typesetting most bits of semantics is very easy, just using the things you see described in the L A TEX book (Actually, the point to note is not just that they are good, but that they are almost certainly better than you take what you are given unless you have a real problem) One small problem is that logical symbols and formulae generally require maths mode, where every letter is treated as a separate mathematical symbol This is not a problem for logicians, who mostly use single letters for predicate names, eg P(x) but linguistics often need words, as in (1), and this can look clumsy unless special care is taken xwalk (x) Unicorn (x) For example, giving (2) as the characteristic function of the set of things that are different from Sam does not look very good, because the spacing (or rather, lack of ligature) between the fs The solution is to use one of the maths type styles, eg \mathit Compare (3): $\lambda x Different\_from(x,Sam)$ λxdifferent from(x,sam) $\lambda x \mathit{different\_from(x,\mathit{sam)$ λxdifferent from(x, Sam) If this looks like a lot of typing, the obvious thing is to define commands: \newcommand{\different{\mathit{different\_from \newcommand{\sam {\mathit{sam Other than this, there are very few problems However, two problems I do know about are: there is no built in command for the evaluation function eg [[]] M,g drawing Discourse Representation Structures Before I go through these, here are a two other commands I find generally useful: \setof for putting curly brackets round elements of a set, and \tuple for putting angle brackets around a tuple: \setof{a,b,c which produces {a, b, c \setof{x : walk (x) which produces {x : walk (x) \tuple{a,b,c which produces a, b, c 1

They are defined simply enough to work both inside and outside maths mode, by: \newcommand{\setof[1]{\ensuremath{\left \{ #1 \right \ \newcommand{\tuple[1]{\ensuremath{\left \langle #1 \right \rangle Here for reference are most the symbols that are generally needed: \neg & \& \equiv \rightarrow \Rightarrow \vee \wedge \exists \forall \vdash = \models \in \times \cup \cap \subset \subseteq \supset \supseteq The Greek letters mostly go by their usual names, eg α \alpha β \beta γ \gamma ǫ \epsilon λ \lambda π \pi ρ \rho σ \sigma τ \tau ψ \psi φ \phi ω \omega To get the following, you need to load the latexsym package: \Box \Diamond \leadsto 2 Denotation/Evaluation Function Basic L A TEX does not provide a command for the semantic evaluation/denotation function: [[walks]] M,g,t However, it is provided by the stmaryrd package; alternatively, it is easy to roll your own 21 The stmaryrd package James A Crippen james@unlambdacom points out that the semantic evaluation brackets are part of the stmaryrd St Mary s Road symbol font To get them, put \usepackage{stmaryrd in the preamble: In this package, the brackets are known as \llbracket and \rrbracket For example: 2

\llbracket (MN)\rrbracket^{\mathcal{M produces: (MN) M For the evaluation function itself, one can define an appropriate macro: \newcommand{\evaluation[2][]{\ensuremath{\llbracket #2\rrbracket^{#1 This takes two arguments, the first optional, puts the second inside the evaluation function, and superscripts the other outside This makes typing the above much simpler, just put: \evaluation[\mathcal{m]{(mn) 22 Rolling your own definition It is easy enough to roll your own definition \newcommand{\sem[2][m\!,g]{\mbox{ $[\![ #2 ]\!]^{#1$ Some examples: \sem{walks produces [[walks]] M,g \sem[m,g]{walks produces [[walks]] M,g \sem[m,g,t]{walks produces [[walks]] M,g,t The purpose of the \! in the definition is to bring the square brackets close together so they look like one character This looks good with small objects, if you want larger ones it is probably better to make them using something like: \left [\!\!\left [ \right ]\!\!\right ]^{M,g 3 Discourse Representation Structures Discourse Representation Structures (DRSs) are extremely easy to produce, but they provide a not uninteresting exercise (They are also provided by Covington s package) Formally, a DRS is a pair < U,C >, with U a universe (set of discourse variables), and C as set of conditions So it is naturally to think a command \Drs should have two arguments \newcommand{\drs[2]{ #1 #2 Graphically/pictorially, DRSs are boxes, with a line separating the universe from the conditions One of the easiest ways to draw a box in L A TEX is as a tabular or array environment Since DRSs are may often contain logical symbols, 3

and for typographical consistency with other logical expressions (which will be set in maths mode), we may as well use an array and maths mode: 1 \( \begin{array{ c Universe \\ Conditions\\ \end{array \) There can be a lot of discourse variables, and conditions, and you probably want them centered, one simple way of doing this is to put them in array (or tabular) environments \newcommand{\drs[2]{%%%%%%%%%%%%%%%%%%%%%%%%% \( % begin maths mode \begin{array{ c % % top line \begin{array{c % #1 % Universe \end{array \\ % end the universe part % line between Universe and Conditions \begin{array{c % #2 % the conditions \end{array \\ % end the conditions part % bottom line \end{array % \) % end maths mode %%%%%%%%%%%%%%%%%%%%%%%%% Now, we can say: \Drs{u,v{ \mathit{man(u) \\ \mathit{unicorn(u) \\ \mathit{seeks(u,v) \\ to produce: u,v man(u) unicorn(u) seeks(u, v) 1 A disadvantage is that words will be treated as collections of separate mathematical symbols, unless we make them arguments of \mathit commands, and whitespace will be ignored Covington uses a tabular environment, and solves the typographical consistency problem by making everything italic (this is not quite the same as the normal maths mode font, but it is near enough for most purposes) 4

In their book Kamp and Reyle (1993), Kamp and Reyle draw DRSs like the following: x y farmer(x) donkey(y) x owns y every x u u = y x beats u There is no easy way to make the diamond shape containing every in ordinary L A TEX However, it is easy using the pstricks package The \psframebox command draws a frame around its argument, the \psdiabox draws a diamond round its argument The contents on the DRSs can be set in tabular environments (or arrays, but Kamp and Reyle s are set in ordinary Roman text) Here is one way to obtain the previous picture: \usepackage{pstricks \begin{tabular{c x y\\ farmer(x)\\ donkey(y)\\ x owns y \end{tabular \psdiabox{ \begin{tabular{c every\\x \end{tabular \begin{tabular{c u\\ u = y\\ x beats u \end{tabular The size of the diamond can be reduced by giving an optional argument: \psdiabox[framesep=-3pt]{ See Goossens et al (1997) (Ch4, circa page 107) for more information References Goossens, Michel, Rahtz, Sebastian and Mittelbach, Frank 1997 The L A TEXGraphics Companion Addison Wesley, new york edition Kamp, H and Reyle, U 1993 From Discourse to Logic Dordrecht: Kluwer Academic Publishers 5