2 %% This is file `infernce.sty',
3 %% generated with the docstrip utility.
5 %% The original source files were:
7 %% semantic.dtx (with options: `allOptions,inference')
11 %% For the copyright see the source file.
13 %% Any modified versions of this file must be renamed
14 %% with new filenames distinct from infernce.sty.
16 %% For distribution of the original source see the terms
17 %% for copying and modification in the file semantic.dtx.
19 %% This generated file may be distributed as long as the
20 %% original source files, as listed above, are part of the
21 %% same distribution. (The sources need not necessarily be
22 %% in the same archive or directory.)
24 %% semantic.dtx (c)1995--2002 Peter M^^f8ller Neergaard and
25 %% Arne John Glenstrup
27 \expandafter\ifx\csname sem@nticsLoader\endcsname\relax
28 \PackageError{semantic}{%
29 This file should not be loaded directly}
31 This file is an option of the semantic package. It should not be
32 loaded directly\MessageBreak
33 but by using \protect\usepackage{semantic} in your document
34 preamble.\MessageBreak
35 No commands are defined.\MessageBreak
36 Type <return> to proceed.
39 \TestForConflict{\@@tempa,\@@tempb,\@adjustPremises,\@inference}
40 \TestForConflict{\@inferenceBack,\@inferenceFront,\@inferenceOrPremis}
41 \TestForConflict{\@premises,\@processInference,\@processPremiseLine}
42 \TestForConflict{\@setLengths,\inference,\predicate,\predicatebegin}
43 \TestForConflict{\predicateend,\setnamespace,\setpremisesend}
44 \TestForConflict{\setpremisesspace,\@makeLength,\@@space}
45 \TestForConflict{\@@aLineBox,\if@@shortDivider}
48 \newcommand{\@makeLength}[4]{
49 \@@tempa=\expandafter{\csname @@#2\endcsname}
50 \@@tempb=\expandafter{\csname @set#2\endcsname} %
51 \expandafter \newlength \the\@@tempa
52 \expandafter \newcommand \the\@@tempb {}
53 \expandafter \newcommand \csname set#1\endcsname[1]{}
54 \expandafter \xdef \csname set#1\endcsname##1%
56 \noexpand\renewcommand{\the\@@tempb}{%
57 \noexpand\setlength{\the \@@tempa}{##1 #4}}%
59 \csname set#1\endcsname{#3}
60 \@@tempa=\expandafter{\@setLengths} %
61 \edef\@setLengths{\the\@@tempa \the\@@tempb} %
64 \newcommand{\@setLengths}{%
65 \setlength{\baselineskip}{1.166em}%
66 \setlength{\lineskip}{1pt}%
67 \setlength{\lineskiplimit}{1pt}}
68 \@makeLength{premisesspace}{pSpace}{1.5em}{plus 1fil}
69 \@makeLength{premisesend}{pEnd}{.75em}{plus 0.5fil}
70 \@makeLength{namespace}{nSpace}{.5em}{}
72 \newif\if@@shortDivider
73 \newcommand{\@@space}{ }
74 \newcommand{\predicate}[1]{\predicatebegin #1\predicateend}
75 \newcommand{\predicatebegin}{$}
76 \newcommand{\predicateend}{$}
79 \expandafter\hbox\bgroup
80 \@ifstar{\@@shortDividertrue\@inferenceFront}%
83 \def\@inferenceFront{%
85 {\@inferenceFrontName}%
88 \def\@inferenceFrontName[#1]{%
89 \setbox3=\hbox{\footnotesize #1}%
96 \long\def\@inferenceMiddle#1{%
105 \long\def\@inferenceBack#1{%
107 \hbox{\hskip\@@pEnd \predicate{\ignorespaces#1}\unskip\hskip\@@pEnd}%
109 \setbox\@@pBox=\vtop{\unvbox\@@pBox
110 \vskip 4\fontdimen8\textfont3}%
111 \setbox\@@cBox=\vbox{\vskip 4\fontdimen8\textfont3%
114 \ifdim\wd\@@pBox >\wd\@@cBox%
122 $\frac{\hbox to \dimen0{\hss\box\@@pBox\hss}}%
131 {\@inferenceBackName}%{}%
134 \def\@inferenceBackName[#1]{%
135 \setbox3=\hbox{\footnotesize #1}%
142 \newcommand{\@premises}[1]{%
143 \setbox\@@pBox=\vbox{}%
144 \dimen\@@maxwidth=\wd\@@cBox%
145 \@processPremises #1\\\end%
148 \newcommand{\@adjustPremises}{%
149 \setbox\@@pBox=\vbox{%
152 \setbox\@@pBox=\vbox{%
154 \global\setbox\@@aLineBox=\lastbox %
159 \hbox to \dimen\@@maxwidth{\unhbox\@@aLineBox}%
161 \if@@moreLines\repeat%
164 \def\@processPremises#1\\#2\end{%
165 \setbox\@@pLineBox=\hbox{}%
166 \@processPremiseLine #1&\end%
167 \setbox\@@pLineBox=\hbox{\unhbox\@@pLineBox \unskip}%
168 \ifdim \wd\@@pLineBox > \z@ %
170 \hbox{\hskip\@@pEnd \unhbox\@@pLineBox \hskip\@@pEnd}%
171 \ifdim \wd\@@pLineBox > \dimen\@@maxwidth %
172 \dimen\@@maxwidth=\wd\@@pLineBox %
174 \setbox\@@pBox=\vbox{\box\@@pLineBox\unvbox\@@pBox}%
177 \ifx \sem@tmp\empty \else %
179 \@processPremises #2\end %
183 \def\@processPremiseLine#1\end{%
185 \ifx \sem@tmp\empty \else%
186 \ifx \sem@tmp\@@space \else%
188 \hbox{\unhbox\@@pLineBox%
189 \@inferenceOrPremis #1\inference\end%
194 \ifx \sem@tmp\empty \else%
196 \@processPremiseLine#2\end%
200 \def\@inferenceOrPremis#1\inference{%
202 {\@dropnext{\predicate{\ignorespaces #1}\unskip}}%
203 {\@processInference #1\inference}%
205 \def\@processInference#1\inference\end{%
209 \advance\dimen3 by -\fontdimen22\textfont2
210 \advance\dimen3 by \fontdimen8\textfont3
211 \expandafter\raise\dimen3\box3%
213 \long\def\@ReturnAfterFi#1\fi{\fi#1}
217 %% End of file `infernce.sty'.