-
Notifications
You must be signed in to change notification settings - Fork 1
/
sp.cls
691 lines (602 loc) · 24 KB
/
sp.cls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
% Semantics & Pragmatics style file.
% Kai von Fintel, Christopher Potts, and Chung-chieh Shan
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesClass{sp}[2015/01/04 v.3.0 Class for Semantics & Pragmatics]
%====================================================================
%===================== release notes ================================
% 2015-01-02: v3.0, include expex option and footnote exx formatting
%======================= Outline ====================================
%====================================================================
% OUTLINE OF THIS CLASS FILE
% option declarations
% required packages
% metadata
% page dimensions
% title
% running headers
% frontmatter
% sectioning
% footnotes
% bibliography
% backmatter
% other environments
% useful macros
%=====================================================================
%======================== option declarations ========================
% font selection
\newcount\@fontenum
% example-numbering packages
\newif\if@expex
\newif\if@linguex
% production settings
\newif\if@biblatex
\newif\if@final
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\newcommand{\@sizeoption@err}{\ClassError{sp}
{Cannot use size option \CurrentOption}
{The S&P style requires (and automatically loads) 12pt text}}
\DeclareOption{10pt}{\@sizeoption@err}
\DeclareOption{11pt}{\@sizeoption@err}
% mutually exclusive font selection
\DeclareOption{cm}{\@fontenum=0}
\DeclareOption{times}{\@fontenum=1}
\DeclareOption{lucida}{\@fontenum=2}
\DeclareOption{lucidaot}{\@fontenum=3}
% example-numbering packages
\DeclareOption{expex}{\@expextrue}
\DeclareOption{linguex}{\@linguextrue}
% production settings
\DeclareOption{biblatex}{\@biblatextrue}
\DeclareOption{final}{\@finaltrue}
\ExecuteOptions{times} % times is the default.
\ProcessOptions\relax
\LoadClass[12pt,twoside]{article}
% amsmath must be loaded before unicode-math; might as well load it here
\RequirePackage[leqno,tbtags]{amsmath}
\RequirePackage{ifxetex}
% if 1) lucida is requested, and 2) lucimatx can't be found, and 3) we're using XeTeX,
% fall back to lucidaot with a warning
\ifnum \@fontenum = 2
\IfFileExists{lucimatx.sty}{}{
\ifxetex
\ClassWarning{sp.cls}{Lucida requested but cannot find font; trying LucidaOT}
\@fontenum=3
\fi
}
\fi
% Load fonts as indicated by \@fontenum setting.
\ifcase \@fontenum % 0 = cm
% Computer Modern is the standard font; do nothing
\or % 1 = times
\RequirePackage[T1]{fontenc}
\RequirePackage{mathptmx}
\or % 2 = lucida
\RequirePackage[romanfamily=bright-osf,scale=0.9,stdmathdigits=true]{lucimatx}
\let\llbracket\ldbrack
\let\rrbracket\rdbrack
\DeclareTextCommand{\textbullet}{\encodingdefault}{\UseTextSymbol{OMS}\textbullet} % the default is tiny
\DeclareMathSymbol{\nLeftrightarrow}{\mathrel}{arrows}{105} % the default, 103, is too short
\or % 3 = lucidaot
\RequirePackage{fontspec}
\RequirePackage{unicode-math}
\defaultfontfeatures{Ligatures=TeX,Scale=0.9}
% load Lucida font files from local directory if possible
% three cases: (i) found in texmf tree, (ii) found in local `./fonts`
% subfolder, (iii) found in system (macOS, in particular)
\IfFontExistsTF{LucidaBrightOT.otf}{%
% Case (i): found by `IfFontExistsTF` in texmf tree
\ClassInfo{sp.cls}{Loading LucidaOT files from texmf tree}
\defaultfontfeatures+{Extension=.otf}
% pre-configure the fonts for loading via their canonical / system name
% by specifying the filenames for each Upright/Bold/Italic/BoldItalic variant
\defaultfontfeatures[Lucida Bright OT]{
UprightFont=LucidaBrightOT,
BoldFont=LucidaBrightOT-Demi,
ItalicFont=LucidaBrightOT-Italic,
BoldItalicFont=LucidaBrightOT-DemiItalic}
\defaultfontfeatures[Lucida Sans OT]{
UprightFont=LucidaSansOT,
BoldFont=LucidaSansOT-Demi,
ItalicFont=LucidaSansOT-Italic,
BoldItalicFont=LucidaSansOT-DemiItalic}
\defaultfontfeatures[Lucida Sans Typewriter OT]{
UprightFont=LucidaSansTypewriterOT-Bold,
BoldFont=LucidaSansTypewriterOT-Bold,
ItalicFont=LucidaSansTypewriterOT-Oblique,
BoldItalicFont=LucidaSansTypewriterOT-BoldOblique}
\defaultfontfeatures[Lucida Console DK]{
UprightFont=LucidaConsoleDK,
BoldFont=LucidaConsoleDK-Bold,
ItalicFont=LucidaConsoleDK-Italic,
BoldItalicFont=LucidaConsoleDK-BoldItalic}
% there is no such pre-configuration implemented in unicode-math,
% so \setmathfont must be called distinctly in each branch
\setmathfont{LucidaBrightMathOT}
\setmathfont{LucidaBrightMathOT-Demi}[version=bold]
}{%
% moving on to cases (ii) and (iii)
\IfFileExists{./fonts/LucidaBrightOT.otf}{%
% Case (ii): file exists in local `./fonts` subfolder
\ClassInfo{sp.cls}{Loading LucidaOT files from local directory (./fonts/)}
\defaultfontfeatures+{Path=./fonts/,Extension=.otf}
% pre-configure the fonts for loading via their canonical / system name
% by specifying the filenames for each Upright/Bold/Italic/BoldItalic variant
\defaultfontfeatures[Lucida Bright OT]{
UprightFont=LucidaBrightOT,
BoldFont=LucidaBrightOT-Demi,
ItalicFont=LucidaBrightOT-Italic,
BoldItalicFont=LucidaBrightOT-DemiItalic}
\defaultfontfeatures[Lucida Sans OT]{
UprightFont=LucidaSansOT,
BoldFont=LucidaSansOT-Demi,
ItalicFont=LucidaSansOT-Italic,
BoldItalicFont=LucidaSansOT-DemiItalic}
\defaultfontfeatures[Lucida Sans Typewriter OT]{
UprightFont=LucidaSansTypewriterOT-Bold,
BoldFont=LucidaSansTypewriterOT-Bold,
ItalicFont=LucidaSansTypewriterOT-Oblique,
BoldItalicFont=LucidaSansTypewriterOT-BoldOblique}
\defaultfontfeatures[Lucida Console DK]{
UprightFont=LucidaConsoleDK,
BoldFont=LucidaConsoleDK-Bold,
ItalicFont=LucidaConsoleDK-Italic,
BoldItalicFont=LucidaConsoleDK-BoldItalic}
% there is no such pre-configuration implemented in unicode-math,
% so \setmathfont must be called distinctly in each branch
\setmathfont{LucidaBrightMathOT}
\setmathfont{LucidaBrightMathOT-Demi}[version=bold]
}{%
% Case (iii): we'll better find it in the system
\ClassInfo{sp.cls}{Loading LucidaOT fonts from system}
\setmathfont{Lucida Bright Math OT}}
}
% now that the fonts have been located,
% load them using their canonical / system names
\setmainfont{Lucida Bright OT}[Numbers=OldStyle]
\setsansfont{Lucida Sans OT}
\setmonofont{Lucida Console DK}
% shim several math commands to approximate definitions in lucimatx.sty
\def\llbracket{\symbol{"27E6}} % MATHEMATICAL LEFT WHITE SQUARE BRACKET
\def\rrbracket{\symbol{"27E7}} % MATHEMATICAL RIGHT WHITE SQUARE BRACKET
\def\leadsto{\symbol{"21DD}} % RIGHTWARDS SQUIGGLE ARROW
\def\Join{\symbol{"22C8}} % BOWTIE
\def\Box{\symbol{"25A1}} % WHITE SQUARE
\def\Diamond{\symbol{"25C7}} % WHITE DIAMOND
\def\ulcorner{\symbol{"23A1}} % LEFT SQUARE BRACKET UPPER CORNER
\def\urcorner{\symbol{"23A4}} % RIGHT SQUARE BRACKET UPPER CORNER
\fi
\ifnum \@fontenum < 2
% load shims for non-Lucida fonts (0 = cm and 1 = times)
\IfFileExists{stmaryrd.sty}{\RequirePackage{stmaryrd}}{
\ClassWarning{sp.cls}{stmaryrd required but not available; double brackets may be rendered incorrectly}
\newcommand{\llbracket}{\ensuremath{\left [\!\left [}}
\newcommand{\rrbracket}{\ensuremath{\right ]\!\right ]}}
}
\RequirePackage{textcomp}
\RequirePackage{amssymb}
\else
% load extras for Lucida fonts (2 = lucida and 3 = lucidaot)
\linespread{1.05}
\fi
% Strong widow and orphan control
\clubpenalty10000
\widowpenalty10000
% French Spacing
\frenchspacing
%=====================================================================
%========================= required packages =========================
\ifxetex
\else
\RequirePackage[utf8]{inputenc}
% define U+2011 NON-BREAKING HYPHEN as a regular hyphen + line break prohibition
% Based on http://tex.stackexchange.com/a/23146
% plain \mbox{-} doesn't allow the suffix to hyphenate automatically
\DeclareUnicodeCharacter{2011}{\mbox{-}\nobreak\hskip\z@}
\fi
\RequirePackage{xspace}
% microtype handles punctuation at the right margin. We want it for
% the final product, but it's okay if authors lack it.
\IfFileExists{microtype.sty}{%
\RequirePackage[final,protrusion={true,compatibility},verbose=silent]{microtype}
}{}
\RequirePackage[hyphens]{url}
% if [biblatex] is requested, check that either the new unified.bbx or the old
% biblatex-sp-unified is available;
% if neither style can be found, fallback to BibTeX.
\if@biblatex
\IfFileExists{unified.bbx}
{\RequirePackage[backend=biber,
style=unified,
natbib,
maxcitenames=3,
maxbibnames=99]{biblatex}}
{\IfFileExists{biblatex-sp-unified.bbx}
{\RequirePackage[backend=biber,
bibstyle=biblatex-sp-unified,
citestyle=sp-authoryear-comp,
natbib,
maxcitenames=3,
maxbibnames=99]{biblatex}}
{\ClassWarning{sp.cls}{BibLaTeX requested but cannot find style; falling back to BibTeX}
\@biblatexfalse}}
\fi
% when a bibentry has a DOI, we should not also display a URL:
\if@biblatex
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{\step[fieldsource=doi,final]
\step[fieldset=url,null]
\step[fieldset=urldate,null]}}}
\fi
\if@biblatex
\else
\RequirePackage{natbib}
\bibpunct[: ]{(}{)}{,}{a}{}{,}
\newcommand{\BIBand}{\&}
\setlength{\bibsep}{0pt}
\setlength{\bibhang}{0.25in}
\bibliographystyle{sp}
\newcommand{\posscitet}[1]{\citeauthor{#1}'s (\citeyear{#1})}
\newcommand{\possciteauthor}[1]{\citeauthor{#1}'s}
\newcommand{\pgposscitet}[2]{\citeauthor{#1}'s (\citeyear{#1}:~#2)}
\newcommand{\secposscitet}[2]{\citeauthor{#1}'s (\citeyear{#1}:~$\S$#2)}
\newcommand{\pgcitealt}[2]{\citealt{#1}:~#2}
\newcommand{\seccitealt}[2]{\citealt{#1}:~$\S$#2}
\newcommand{\pgcitep}[2]{(\citealt{#1}:~#2)}
\newcommand{\seccitep}[2]{(\citealt{#1}:~$\S$#2)}
\newcommand{\pgcitet}[2]{\citeauthor{#1} (\citeyear{#1}:~#2)}
\newcommand{\seccitet}[2]{\citeauthor{#1} (\citeyear{#1}:~$\S$#2)}
% \addbibresource{} and \printbibliography are the names of standard
% BibLaTeX macros, which are shimmed here to call out to normal BibTeX.
% The \@bibresources variable stores a list of bibliography arguments,
% which are subsequently loaded by the 0-arity \printbibliography call.
\def\@bibresources{}
% \addbibresource mutably appends the given argument to \@bibresources,
% maintaining \@bibresources as a comma-separated list of arguments.
\newcommand{\addbibresource}[1]{%
% \xdef is like \gdef, but immediately expands the second argument.
\xdef\@bibresources{\@bibresources\ifx\@empty\@bibresources\else,\fi#1}}
% \printbibliography simply calls the standard BibTeX \bibliography command
% with the value of the \@bibresources variable (set earlier, as with BibLaTeX).
\newcommand{\printbibliography}{\bibliography{\@bibresources}}
\fi
\RequirePackage[usenames,dvipsnames,table]{xcolor}
\definecolor{splinkcolor}{rgb}{.0,.2,.4}
% hyperxmp prefers to be loaded before hyperref, so we load it now,
% if we're doing final typesetting
\if@final
\RequirePackage{hyperxmp}
\fi
\RequirePackage[colorlinks,breaklinks,
linkcolor=splinkcolor,
urlcolor=splinkcolor,
citecolor=splinkcolor,
filecolor=splinkcolor,
plainpages=false,
pdfpagelabels,
bookmarks=false,
pdfstartview=FitH]{hyperref}
% tell hyperref/hyperxmp to keep pdf info of the old kind
\if@final
\hypersetup{keeppdfinfo}
\fi
\newcommand{\doi}[1]{\url{https://doi.org/#1}}
\urlstyle{rm}
\RequirePackage{graphicx}
\RequirePackage{float}
\RequirePackage[hang,FIGBOTCAP,loose]{subfigure}
%=====================================================================
%============================= metadata ==============================
\def\@pdfauthor{\relax}
\newcommand{\pdfauthor}[1]{\gdef\@pdfauthor{#1}\gdef\@copyrightowner{#1}}
\def\@pdftitle{\relax}
\newcommand{\pdftitle}[1]{\gdef\@pdftitle{#1}}
\def\@pdfkeywords{\relax}
\newcommand{\pdfkeywords}[1]{\gdef\@pdfkeywords{#1}}
\def\@spvolume{}
\newcommand{\spvolume}[1]{\gdef\@spvolume{#1}}
\def\@sparticle{}
\newcommand{\sparticle}[1]{\gdef\@sparticle{#1}}
\def\@spyear{}
\newcommand{\spyear}[1]{\gdef\@spyear{#1}}
\def\@spdoi{10.3765/sp.\@spvolume.\@sparticle}
\def\@splastpage{}
\newcommand{\splastpage}[1]{\gdef\@splastpage{#1}}
\newcommand{\copyrightowner}[1]{\gdef\@copyrightowner{#1}}
%=====================================================================
%========================== page dimensions ==========================
% Vertical.
\paperheight=11in
\topmargin=0in %
\headheight=0.2in % head: 1.5in (margin + head + sep = .5; latex adds 1in)
\headsep=0.3in %
\topskip=0.1in % included in the textheight
\textheight=8in % text is 8in
\footskip=0.5in % foot: 1.5in (.5 + 1.0in leftover)
\parskip=0pt
% Horizontal.
\paperwidth=8.5in
\textwidth=5.5in
\oddsidemargin=0.5in % 1.5in due to LaTeX's calculations
\evensidemargin=0.5in % 1.5in due to LaTeX's calculations
\raggedbottom % constant spacing in the text; cost is a ragged bottom
\parindent=0.25in
\leftmargini=0.5in
\@ifundefined{mathindent}{}{\mathindent=0.5in\relax}%
% Tell dvips about our paper.
\special{papersize=8.5in,11in}
%=====================================================================
%============================== title ================================
% Formats individual <name--institute> pairs inside \author.
\newcommand{\spauthor}[1]{%
\begin{minipage}[t]{16pc}\centering #1\end{minipage}\hspace{.5pc plus1pc}%
\ignorespaces
}
\renewcommand*{\title}[2][]{\gdef\@shorttitle{#1}\gdef\@title{#2}}
\renewcommand*{\author}[2][]{\gdef\@shortauthor{#1}\gdef\@author{#2}}
% Adapted from JMLR.
\renewcommand{\maketitle}{%
\par
\begingroup
\renewcommand{\thefootnote}{\fnsymbol{footnote}}
\@maketitle\@thanks
\setcounter{footnote}{0}
\endgroup
\let\maketitle\relax \let\@maketitle\relax
\gdef\@thanks{}
\let\thanks\relax%
}
% From salt.cls.
\newskip\onelineskip
\onelineskip=\baselineskip
\advance\onelineskip by0pt plus 4pt minus 2pt
\def\@maketitle{%
\vbox{\hsize\textwidth%
\linewidth\hsize%
\centering
\vskip\onelineskip
\large\textbf{\@title}\@@par
\normalsize
\def\institute{\textit}%
\newcommand{\AND}{\ignorespaces}%
\let\par\@empty
\@author
\lineskiplimit\onelineskip
\lineskip\onelineskip
\@@par
}%
\global\everypar{\everypar{}\vskip 3.5ex}
}
%=====================================================================
%========================== running headers ==========================
% Prints publication and copyright info on the first page
\def\ps@spfirstheadings{
\let\@mkboth\@gobbletwo
\def\@oddhead{%
\footnotesize
\begin{minipage}[c]{.25in}
\includegraphics[width=\textwidth]{sp-logo}
\end{minipage}%
\begin{minipage}[c]{5.25in}
\href{http://semprag.org/}{Semantics \& Pragmatics}
Volume \@spvolume,
Article \@sparticle\ifx\@empty\@splastpage\else: 1--\@splastpage\fi,
\@spyear\\
\href{https://doi.org/\@spdoi}{https://doi.org/\@spdoi}
\end{minipage}%
}
\def\@oddfoot{%
\footnotesize
\begin{minipage}[c]{\textwidth}
\copyright \@spyear\ \@copyrightowner\\
% Creative commons license text.
This is an open-access article distributed under the terms of a
Creative Commons Attribution License
(\url{https://creativecommons.org/licenses/by/3.0/}).
\end{minipage}%
}
\def\@evenhead{}
\def\@evenfoot{}
}
% Prints abbreviated article information on non-initial pages.
\def\ps@spheadings{
\let\@mkboth\@gobbletwo
% short title on inner (left) side
\def\@oddhead{\footnotesize\@shorttitle\hfill}
% author name(s) on inner (right) side
\def\@evenhead{\footnotesize\hfill\@shortauthor}
% centered page number (with article prefix if available) on all pages
\def\@oddfoot{\footnotesize\hfill\ifx\@empty\@sparticle\else\@sparticle:\fi\thepage\hfill}
\let\@evenfoot\@oddfoot
}
% set spheadings as default pagestyle throughout document
\pagestyle{spheadings}
%=====================================================================
%=========================== final typeset ===========================
\if@final
% load global variables into metadata
\AfterEndPreamble{%
\hypersetup{%
unicode=true,
pdfmetalang={en},
pdfcopyright={Copyright \@spyear, \@copyrightowner. This is an open-access article distributed under the terms of a Creative Commons Non-Commercial License (http://creativecommons.org/licenses/by-nc/3.0).},%
pdflicenseurl={http://creativecommons.org/licenses/by-nc/3.0},%
pdfsubject={Semantics and Pragmatics \@spvolume(\@sparticle). \@spyear. \@spdoi},%
pdfpublisher={The Linguistics Society of America},%
pdfpublication={Semantics and Pragmatics},%
pdfpagerange={1-\@splastpage},%
pdfdoi={\@spdoi},%
pdfpubtype={journal},%
pdfissn={1937-8912},%
pdfurl={https://doi.org/\@spdoi},%
pdfvolumenum={\@spvolume},%
pdfissuenum={\@sparticle}}}
\thispagestyle{spfirstheadings}
\else
% load minimal metadata for non-final (or non-S&P) pdfs
\hypersetup{%
pdfauthor=\@pdfauthor,
pdftitle=\@pdftitle,
pdfkeywords=\@pdfkeywords}
\thispagestyle{empty}
\fi
%=====================================================================
%=========================== frontmatter =============================
% The spacing specs (arg 2 of \list) are the same for the mshistory,
% abstract, and keywords environments, except that the abstract is
% indented somewhat.
% Single parameter determines the left and right margin size.
\newcommand{\frontmatterspacing}[1]{%
\small
\topsep 10\p@ \@plus4\p@ \@minus6\p@ % from size12.clo
\advance\topsep by3.5ex plus -1ex minus -.2ex
\setlength{\listparindent}{0em}
\setlength{\itemindent}{0em}
\setlength{\leftmargin}{#1}
\setlength{\rightmargin}{\leftmargin}
\setlength{\parskip}{0em}
}
\newenvironment{mshistory}%
{\list{}{\frontmatterspacing{0em}}%
\item\relax}%
{\endlist}
% \ignorespacesandpars inspired by http://tex.stackexchange.com/a/179034/3642
\def\ignorespacesandpars{%
\@ifnextchar\par{\expandafter\ignorespacesandpars\@gobble}{\ignorespaces}}
\renewenvironment{abstract}%
{\list{}{\frontmatterspacing{0.25in}}%
\item\relax\textbf{\abstractname}~~\ignorespacesandpars}%
{\endlist}
\newenvironment{keywords}%
{\list{}{\frontmatterspacing{0em}}%
\item\relax\textbf{Keywords:}}%
{\endlist}
%=====================================================================
%============================ sectioning =============================
\renewcommand{\section}{\@startsection{section}{1}{\z@}%
{-3.5ex plus -1ex minus -.2ex}%
{1.8ex plus.2ex}%
{\noindent\normalfont\bfseries}}
\renewcommand{\subsection}{\@startsection{subsection}{2}{\z@}%
{-3.5ex plus -1ex minus -.2ex}%
{1.8ex plus.2ex}%
{\noindent\normalfont\bfseries}}
\renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@}%
{-3.5ex plus -1ex minus -.2ex}%
{1.8ex plus.2ex}%
{\noindent\normalfont\bfseries}}
\renewcommand{\paragraph}{\@startsection{paragraph}{4}{\z@}%
{3.5ex plus 1ex minus .2ex}%
{-1em plus0.0ex}%
{\noindent\normalsize\bfseries}}
\renewcommand{\subparagraph}{\@startsection{subparagraph}{5}{\z@}%
{3.5ex plus 1ex minus .2ex}%
{-1em plus0.0ex}%
{\noindent\normalsize\it}}
% General formatting --- for punctuating section headings.
\renewcommand{\@seccntformat}[1]{\@nameuse{the#1}\hspace{1em}}
%=====================================================================
%============================ footnotes ==============================
\renewcommand{\@makefntext}[1]{%
\parindent=0.25in
\noindent \hbox to \z@{\hss{\@thefnmark} \hfil}#1}
%=====================================================================
%============================ backmatter =============================
% Environment for formatting all the addresses.
\newenvironment{addresses}%
{\@@par\let\par\@empty\addvspace{3.25ex}\small\ignorespaces}%
{\lineskiplimit 1pc\lineskip 1pc\@@par}
% Sub-environment for formatting each individual author's address.
\newenvironment{address}[1][.5\textwidth]%
{\noindent\ignorespaces\begin{minipage}[t]{#1}\raggedright}%
{\end{minipage}\allowbreak\ignorespacesafterend}
%=====================================================================
%======================== other environments =========================
% enumerate labeling that won't conflict with standard ex. numbers.
\renewcommand{\theenumi}{\roman{enumi}}
\renewcommand{\labelenumi}{\theenumi.}
\renewcommand{\theenumii}{\alph{enumii}}
\renewcommand{\labelenumii}{\theenumii.}
% list spacing ought to satisfy \itemsep + \parsep < \topsep + \parskip
\def\@listi{\leftmargin\leftmargini
\parsep 4\p@ \@plus2\p@ \@minus\p@
\topsep 10\p@ \@plus4\p@ \@minus\p@
\itemsep4\p@ \@plus2\p@ \@minus\p@}
\let\@listI\@listi
\@listi
% typeset figures with lines above and below and the caption title and
% caption texts in boxes next to each other, top aligned. these
% definitions extend those of float.sty.
%
% sp caption style
\newlength\floatc@sp@contentwidth
\newcommand\floatc@sp[2]{%
\setlength\floatc@sp@contentwidth{\linewidth}%
\addtolength\floatc@sp@contentwidth{-60pt}%
\parbox[t]{60pt}{{\@fs@cfont#1}}%
\parbox[t]{\floatc@sp@contentwidth}{#2}}%
% sp float style; uses the sp caption style
\newcommand\fs@sp{
\def\@fs@cfont{\bfseries}\let\@fs@capt\floatc@sp
\def\@fs@pre{\hrule\kern5pt}%
\def\@fs@post{\kern5pt\hrule\relax}%
\def\@fs@mid{\kern10pt}
\let\@fs@iftopcapt\iffalse}
% users can override these commands using float.sty's functionality
\floatstyle{sp}
\restylefloat{figure}
\restylefloat{table}
%=====================================================================
%=========================== useful macros ===========================
\def\co{\colon\thinspace}
\DeclareRobustCommand\dash{%
\unskip\nobreak\thinspace\textemdash\thinspace\ignorespaces}
\pdfstringdefDisableCommands{\renewcommand{\dash}{ - }}
% based on \url defined in hyperref.sty
\DeclareRobustCommand*{\http}{\hyper@normalise\http@}
\def\http@#1{\hyper@linkurl{\Hurl{#1}}{http://#1}}
\newcommand{\email}[1]{\href{mailto:#1}{#1}}
\providecommand{\sv}[1]{\ensuremath{\llbracket{#1}\rrbracket}}
%=====================================================================
%=========================== linguex settings ========================
\if@linguex
\AtEndPreamble{\RequirePackage{linguex}}%
\AtEndPreamble{\renewcommand{\firstrefdash}{}}%
\AtBeginDocument{\settowidth{\Exlabelwidth}{(110)}}
\fi
%=====================================================================
%=========================== expex settings ========================
\if@expex
\RequirePackage{expex}%
\lingset{%
exskip=-0.5ex,
interpartskip=0.5ex,
aboveexskip=1ex,
belowexskip=2ex,
everygla=}
\ifxetex
\let\expexgla\gla%
\AtBeginDocument{\let\gla\expexgla}
\fi
\def\everyfootnote{%
\keepexcntlocal
\excnt=1
% exskip: sets aboveexskip and belowexskip at the same time
% exnotype: sets the family for root example numbering (default: arabic)
% (must be one of: arabic, chapter.arabic, or roman)
% sampleexno: sets root example to constant width (default: no constant width)
% labeltype: sets the family for subexample numbering (default: alpha)
% labelanchor: sets left alignment of subexample (default: numright)
% labeloffset: left margin of subexample numbering (default: 1em)
% textoffset: distance between subexample numbering and text (default: 1em)
\lingset{exskip=1ex,exnotype=roman,labeloffset=.6em,textoffset=.6em}
}
\renewcommand{\@makefntext}[1]{%
\everyfootnote
\parindent=0.25in
\noindent \hbox to \z@{\hss{\@thefnmark} \hfil}#1%
}
\gathertags
\fi
%================================ fin ================================
%=====================================================================