Debian Codegraph @

texmf-dist/doc/latex/ling-macros/ling-macros-doc.tex

raw
1 %%%%
2 %%%
3 %%
4 % DOCUMENTATION FOR THE ling-macros PACKAGE
5 % by ANDREW MCKENZIE ([email protected])
6 % Version 2.2
7 % 2016-10-12
8 %
9 % %% not to be confused with lingmacros.sty, a part of tree-dvips.sty
10 %%
11 %%% Thanks to Lydia Newkirk for the name suggestion.
12 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13 %%%%
14 %%%%%% %% ling-macros-doc.tex
15 %% Copyright 2016 Andrew McKenzie ([email protected])
16 %
17 % This work may be distributed and/or modified under the
18 % conditions of the LaTeX Project Public License, either version 1.3
19 % of this license or (at your option) any later version.
20 % The latest version of this license is in
21 % http://www.latex-project.org/lppl.txt
22 % and version 1.3 or later is part of all distributions of LaTeX
23 % version 2005/12/01 or later.
24 %
25 % This work has the LPPL maintenance status `maintained'.
26 %
27 % The Current Maintainer of this work is Andrew McKenzie.
28 %
29 % This work consists of the files ling-macros.sty and ling-macros-doc.tex
30
31
32 \documentclass{article}
33
34 \usepackage{tipa} % phonetic alphabet package
35 \usepackage{xcolor}
36 \usepackage{parskip}
37 \definecolor{KUBlue}{RGB}{0,34,180} % Kansas University Blue
38 \definecolor{KUCrimson}{RGB}{232,0,13} % Crimson (Rock Chalk!)
39 \usepackage[colorlinks=true,urlcolor=KUBlue]{hyperref}
40 \usepackage{array}
41 \usepackage[]{ling-macros} % uses the ling-macros package
42
43 \newcommand{\structure}{\color{KUBlue}} % highlighting
44 \newcommand{\cbl}{{\color{green!60!black}{\{}}} % green left curly braces
45 \newcommand{\cbr}{{\color{green!60!black}{\}}}} % green right curly braces
46 \newcommand{\mathbit}[1]{{\color{green!60!black}{\$}}#1{\color{green!60!black}{\$}}} % for typing things between math mode delimiters
47 \newcommand{\comm}[2]{{\rmfamily{\structure{$\backslash$#1}}\cbl#2\cbr}} % for typing commands. first arg is command, second is argument
48 \newcommand{\comopt}[3]{{\rmfamily{\structure{$\backslash$#1}}[#2]\cbl#3\cbr}} % for typing commands. first arg is command, second is argument
49 \newcommand{\decla}[1]{{\rmfamily{\structure{$\backslash$#1}}}} %for typing declarations
50 \newcommand{\lat}[1]{{\color{KUBlue}\bfseries\ttfamily #1}} % for typing names of LaTeX objects
51
52
53 \title{The \lat{ling-macros} package \\ \Large Version 2.2}
54 \author{Andrew McKenzie \\ \href{mailto:[email protected]}{[email protected]} \\ \href{http://people.ku.edu/~a326m085}{http://people.ku.edu/$\sim$a326m085}
55 }
56 \date{October 12, 2016}
57
58 \begin{document}
59 \newcommand{\commb}[1]{\comm{#1}{\ldots}}
60
61 \maketitle
62
63 \setcounter{tocdepth}{2}
64 \tableofcontents
65
66 \section{About \texttt{ling-macros}}
67
68 The \lat{ling-macros} package is designed to allow easier use of formal symbols used in formal linguistics, especially in formal linguistics. The set arose from the macros that I have been using over the years for papers and class handouts. Suggestions and additions are welcome. Note: This is not the same package as \lat{ling{}macros}, which is part of \lat{tree-dvips}.
69
70 To call the package, type \comm{usepackage}{ling-macros} in the preamble of your document. The package has the following options:
71
72 \begin{tabular}{>{\bfseries\ttfamily}l p{3in}}
73 text-semantics & typesets formal semantic expressions in upright fashion rather than italicized or math fashion\\
74 shortspace & removes space before, after, and between examples in \lat{exe} environment (see sect.\ \ref{gbr3}) \\
75 leftflush & pulls examples to the left edge in \lat{exe} environment (see sect.\ \ref{gbr3}) \\
76 abstract & combines {\bfseries\ttfamily shortspace} and {\bfseries\ttfamily leftflush}; useful for abstracts (see sect.\ \ref{gbr3}) \\
77 \end{tabular}
78
79 The \lat{ling-macros} package calls for the following packages: \lat{stmaryrd}, \lat{ulem}, \lat{amssymb}, \lat{upgreek}, \lat{gb4e}, \lat{relsize}, and \lat{pbox}. Also included are call commands for phonetic writing (\lat{tipa}) and tree structures (\lat{qtree}), but they are commented out to prevent option clashes (look for {\color{red}\%$\backslash${RequirePackage}\{qtree\}}, etc., if you want to turn them on for your version).
80
81 Using \lat{ling-macros} is pretty straightforward, since it is just a series of macros. The macros are organized by module of the grammar.
82
83
84
85 \section{General linguistics}
86
87 \subsection{Ordinary macros}
88 The following macros are used pretty generally throughout the subfields.
89
90 \begin{tabular}{>{\bfseries}l p{2in} l c }
91 \mdseries command & purpose & in source file & in print \\\hline
92 \decla{nl} & null symbol & \decla{nl} & \nl \\[3pt]
93 \comm{m}{\ldots} & small caps for morpheme gloss & \comm{m}{acc.pl} & \m{acc.pl} \\
94 \comm{mc}{\ldots} & small caps for morpheme gloss & \comm{mc}{acc.pl} & \m{acc.pl} \\
95 \decla{mb} & wider hyphen for morpheme breaks (can be changed globally) & ant\decla{mb} s & ant\mb s \\
96 \commb{ol} & object language text & \comm{ol}{clermontois} & \ol{clermontois} \\
97 \commb{alert} & highlights parts of examples & work\comm{alert}{horse} & work\alert{horse} \\
98 \commb{term} & highlights terminology being introduced & \comm{term}{causative} & \term{causative} \\
99 \\
100 \comm{ix}{\ldots} & subscript index (upright text with \lat{text-semantics} option) & Bill\comm{ix}{j}, x\comm{ix}{cat} & Bill\ix{j}, x\ix{cat} \\[3pt]
101 \comm{ux}{\ldots} & subscript index with upright text (no matter what) & Bill\comm{ux}{j}, x\comm{ux}{cat} & Bill\ux{j}, x\ux{cat} \\[3pt]
102 \comm{superx}{\ldots} & superscript index with upright text & x\comm{superx}{3}, y\comm{superx}{i} & x\superx{3}, y\superx{i} \\
103
104 \hline\end{tabular}
105
106 The \textbf{\commb{alert}} command is compatible with the \lat{beamer} class. It puts highlighted text in boldface. This can be changed with \lat{renewcommand}.
107
108 The \textbf{\decla{nl}} declaration requires the \lat{amssymb} package. (\decla{null} is already used by \TeX\ for empty boxes, so it's best not to replace it).
109
110 The \textbf{\commb{ol}} command is for object language text. It is currently set to italics, but you can change that globally or locally with a \decla{renewcommand} command.
111
112 The \textbf{\comm{m}{\ldots}} command sets grammatical morphemes (m) in \textsc{small caps}. This is helpful in glosses, notably using \lat{gb4e}, since it makes the source easier to read. Also, if you need to change the morphemes' typesetting globally, a simple \decla{renewcommand} of \decla{m} will suffice.
113
114 However, if you use the \lat{fontspec} package for Xe\LaTeX , beware, for it employs \decla{m} for various diacritics. So you can comment it out and use \commb{mc} for morpheme caps instead. Also, \comm{usepackage}{ling-macros} must be placed in your preamble after \comm{usepackage}{fontspec}.
115
116 \subsection{Macros for \lat{gb4e} environment}\label{gbr3}
117
118 The following declarations make the use of the \lat{gb4e} more streamlined and allow for easy tweaking of example alignment.
119
120 \begin{tabular}{>{\bfseries}l l l c}
121 \mdseries declaration & command it replaces & purpose & name origin\\\hline
122 \decla{bex} & \comm{begin}{exe} & begin example environment & begin exe \\
123 \decla{fex} & \comm{end}{exe} & end example environment & finish exe \\
124 \\
125 \decla{bxl} & \comm{begin}{xlist} & begin example subenvironment & begin xlist \\
126 \decla{fxl} & \comm{end}{xlist} & end example subenvironment & finish xlist \\
127
128 \end{tabular}
129
130 These declarations also define a number of variable widths that can be used to reformat the example environments. The reformatting is done globally by setting the package options \lat{leftflush}, \lat{shortspace}, or \lat{abstract}.
131
132 \textbf{Warning:} The package options do not reformat \lat{exe} environments unless you use the \decla{bex} and \decla{bxl} declarations. Otherwise, one would need to adjust the \lat{gb4e} package itself.
133
134 The \lat{leftflush} option puts example numbers to the left, but numbers 1-9 are not all the way to the left. To force them to be, place the declaration \decla{lessthanten} in the document before the first example. This will place examples 10 and above too far left, so use the declaration \decla{tenormore} to undo this effect.
135
136 While we're at it, here is a similar list of abbreviations for ordinary list environments.
137
138 \begin{tabular}{>{\bfseries}l l l c}
139 \mdseries declaration & command it replaces & purpose & name origin\\\hline
140 \decla{ben} & \comm{begin}{enumerate} & begin enumerate environment & begin enumerate \\
141 \decla{fen} & \comm{end}{enumerate} & end enumerate environment & finish enumerate \\
142 \\
143 \decla{bit} & \comm{begin}{itemize} & begin itemize environment & begin itemize \\
144 \decla{fit} & \comm{end}{itemize} & end itemize environment & finish itemize \\
145
146 \end{tabular}
147
148
149 \subsection{The \lat{context} environment}
150
151 The \lat{context} environment typesets the context used to elicit or set-up an example. The typesetting can be changed globally.
152
153 \begin{context}
154 Denny arrived at the restaurant, and sat at an empty table. The moment he did so, a waiter approached and asked him:
155 \end{context}
156
157 \bex \ex[\#]{Would you like some more water?}
158 \fex
159
160 \comm{begin}{context} \\
161 Denny arrived at the restaurant, and sat at an empty table. The moment he did so, a waiter approached and asked him: \\
162 \comm{end}{context}
163
164 \decla{bex} \comopt{ex}{\decla{\#}}{Would you like some water?} \decla{fex}
165
166
167 \section{Phonology}
168
169 OT Tableaux can be made with a number of packages, each with their own macros for symbols. To write phonological rules, however, you can use the following macros to simplify things.
170
171 \begin{tabular}{>{\bfseries}l l l c }
172 \mdseries command & purpose & source & in print \\\hline
173 \commb{underlying} & the input to the rule & \comm{underlying}{+back} & \underlying{+back} \\
174 \decla{becomes} & the arrow & \decla{becomes} & \becomes \\
175 \commb{spoken} & the output & \comm{spoken}{--back} & \spoken{--back} \\
176 \decla{environ} & `in the environment of' slash & \decla{environ} & \environ \\
177 \decla{spot} & the exact spot of the change & \decla{spot} &\spot \\
178 \decla{syll} & syllable subscript & [\decla{syll} ~~~ ]\decla{syll} & [\syll ~~~ ]\syll \\\hline
179 \decla{fmleft} & feature matrix left bracket & \decla{fmleft} & \\
180 \decla{fmright} & feature matrix right bracket & \decla{fmright} & \\
181 \comm{fmat}{\ldots}\cbl \ldots\cbr & feature matrix line & \parbox[c]{1.1in}{\comm{fmat}{+}\cbl{coronal}\cbr \\\comm{fmat}{-}\cbl{voiced}\cbr } & \fmleft \fmat{+}{coronal}\fmat{-}{voiced}\fmright \\
182 \end{tabular}
183
184 Combined, these get a source code like this, for a rule fronting a back vowel between /i/ and any consonant:
185
186 \comm{underlying}{+back} \decla{becomes} \comm{spoken}{--back} \decla{environ} i\decla{spot} C
187
188 The commands \decla{prule} and \decla{iparule} are macros combining the above macros.
189
190 About the \comm{prule}{\ldots}\cbl \ldots\cbr\cbl \ldots\cbr\ command: The first command is the underlying form, the second the spoken form, and the third the environment. The \comm{iparule}{\ldots}\cbl \ldots\cbr\cbl \ldots\cbr\ does the same, but puts everything in the rule in IPA. The \decla{iparule} command requires the \lat{tipa} package, which you probably already use if you're typesetting phonology.
191
192
193 \hspace*{2em}\comm{prule}{+back}\cbl --back\cbr\cbl i\decla{spot} C\cbr \hspace{1cm} \prule{+back}{--back}{i\spot C} \\
194 \hspace*{2em}\comm{iparule}{2}\cbl E\cbr\cbl i\decla{spot} \decla{*}C\cbr \hspace{1.8cm} \iparule{2}{E}{i\spot \*C} \\
195
196
197 The \comm{fmat}{\ldots}\cbl \ldots\cbr command is for feature matrices. Use \decla{fmleft} and \decla{fmright} for each bracket, and for each line in the feature matrix, use \comm{fmat} with its two arguments. The first argument will be $+/-$, and the second will be the feature name.
198
199 You can put feature matrices inside a phonological rule command as well.
200
201
202 \section{Syntax}
203
204 For syntax trees, a tree package like \lat{qtree}, \lat{tikz-qtree}, or \lat{parsetree} suffices. The following macros allow quick and regular typing of some common syntactic symbols, in better looking ways than are offered by ordinary distributions and packages.
205
206 \hspace*{-1cm}\begin{tabular}{>{\bfseries}l l l c }
207 \mdseries command & purpose & source & in print \\\hline
208 \commb{head} & the head circle & \comm{head}{V} & \head{V} \\
209 \commb{xbar} & the bar in X-bar & \comm{xbar}{Asp} & \xbar{Asp}~ \\
210 \decla{lv} & little v & \decla{lv} & \lv ~~\\
211 \commb{feat} & syntactic feature in trees & \comm{feat}{fem} & \feat{{fem}} \\
212 \commb{textfeat} & syntactic feature in text & \comm{textfeat}{fem} & \textfeat{{fem}} \\
213 \commb{dcopy} & deleted copy (strike-out)\footnotemark & \comm{dcopy}{the car} & \dcopy{the car} \\
214 \commb{mroot} & morpheme root & \comm{mroot}{car} & \mroot{car} \\
215 \commb{ufeat} & unvalued/uninterpretable feature in trees & \comm{ufeat}{T} & \ufeat{T} \\
216 \commb{unv} & unvalued/uninterpretable feature & \comm{feat}{\comm{unv}{T}} & \ufeat{T} \\
217 \end{tabular}\footnotetext{Requires the \lat{ulem} package}
218
219 The \decla{unv} command should be used inside a \decla{feat} or \decla{textfeat} command, but of course doesn't have to be. If you want to use an upright $\phi$ symbol ($\upphi$), use the \decla{upphi} declaration in math mode.
220
221 Use the \comm{featuresize}{$\langle$size$\rangle$} command to adjust the size of features in \commb{feat}.
222
223 The \commb{xbar} command places a bar over the entire head name. For a prime symbol instead, you can use use the \decla{pri} declaration.
224
225 For bracket subscript labels, you can use the \comm{ix}{\ldots} or \comm{ux}{\ldots} commands.
226
227 \begin{center}
228 \cbl [\cbr\comm{ux}{TP} \comm{head}{T} [\comm{ux}{VP} \comm{head}{V} [\comm{ux}{DP} \head{D} ] ] ] \\
229 {[}\ux{TP} \head{T} [\ux{VP} \head{V} [\ux{DP} \head{D} ] ] ]
230 \end{center}
231
232
233
234 \section{Semantics}
235
236 Formal semantics uses math mode more clearly than most areas of linguistics. You can use the \commb{form} command to put anything into math mode.
237 More recently, semanticists have been writing formulas in text, with mathematical symbols. Using the \lat{text-semantics} option will convert these formulas from math mode to text mode. Some symbols you will want to stay in math mode. Putting them between \mathbit{\ldots} often creates errors. Instead, the \commb{ensuremath} command will protect them. For short, you can use the \commb{f} command for any symbol you want to remain in math mode even as \commb{form} is redefined as text mode.
238
239 Along with formal expressions, the \commb{readas} command is used with denotations to write formal expressions out in metalanguage.
240
241 \denol{every car} = \form{\lamd{Q}{et}.~ \all{y}[~ car(y) = 1 \to Q(y) = 1~]} \\
242 \readas{the function from properties of entities to truth values such that for all \form{y}, if \form{y} is a car, then \form{Q(y) = 1}
243 }
244
245
246 \subsection{Operators and Symbols}
247
248 Operators all require math mode, and putting them in math mode makes source documents hard to read. These macros simplify the writing of common operators, and make the source code more intuitive to read.
249
250 \hspace*{-2em}\begin{tabular}{>{\bfseries}l l l c }
251 \mdseries command & purpose & source & in print \\\hline
252 \comm{lam}{{\small\itshape variable}} & lambda operator & \comm{lam}{x} & \lam{x} \\
253 \comm{lamd}{{\small\itshape var.}}\cbl {\small\itshape type}\cbr & lambda operator with domain D\ix{type} & \comm{lam}{P}\cbl s,t\cbr & \lamd{P}{s,t}\\
254 \comm{all}{{\small\itshape var.}} & universal quantifier & \comm{all}{x} & \all{x} \\
255 \comm{some}{{\small\itshape var.}} & existential quantifier & \comm{some}{x} & \some{x} \\
256 \comm{no}{{\small\itshape var.}} & negative quantifier & \comm{no}{x} & \no{x} \\
257 \comm{ddet}{{\small\itshape var.}} & iota-operator (definite determiner) & \comm{ddet}{x} & \ddet{x}\\
258 \decla{pri} & prime symbol in text or math mode & x\decla{pri} & x\pri \\
259 \end{tabular}
260 %\EX
261
262
263
264 \subsection{Semantic types}
265
266 The \commb{type} command is used for writing semantic types. It places its argument in ordered pair brackets, in math mode. It can be used inside the arguments of another \decla{type} command to get complex types.
267
268 \begin{tabular}{l l}
269 \comm{type}{e,t} & \type{e,t} \\
270 \comm{type}{e,\comm{type}{s,t}} & \type{e,\type{s,t}} \\
271 \comm{type}{\comm{type}{e,t},\comm{type}{\comm{type}{e,t},t}} & \type{\type{e,t},\type{\type{e,t},t}} \\
272 \end{tabular}
273
274 Since \decla{type} places its arguments in math mode, it can be used for ordinary ordered pairs as well. For simple types, which don't require ordered pair brackets, simply place the type in math mode: \mathbit{e}, \mathbit{t} $\Rightarrow$ $e$, $t$
275
276 The \lat{text-semantics} option will not put types in text mode. If you really want semantic types with upright letters, use the \commb{uptype} command wherever you'd use \commb{type}.
277
278 \subsection{Sets}
279
280 The \commb{set} and \commb{varset} commands are used to write sets. The \decla{set} command is purely for making the source code more intuitive, since \decla{\{} is not exactly hard to type. The \decla{varset} command (`variable set') writes an abstracted set. \decla{varset} uses a vertical line for `such that'. For the older colon notation, use the \decla{cvarset} command.
281
282 \begin{tabular}{l l}
283 \comm{set}{a, b, c, d} & \set{a, b, c, d} \\
284 \comm{varset}{x \comm{f}{\decla{in}} D}\cbl x is happy\cbr & \varset{x \in D }{x ~is ~happy} \\
285 \comm{cvarset}{x}\cbl x is happy\cbr & \cvarset{x}{x ~is ~happy} \\
286 \end{tabular}
287
288 %Under the \lat{text-semantics} option:
289 %
290 %\begin{tabular}{l l}
291 % \comm{set}{a, b, c, d} & {\{ {a, b, c, d} \}} \\
292 %\comm{varset}{x \mathbit{\decla{in}} D}\cbl x is happy\cbr & \{ {x $\in$ D} $|$ {x is happy} \} \\
293 %\comm{cvarset}{x}\cbl x is happy\cbr & \{ {x} $:$ {x is happy} \} \\
294 %\end{tabular}
295
296 \subsection{Functions}
297
298 Use the command \commb{funcnot}\cbl \ldots \cbr\cbl \ldots \cbr\cbl \ldots \cbr\cbl \ldots \cbr , which allows quick writing of functions in an explicit functional notation (hence the name). The first argument is the variable representing the function; the second is the domain of the function, the third is the range, the fourth is the argument variable, and the fifth are the truth conditions.
299
300 %\begin{minipage}{.45\textwidth}
301 \comm{funcnot}{f}{\cbl D\cbr}{\cbl R\cbr}\cbl y\cbr\cbl 1 iff \comm{form}{y} is a bandit\cbr \\
302
303 \parbox[t]{2in}{With no options : } \funcnot{f}{D}{R}{y}{1 iff \form{y} is a bandit}
304
305 \parbox[t]{2in}{With \lat{text-semantics} option : } { \renewcommand{\funcnot}[5]{%
306 {#1} : \pbox[t]{2.0\textwidth}{% 1 the function
307 {#2} {\ensuremath{\to}} #3 \\% the buffoon % the domain
308 \all{}{#4} \ensuremath{\in} #2, {#1(#4) =} #5% %object of domain
309 }%
310 }%%
311 \funcnot{f}{D}{R}{y}{1 iff {y} is a bandit}
312 }
313
314 Functions can be embedded in others by putting the second function in the truth-conditions of the first
315
316 \comm{funcnot}{f}{\cbl D\comm{ix}{e}\cbr}{\cbl D\comm{ix}{et}\cbr}\cbl x\cbr\cbl{\color{red}\%} \\
317 \comm{funcnot}{g}{\cbl D\comm{ix}{e}\cbr}{\cbl D\comm{ix}{t}\cbr}\cbl y\cbr\cbl 1 iff \comm{form}{y} is tall\cbr{\color{red}\%} \\
318 \cbr{\color{red}\%}
319
320 \funcnot{f}%FUNCTION
321 {D\ix{e}}%DOMAIN
322 {D\ix{et}}%RANGE
323 {x}%VARIABLE
324 {\funcnot{g}%FUNCTION'
325 {D\ix{e}}%DOMAIN'
326 {D\ix{t}}%RANGE'
327 {y}%VARIABLE'
328 {1 iff \form{y} is tall}%TRUTH-CONDITIONS'
329 }%TRUTH-CONDITIONS
330
331
332
333
334 To write a function in array format requires math mode and the array environment. This is inconvenient, so the following macros simplify this.
335
336 \begin{enumerate} \item The \decla{fleft} (function left) declaration gives the left bracket.
337 \item The \comm{func}{\ol{domain}}\cbl \ol{range}\cbr\ command is used for each line of the function.
338 \item The \decla{fright} (function right) declaration gives the right bracket.
339 \end{enumerate}
340
341 To write the function \set{\uptype{a,1},\uptype{b,2}}:
342
343 \begin{minipage}{.45\textwidth}
344
345 \decla{fleft}{\color{KUCrimson}\%} \\
346 \comm{func}{a}\cbl 1\cbr{\color{KUCrimson}\%} \\
347 \comm{func}{b}\cbl 2\cbr{\color{KUCrimson}\%} \\
348 \decla{fright}{\color{KUCrimson}\%}
349 \end{minipage}
350 \begin{minipage}{.45\textwidth}
351 \fleft
352 \func{a}{1}
353 \func{b}{2}
354 \fright
355 \end{minipage}
356
357 These macros can be used recursively.
358
359 \begin{minipage}{.45\textwidth}
360 \decla{fleft}{\color{KUCrimson}\%} \\
361 \comm{func}{a}\cbl{\color{KUCrimson}\% range of a} \\
362 \decla{fleft}~\comm{func}{c}\cbl 1\cbr {\color{KUCrimson}\%} \\
363 \hspace*{6ex}\comm{func}{d}\cbl 2\cbr{\color{KUCrimson}\%} \\
364 \decla{fright}\cbr {\color{KUCrimson}\% end of range of a} \\
365 \decla{fright}{\color{KUCrimson}\%}
366 \end{minipage}
367 \begin{minipage}{.45\textwidth}
368 \fleft
369 \func{a}{
370 \fleft\func{c}{1}
371 \func{d}{2}
372 \fright}
373
374 \fright
375 \end{minipage}
376
377
378 \subsection{Scope brackets with \decla{scopebox}}
379
380 The \commb{scopebox} command places brackets ([ ]) around an expression to signal its scope. This command allows the use of multi-line scope brackets, to make things easier to read. If you put more than one scope box inside the largest one, you should use \commb{innerscopebox} for the inside ones.
381
382 Compare the following formulas, with simple brackets, and then with \commb{scopebox}.
383
384 \form{\all{x}[ ~dog(x) \&\ on(\textrm{the car})(x) \f{\to} \some{y}[ ~cat(y) ~\&\ \some{e}[ \textsc{perfective}(e) ~\&\ chase(x)(y)(e) ] ] ] }
385
386 \form{\all{\textrm{x}}\scopebox{dog(x) \&\ on(the car)(x) \f{\to} ~~~~~~~~\\
387 \some{\textrm{y}}\innerscopebox{cat(y) \&\ \\
388 \some{e}\innerscopebox{ \m{perf}(e) \&\ chase(x)(y)(e) } }}}
389
390
391
392 Note: These commands force their expression to be in text mode, because they rely on \commb{pbox}, which is part of the \lat{pbox} package. \\
393 Note 2: Sometimes you may need to add spaces to the outside scopebox (with \raisebox{-3pt}{\~{}} ) to make sure it's the widest.
394
395 \subsection{Denotation brackets}
396
397
398 Several commands involve double brackets for denotations (or interpretation functions). These all require the \lat{stmaryrd} package, which is called by the \lat{ling-macros} package.
399
400 Many commands involve assignment modifications. These modifications are already in math mode, so any use of {\color{green!60!black}{\$}} in them will lead to an error. If you need to use math mode inside these, use \comm{ensuremath}{\ldots} or \comm{f}{\ldots}.
401
402 \hspace*{-5em}\begin{tabular}{>{\bfseries}l l l c}
403 \mdseries command & purpose & source & in print \\[2pt]\hline
404 \commb{den} & denotation brackets & \comm{den}{car} & \hspace{-1.1ex}\den{car} \\% & req. \lat{stmaryrd} pkg. \\
405 \commb{dena}\cbl\ldots \cbr & denotation w/ assignment & \comm{dena}{car}\cbl g\cbr & \dena{car}{g} \\%
406 \commb{denac}\cbl\ldots \cbr & d.b. w/ asst., context c & \comm{denac}{car}\cbl g\cbr & ~\denac{car}{g} \\%
407 \comm{denamod}{..}\cbl ..\cbr\cbl ..\cbr & {\small d.b. w/ modified assignment} & \comm{denamod}{car}\cbl g\cbr\cbl x\decla{to} 1\cbr & \denamod{car}{g}{x \ensuremath{\to} 1} \\ %
408 \comm{denacmod}{..}\cbl ..\cbr\cbl ..\cbr & {\small d.b. w/ modified asst, context c} & \comm{denacmod}{car}\cbl g\cbr\cbl x\decla{to} 1\cbr & \denacmod{car}{g}{x \ensuremath{\to} 1} \\%
409 \end{tabular}
410
411 \vspace{8pt}There is also a series of commands which are identical to those of the \decla{den} family, except that the text is already in the object language font (\decla{ol}). These commands declutter the source code. With \decla{ol} set to \decla{itshape}:
412
413 \hspace*{-5em}\begin{tabular}{>{\bfseries}l l l c}
414 \mdseries command & purpose & source & in print \\[2pt] \hline
415 \commb{denol} & denotation brackets & \comm{denol}{car} & \hspace{-1.1ex}\denol{car} \\% & req. \lat{stmaryrd} pkg. \\
416 \commb{denola}\cbl\ldots \cbr & denotation w/ assignment & \comm{denola}{car}\cbl g\cbr & \denola{car}{g} \\%
417 \commb{denolac}\cbl\ldots \cbr & d.b. w/ asst., context c & \comm{denolac}{car}\cbl g\cbr & ~\denolac{car}{g} \\%
418 \comm{denolamod}{..}\cbl ..\cbr\cbl ..\cbr & {\small d.b. w/ modified assignment} & \comm{denolamod}{car}\cbl g\cbr\cbl x\decla{to} 1\cbr & \denolamod{car}{g}{x \ensuremath{\to} 1} \\ %
419 \comm{denolacmod}{..}\cbl ..\cbr\cbl ..\cbr & {\small d.b. w/ modified asst, context c} & \comm{denolacmod}{car}\cbl g\cbr\cbl x\decla{to} 1\cbr & \denolacmod{car}{g}{x \ensuremath{\to} 1} \\%
420
421 \end{tabular}
422
423
424
425
426 \end{document}