[comp.text.tex] TeXhax Digest V91 #002

TeXhax@CS.WASHINGTON.EDU (TeXhax Digest) (01/14/91)

TeXhax Digest    Wednesday,  January 2, 1990  Volume 91 : Issue 2

Moderators: Tiina Modisett and Pierre MacKay

%%% The TeXhax digest is brought to you as a service of the TeX Users Group %%%
%%%       in cooperation with the UnixTeX distribution service at the       %%%
%%%                      University of Washington                           %%%

Today's Topics:         

                       Fonts and Memory Problems
                          problem with \bar
                         proof figure macros

------------------------------------------------------------------------

Date: Sat, 29 Dec 90 3:24:41 KST
From: wgcho@solgai.kaist.ac.kr (The Untouchable)
Subject: Fonts and Memory Problems
Keywords: fonts, memory, TeX, LaTeX

I have just started to use TeX and LaTeX on my PC, and on my Workstation at
school. And now I have some problems. 

It seems that the TeX packages I got is not enough. I often get the error 
messages that I need more fonts (such as amr*, amt*, etc.).
Where can I get the full package of generally used fonts?

One more question. I got the DosTeX 2.93a from somewhere on the net, and I
cannot run it on my 640K IBM AT. Does anyone has any suggestions ?

Thanks in advance,

Wongyu Cho

P.S. Direct replies are welcome.


    ********                
   *  *******               Wongyu Cho
 **  **                     Computer Science Dept.
*** *** *** ***             Korea Advanced Institute of Science and Technology 
*** *** *** ***             P.O. Box, 150, Cheongryang
*** *** *** ***             Seoul, Korea
        **  **              
  *******   *               Phone : 966-1931 (x4729)
    ********                e-mail: wgcho@solgai.kaist.ac.kr

-----------------------------------------------------------------------------

Date: Wed, 2 Jan 91 13:32:53 EST
From: keister@poincare.phys.cmu.edu (Brad Keister)
Subject: problem with \bar
Keywords: PHYZZX, \bar

I'm having trouble with an intermittent error involving \bar.
I'm using the PHYZZX macro package from SLAC, though I'm not sure
that the problem lies there.

I cannot isolate the problem.  In very short files, I don't get any
error messages, nor do I get trouble when these control sequences
occur in a 300+ page document, at least some of the time.  I do know
that \overline instead of \bar cures the problem, but I don't see the
problem with a \bar over a single boldface letter.

I start with the macro

	\def\rmb#1{{\bf #1}}


Then, inside a displayed equation, I have the following:

	{\bar\rmb{P}}'

! Argument of \rmb has an extra }.
<inserted text> 
                \par 
<to be read again> 
                   }
<argument> ... \mu ' | \lambda '\, j'; {\bar \rmb 
                                                  {P}}' \mu ' \>_g\cr &\quad...

\eqalign ...$&$\displaystyle {{}##}$\hfil \crcr #1
                                                  \crcr }}\,
l.841 [ l \, s ] k\, j; \rmb{P}\, \mu \>_{g0},}
                                               
? 
! Missing $ inserted.
<inserted text> 
                $
<to be read again> 
                   \par 
<to be read again> 
                   }
<argument> ... \mu ' | \lambda '\, j'; {\bar \rmb 
                                                  {P}}' \mu ' \>_g\cr &\quad...

\eqalign ...$&$\displaystyle {{}##}$\hfil \crcr #1
                                                  \crcr }}\,


This is then followed by an endless sequence of

! Misplaced \cr.

and

! Missing \cr inserted.

Does anyone have any suggestions?

Brad Keister
Department of Physics
Carnegie Mellon University
Pittsburgh, PA 15213
(412) 268-2772

internet:	keister@poincare.phys.cmu.edu
BITNET:		keister%poincare.phys.cmu.edu@CARNEGIE

-------------------------------------------------------------------------------

Date: Thu, 20 Dec 90 18:49:49 +0900
From: Makoto Tatsuta <tatsuta@sato.riec.tohoku.ac.jp>
Subject: proof figure macros
Keywords: LaTeX, proof figures, mathematics

I have made LaTeX macros to write proof figures often used in
Mathematical Logic easily and beautifully.

proof.sty	definitions of the macros
proofeg.tex	examples

The usage is commented in the head of proof.sty. The output of
proofeg.tex will also explain how to use the macros.

I have been using these macros since I wrote them 3 years ago.  Many
people told me that they were very convenient and it encouraged me to
post them here.

Remark that a large proof figure often requires bigLaTeX instead of
usual LaTeX because of its capacity.

			Makoto Tatsuta
			(tatsuta@riec.tohoku.ac.jp)
			Tohoku University

