@@ -0,0 +1,193 @@
2+%% This is file `trfrac.sty',
3+%% generated with the docstrip utility.
5+%% The original source files were:
7+%% trfrac.dtx (with options: `file')
9+%% This is a generated file.
11+%% Copyright (C) 2009 by Kevin W. Hamlen
13+%% This file may be distributed and/or modified under the conditions of
14+%% the LaTeX Project Public License, either version 1.3a of this license
15+%% or (at your option) any later version. The latest version of this
18+%% http://www.latex-project.org/lppl.txt
20+%% and version 1.3a or later is part of all distributions of LaTeX version
21+%% 2004/10/01 or later.
23+\newdimen\trtopgap\trtopgap\z@
24+\newdimen\trbotgap\trbotgap\z@
25+\newcommand\TRF@startp{31415926}
26+\newcommand\TRF@endp{27182818}
28+\newif\ifTRF@outer\TRF@outertrue
29+\newif\ifTRF@derivok\TRF@derivoktrue
30+\newdimen\TRF@lhang\TRF@lhang\z@
31+\newdimen\TRF@rhang\TRF@rhang\z@
39+\newcommand\TRF@trfrac[3]{%
41+ \ifnum\lastpenalty=\TRF@startp\relax%
46+ \TRF@lsave\TRF@lhang%
47+ \setbox\TRF@eqbox\hbox{\TRF@derivokfalse#1}%
48+ \ifdim\wd\TRF@eqbox>\z@%
49+ \setbox\TRF@eqbox\hbox{\kern\p@\unhbox\TRF@eqbox}%
52+ \setbox\TRF@numbox\hbox{%
55+ \penalty\TRF@startp\relax%
57+ \ifnum\lastpenalty=\TRF@endp\relax\else%
58+ \global\TRF@rhang\z@%
62+ \setbox\TRF@denombox\hbox{%
66+ \dimen@\wd\TRF@numbox%
67+ \advance\dimen@-\TRF@rhang%
69+ \advance\TRF@bw-\TRF@lhang%
70+ \ifdim\wd\TRF@denombox>\TRF@bw\TRF@bw\wd\TRF@denombox\fi%
71+ \advance\dimen@\TRF@lhang%
72+ \advance\dimen@-\wd\TRF@denombox%
73+ \TRF@ni\ifdim\dimen@>\z@\z@\else-.5\dimen@\fi%
75+ \advance\TRF@bi\TRF@lhang%
76+ \TRF@lhang\ifdim\dimen@<\z@\z@\else.5\dimen@\fi%
77+ \ifdim\TRF@bi>\TRF@lhang\TRF@bi\TRF@lhang\fi%
79+ \advance\TRF@rhang\wd\TRF@numbox%
81+ \advance\dimen@\TRF@bw%
82+ \advance\dimen@\wd\TRF@eqbox%
83+ \ifdim\dimen@>\TRF@rhang\TRF@rhang\dimen@\fi%
84+ \advance\TRF@rhang-\TRF@lhang%
85+ \advance\TRF@rhang-\wd\TRF@denombox%
86+ \global\TRF@rhang\TRF@rhang%
89+ \raise\fontdimen22\textfont\tw@\vtop%
97+ \dimen@\fontdimen8\textfont\tw@%
98+ \advance\dimen@-\fontdimen22\textfont\tw@%
99+ \advance\dimen@-.5\fontdimen8\textfont\thr@@%
100+ \advance\dimen@-\dp\TRF@numbox%
101+ \ifdim\dimen@<3\fontdimen8\textfont\thr@@%
102+ \dimen@3\fontdimen8\textfont\thr@@%
104+ \advance\dimen@\trtopgap%
105+ \hbox{\kern\TRF@ni\unhbox\TRF@numbox}%
109+ \vrule\@width\TRF@bw%
110+ \@height.5\fontdimen8\textfont\thr@@%
111+ \@depth.5\fontdimen8\textfont\thr@@%
113+ \dimen@.5\ht\TRF@eqbox%
114+ \advance\dimen@.5\dp\TRF@eqbox%
122+ \dimen@\fontdimen11\textfont\tw@%
123+ \advance\dimen@\fontdimen22\textfont\tw@%
124+ \advance\dimen@-.5\fontdimen8\textfont\thr@@%
125+ \advance\dimen@-\ht\TRF@denombox%
126+ \ifdim\dimen@<3\fontdimen8\textfont\thr@@%
127+ \dimen@3\fontdimen8\textfont\thr@@%
129+ \advance\dimen@\trbotgap%
131+ \hbox{\kern\TRF@lhang\box\TRF@denombox}%
135+ \penalty\TRF@endp\relax%
137+ \global\TRF@lhang\ifTRF@first\TRF@lhang\else\TRF@lsave\fi%
140+\newcommand\trfrac[3][]{%
143+ \TRF@trfrac{#1}{#2}{#3}%
151+\newcommand\TRF@mmerr{%
152+ \PackageError{trfrac}{\protect\trfrac\space%
153+ only allowed in math mode}%
154+ {I encountered a \protect\trfrac\space%
155+ macro without first encountering a begin-math token.}%
157+\newcommand\TRF@derr{%
158+ \PackageError{trfrac}{\protect\trfrac\space%
159+ not allowed in the consequent of another \protect\trfrac}%
160+ {\protect\trfrac\space can only appear in the premise (numerator%
161+ ) of another \protect\trfrac, not in the consequent (denominator%
162+ ) of a \protect\trfrac.}%
164+\newcommand\TRF@next{}
165+\newcommand\TRF@sep{\futurelet\TRF@next\TRF@@sep}
166+\newcommand\TRF@@sep{%
168+ \let\TRF@next\TRF@separg%
170+ \let\TRF@next\TRF@sepnoarg%
174+\newcommand\TRF@separg{}
175+\def\TRF@separg[#1]{\cr\noalign{\kern#1}}
176+\newcommand\TRF@sepnoarg{\cr}
177+\newenvironment{trgather}{%
180+ \ialign\bgroup\hfil{\m@th$##$}\hfil\cr%
182+ \crcr\egroup\egroup%
184+\newenvironment{tralign}{%
187+ \ialign\bgroup\hfil{\m@th$##\null$}&{\m@th$\null##$}\hfil\cr%
189+ \crcr\egroup\egroup%
193+%% End of file `trfrac.sty'.