summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-04-12 23:01:12 +0000
committerKarl Berry <karl@freefriends.org>2010-04-12 23:01:12 +0000
commit277b30bec6f5fcfa16446c7a912d1268fa798be0 (patch)
tree3c8e2f9059dc7b505dfc0412602cef21fa6c5873 /Master
parente6b5908820f5cc3db4919ab1e0aa4ec435ae9d19 (diff)
new latex package ot-tableau (11apr10)
git-svn-id: svn://tug.org/texlive/trunk@17829 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/ot-tableau/README3
-rw-r--r--Master/texmf-dist/doc/latex/ot-tableau/ot-tableau.pdfbin0 -> 112721 bytes
-rw-r--r--Master/texmf-dist/doc/latex/ot-tableau/ot-tableau.tex188
-rw-r--r--Master/texmf-dist/tex/latex/ot-tableau/ot-tableau.sty61
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check2
-rw-r--r--Master/tlpkg/tlpsrc/collection-mathextra.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/ot-tableau.tlpsrc0
7 files changed, 254 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/ot-tableau/README b/Master/texmf-dist/doc/latex/ot-tableau/README
new file mode 100644
index 00000000000..811ce1af775
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/ot-tableau/README
@@ -0,0 +1,3 @@
+This material is subject to the LaTeX Project Public License. See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html for the details of that license.
+
+Requires packages: tipa,ifthen,pifont,substr,bbding,suffix, colortbl, arydshln \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/ot-tableau/ot-tableau.pdf b/Master/texmf-dist/doc/latex/ot-tableau/ot-tableau.pdf
new file mode 100644
index 00000000000..78047963eb7
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/ot-tableau/ot-tableau.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/ot-tableau/ot-tableau.tex b/Master/texmf-dist/doc/latex/ot-tableau/ot-tableau.tex
new file mode 100644
index 00000000000..d4fd375b31e
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/ot-tableau/ot-tableau.tex
@@ -0,0 +1,188 @@
+\documentclass{article}
+\usepackage{ot-tableau}
+\usepackage{fullpage,rotating}
+\title{The \textsf{ot-tableau} package}
+\author{Adam Baker}
+
+\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[\HandRight]{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[\HandRight]{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 (like with \HandRight, \verb+\HandRight+)
+\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 typset the argument in IPA (TIPA) 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.
+
+\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, if you invoke the \verb+\ShadingOn+ command before creating the tableau.\footnote{More specifically, \tabl\ will look for the exclamation point. You have to provide the exclamation point.} (There is also \verb+\ShadingOff+ if you wish to turn this feature off for subsequent tableaux in the document; this is the default setting.) 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 a command like \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+\LetterBeforeFinger+ command:
+
+\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}
+ \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{verbatim}
+
+\noindent \verb+\FingerBeforeLetter+ is also available. This is the default.
+
+\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}
+
+\noindent For most needs, \verb+\HandRight+ and \verb+\HandLeft+ will be sufficient.
+
+\end{document}
diff --git a/Master/texmf-dist/tex/latex/ot-tableau/ot-tableau.sty b/Master/texmf-dist/tex/latex/ot-tableau/ot-tableau.sty
new file mode 100644
index 00000000000..1d082ae13ca
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ot-tableau/ot-tableau.sty
@@ -0,0 +1,61 @@
+% Note that tableau requires arydshln, which must be loaded after longtable
+
+\ProvidesPackage{ot-tableau}
+
+\RequirePackage{tipa,ifthen,pifont,substr,bbding,suffix}
+\RequirePackage{colortbl}
+\RequirePackage{arydshln}
+
+% IPA typesetting macros
+\def\ipa#1{\textipa{#1}}
+\def\ip#1{[\textipa{#1}]}
+\def\ips#1{/\textipa{#1}/}
+
+% OT tableaux
+\newcounter{tableaurow}
+
+\newcolumntype{s}{>{\ShadeTheCell}c}
+
+
+\def\ShadedCells{no}
+\def\ShadingOn{\def\ShadedCells{yes}}
+\def\ShadingOff{\def\ShadedCells{no}}
+
+\def\CellShading{0.9}
+\def\SetCellShading#1{\def\CellShading{#1}}
+\def\ShadeTheCell{\cellcolor[gray]{\CellShading}}
+
+\def\UnshadeTheCell{\cellcolor[gray]{1}}
+
+\def\Excl{no}
+
+\def\fingerfirst{yes}
+\def\FingerBeforeLetter{\def\fingerfirst{yes}}
+\def\LetterBeforeFinger{\def\fingerfirst{no}}
+
+\newcommand*{\rowletter}{\stepcounter{tableaurow}\alph{tableaurow}. }
+\newenvironment{tableau}[1]{\setcounter{tableaurow}{0}%
+ \dashlinegap=2pt%
+ \ifthenelse{\equal{\fingerfirst}{yes}}%
+ {\begin{tabular}{|r@{\hspace{4pt}}l@{\hspace{3pt}}l||#1|}}%then
+ {\begin{tabular}{|l@{\hspace{2pt}}r@{\hspace{4pt}}l||#1|}}%else
+ }{\\\hline\end{tabular}}
+
+\def\properlines{\ifthenelse{\thetableaurow=0}{\\\hline\hline}{\\\hline}}
+
+\newcommand\cand[2][]{\properlines\ifthenelse{\equal{\fingerfirst}{yes}}{#1&\rowletter}{\rowletter&#1}&\ipa{#2}\gdef\Excl{no}}
+\WithSuffix\newcommand\cand*[2][]{\properlines\ifthenelse{\equal{\fingerfirst}{yes}}{#1&\rowletter}{\rowletter&#1}&#2\gdef\Excl{no}}
+
+\def\vio#1{&#1\ifthenelse{\equal{\Excl}{yes}\and\equal{\ShadedCells}{yes}}{\ShadeTheCell}{}\ifthenelse{\equal{\Excl}{yes}}{}{\IfSubStringInString{!}{#1}{\gdef\Excl{yes}}{\gdef\Excl{no}}}}
+
+\newcommand\inp[1]{\hline\multicolumn{3}{|l||}{#1}}
+
+\newcommand\const[1]{&\textsc{#1}\UnshadeTheCell}
+\WithSuffix\newcommand\const*[1]{&#1\UnshadeTheCell}
+
+
+% \begin{tableau}{c:c}
+% \inp{input} \constraint{One} \constraint{Two}
+% \cand{input} \vio{*!} \vio{*}
+% \optcand{inp\super hut} \vio{} \vio{*}
+% \end{tableau}
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index aa47602baf4..39a8792efe2 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -212,7 +212,7 @@ my @TLP_working = qw(
ntgclass ntheorem-vn numname numprint
oberdiek ocgtools ocr-latex octavo ofs ogham oldstyle
onlyamsmath onrannual opcit
- ordinalpt orkhun othello oubraces outline
+ ordinalpt orkhun ot-tableau othello oubraces outline
pagecont pagenote pagerange paper papercdcase papertex
parallel paresse parrun passivetex
patch patchcmd patgen2-tutorial pauldoc pax pbox pb-diagram
diff --git a/Master/tlpkg/tlpsrc/collection-mathextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-mathextra.tlpsrc
index 5035fd8bd5e..f5c762d2823 100644
--- a/Master/tlpkg/tlpsrc/collection-mathextra.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-mathextra.tlpsrc
@@ -21,6 +21,7 @@ depend mattens
depend mhequ
depend multiobjective
depend nath
+depend ot-tableau
depend oubraces
depend proba
depend shuffle
diff --git a/Master/tlpkg/tlpsrc/ot-tableau.tlpsrc b/Master/tlpkg/tlpsrc/ot-tableau.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/ot-tableau.tlpsrc