%------------------------------ CUT HERE ------------------------------
#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create:
#	proof.sty
#	proofeg.tex
# This archive created: Sat Oct 13 15:43:27 1990
export PATH; PATH=/bin:/usr/bin:$PATH
if test -f 'proof.sty'
then
	echo shar: "will not over-write existing file 'proof.sty'"
else
cat << \SHAR_EOF > 'proof.sty'
%	proof.sty	(Proof Figure Macros)
%
% 	version 1.0
%	October 13, 1990
% 	Copyright (C) 1990 Makoto Tatsuta (tatsuta@riec.tohoku.ac.jp)
% 
% This program is free software; you can redistribute it or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either versions 1, or (at your option)
% any later version.
% 
% This program is distributed in the hope that it will be useful
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.
%
%	Usage:
%		In \documentstyle, specify an optional style `proof', say,
%			\documentstyle[proof]{article}.
%
%	The following macros are available:
%
%	In all the following macros, all the arguments such as
%	<Lowers> and <Uppers> are processed in math mode.
%
%	\infer<Lower><Uppers>
%		draws an inference.
%
%		Use & in <Uppers> to delimit upper formulae.
%		<Uppers> consists more than 0 formulae.
%
%		\infer returns \hbox{ ... } or \vbox{ ... } and
%		sets \@LeftOffset and \@RightOffset globally.
%
%	\infer[<Label>]<Lower><Uppers>
%		draws an inference labeled with <Label>.
%
%	\infer*<Lower><Uppers>
%		draws a many step deduction.
%
%	\infer*[<Label>]<Lower><Uppers>
%		draws a many step deduction labeled with <Label>.
%
%	\deduce<Lower><Uppers>
%		draws an inference without a rule.
%
%	\deduce[<Proof>]<Lower><Uppers>
%		draws a many step deduction with a proof name.
%
%	Example:
%		If you want to write
%       	       	    B C
%		 	   -----
%		       A     D
%		      ----------
%			  E
%	use
%		\infer{E}{
%			A
%			&
%			\infer{D}{B & C}
%		}
%

%	Style Parameters

\newdimen\inferLineSkip		\inferLineSkip=2pt
\newdimen\inferLabelSkip	\inferLabelSkip=5pt
\def\inferTabSkip{\quad}

%	Variables

\newdimen\@LeftOffset	% global
\newdimen\@RightOffset	% global
\newdimen\@SavedLeftOffset	% safe from users

\newdimen\UpperWidth
\newdimen\LowerWidth
\newdimen\LowerHeight
\newdimen\UpperLeftOffset
\newdimen\UpperRightOffset
\newdimen\UpperCenter
\newdimen\LowerCenter
\newdimen\UpperAdjust
\newdimen\RuleAdjust
\newdimen\LowerAdjust
\newdimen\RuleWidth
\newdimen\HLabelAdjust
\newdimen\VLabelAdjust
\newdimen\WidthAdjust

\newbox\@UpperPart
\newbox\@LowerPart
\newbox\@LabelPart
\newbox\ResultBox

%	Flags

\newif\if@inferRule	% whether \@infer draws a rule.
\newif\if@ReturnLeftOffset	% whether \@infer returns \@LeftOffset.
\newif\if@MathSaved	% whether inner math mode where \infer or
			% \deduce appears.

%	Special Fonts

\def\DeduceSym{\vtop{\baselineskip4\p@ \lineskiplimit\z@
    \vbox{\hbox{.}\hbox{.}\hbox{.}}\hbox{.}}}

%	Math Save Macros
%
%	\@SaveMath is called in the very begining of toplevel macros
%	which are \infer and \deduce.
%	\@RestoreMath is called in the very last before toplevel macros end.
%	Remark \infer and \deduce ends calling \@infer.

\def\@SaveMath{\@MathSavedfalse \ifmmode \ifinner
	\relax $\relax \@MathSavedtrue \fi\fi }

\def\@RestoreMath{\if@MathSaved \relax $\relax\fi }

%	Macros

\def\@ifEmpty#1#2#3{\def\@tempa{\@empty}\def\@tempb{#1}\relax
	\ifx \@tempa \@tempb #2\else #3\fi }

\def\infer{\@SaveMath \@ifnextchar *{\@inferSteps}{\@inferOneStep}}

\def\@inferOneStep{\@inferRuletrue
	\@ifnextchar [{\@infer}{\@infer[\@empty]}}

\def\@inferSteps*{\@ifnextchar [{\@@inferSteps}{\@@inferSteps[\@empty]}}

\def\@@inferSteps[#1]{\@deduce{#1}[\DeduceSym]}

\def\deduce{\@SaveMath \@ifnextchar [{\@deduce{\@empty}}
	{\@inferRulefalse \@infer[\@empty]}}

%	\@deduce<Proof Label>[<Proof>]<Lower><Uppers>

\def\@deduce#1[#2]#3#4{\@inferRulefalse
	\@infer[\@empty]{#3}{\@SaveMath \@infer[{#1}]{#2}{#4}}}

%	\@infer[<Label>]<Lower><Uppers>
%		If \@inferRuletrue, draws a rule and <Label> is right to
%		a rule.
%		Otherwise, draws no rule and <Label> is right to <Lower>.

\def\@infer[#1]#2#3{\relax
% Get parameters
	\if@ReturnLeftOffset \else \@SavedLeftOffset=\@LeftOffset \fi
	\setbox\@LabelPart=\hbox{$#1$}\relax
	\setbox\@LowerPart=\hbox{$#2$}\relax
%
	\global\@LeftOffset=0pt
	\setbox\@UpperPart=\vbox{\tabskip=0pt \halign{\relax
		\global\@RightOffset=0pt \@ReturnLeftOffsettrue $##$&&
		\inferTabSkip
		\global\@RightOffset=0pt \@ReturnLeftOffsetfalse $##$\cr
		#3\cr}}\relax
%			Here is a little trick.
%			\@ReturnLeftOffsettrue(false) influences on \infer or
%			\deduce placed in ## locally
%			because of \@SaveMath and \@RestoreMath.
	\UpperLeftOffset=\@LeftOffset
	\UpperRightOffset=\@RightOffset
% Calculate Adjustments
	\LowerWidth=\wd\@LowerPart
	\LowerHeight=\ht\@LowerPart
	\LowerCenter=0.5\LowerWidth
%
	\UpperWidth=\wd\@UpperPart \advance\UpperWidth by -\UpperLeftOffset
	\advance\UpperWidth by -\UpperRightOffset
	\UpperCenter=\UpperLeftOffset
	\advance\UpperCenter by 0.5\UpperWidth
%
	\ifdim \UpperWidth > \LowerWidth
		% \UpperCenter > \LowerCenter
	\UpperAdjust=0pt
	\RuleAdjust=\UpperLeftOffset
	\LowerAdjust=\UpperCenter \advance\LowerAdjust by -\LowerCenter
	\RuleWidth=\UpperWidth
	\global\@LeftOffset=\LowerAdjust
%
	\else	% \UpperWidth <= \LowerWidth
	\ifdim \UpperCenter > \LowerCenter
%
	\UpperAdjust=0pt
	\RuleAdjust=\UpperCenter \advance\RuleAdjust by -\LowerCenter
	\LowerAdjust=\RuleAdjust
	\RuleWidth=\LowerWidth
	\global\@LeftOffset=\LowerAdjust
%
	\else	% \UpperWidth <= \LowerWidth
		% \UpperCenter <= \LowerCenter
%
	\UpperAdjust=\LowerCenter \advance\UpperAdjust by -\UpperCenter
	\RuleAdjust=0pt
	\LowerAdjust=0pt
	\RuleWidth=\LowerWidth
	\global\@LeftOffset=0pt
%
	\fi\fi
% Make a box
	\if@inferRule
%
	\setbox\ResultBox=\vbox{
		\moveright \UpperAdjust \box\@UpperPart
		\nointerlineskip \kern\inferLineSkip
		\moveright \RuleAdjust \vbox{\hrule width\RuleWidth}\relax
		\nointerlineskip \kern\inferLineSkip
		\moveright \LowerAdjust \box\@LowerPart }\relax
%
	\@ifEmpty{#1}{}{\relax
%
	\HLabelAdjust=\wd\ResultBox	\advance\HLabelAdjust by -\RuleAdjust
	\advance\HLabelAdjust by -\RuleWidth
	\WidthAdjust=\HLabelAdjust
	\advance\WidthAdjust by -\inferLabelSkip
	\advance\WidthAdjust by -\wd\@LabelPart
	\ifdim \WidthAdjust < 0pt \WidthAdjust=0pt \fi
%
	\VLabelAdjust=\dp\@LabelPart
	\advance\VLabelAdjust by -\ht\@LabelPart
	\VLabelAdjust=0.5\VLabelAdjust	\advance\VLabelAdjust by \LowerHeight
	\advance\VLabelAdjust by \inferLineSkip
%
	\setbox\ResultBox=\hbox{\box\ResultBox
		\kern -\HLabelAdjust \kern\inferLabelSkip
		\raise\VLabelAdjust \box\@LabelPart \kern\WidthAdjust}\relax
%
	}\relax % end @ifEmpty
%
	\else % \@inferRulefalse
%
	\setbox\ResultBox=\vbox{
		\moveright \UpperAdjust \box\@UpperPart
		\nointerlineskip \kern\inferLineSkip
		\moveright \LowerAdjust \hbox{\unhbox\@LowerPart
			\@ifEmpty{#1}{}{\relax
			\kern\inferLabelSkip \unhbox\@LabelPart}}}\relax
	\fi
%
	\global\@RightOffset=\wd\ResultBox
	\global\advance\@RightOffset by -\@LeftOffset
	\global\advance\@RightOffset by -\LowerWidth
	\if@ReturnLeftOffset \else \global\@LeftOffset=\@SavedLeftOffset \fi
%
	\box\ResultBox
	\@RestoreMath
}
SHAR_EOF
fi
if test -f 'proofeg.tex'
then
	echo shar: "will not over-write existing file 'proofeg.tex'"
else
cat << \SHAR_EOF > 'proofeg.tex'
%	proofeg.tex	(Examples for proof.sty)
%
%		on Oct 13, 1990
%		by Makoto Tatsuta
%
%	I hope you can learn how to use proof figure macros easily
%	by these examples.

\def\imp{\to}
\def\land{\mathbin\&}

\documentstyle[proof]{article}

\begin{document}
\section*{Examples of proof.sty}

\verb|\infer| draws beautiful proof figures easily:

\noindent (1)
$$
\infer{A}{
	\infer{B}{
		B11\land B12\land B13
		&
		B21\land B22\land B23
	}
	&
	C
}
$$

\noindent (2)
$$
\infer{A1\land A2\land A3\land A4\land A5\land A6}{
	\infer{B}{
		B11\land B12\land B13
		&
		B21\land B22\land B23
	}
	&
	C
}
$$

\noindent (3)
$$
\infer{A1\land A2\land A3\land A4\land A5\land A6}{
	C
	&
	\infer{B}{
		B11\land B12\land B13
		&
		B21\land B22\land B23
	}
}
$$

You can use also some variations:

\noindent (4)
$$
\infer[(1)]{A}{
	\infer*{B}{
		B11\land B12\land B13
		&
		B21\land B22\land B23
	}
	&
	C
}
$$

\noindent (5)
$$
\infer*[(1)]{A1\land A2\land A3\land A4\land A5\land A6}{
	\deduce[{\displaystyle \sum}]{B}{
		B11\land B12\land B13
		&
		B21\land B22\land B23
	}
	&
	\deduce{C}{(2)}
}
$$

Here are more practical examples:

\noindent (6)
$$
\infer[(\land I)]{A \land B}{A & B}
\qquad
\infer[(\land E_l)]A{A\land B}
\qquad
\infer[(\land E_r)]B{A\land B}
$$

$$
\infer[(\imp I)]{A \imp B}{
	\infer*{B}{[A]}
}
\qquad
\infer[(\imp E)]{B}{
	A \imp B
	&
	A
}
$$

Some techniques:
Use \verb|\vcenter| for an equation of proofs.

\noindent (7)
$$
\pi = \vcenter{
\infer{E}{
	A
	&
	\infer{D}{B & C}
}
}
$$

Use \verb|\kern| to adjust the form of a proof.

\noindent (8)
$$
\infer{E}{
	A
	&
	\infer{D}{B & C} \kern 0.5cm
}
$$

\end{document}
SHAR_EOF
fi
exit 0
#	End of shell archive

-----------------------------------------------------------------------

%%% Further information about the TeXhax Digest, the TeX
%%% Users Group, and the latest software versions is available
%%% in every tenth issue of the TeXhax Digest.
%%%
%%% Concerning subscriptions, address changes, unsubscribing:
%%%
%%%  BITNET: send a one-line mail message to LISTSERV@xxx
%%%         SUBSCRIBE TEX-L <your name>    % to subscribe
%%%      or UNSUBSCRIBE TEX-L
%%%
%%% Internet: send a similar one line mail message to
%%%           TeXhax-request@cs.washington.edu
%%% JANET users may choose to use
%%%           texhax-request@uk.ac.nsf
%%% All submissions to: TeXhax@cs.washington.edu
%%%
%%% Back issues available for FTPing as:
%%%          machine:              directory:  filename:
%%%   JUNE.CS.WASHINGTON.EDU          TeXhax/TeXhaxyy.nnn
%%%              yy = last two digits of current year
%%%                       nnn = issue number
%%%
%%%\bye
%%%

End of TeXhax Digest
**************************
-------