summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/ot-tableau/ot-tableau.tex
blob: 1f19803e341537ebb32c8cb3e73d00c6612f2b39 (plain)
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
\documentclass{article}
\usepackage[notipa]{ot-tableau}
\usepackage{fullpage,pifont}
\title{The \textsf{ot-tableau} package}
\date{Revised 2014-09-02}
\author{Adam Baker}
\def\eg{e.g.,~}
\def\tabl{\textsf{ot-tableau}}

\begin{document}
\maketitle

\section{Introduction}
The \tabl\ package makes it easy to create beautiful optimality-theoretic tableaux. The \LaTeX\ source is visually very similar to a formatted tableau, which makes working with the source code painless (well, less painful). A variety of stylistic variants can be modified to suit personal taste.

\begin{center}
	\begin{tableau}{c:c|c}
	\inp{\ips{stap}}        \const{*Complex} \const{Anchor-IO} \const{Contiguity-IO}
	\cand{stap}             \vio{*!}         \vio{}            \vio{}
	\cand[\Optimal]{sap}    \vio{}           \vio{}            \vio{*}
	\cand{tap}              \vio{}           \vio{*!}          \vio{}
	\end{tableau}
\end{center}

\begin{verbatim}
\begin{tableau}{c:c|c}
\inp{\ips{stap}}        \const{*Complex} \const{Anchor-IO} \const{Contiguity-IO}
\cand{stap}             \vio{*!}         \vio{}            \vio{}
\cand[\Optimal]{sap}    \vio{}           \vio{}            \vio{*}
\cand{tap}              \vio{}           \vio{*!}          \vio{}
\end{tableau}
\end{verbatim}
Pertinent features:
\begin{itemize}
\item The package introduces the \verb+tableau+ environment.
\item Indicate solid or dashed lines between constraints with \verb+\begin{tableau}{c:c|c}+. A solid line is indicated by a pipe, a dashed line with a colon.
\item The input is specified with the \verb+\inp+ command. (Here the \verb+\ips+ macro is being used to render the text using TIPA and put it within slashes.)
\item Indicate the constraints with the \verb+\const+ command.
\item Add a candidate with the \verb+\cand+ command. An optional argument can be used to annotate the candidate (\eg to use \HandLeft, \verb+\cand[\HandLeft]+)
\item Violations are indicated with the \verb+\vio+ macro. You need to include these commands even when there are no violations.
\item Use of whitespace is optional. Keeping the columns aligned in the source code, though, makes the tableau much easier to edit.
\end{itemize}

\noindent Very large tableaux are not much more difficult---for instance in Table~\ref{large_example}.

\begin{sidewaystable}
\ShadingOn
\begin{center}
	\LetterBeforeFinger
	\begin{tableau}{c:c:c|c:c|s:s}
	\inp{Input: /\textsc{red}, \ipa{ulampoy}/}	\const{Red=$\sigma$}	\const{Dep-IO}	\const{Max-IO}	\const{Onset}	\const{No-Coda}	\const{Align-Red-L}	\const{Max-BR}
	\cand[\HandRight]{u-\underline{la}-lam.poy}			\vio{}			\vio{}		\vio{}		\vio{*}		\vio{**}	\vio{u}			\vio{mpoy}
	\cand{u-\underline{lam}-lam.poy}				\vio{}			\vio{}		\vio{}		\vio{*}		\vio{***!}	\vio{u}			\vio{poy}
	\cand{\underline{u}-u.lam.poy}				\vio{}			\vio{}		\vio{}		\vio{**!}	\vio{**}	\vio{}			\vio{lampoy}
	\cand{\underline{ul}-u.lam.poy}				\vio{}			\vio{}		\vio{}		\vio{**!}	\vio{***}	\vio{}			\vio{ampoy}
	\cand{\underline{la}-lam.poy}				\vio{}			\vio{}		\vio{*!}	\vio{}		\vio{**}	\vio{}			\vio{mpoy}
	\cand{\underline{tu}-tu-lam.poy}				\vio{}			\vio{*!}	\vio{}		\vio{}		\vio{**}	\vio{}			\vio{lampoy}
	\cand{\underline{u.l}-u.lam.poy}				\vio{l!}		\vio{}		\vio{}		\vio{}		\vio{**}	\vio{}			\vio{lampoy}
	\cand{u-\underline{lam.poy}-lam.poy}			\vio{p!oy}		\vio{}		\vio{}		\vio{}		\vio{****}	\vio{u}			\vio{}
	\end{tableau}
\end{center}
\caption{After Kager (1999:229).}\label{large_example}
\end{sidewaystable}

