summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/schemata/schemata.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/schemata/schemata.sty')
-rw-r--r--Master/texmf-dist/tex/generic/schemata/schemata.sty66
1 files changed, 49 insertions, 17 deletions
diff --git a/Master/texmf-dist/tex/generic/schemata/schemata.sty b/Master/texmf-dist/tex/generic/schemata/schemata.sty
index 8d971f6990b..36ec2828356 100644
--- a/Master/texmf-dist/tex/generic/schemata/schemata.sty
+++ b/Master/texmf-dist/tex/generic/schemata/schemata.sty
@@ -24,12 +24,30 @@
\else
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{schemata}
- [2013/02/14 v0.5 generic package to aid construction of topical categories]
+ [2013/03/10 v0.6 generic package to aid construction of topical categories]
+\fi
+\expandafter\ifx\csname newenvironment\endcsname\relax%
+\def\DoBraces{\let\schemaLD\lbrace \let\schemaRD\rbrace}\DoBraces%
+\DoBraces%
+\else
+\DeclareOption{braces}{\let\schemaLD\lbrace \let\schemaRD\rbrace}
+\DeclareOption{brackets}{\let\schemaLD\lbrack \let\schemaRD\rbrack}
+\DeclareOption{parens}{\let\schemaLD( \let\schemaRD)}
+\ExecuteOptions{braces}
+\ProcessOptions\relax
\fi
\newbox\rhs%
\newbox\lhs%
\newdimen\rheight%
\newdimen\lheight%
+\newif\ifschemaLC%
+\newif\ifschemaSwitch%
+\def\DoBraces{\let\schemaLD\lbrace \let\schemaRD\rbrace}\DoBraces%
+\def\DoBrackets{\let\schemaLD\lbrack \let\schemaRD\rbrack}%
+\def\DoParens{\let\schemaLD( \let\schemaRD)}%
+\def\LCschema{\schemaLCtrue}%
+\def\UCschema{\schemaLCfalse}%
+\def\SwitchSB{\schemaSwitchtrue}%
\expandafter\ifx\csname newenvironment\endcsname\relax%
{\catcode`@=11
\gdef\schemabox{\futurelet\testchar\schemab@x}
@@ -37,21 +55,35 @@
\else \let\next\@schemab@x \fi \next}
\gdef\@schemab@x#1{\@schemabox[0pt]{#1}}
\gdef\@schemabox[#1]#2{%
+ \ifschemaLC\def\Adj{}%
+ \ifschemaSwitch\def\Adj{\strut}\fi
+ \else
+ \def\Adj{\strut}%
+ \ifschemaSwitch\def\Adj{}\fi
+ \fi
+ \schemaSwitchfalse%
\ifdim#1<1pt
\def\\{\egroup\hbox\bgroup\ignorespaces }%
- \vbox{\hbox\bgroup\strut\ignorespaces #2\egroup}%
+ \vbox{\hbox\bgroup\Adj\ignorespaces #2\egroup}%
\else
\def\\{\hfil\egroup\hbox to #1\bgroup\ignorespaces }%
- \vbox{\hbox to #1\bgroup\strut\ignorespaces #2\hfil\egroup}%
+ \vbox{\hbox to #1\bgroup\Adj\ignorespaces #2\hfil\egroup}%
\fi
}}\else
\newcommand{\schemabox}[2][0pt]{%
+ \ifschemaLC\def\Adj{}%
+ \ifschemaSwitch\def\Adj{\strut}\fi
+ \else
+ \def\Adj{\strut}%
+ \ifschemaSwitch\def\Adj{}\fi
+ \fi
+ \schemaSwitchfalse%
\ifdim#1<1pt
\def\\{\egroup\hbox\bgroup\ignorespaces }%
- \vbox{\hbox\bgroup\strut\ignorespaces #2\egroup}%
+ \vbox{\hbox\bgroup\Adj\ignorespaces #2\egroup}%
\else
\def\\{\hfil\egroup\hbox to #1\bgroup\ignorespaces }%
- \vbox{\hbox to #1\bgroup\strut\ignorespaces #2\hfil\egroup}%
+ \vbox{\hbox to #1\bgroup\Adj\ignorespaces #2\hfil\egroup}%
\fi
}\fi
\expandafter\ifx\csname newenvironment\endcsname\relax%
@@ -121,39 +153,39 @@
}\fi
\expandafter\ifx\csname newenvironment\endcsname\relax%
\def\basiclbrace#1{%
- \ifmmode\left.\vcenter{\vbox to #1{\vfil}}\right\lbrace\fi}
+ \ifmmode\left.\vcenter{\vbox to #1{\vfil}}\right\schemaLD\fi}
\else
\newcommand{\basiclbrace}[1]{%
- \ifmmode\left.\vcenter{\vbox to #1{\vfil}}\right\lbrace\fi}
+ \ifmmode\left.\vcenter{\vbox to #1{\vfil}}\right\schemaLD\fi}
\fi
\expandafter\ifx\csname newenvironment\endcsname\relax%
\def\basicrbrace#1{%
- \ifmmode\left\rbrace\vcenter{\vbox to #1{\vfil}}\right.\fi}
+ \ifmmode\left\schemaRD\vcenter{\vbox to #1{\vfil}}\right.\fi}
\else
\newcommand{\basicrbrace}[1]{%
- \ifmmode\left\rbrace\vcenter{\vbox to #1{\vfil}}\right.\fi}
+ \ifmmode\left\schemaRD\vcenter{\vbox to #1{\vfil}}\right.\fi}
\fi
\expandafter\ifx\csname newenvironment\endcsname\relax%
\def\complexlbrace#1#2{%
\dimen0=#1%
\dimen2=#2%
\ifdim\dimen0<0pt
- \ifmmode\vcenter{\hbox{$\left.\vbox to 1.44265\dimen2{\vfil}\right\lbrace%
+ \ifmmode\vcenter{\hbox{$\left.\vbox to 1.44265\dimen2{\vfil}\right\schemaLD%
\atop\vbox to -1.44265\dimen0{\vfil}$}}\fi
\else
\ifmmode\vcenter{\hbox{$\vbox to 1.44265\dimen0{\vfil}%
- \atop\left.\vbox to 1.44265\dimen2{\vfil}\right\lbrace$}}\fi
+ \atop\left.\vbox to 1.44265\dimen2{\vfil}\right\schemaLD$}}\fi
\fi
}\else
\newcommand{\complexlbrace}[2]{%
\dimen0=#1%
\dimen2=#2%
\ifdim\dimen0<0pt
- \ifmmode\vcenter{\hbox{$\left.\vbox to 1.44265\dimen2{\vfil}\right\lbrace%
+ \ifmmode\vcenter{\hbox{$\left.\vbox to 1.44265\dimen2{\vfil}\right\schemaLD%
\atop\vbox to -1.44265\dimen0{\vfil}$}}\fi
\else
\ifmmode\vcenter{\hbox{$\vbox to 1.44265\dimen0{\vfil}%
- \atop\left.\vbox to 1.44265\dimen2{\vfil}\right\lbrace$}}\fi
+ \atop\left.\vbox to 1.44265\dimen2{\vfil}\right\schemaLD$}}\fi
\fi
}\fi
\expandafter\ifx\csname newenvironment\endcsname\relax%
@@ -161,22 +193,22 @@
\dimen0=#1%
\dimen2=#2%
\ifdim\dimen0<0pt
- \ifmmode\vcenter{\hbox{$\left.\vbox to 1.44265\dimen2{\vfil}\right\rbrace%
+ \ifmmode\vcenter{\hbox{$\left.\vbox to 1.44265\dimen2{\vfil}\right\schemaRD%
\atop\vbox to -1.44265\dimen0{\vfil}$}}\fi
\else
\ifmmode\vcenter{\hbox{$\vbox to 1.44265\dimen0{\vfil}%
- \atop\left.\vbox to 1.44265\dimen2{\vfil}\right\rbrace$}}\fi
+ \atop\left.\vbox to 1.44265\dimen2{\vfil}\right\schemaRD$}}\fi
\fi
}\else
\newcommand{\complexrbrace}[2]{%
\dimen0=#1%
\dimen2=#2%
\ifdim\dimen0<0pt
- \ifmmode\vcenter{\hbox{$\left.\vbox to 1.44265\dimen2{\vfil}\right\rbrace%
+ \ifmmode\vcenter{\hbox{$\left.\vbox to 1.44265\dimen2{\vfil}\right\schemaRD%
\atop\vbox to -1.44265\dimen0{\vfil}$}}\fi
\else
\ifmmode\vcenter{\hbox{$\vbox to 1.44265\dimen0{\vfil}%
- \atop\left.\vbox to 1.44265\dimen2{\vfil}\right\rbrace$}}\fi
+ \atop\left.\vbox to 1.44265\dimen2{\vfil}\right\schemaRD$}}\fi
\fi
}\fi
\endinput