texlive[44889] Master/texmf-dist: ot-tableau (25jul17)
commits+karl at tug.org
commits+karl at tug.org
Wed Jul 26 00:00:35 CEST 2017
Revision: 44889
http://tug.org/svn/texlive?view=revision&revision=44889
Author: karl
Date: 2017-07-26 00:00:35 +0200 (Wed, 26 Jul 2017)
Log Message:
-----------
ot-tableau (25jul17)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/ot-tableau/README
trunk/Master/texmf-dist/doc/latex/ot-tableau/ot-tableau.pdf
trunk/Master/texmf-dist/doc/latex/ot-tableau/ot-tableau.tex
trunk/Master/texmf-dist/tex/latex/ot-tableau/ot-tableau.sty
Modified: trunk/Master/texmf-dist/doc/latex/ot-tableau/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/ot-tableau/README 2017-07-25 22:00:23 UTC (rev 44888)
+++ trunk/Master/texmf-dist/doc/latex/ot-tableau/README 2017-07-25 22:00:35 UTC (rev 44889)
@@ -1,3 +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: xstring, amssymb, bbding, suffix, colortbl, arydshln
\ No newline at end of file
+Requires packages: xstring, amssymb, bbding, suffix, colortbl, rotating, hhline,tabu
Modified: trunk/Master/texmf-dist/doc/latex/ot-tableau/ot-tableau.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/ot-tableau/ot-tableau.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/ot-tableau/ot-tableau.tex 2017-07-25 22:00:23 UTC (rev 44888)
+++ trunk/Master/texmf-dist/doc/latex/ot-tableau/ot-tableau.tex 2017-07-25 22:00:35 UTC (rev 44889)
@@ -2,7 +2,7 @@
\usepackage[notipa]{ot-tableau}
\usepackage{fullpage,pifont}
\title{The \textsf{ot-tableau} package}
-\date{Revised 2014-09-02}
+\date{Revised 2017-07-23}
\author{Adam Baker}
\def\eg{e.g.,~}
\def\tabl{\textsf{ot-tableau}}
Modified: trunk/Master/texmf-dist/tex/latex/ot-tableau/ot-tableau.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/ot-tableau/ot-tableau.sty 2017-07-25 22:00:23 UTC (rev 44888)
+++ trunk/Master/texmf-dist/tex/latex/ot-tableau/ot-tableau.sty 2017-07-25 22:00:35 UTC (rev 44889)
@@ -1,5 +1,4 @@
-% Note that ot-tableau requires arydshln, which must be loaded after longtable
-\ProvidesPackage{ot-tableau}[2014/09/02]
+\ProvidesPackage{ot-tableau}[2017/07/23]
% Package option: notipa
\newif\ifottableau at tipa
@@ -25,11 +24,14 @@
\RequirePackage{xstring}
\RequirePackage{amssymb} % provides the asterisks
\RequirePackage{bbding} % provides \HandRight, etc.
-\RequirePackage{suffix}
-\RequirePackage{colortbl}
-\RequirePackage{arydshln}
+\RequirePackage{suffix} % provides stared commands
+\RequirePackage{colortbl} % for shading
\RequirePackage{rotating}
+% fancy table and lines
+\RequirePackage{hhline,tabu}
+\newtabulinestyle { dashed=.5pt on 1.5pt off 1.5pt }
+
% IPA typesetting macros
\def\ipa#1{#1}
\def\ip#1{[#1]}
@@ -86,18 +88,28 @@
\def\ExclOff{\globaldefs=1\ottableau at exclfalse\globaldefs=0}
\def\ExclOn{\globaldefs=1\ottableau at excltrue\globaldefs=0}
+% Automatic row lettering
+\newcommand*{\rowletter}{\stepcounter{tableaurow}\alph{tableaurow}. }
-\newcommand*{\rowletter}{\stepcounter{tableaurow}\alph{tableaurow}. }
+% https://tex.stackexchange.com/questions/382843/using-the-tabu-environment-within-a-conditional-within-newenvironment
\newenvironment{tableau}[1]{\setcounter{tableaurow}{0}%
- \dashlinegap=2pt%
- \ifottableau at fingerfirst
- \begin{tabular}{|r@{\hspace{4pt}}l@{\hspace{3pt}}l||#1|}
- \else
- \begin{tabular}{|l@{\hspace{2pt}}r@{\hspace{4pt}}l||#1|}
- \fi%
- }{\\\hline\end{tabular}}
+ \gdef\ConstraintString{#1}
+ \StrSubstitute{#1}{s}{c}[\NoS]
+ \StrCount{\NoS}{c}[\ConstraintCount]%
+ \ifottableau at fingerfirst % finger first: this is the default
+ \expandafter\@firstoftwo
+ \else % finger second
+ \expandafter\@secondoftwo
+ \fi
+ {\begin{tabu}{|r@{\hspace{4pt}}l@{\hspace{3pt}}l||#1|}} % finger first
+ {\begin{tabu}{|l@{\hspace{2pt}}r@{\hspace{4pt}}l||#1|}} % finger second
+ \hhline{|---||*{\ConstraintCount}{-|}}
+ }{\\\hhline{|---||*{\ConstraintCount}{-|}}\end{tabu}}
-\def\properlines{\ifthenelse{\thetableaurow=0}{\\\hline\hline}{\\\hline}}
+% draw two lines after the constraints, one line elsewhere
+\def\properlines{\ifthenelse{\thetableaurow=0}%
+ {\\\hhline{:===::*{\ConstraintCount}{=:}}}%
+ {\\\hhline{|---||*{\ConstraintCount}{-|}}}}
\newcommand\cand[2][]{\OptimalOff\properlines%
\ifottableau at fingerfirst \ipa{#1} \else \rowletter \fi%
@@ -126,7 +138,10 @@
\ifottableau at excl \empty \else \IfSubStr{#1}{!}{\ExclOn}{\ExclOff} \fi%
}
-\newcommand\inp[1]{\hline\multicolumn{3}{|l||}{#1}}
+\newcommand\inp[1]{\multicolumn{3}{|l||}{#1}}
\newcommand\const[1]{&\textsc{#1}\UnshadeTheCell}
\WithSuffix\newcommand\const*[1]{\UnshadeTheCell}
+
+% 2017-07-22: This doesn't work for some reason if it's toward the top of the file
+\newcolumntype{:}{|[dashed]}
More information about the tex-live-commits
mailing list