\section{Parameters}

\subsection{Changing formats}
The default \verb+\cand+ and \verb+\const+ commands typeset the argument with TIPA's \verb+\textipa+  command, and small caps, respectively. Though this is generally appropriate, there are also commands \verb+\cand*+ and \verb+\const*+ that apply no formatting. The following code and tableau illustrate this.

\begin{center}
	\begin{tableau}{c|c}
	\inp{Illustration}            \const{C1}  \const*{C2}
	\cand*{Option 1}              \vio{*!}    \vio{}
	\cand*[\HandRight]{Option 2}  \vio{}      \vio{*}
	\end{tableau}
\end{center}

\begin{verbatim}
	\begin{tableau}{c|c}
	\inp{Illustration}            \const{C1}  \const*{C2}
	\cand*{Option 1}              \vio{*!}    \vio{}
	\cand*[\HandRight]{Option 2}  \vio{}      \vio{*}
	\end{tableau}
\end{verbatim}

\noindent Usage of \verb+\const*+ is illustrated in the next section.

If you are using Unicode input for your phonetic symbols, use the package option \verb+notipa+ to disable TIPA.
 
\subsection{Controlling cell shading}
There are two systems in use for shading OT tableaux. One system is to shade cells in a row after the crucial violation. The other system is to shade an entire column, if the associate constraint generates no crucial violations.

\tabl\ will do cell-shading automatically with the \verb+shadedcells+ package option.\footnote{More specifically, \tabl\ will look for the exclamation point. You have to provide the exclamation point.} This tableau...

\begin{center}
	\ShadingOn
	\begin{tableau}{c|c}
	\inp{\ips{ba}}		\const{*VcdObs}	\const*{\textsc{Ident-IO}-[nas]}
	\cand{ba}		\vio{*!}	\vio{}
	\cand[\HandRight]{pa}	\vio{}		\vio{*}
	\end{tableau}
\end{center}

\noindent ...is produced by the following code...

\begin{verbatim}
	\ShadingOn
	\begin{tableau}{c|c}
	\inp{\ips{ba}}         \const{*VcdObs}  \const*{\textsc{Ident-IO}-[nas]}
	\cand{ba}              \vio{*!}         \vio{}
	\cand[\HandRight]{pa}  \vio{}           \vio{*}
	\end{tableau}
\end{verbatim}

The alternative is to shade an entire column by using `s' instead of `c' in the argument to the \verb+tableau+ environment:

\begin{center}
	\begin{tableau}{c|s}
	\inp{\ips{ba}}         \const{*VcdObs}  \const*{\textsc{Ident-IO}-[nas]}
	\cand{ba}              \vio{*!}         \vio{}
	\cand[\HandRight]{pa}  \vio{}           \vio{*}
	\end{tableau}
\end{center}

\noindent ...is produced by...

\begin{verbatim}
	\begin{tableau}{c|s}
	\inp{\ips{ba}}         \const{*VcdObs}  \const*{\textsc{Ident-IO}-[nas]}
	\cand{ba}              \vio{*!}         \vio{}
	\cand[\HandRight]{pa}  \vio{}           \vio{*}
	\end{tableau}
\end{verbatim}

