Debian Codegraph @

texmf-dist/doc/latex/ot-tableau/ot-tableau.tex

raw
1 \documentclass{article}
2 \usepackage[notipa]{ot-tableau}
3 % use the usehhline option to use the hhline for prettier lines (which currently does not work)
4 %\usepackage[notipa,usehhline]{ot-tableau}
5 \usepackage{fullpage,pifont}
6 \title{The \textsf{ot-tableau} package}
7 \date{Revised 2023-08-01}
8 \author{Adam Baker}
9 \def\eg{e.g.,~}
10 \def\tabl{\textsf{ot-tableau}}
11
12 \begin{document}
13 \maketitle
14
15 \section{Introduction}
16 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.
17
18 \begin{center}
19 \begin{tableau}{c:c|c}
20 \inp{\ips{stap}} \const{*Complex} \const{Anchor-IO} \const{Contiguity-IO}
21 \cand{stap} \vio{*!} \vio{} \vio{}
22 \cand[\Optimal]{sap} \vio{} \vio{} \vio{*}
23 \cand{tap} \vio{} \vio{*!} \vio{}
24 \end{tableau}
25 \end{center}
26
27 \begin{verbatim}
28 \begin{tableau}{c:c|c}
29 \inp{\ips{stap}} \const{*Complex} \const{Anchor-IO} \const{Contiguity-IO}
30 \cand{stap} \vio{*!} \vio{} \vio{}
31 \cand[\Optimal]{sap} \vio{} \vio{} \vio{*}
32 \cand{tap} \vio{} \vio{*!} \vio{}
33 \end{tableau}
34 \end{verbatim}
35 Pertinent features:
36 \begin{itemize}
37 \item The package introduces the \verb+tableau+ environment.
38 \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.
39 \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.)
40 \item Indicate the constraints with the \verb+\const+ command.
41 \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]+)
42 \item Violations are indicated with the \verb+\vio+ macro. You need to include these commands even when there are no violations.
43 \item Use of whitespace is optional. Keeping the columns aligned in the source code, though, makes the tableau much easier to edit.
44 \end{itemize}
45
46 \noindent Very large tableaux are not much more difficult---for instance in Table~\ref{large_example}.
47
48 \begin{sidewaystable}
49 \ShadingOn
50 \begin{center}
51 \LetterBeforeFinger
52 \begin{tableau}{c:c:c|c:c|s:s}
53 \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}
54 \cand[\HandRight]{u-\underline{la}-lam.poy} \vio{} \vio{} \vio{} \vio{*} \vio{**} \vio{u} \vio{mpoy}
55 \cand{u-\underline{lam}-lam.poy} \vio{} \vio{} \vio{} \vio{*} \vio{***!} \vio{u} \vio{poy}
56 \cand{\underline{u}-u.lam.poy} \vio{} \vio{} \vio{} \vio{**!} \vio{**} \vio{} \vio{lampoy}
57 \cand{\underline{ul}-u.lam.poy} \vio{} \vio{} \vio{} \vio{**!} \vio{***} \vio{} \vio{ampoy}
58 \cand{\underline{la}-lam.poy} \vio{} \vio{} \vio{*!} \vio{} \vio{**} \vio{} \vio{mpoy}
59 \cand{\underline{tu}-tu-lam.poy} \vio{} \vio{*!} \vio{} \vio{} \vio{**} \vio{} \vio{lampoy}
60 \cand{\underline{u.l}-u.lam.poy} \vio{l!} \vio{} \vio{} \vio{} \vio{**} \vio{} \vio{lampoy}
61 \cand{u-\underline{lam.poy}-lam.poy} \vio{p!oy} \vio{} \vio{} \vio{} \vio{****} \vio{u} \vio{}
62 \end{tableau}
63 \end{center}
64 \caption{After Kager (1999:229).}\label{large_example}
65 \end{sidewaystable}
66
67 \section{Parameters}
68
69 \subsection{Changing formats}
70 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.
71
72 \begin{center}
73 \begin{tableau}{c|c}
74 \inp{Illustration} \const{C1} \const*{C2}
75 \cand*{Option 1} \vio{*!} \vio{}
76 \cand*[\HandRight]{Option 2} \vio{} \vio{*}
77 \end{tableau}
78 \end{center}
79
80 \begin{verbatim}
81 \begin{tableau}{c|c}
82 \inp{Illustration} \const{C1} \const*{C2}
83 \cand*{Option 1} \vio{*!} \vio{}
84 \cand*[\HandRight]{Option 2} \vio{} \vio{*}
85 \end{tableau}
86 \end{verbatim}
87
88 \noindent Usage of \verb+\const*+ is illustrated in the next section.
89
90 If you are using Unicode input for your phonetic symbols, use the package option \verb+notipa+ to disable TIPA.
91
92 \subsection{Controlling cell shading}
93
94 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.
95
96 \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...
97
98 \begin{center}
99 \ShadingOn
100 \begin{tableau}{c|c}
101 \inp{\ips{ba}} \const{*VcdObs} \const*{\textsc{Ident-IO}-[nas]}
102 \cand{ba} \vio{*!} \vio{}
103 \cand[\HandRight]{pa} \vio{} \vio{*}
104 \end{tableau}
105 \end{center}
106
107 \noindent ...is produced by the following code...
108
109 \begin{verbatim}
110 \ShadingOn
111 \begin{tableau}{c|c}
112 \inp{\ips{ba}} \const{*VcdObs} \const*{\textsc{Ident-IO}-[nas]}
113 \cand{ba} \vio{*!} \vio{}
114 \cand[\HandRight]{pa} \vio{} \vio{*}
115 \end{tableau}
116 \end{verbatim}
117
118 The alternative is to shade an entire column by using `s' instead of `c' in the argument to the \verb+tableau+ environment:
119
120 \begin{center}
121 \begin{tableau}{c|s}
122 \inp{\ips{ba}} \const{*VcdObs} \const*{\textsc{Ident-IO}-[nas]}
123 \cand{ba} \vio{*!} \vio{}
124 \cand[\HandRight]{pa} \vio{} \vio{*}
125 \end{tableau}
126 \end{center}
127
128 \noindent ...is produced by...
129
130 \begin{verbatim}
131 \begin{tableau}{c|s}
132 \inp{\ips{ba}} \const{*VcdObs} \const*{\textsc{Ident-IO}-[nas]}
133 \cand{ba} \vio{*!} \vio{}
134 \cand[\HandRight]{pa} \vio{} \vio{*}
135 \end{tableau}
136 \end{verbatim}
137
138 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.)
139
140 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.
141
142 \subsection{Symbol position}
143 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:
144
145 \begin{center}
146 \LetterBeforeFinger
147 \begin{tableau}{c|c}
148 \inp{\ips{ba}} \const{*VcdObs} \const*{\textsc{Ident-IO}-[nas]}
149 \cand{ba} \vio{*!} \vio{}
150 \cand[\HandRight]{pa} \vio{} \vio{*}
151 \end{tableau}
152 \end{center}
153
154 \noindent ...is produced by the following code...
155
156 \begin{verbatim}
157 \begin{tableau}{c|c}
158 \inp{\ips{ba}} \const{*VcdObs} \const*{\textsc{Ident-IO}-[nas]}
159 \cand{ba} \vio{*!} \vio{}
160 \cand[\HandRight]{pa} \vio{} \vio{*}
161 \end{tableau}
162 \end{verbatim}
163
164 \subsection{Circled violations}
165 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+.
166
167 \CircledViolationsOn
168 \begin{center}
169 \begin{tableau}{c|c}
170 \inp{\ips{ba}} \const{*VcdObs} \const*{\textsc{Ident-IO}-[nas]}
171 \cand{ba} \vio{*!} \vio{}
172 \cand[\Optimal]{pa} \vio{} \vio{*}
173 \end{tableau}
174 \end{center}
175 \CircledViolationsOff
176
177 \begin{verbatim}
178 \begin{tableau}{c|c}
179 \inp{\ips{ba}} \const{*VcdObs} \const*{\textsc{Ident-IO}-[nas]}
180 \cand{ba} \vio{*!} \vio{}
181 \cand[\Optimal]{pa} \vio{} \vio{*}
182 \end{tableau}
183 \end{verbatim}
184
185 \subsection{Different symbols}
186 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:
187
188 \begin{center}
189 \begin{tableau}{c|c}
190 \inp{\ips{ba}} \const{*VcdObs} \const*{\textsc{Ident-IO}-[nas]}
191 \cand[(FFC)]{ba} \vio{*!} \vio{}
192 \cand[\HandRight]{pa} \vio{} \vio{*}
193 \cand[\ding{96}]{ta} \vio{} \vio{*}
194 \cand[\HandLeft]{sa} \vio{} \vio{*}
195 \end{tableau}
196 \end{center}
197
198 \noindent Generated by...
199
200 \begin{verbatim}
201 \begin{tableau}{c|c}
202 \inp{\ips{ba}} \const{*VcdObs} \const*{\textsc{Ident-IO}-[nas]}
203 \cand[(FFC)]{ba} \vio{*!} \vio{}
204 \cand[\HandRight]{pa} \vio{} \vio{*}
205 \cand[\ding{96}]{ta} \vio{} \vio{*}
206 \cand[\HandLeft]{sa} \vio{} \vio{*}
207 \end{tableau}
208 \end{verbatim}
209
210 You can mark the optimal candidate with the \verb+\Optimal+ command. 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+:
211
212 \begin{center}
213 \CircledViolationsOn
214 \renewcommand\OptimalMarker{$\Cup$}
215 \renewcommand\ViolationMarker{$+$}
216 \renewcommand\CircledViolationMarker{$\boxplus$}
217 \begin{tableau}{c|c}
218 \inp{\ips{ba}} \const{*VcdObs} \const*{\textsc{Ident-IO}-[nas]}
219 \cand{ba} \vio{*!} \vio{}
220 \cand[\Optimal]{ma} \vio{} \vio{*}
221 \end{tableau}
222 \CircledViolationsOff
223 \end{center}
224
225 \begin{verbatim}
226 \renewcommand\OptimalMarker{$\Cup$}
227 \renewcommand\ViolationMarker{$+$}
228 \renewcommand\CircledViolationMarker{$\boxplus$}
229
230 \begin{tableau}{c|c}
231 \inp{\ips{ba}} \const{*VcdObs} \const*{\textsc{Ident-IO}-[nas]}
232 \cand{ba} \vio{*!} \vio{}
233 \cand[\Optimal]{ma} \vio{} \vio{*}
234 \end{tableau}
235 \end{verbatim}
236
237 \subsection{Prettier lines}
238 \textbf{As of 2021-05-19:} A conflict between \verb+hhline+ and \verb+arydshln+ means that it's not possible to have the prettier tableau lines that \verb+hhline+ offers. (Extra whitespace is introduced above the first line.) It's possible that this will be fixed in the future, in which case you can get the prettier lines back with the \verb+usehhline+ package option, e.g., \verb+\usepackage[notipa,usehhline]{ot-tableau}+.
239
240
241 \section{Package Options}
242 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.
243
244 \begin{description}
245 \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+)
246 \item[circledviolations] Circle the optimal candidate's constraint violations. The optimal candidate must be identified with \verb+\cand[\Optimal]+. (\verb+\CircledViolationsOn+, \verb+\CircledViolationsOff+)
247 \item[shadedcells] Shade cells for a constraint that follow the candidate's fatal violation. (\verb+\ShadingOn+, \verb+\ShadingOff+)
248 \item[fingerafter] Place the finger-of-optimality after the letter rather than before it. (\verb+\FingerBeforeLetter+, \verb+\LetterBeforeFinger+)
249 \item[usehhline] Use the \verb+hhline+ package to draw prettier tableau lines. (As of 2021-05-19, a package conflict means that the lines are not actually prettier. Hopefully this will be fixed in the future and we can go back to pretty lines!)
250 \end{description}
251 \section{Multiple input candidates}
252 To input candidates with multiple inputs, you can use the \verb+\mcand+ command instead of the \verb+\cand+ command. This suppresses the numbering of the candidate. Since multiple input candidates usually appear with no constraint markings on the candidate itself, the starred version of the \verb+\viol+ command suppresses vertical lines in that cell of the tableau. Here's a full example, adapted from Petrova et al. (2006) in \emph{The Linguistic Review} 23-1.
253 \bigskip
254
255 \LetterBeforeFinger
256 \begin{tableau}{c:c|c|c|c}
257 \inp{} \const{Agree} \const{ID preson voi} \const{ID-wf voi} \const{IDvoi}\const{*voi}
258 \cand{\ips{pigds}} \vio*{} \vio*{} \vio*{} \vio*{} \vio{}
259 \mcand{pigds} \vio{!*} \vio{} \vio{} \vio{} \vio{**}
260 \mcand{pigdz} \vio{} \vio{} \vio{*!} \vio{*} \vio{***}
261 \mcand[\Optimal]{pikts} \vio{} \vio{} \vio{} \vio{**} \vio{}
262 \cand{\ips{pigts}} \vio*{} \vio*{} \vio*{} \vio*{} \vio{}
263 \mcand{pigts} \vio{*!} \vio{} \vio{} \vio{} \vio{*}
264 \mcand[\Optimal]{pikts} \vio{} \vio{} \vio{} \vio{*} \vio{}
265 \mcand{pigdz} \vio{} \vio{} \vio{!*} \vio{**} \vio{***}
266 \cand{\ips{pigtz}} \vio*{} \vio*{} \vio*{} \vio*{} \vio{}
267 \mcand[\Optimal]{pigdz} \vio{} \vio{} \vio{} \vio{**} \vio{***}
268 \mcand{piktz} \vio{*!} \vio{} \vio{} \vio{} \vio{}
269 \mcand{pigts} \vio{} \vio{} \vio{!*} \vio{*} \vio{}
270 \end{tableau}
271
272 \bigskip
273
274 Generated by:
275
276 \begin{verbatim}
277 \LetterBeforeFinger
278 \begin{tableau}{c:c|c|c|c}
279 \inp{} \const{Agree} \const{ID preson voi} \const{ID-wf voi} \const{IDvoi} \const{*voi}
280 \cand{\ips{pigds}} \vio*{} \vio*{} \vio*{} \vio*{} \vio{}
281 \mcand{pigds} \vio{!*} \vio{} \vio{} \vio{} \vio{**}
282 \mcand{pigdz} \vio{} \vio{} \vio{*!} \vio{*} \vio{***}
283 \mcand[\Optimal]{pikts} \vio{} \vio{} \vio{} \vio{**} \vio{}
284 \cand{\ips{pigts}} \vio*{} \vio*{} \vio*{} \vio*{} \vio{}
285 \mcand{pigts} \vio{*!} \vio{} \vio{} \vio{} \vio{*}
286 \mcand[\Optimal]{pikts} \vio{} \vio{} \vio{} \vio{*} \vio{}
287 \mcand{pigdz} \vio{} \vio{} \vio{!*} \vio{**} \vio{***}
288 \cand{\ips{pigtz}} \vio*{} \vio*{} \vio*{} \vio*{} \vio{}
289 \mcand[\Optimal]{pigdz} \vio{} \vio{} \vio{} \vio{**} \vio{***}
290 \mcand{piktz} \vio{*!} \vio{} \vio{} \vio{} \vio{}
291 \mcand{pigts} \vio{} \vio{} \vio{!*} \vio{*} \vio{}
292 \end{tableau}
293 \end{verbatim}
294
295
296
297
298
299 \end{document}