diff options
author | Karl Berry <karl@freefriends.org> | 2007-09-09 00:31:13 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-09-09 00:31:13 +0000 |
commit | 3407d103032c2b370491adcfdc621c034e01ec4e (patch) | |
tree | 01b0bd088d2de758858b5fd776415a19a0ad3476 /Master/texmf-dist/tex/latex/turnstile | |
parent | a0dfa93bd1086044339d3dd67f4000566e302e07 (diff) |
new latex package turnstile (7sep07)
git-svn-id: svn://tug.org/texlive/trunk@4917 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/turnstile')
-rw-r--r-- | Master/texmf-dist/tex/latex/turnstile/turnstile.sty | 225 |
1 files changed, 225 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/turnstile/turnstile.sty b/Master/texmf-dist/tex/latex/turnstile/turnstile.sty new file mode 100644 index 00000000000..5c116fe97d8 --- /dev/null +++ b/Master/texmf-dist/tex/latex/turnstile/turnstile.sty @@ -0,0 +1,225 @@ +%% +%% This is file `turnstile.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% turnstile-en.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% Copyright (C) 2007 by Arthur Buchsbaum and Francisco Reinaldo +%% <arthur@inf.ufsc.br>, <reinaldo.opus@gmail.com> +%% +%% This file may be distributed and/or modified under the conditions of +%% the LaTeX Project Public License, either version 1.2 of this license +%% or (at your option) any later version. The latest version of this +%% license is in: +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.2 or later is part of all distributions of LaTeX version +%% 1999/12/01 or later. +%% +\ProvidesPackage{turnstile} + [2007/06/23 v1.0 turnstile file] +\RequirePackage{ifthen} +\newlength{\firstwidth} +\newlength{\secondwidth} + +\newlength{\extrawidth} + +\newlength{\leasturnstilewidth} + +\newlength{\turnstilewidth} + +\newlength{\turnstileheight} + +\newlength{\dashthickness} + +\newlength{\ddashthickness} + +\newlength{\raiseup} + +\newlength{\raisedown} + +\newlength{\tinyverdistance} + +\newlength{\verdistance} + +\newlength{\lift} + +\newlength{\lengthvar} +\newsavebox{\first} + +\newsavebox{\second} + +\newsavebox{\turnstilebox} +\newcommand{\makever}[4] + {\ifthenelse{\equal{#1}{s}}{\rule[-0.5#3]{#2}{#3}}{} + \ifthenelse{\equal{#1}{d}}{\rule[-0.5#3]{#2}{#3} + \hspace{#4} + \rule[-0.5#3]{#2}{#3}}{} + \ifthenelse{\equal{#1}{t}}{\rule[-0.5#3]{#2}{#3} + \hspace{#4} + \rule[-0.5#3]{#2}{#3} + \hspace{#4} + \rule[-0.5#3]{#2}{#3}}{}} +\newcommand{\makehor}[4] + {\ifthenelse{\equal{#1}{n}}{\hspace{#3}}{} + \ifthenelse{\equal{#1}{s}}{\rule[-0.5#2]{#3}{#2}}{} + \ifthenelse{\equal{#1}{d}}{\setlength{\lengthvar}{#2} + \addtolength{\lengthvar}{0.5#4} + \rule[-\lengthvar]{#3}{#2} + \hspace{-#3} + \rule[0.5#4]{#3}{#2}}{} + \ifthenelse{\equal{#1}{t}}{\setlength{\lengthvar}{1.5#2} + \addtolength{\lengthvar}{#4} + \rule[-\lengthvar]{#3}{#2} + \hspace{-#3} + \rule[-0.5#2]{#3}{#2} + \hspace{-#3} + \setlength{\lengthvar}{0.5#2} + \addtolength{\lengthvar}{#4} + \rule[\lengthvar]{#3}{#2}}{}} +\newcommand{\turnstile}[6][s] + {\ifthenelse{\equal{#1}{d}} + {\sbox{\first}{$\displaystyle{#4}$} + \sbox{\second}{$\displaystyle{#5}$}}{} + \ifthenelse{\equal{#1}{t}} + {\sbox{\first}{$\textstyle{#4}$} + \sbox{\second}{$\textstyle{#5}$}}{} + \ifthenelse{\equal{#1}{s}} + {\sbox{\first}{$\scriptstyle{#4}$} + \sbox{\second}{$\scriptstyle{#5}$}}{} + \ifthenelse{\equal{#1}{ss}} + {\sbox{\first}{$\scriptscriptstyle{#4}$} + \sbox{\second}{$\scriptscriptstyle{#5}$}}{} + \setlength{\dashthickness}{0.111ex} + \setlength{\ddashthickness}{0.35ex} + \setlength{\leasturnstilewidth}{0.8em} + \setlength{\extrawidth}{0.2em} + \ifthenelse{% + \equal{#3}{n}}{\setlength{\tinyverdistance}{0ex}}{} + \ifthenelse{% + \equal{#3}{s}}{\setlength{\tinyverdistance}{0.5\dashthickness}}{} + \ifthenelse{% + \equal{#3}{d}}{\setlength{\tinyverdistance}{0.5\ddashthickness} + \addtolength{\tinyverdistance}{\dashthickness}}{} + \ifthenelse{% + \equal{#3}{t}}{\setlength{\tinyverdistance}{1.5\dashthickness} + \addtolength{\tinyverdistance}{\ddashthickness}}{} + \setlength{\verdistance}{0.4ex} + \settoheight{\lengthvar}{\usebox{\first}} + \setlength{\raisedown}{-\lengthvar} + \addtolength{\raisedown}{-\tinyverdistance} + \addtolength{\raisedown}{-\verdistance} + \settodepth{\raiseup}{\usebox{\second}} + \addtolength{\raiseup}{\tinyverdistance} + \addtolength{\raiseup}{\verdistance} + \setlength{\lift}{0.8ex} + \settowidth{\firstwidth}{\usebox{\first}} + \settowidth{\secondwidth}{\usebox{\second}} + \ifthenelse{\lengthtest{\firstwidth = 0ex} + \and + \lengthtest{\secondwidth = 0ex}} + {\setlength{\turnstilewidth}{\leasturnstilewidth}} + {\setlength{\turnstilewidth}{2\extrawidth} + \ifthenelse{\lengthtest{\firstwidth < \secondwidth}} + {\addtolength{\turnstilewidth}{\secondwidth}} + {\addtolength{\turnstilewidth}{\firstwidth}}} + \setlength{\turnstileheight}{3ex} + \sbox{\turnstilebox} + {\raisebox{\lift}{\ensuremath{ + \makever{#2}{\dashthickness}{\turnstileheight}{\ddashthickness} + \makehor{#3}{\dashthickness}{\turnstilewidth}{\ddashthickness} + \hspace{-\turnstilewidth} + \raisebox{\raisedown} + {\makebox[\turnstilewidth]{\usebox{\first}}} + \hspace{-\turnstilewidth} + \raisebox{\raiseup} + {\makebox[\turnstilewidth]{\usebox{\second}}} + \makever{#6}{\dashthickness}{\turnstileheight}{\ddashthickness}}}} + \mathrel{\usebox{\turnstilebox}}} +\newcommand{\nntstile}[3][s]{\turnstile[#1]{n}{n}{#2}{#3}{n}} +\newcommand{\nststile}[3][s]{\turnstile[#1]{n}{s}{#2}{#3}{n}} +\newcommand{\ndtstile}[3][s]{\turnstile[#1]{n}{d}{#2}{#3}{n}} +\newcommand{\nttstile}[3][s]{\turnstile[#1]{n}{t}{#2}{#3}{n}} + +\newcommand{\sntstile}[3][s]{\turnstile[#1]{s}{n}{#2}{#3}{n}} +\newcommand{\sststile}[3][s]{\turnstile[#1]{s}{s}{#2}{#3}{n}} +\newcommand{\sdtstile}[3][s]{\turnstile[#1]{s}{d}{#2}{#3}{n}} +\newcommand{\sttstile}[3][s]{\turnstile[#1]{s}{t}{#2}{#3}{n}} + +\newcommand{\dntstile}[3][s]{\turnstile[#1]{d}{n}{#2}{#3}{n}} +\newcommand{\dststile}[3][s]{\turnstile[#1]{d}{s}{#2}{#3}{n}} +\newcommand{\ddtstile}[3][s]{\turnstile[#1]{d}{d}{#2}{#3}{n}} +\newcommand{\dttstile}[3][s]{\turnstile[#1]{d}{t}{#2}{#3}{n}} + +\newcommand{\tntstile}[3][s]{\turnstile[#1]{t}{n}{#2}{#3}{n}} +\newcommand{\tststile}[3][s]{\turnstile[#1]{t}{s}{#2}{#3}{n}} +\newcommand{\tdtstile}[3][s]{\turnstile[#1]{t}{d}{#2}{#3}{n}} +\newcommand{\tttstile}[3][s]{\turnstile[#1]{t}{t}{#2}{#3}{n}} + +\newcommand{\nnststile}[3][s]{\turnstile[#1]{n}{n}{#2}{#3}{s}} +\newcommand{\nsststile}[3][s]{\turnstile[#1]{n}{s}{#2}{#3}{s}} +\newcommand{\ndststile}[3][s]{\turnstile[#1]{n}{d}{#2}{#3}{s}} +\newcommand{\ntststile}[3][s]{\turnstile[#1]{n}{t}{#2}{#3}{s}} + +\newcommand{\nndtstile}[3][s]{\turnstile[#1]{n}{n}{#2}{#3}{d}} +\newcommand{\nsdtstile}[3][s]{\turnstile[#1]{n}{s}{#2}{#3}{d}} +\newcommand{\nddtstile}[3][s]{\turnstile[#1]{n}{d}{#2}{#3}{d}} +\newcommand{\ntdtstile}[3][s]{\turnstile[#1]{n}{t}{#2}{#3}{d}} + +\newcommand{\nnttstile}[3][s]{\turnstile[#1]{n}{n}{#2}{#3}{t}} +\newcommand{\nsttstile}[3][s]{\turnstile[#1]{n}{s}{#2}{#3}{t}} +\newcommand{\ndttstile}[3][s]{\turnstile[#1]{n}{d}{#2}{#3}{t}} +\newcommand{\ntttstile}[3][s]{\turnstile[#1]{n}{t}{#2}{#3}{t}} + +\newcommand{\snststile}[3][s]{\turnstile[#1]{s}{n}{#2}{#3}{s}} +\newcommand{\ssststile}[3][s]{\turnstile[#1]{s}{s}{#2}{#3}{s}} +\newcommand{\sdststile}[3][s]{\turnstile[#1]{s}{d}{#2}{#3}{s}} +\newcommand{\stststile}[3][s]{\turnstile[#1]{s}{t}{#2}{#3}{s}} + +\newcommand{\sndtstile}[3][s]{\turnstile[#1]{s}{n}{#2}{#3}{d}} +\newcommand{\ssdtstile}[3][s]{\turnstile[#1]{s}{s}{#2}{#3}{d}} +\newcommand{\sddtstile}[3][s]{\turnstile[#1]{s}{d}{#2}{#3}{d}} +\newcommand{\stdtstile}[3][s]{\turnstile[#1]{s}{t}{#2}{#3}{d}} + +\newcommand{\snttstile}[3][s]{\turnstile[#1]{s}{n}{#2}{#3}{t}} +\newcommand{\ssttstile}[3][s]{\turnstile[#1]{s}{s}{#2}{#3}{t}} +\newcommand{\sdttstile}[3][s]{\turnstile[#1]{s}{d}{#2}{#3}{t}} +\newcommand{\stttstile}[3][s]{\turnstile[#1]{s}{t}{#2}{#3}{t}} + +\newcommand{\dnststile}[3][s]{\turnstile[#1]{d}{n}{#2}{#3}{s}} +\newcommand{\dsststile}[3][s]{\turnstile[#1]{d}{s}{#2}{#3}{s}} +\newcommand{\ddststile}[3][s]{\turnstile[#1]{d}{d}{#2}{#3}{s}} +\newcommand{\dtststile}[3][s]{\turnstile[#1]{d}{t}{#2}{#3}{s}} + +\newcommand{\dndtstile}[3][s]{\turnstile[#1]{d}{n}{#2}{#3}{d}} +\newcommand{\dsdtstile}[3][s]{\turnstile[#1]{d}{s}{#2}{#3}{d}} +\newcommand{\dddtstile}[3][s]{\turnstile[#1]{d}{d}{#2}{#3}{d}} +\newcommand{\dtdtstile}[3][s]{\turnstile[#1]{d}{t}{#2}{#3}{d}} + +\newcommand{\dnttstile}[3][s]{\turnstile[#1]{d}{n}{#2}{#3}{t}} +\newcommand{\dsttstile}[3][s]{\turnstile[#1]{d}{s}{#2}{#3}{t}} +\newcommand{\ddttstile}[3][s]{\turnstile[#1]{d}{d}{#2}{#3}{t}} +\newcommand{\dtttstile}[3][s]{\turnstile[#1]{d}{t}{#2}{#3}{t}} + +\newcommand{\tnststile}[3][s]{\turnstile[#1]{t}{n}{#2}{#3}{s}} +\newcommand{\tsststile}[3][s]{\turnstile[#1]{t}{s}{#2}{#3}{s}} +\newcommand{\tdststile}[3][s]{\turnstile[#1]{t}{d}{#2}{#3}{s}} +\newcommand{\ttststile}[3][s]{\turnstile[#1]{t}{t}{#2}{#3}{s}} + +\newcommand{\tndtstile}[3][s]{\turnstile[#1]{t}{n}{#2}{#3}{d}} +\newcommand{\tsdtstile}[3][s]{\turnstile[#1]{t}{s}{#2}{#3}{d}} +\newcommand{\tddtstile}[3][s]{\turnstile[#1]{t}{d}{#2}{#3}{d}} +\newcommand{\ttdtstile}[3][s]{\turnstile[#1]{t}{t}{#2}{#3}{d}} + +\newcommand{\tnttstile}[3][s]{\turnstile[#1]{t}{n}{#2}{#3}{t}} +\newcommand{\tsttstile}[3][s]{\turnstile[#1]{t}{s}{#2}{#3}{t}} +\newcommand{\tdttstile}[3][s]{\turnstile[#1]{t}{d}{#2}{#3}{t}} +\newcommand{\ttttstile}[3][s]{\turnstile[#1]{t}{t}{#2}{#3}{t}} +\endinput +%% +%% End of file `turnstile.sty'. |