You can also mix the approaches, which is illustrated in the code for Table~\ref{large_example}. (That code is not printed in this manual, but it's available in the .tex version of this file.)

You can control the darkness of the shading using, \eg \verb+\SetCellShading{0.4}+. A value of 1 corresponds to white, 0 to black. The default is 0.9.

\subsection{Symbol position}
Some people prefer the ``finger-of-optimality'' to go after the letter. This can be done by using the \verb+fingerafter+ package option. For example:

\begin{center}
	\LetterBeforeFinger
	\begin{tableau}{c|c}
	\inp{\ips{ba}}		\const{*VcdObs}	\const*{\textsc{Ident-IO}-[nas]}
	\cand{ba}		\vio{*!}	\vio{}
	\cand[\HandRight]{pa}	\vio{}		\vio{*}
	\end{tableau}
\end{center}

\noindent ...is produced by the following code...

\begin{verbatim}
	\begin{tableau}{c|c}
	\inp{\ips{ba}}         \const{*VcdObs}  \const*{\textsc{Ident-IO}-[nas]}
	\cand{ba}              \vio{*!}         \vio{}
	\cand[\HandRight]{pa}  \vio{}           \vio{*}
	\end{tableau}
\end{verbatim}

\subsection{Circled violations}
In one style of tableau, the optimal candidate's violations are circled. You can enabled this with the \verb+circledviolations+ package option. In this case, the optimal candidate must be marked with \verb+\Optimal+.

\CircledViolationsOn
\begin{center}
	\begin{tableau}{c|c}
	\inp{\ips{ba}}		\const{*VcdObs}	\const*{\textsc{Ident-IO}-[nas]}
	\cand{ba}		\vio{*!}	\vio{}
	\cand[\Optimal]{pa}	\vio{}		\vio{*}
	\end{tableau}
\end{center}
\CircledViolationsOff

\begin{verbatim}
	\begin{tableau}{c|c}
	\inp{\ips{ba}}           \const{*VcdObs}    \const*{\textsc{Ident-IO}-[nas]}
	\cand{ba}                \vio{*!}           \vio{}
	\cand[\Optimal]{pa}      \vio{}             \vio{*}
	\end{tableau}
\end{verbatim}

\subsection{Different symbols}
Using the optional argument to \verb+\cand+, you can add any annotation to a candidate. The following will be a trip down Memory Lane for some people:

\begin{center}
	\begin{tableau}{c|c}
	\inp{\ips{ba}}         \const{*VcdObs} \const*{\textsc{Ident-IO}-[nas]}
	\cand[(FFC)]{ba}       \vio{*!}        \vio{}
	\cand[\HandRight]{pa}  \vio{}          \vio{*}
	\cand[\ding{96}]{ta}   \vio{}          \vio{*}
	\cand[\HandLeft]{sa}   \vio{}          \vio{*}
	\end{tableau}
\end{center}

\noindent Generated by...

\begin{verbatim}
	\begin{tableau}{c|c}
	\inp{\ips{ba}}         \const{*VcdObs} \const*{\textsc{Ident-IO}-[nas]}
	\cand[(FFC)]{ba}       \vio{*!}        \vio{}
	\cand[\HandRight]{pa}  \vio{}          \vio{*}
	\cand[\ding{96}]{ta}   \vio{}          \vio{*}
	\cand[\HandLeft]{sa}   \vio{}          \vio{*}
	\end{tableau}
\end{verbatim}

You can mark the optimal candidate with the \verb+\Optimal+ command. This 
By default, \tabl\ typesets \textsf{bbding}'s \verb+\HandRight+ symbol (\HandRight), which I find to be the most attractive. \tabl\ also replaces asterisks with the more attractive asterisks in \textsf{amssymb}. You can replace these symbols with others if you wish, using \verb+\renewcommand+:

\begin{center}
	\CircledViolationsOn
	\renewcommand\OptimalMarker{$\Cup$}
	\renewcommand\ViolationMarker{$+$}
	\renewcommand\CircledViolationMarker{$\boxplus$}
	\begin{tableau}{c|c}
	\inp{\ips{ba}}         \const{*VcdObs} \const*{\textsc{Ident-IO}-[nas]}
	\cand{ba}       \vio{*!}        \vio{}
	\cand[\Optimal]{ma}  \vio{}          \vio{*}
	\end{tableau}
	\CircledViolationsOff
\end{center}

\begin{verbatim}
	\renewcommand\OptimalMarker{$\Cup$}
	\renewcommand\ViolationMarker{$+$}
	\renewcommand\CircledViolationMarker{$\boxplus$}
	
	\begin{tableau}{c|c}
	\inp{\ips{ba}}         \const{*VcdObs} \const*{\textsc{Ident-IO}-[nas]}
	\cand{ba}              \vio{*!}        \vio{}
	\cand[\Optimal]{ma}    \vio{}          \vio{*}
	\end{tableau}
\end{verbatim}

\section{Package Options}
It makes the most sense to set these options as package options, but if you want to change the settings in the middle of the documents, you can use the commands indicated in parentheses.

\begin{description}
\item[notipa] With this option, the TIPA package will not be loaded, and text in the \verb+\cand+ argument will not be placed in a  \verb+\textipa+ command. Use this option if you are using Unicode input for IPA symbols. (\verb+\TipaOn+, \verb+\TipaOff+)
\item[circledviolations] Circle the optimal candidate's constraint violations. The optimal candidate must be identified with \verb+\cand[\Optimal]+. (\verb+\CircledViolationsOn+, \verb+\CircledViolationsOff+)
\item[shadedcells] Shade cells for a constraint that follow the candidate's fatal violation. (\verb+\ShadingOn+, \verb+\ShadingOff+)
\item[fingerafter] Place the finger-of-optimality after the letter rather than before it. (\verb+\FingerBeforeLetter+, \verb+\LetterBeforeFinger+)
\end{description}

\end{document}