diff options
author | Karl Berry <karl@freefriends.org> | 2017-07-25 22:00:35 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-07-25 22:00:35 +0000 |
commit | b5a3b2241e94d4afceda9cbcaebbd4da44e688ce (patch) | |
tree | 5bc46e710b8d6a5749bc51571f7cfbb0f7a67023 /Master/texmf-dist | |
parent | fa806c70c6a0ac139eabe8d0eca43352a13ac48e (diff) |
ot-tableau (25jul17)
git-svn-id: svn://tug.org/texlive/trunk@44889 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/ot-tableau/README | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/ot-tableau/ot-tableau.pdf | bin | 60741 -> 84456 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/ot-tableau/ot-tableau.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/ot-tableau/ot-tableau.sty | 45 |
4 files changed, 32 insertions, 17 deletions
diff --git a/Master/texmf-dist/doc/latex/ot-tableau/README b/Master/texmf-dist/doc/latex/ot-tableau/README index 353bd3f66ba..588e69e6af9 100644 --- a/Master/texmf-dist/doc/latex/ot-tableau/README +++ b/Master/texmf-dist/doc/latex/ot-tableau/README @@ -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 diff --git a/Master/texmf-dist/doc/latex/ot-tableau/ot-tableau.pdf b/Master/texmf-dist/doc/latex/ot-tableau/ot-tableau.pdf Binary files differindex a040b3c1969..bbda62b020a 100644 --- a/Master/texmf-dist/doc/latex/ot-tableau/ot-tableau.pdf +++ b/Master/texmf-dist/doc/latex/ot-tableau/ot-tableau.pdf diff --git a/Master/texmf-dist/doc/latex/ot-tableau/ot-tableau.tex b/Master/texmf-dist/doc/latex/ot-tableau/ot-tableau.tex index 1f19803e341..e63c9c43aab 100644 --- a/Master/texmf-dist/doc/latex/ot-tableau/ot-tableau.tex +++ b/Master/texmf-dist/doc/latex/ot-tableau/ot-tableau.tex @@ -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}} diff --git a/Master/texmf-dist/tex/latex/ot-tableau/ot-tableau.sty b/Master/texmf-dist/tex/latex/ot-tableau/ot-tableau.sty index 4769b18ec44..84528124dca 100644 --- a/Master/texmf-dist/tex/latex/ot-tableau/ot-tableau.sty +++ b/Master/texmf-dist/tex/latex/ot-tableau/ot-tableau.sty @@ -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@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@exclfalse\globaldefs=0} \def\ExclOn{\globaldefs=1\ottableau@excltrue\globaldefs=0} - +% Automatic row lettering \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@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@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@fingerfirst \ipa{#1} \else \rowletter \fi% @@ -126,7 +138,10 @@ \ifottableau@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]} |