From 1464b16c814d145ab46ea1d25254a8643d183e71 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 1 Aug 2007 01:01:34 +0000 Subject: apl update (28jul07) git-svn-id: svn://tug.org/texlive/trunk@4689 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/apl/00readme.tex | 32 -- Master/texmf-dist/doc/latex/apl/apldef.tex | 96 ---- Master/texmf-dist/doc/latex/apl/aplstyle.tex | 29 -- Master/texmf-dist/doc/latex/apl/aplverb.tex | 45 -- Master/texmf-dist/doc/latex/apl/ninesize.tex | 34 -- Master/texmf-dist/doc/latex/apl/problems.tex | 316 -------------- Master/texmf-dist/doc/latex/apl/sample.tex | 124 ------ Master/texmf-dist/doc/latex/apl/solutions.tex | 198 --------- Master/texmf-dist/doc/latex/apl/tugboat.tex | 530 ---------------------- Master/texmf-dist/doc/latex/apl/tugboat2.tex | 534 ----------------------- Master/texmf-dist/doc/latex/apl/versatim.tex | 66 --- Master/texmf-dist/source/fonts/apl/apldef.tex | 106 +++++ Master/texmf-dist/source/fonts/apl/aplstyle.tex | 29 ++ Master/texmf-dist/source/fonts/apl/aplverb.tex | 45 ++ Master/texmf-dist/source/fonts/apl/clean.pas | 226 ++++++++++ Master/texmf-dist/source/fonts/apl/convert.pas | 117 +++++ Master/texmf-dist/source/fonts/apl/fontnotes | 97 ++++ Master/texmf-dist/source/fonts/apl/ninesize.tex | 34 ++ Master/texmf-dist/source/fonts/apl/problems.tex | 316 ++++++++++++++ Master/texmf-dist/source/fonts/apl/readme | 28 ++ Master/texmf-dist/source/fonts/apl/readme.txt | 129 ++++++ Master/texmf-dist/source/fonts/apl/sample.tex | 124 ++++++ Master/texmf-dist/source/fonts/apl/solutions.tex | 198 +++++++++ Master/texmf-dist/source/fonts/apl/tugboat.tex | 530 ++++++++++++++++++++++ Master/texmf-dist/source/fonts/apl/tugboat2.tex | 534 +++++++++++++++++++++++ Master/texmf-dist/source/fonts/apl/versatim.tex | 66 +++ Master/texmf-dist/source/latex/apl/clean.pas | 226 ---------- Master/texmf-dist/source/latex/apl/convert.pas | 117 ----- Master/texmf-dist/source/latex/apl/fontnotes | 97 ---- Master/texmf-dist/source/latex/apl/readme | 28 -- Master/texmf-dist/source/latex/apl/readme.txt | 129 ------ 31 files changed, 2579 insertions(+), 2601 deletions(-) delete mode 100644 Master/texmf-dist/doc/latex/apl/00readme.tex delete mode 100644 Master/texmf-dist/doc/latex/apl/apldef.tex delete mode 100644 Master/texmf-dist/doc/latex/apl/aplstyle.tex delete mode 100644 Master/texmf-dist/doc/latex/apl/aplverb.tex delete mode 100644 Master/texmf-dist/doc/latex/apl/ninesize.tex delete mode 100644 Master/texmf-dist/doc/latex/apl/problems.tex delete mode 100644 Master/texmf-dist/doc/latex/apl/sample.tex delete mode 100644 Master/texmf-dist/doc/latex/apl/solutions.tex delete mode 100644 Master/texmf-dist/doc/latex/apl/tugboat.tex delete mode 100644 Master/texmf-dist/doc/latex/apl/tugboat2.tex delete mode 100644 Master/texmf-dist/doc/latex/apl/versatim.tex create mode 100644 Master/texmf-dist/source/fonts/apl/apldef.tex create mode 100644 Master/texmf-dist/source/fonts/apl/aplstyle.tex create mode 100644 Master/texmf-dist/source/fonts/apl/aplverb.tex create mode 100644 Master/texmf-dist/source/fonts/apl/clean.pas create mode 100644 Master/texmf-dist/source/fonts/apl/convert.pas create mode 100644 Master/texmf-dist/source/fonts/apl/fontnotes create mode 100644 Master/texmf-dist/source/fonts/apl/ninesize.tex create mode 100644 Master/texmf-dist/source/fonts/apl/problems.tex create mode 100644 Master/texmf-dist/source/fonts/apl/readme create mode 100644 Master/texmf-dist/source/fonts/apl/readme.txt create mode 100644 Master/texmf-dist/source/fonts/apl/sample.tex create mode 100644 Master/texmf-dist/source/fonts/apl/solutions.tex create mode 100644 Master/texmf-dist/source/fonts/apl/tugboat.tex create mode 100644 Master/texmf-dist/source/fonts/apl/tugboat2.tex create mode 100644 Master/texmf-dist/source/fonts/apl/versatim.tex delete mode 100644 Master/texmf-dist/source/latex/apl/clean.pas delete mode 100644 Master/texmf-dist/source/latex/apl/convert.pas delete mode 100644 Master/texmf-dist/source/latex/apl/fontnotes delete mode 100644 Master/texmf-dist/source/latex/apl/readme delete mode 100644 Master/texmf-dist/source/latex/apl/readme.txt (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/apl/00readme.tex b/Master/texmf-dist/doc/latex/apl/00readme.tex deleted file mode 100644 index d729a540b6a..00000000000 --- a/Master/texmf-dist/doc/latex/apl/00readme.tex +++ /dev/null @@ -1,32 +0,0 @@ -% langs/apl -\par\begin{footnotesize}\begin{alltt} -Contents of README files:\par -Thank you for your letter of 27 February. The original purpose -of our APL font and macros was to solve the immediate problem -of writing documents with APL code. Therefore, they are free for -anyone who finds them useful. Some people have requested the font -and we have sent them the files appended below (with CMAPL10 and -two conversion programs for downloading pixel files, not given here). -Further, we have nothing against giving our net address to the -users because it would be useful to hear about extensions made -to the system. - -The files APLDEF.TEX and TUGBOAT.TEX are identical with the second -versions sent to you (via BITNET) except for minimal changes (there -are some corrections and extensions in APLDEF.TEX, and in -TUGBOAT.TEX one APL line was corrected.) We think the files are -in a "final" form (at least we are not planning any changes). - -Our original purpose was to publish the second version, but the only -difference was really the removal of the tilde space character (this -resulted in more complex 1-character macros, but the user cannot -see any difference; moreover, TeX runs only about 14% slower). Thus, -we feel that there is no reason to publish a list of errata in -TUGboat, because any user would inevitably have to use the new -version (the old one has not been released). - -We are adding a file containing sample examples on the use of the -APL mnemonics. - -Aarno Hohti -\end{alltt}\end{footnotesize}\par diff --git a/Master/texmf-dist/doc/latex/apl/apldef.tex b/Master/texmf-dist/doc/latex/apl/apldef.tex deleted file mode 100644 index e47ab57301f..00000000000 --- a/Master/texmf-dist/doc/latex/apl/apldef.tex +++ /dev/null @@ -1,96 +0,0 @@ -% apldef.tex -% -%=============================================================== -% This file contains the definitions of the 2-letter control -% sequences for using cmapl10. -%=============================================================== -% -\def\RO{{\apl\char'014}} % rho -\def\IO{{\apl\char'015}} % iota -\def\BX{\lower.1ex\hbox{\apl\char'001}} % quad box (window etc.) -\def\CE{{\apl\char'035}} % ceiling -\def\FL{{\apl\char'034}} % floor -\def\DE{{\apl\char'031}} % decode -\def\EN{{\apl\char'030}} % encode -\def\DL{{\apl\char'002}} % del -\def\LD{{\apl\char'003}} % delta -\def\NT{{\apl\char'026}} % not -\def\LO{{\apl\char'017}} % circle -\def\GO{{\apl\char'036}} % arrow right -\def\OR{{\apl\char'010}} % logical or -\def\DM{{\apl\char'011}} % diamond -\def\LE{{\apl\char'012}} % less than or equal -\def\GE{{\apl\char'013}} % greater than or equal -\def\AB{{\apl\char'174}} % stile -\def\LB{{\apl\char'173}} % left brace -\def\RB{{\apl\char'175}} % right brace -\def\DA{{\apl\char'037}} % arrow down -\def\UA{{\apl\char'136}} % arrow up -\def\EP{{\apl\char'006}} % epsilon -\def\NE{{\apl\char'027}} % not equal -\def\BL{{\apl\char'134}} % backslash -\def\RU{{\apl\char'022}} % right U -\def\LU{{\apl\char'023}} % left U -\def\DU{{\apl\char'021}} % down U -\def\UU{{\apl\char'020}} % up U -\def\LK{{\apl\char'033}} % left tack -\def\RK{{\apl\char'032}} % right tack -\def\US{{\apl\char'024}} % underscore -\def\NG{{\apl\char'025}} % high minus -\def\DD{{\apl\char'007}} % dieresis -\def\AM{{\apl\char'004}} % alpha -\def\OM{{\apl\char'005}} % omega -\def\SO{\raise.3ex\hbox{{\apl\char'016}}} % small circle -% -% This macro is used for overstriking two characters -\newskip\charwidth -\def\overstrike#1#2{\setbox1=\hbox{#1}\charwidth=\wd1 - #1\hskip-\charwidth#2} -% -\def\TR{\overstrike{\LO}{\BL}} % transpose -\def\RV{\overstrike{\LO}{\AB}} % reverse -\def\CR{\overstrike{\LO}{-}} % column reverse -\def\GD{\overstrike{\LD}{\AB}} % grade down -\def\GU{\overstrike{\DL}{\AB}} % grade up -\def\FM{\overstrike{\raise.1ex\hbox{{\apl\char'016}}}{\EN}} % format -\def\XQ{\overstrike{\raise.1ex\hbox{{\apl\char'016}}}{\DE}} % execute -\def\SS{\overstrike{\RU}{\US}} % subset -\def\CO{\overstrike{\LU}{\US}} % contains -\def\CB{\overstrike{\BL}{-}} % column backslash -\def\CS{\overstrike{/}{-}} % column slash -\def\IB{\overstrike{\EN}{\DE}} % I-beam -\def\DQ{\overstrike{{\apl\char'045}}{\BX}} % divide quad -\def\QQ{\overstrike{{\apl '}}{\BX}} % quote quad -\def\PD{\overstrike{\DL}{\NT}} % protected del -\def\NR{\overstrike{\OR}{\NT}} % nor -\def\NN{\overstrike{{\apl\char'046}}{\NT}} % nand -\def\LG{\overstrike{{\apl *}}{\LO}} % logarithm -% underscored letters -\def\ZA{\overstrike{{\apl A}}{\US}} -\def\ZB{\overstrike{{\apl B}}{\US}} -\def\ZC{\overstrike{{\apl C}}{\US}} -\def\ZD{\overstrike{{\apl D}}{\US}} -\def\ZE{\overstrike{{\apl E}}{\US}} -\def\ZF{\overstrike{{\apl F}}{\US}} -\def\ZG{\overstrike{{\apl G}}{\US}} -\def\ZH{\overstrike{{\apl H}}{\US}} -\def\ZI{\overstrike{{\apl I}}{\US}} -\def\ZJ{\overstrike{{\apl J}}{\US}} -\def\ZK{\overstrike{{\apl K}}{\US}} -\def\ZL{\overstrike{{\apl L}}{\US}} -\def\ZM{\overstrike{{\apl M}}{\US}} -\def\ZN{\overstrike{{\apl N}}{\US}} -\def\ZO{\overstrike{{\apl O}}{\US}} -\def\ZP{\overstrike{{\apl P}}{\US}} -\def\ZQ{\overstrike{{\apl Q}}{\US}} -\def\ZR{\overstrike{{\apl R}}{\US}} -\def\ZS{\overstrike{{\apl S}}{\US}} -\def\ZT{\overstrike{{\apl T}}{\US}} -\def\ZU{\overstrike{{\apl U}}{\US}} -\def\ZV{\overstrike{{\apl V}}{\US}} -\def\ZX{\overstrike{{\apl X}}{\US}} -\def\ZY{\overstrike{{\apl Y}}{\US}} -\def\ZW{\overstrike{{\apl W}}{\US}} -\def\ZZ{\overstrike{{\apl Z}}{\US}} - -\endinput diff --git a/Master/texmf-dist/doc/latex/apl/aplstyle.tex b/Master/texmf-dist/doc/latex/apl/aplstyle.tex deleted file mode 100644 index b732bded0c4..00000000000 --- a/Master/texmf-dist/doc/latex/apl/aplstyle.tex +++ /dev/null @@ -1,29 +0,0 @@ -% aplstyle.tex -% -%=============================================================== -% A P L S T Y L E -%=============================================================== -% A.Hohti/O.Kanerva University of Helsinki April 6 1987 -% -% APL symbols are represented by the Digital (VAX) APL replacement -% symbols. The standard escape sequence is changed to "@" (at sign) -% in accordance with the usage in Digital APL. -% -\font\apl=cmapl10 % The APL font of typewriter type -% -% -% The following macro switches the typewriter-like font -% used within verbatim -\def\ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax} -\outer\def\choosett#1{\ifundefined{#1} - \message{Undefined font(?), replaced with cmtt10} - \let\tt=\tentt - \else - \def\tt{\expandafter\csname#1\endcsname}\fi} -% -\choosett{tentt} % default value -% -\input aplverb % definitions for verbatim -\input apldef % control sequences for the APL symbols - -\endinput diff --git a/Master/texmf-dist/doc/latex/apl/aplverb.tex b/Master/texmf-dist/doc/latex/apl/aplverb.tex deleted file mode 100644 index cac8e3acdbf..00000000000 --- a/Master/texmf-dist/doc/latex/apl/aplverb.tex +++ /dev/null @@ -1,45 +0,0 @@ -% aplverb.tex = verbatim.tex -% -% -% F|ljande macron anv{nds d} man vill f} ut \TeX-kommandon -% i klartext. @text@ ger text i fonten \tt med alla kontroll- -% tecken och dylika bevarade (\TeX\ f|rst}r sig endast p} kommandot -% @ i denna mode). Man kan ocks} utnyttja \begintt ... \endtt f|r -% att beskriva kommandon, d} {r ocks} \obeylines och \obeyspaces -% aktiva. Om man vill anv{nda vissa \TeX-kommandon men vill -% ocks} displaya n}got i en-kolumn-tabell-form kan man anv{nda -% \begindisplay ...\cr ...\cr \enddisplay -% Om du vill anv{nda \begintt...\endtt f|r text som inte -% ryms p} en sida, kan du ocks} anv{nda \beginlines...\endlines. -% Varje rad m}ste d} b|rjas och avslutas med kommandot @. -\newskip\verbatimindent \verbatimindent=0cm -\newskip\ttglue{\tt \global\ttglue=.5em plus.25em minus.15em} -\def\@{\char'100 } -% -\outer\def\begindisplay{\obeylines\startdisplay} -{\obeylines\gdef\startdisplay#1 - {\catcode`\^^M=5$$#1\halign\bgroup&\hskip\verbatimindent##\hfil\cr}} -\outer\def\enddisplay{\crcr\egroup$$} -% -\chardef\other=12 -\def\ttverbatim{\begingroup \catcode`\\=\other \catcode`\{=\other - \catcode`\}=\other \catcode`\$=\other \catcode`\&=\other - \catcode`\#=\other \catcode`\%=\other \catcode`\~=\other - \catcode`\_=\other \catcode`\^=\other\catcode`\*=\other\catcode`\==\other - \obeyspaces \obeylines \tt} -{\obeyspaces\gdef {\ }} -% -\def\begintt{$$\let\par=\endgraf \ttverbatim \parskip=0pt - \catcode`\@=0 \parindent=\verbatimindent \rightskip=-5pc \ttfinish} -{\catcode`\@=0 @catcode`@\=\other % @ is temporary escape character - @obeylines % end of line is active - @gdef@ttfinish#1^^M#2\endtt{#1@vbox{#2}@endgroup$$}} -% -\catcode`\@=\active -{\obeylines\gdef@{\ttverbatim\spaceskip=\ttglue\let^^M=\ \let@=\endgroup}} - -\def\beginlines{\par\begingroup\nobreak\medskip\parindent=0pt - \kern1pt\nobreak \obeylines \everypar{\strut}} -\def\endlines{\kern1pt\endgroup\medbreak\noindent} - -\endinput diff --git a/Master/texmf-dist/doc/latex/apl/ninesize.tex b/Master/texmf-dist/doc/latex/apl/ninesize.tex deleted file mode 100644 index a0260f07997..00000000000 --- a/Master/texmf-dist/doc/latex/apl/ninesize.tex +++ /dev/null @@ -1,34 +0,0 @@ - -%============================================================================= -% N I N E S I Z E . T E X (for convenience only) -%============================================================================= -%=============================================================== -% This is a TeX macro for switching to nine point fonts. Taken -% from the TeXbook, pages 413 - 415. (For special cases only) -%=============================================================== -% -\font\ninerm=amr9 -\font\ninei=ammi9 -\font\ninesy=amsy9 -\font\ninebf=ambx9 -\font\ninett=amtt9 -\font\nineit=amti9 -\font\ninesl=amsl9 -% -\skewchar\ninei='177 -\skewchar\ninesy='60 -\skewchar\ninett=-1 -% -\newskip\tglue -\def\ninepoint{\def\rm{\fam0\ninerm} - \textfont0=\ninerm - \textfont1=\ninei - \textfont2=\ninesy - \textfont\itfam=\nineit \def\it{\fam\itfam\nineit}% - \textfont\slfam=\ninesl \def\sl{\fam\slfam\ninesl}% - \textfont\ttfam=\ninett \def\tt{\fam\ttfam\ninett}% - \textfont\bffam=\ninebf \def\bf{\fam\bffam\ninebf}% - \tt\tglue=.5em plus.25em minus .15em - \normalbaselineskip=11pt - \setbox\strutbox=\hbox{\vrule height8pt depth3pt width0pt}% - \let\sc=\sevenrm \let\big=\ninebig \normalbaselines\rm}% diff --git a/Master/texmf-dist/doc/latex/apl/problems.tex b/Master/texmf-dist/doc/latex/apl/problems.tex deleted file mode 100644 index 3f47553ea37..00000000000 --- a/Master/texmf-dist/doc/latex/apl/problems.tex +++ /dev/null @@ -1,316 +0,0 @@ - -%=================================================================== -% Sample problems; solutions give examples on using APL style in TeX -% Taken from the course ``Mathematics on the Computer'', Fall 87 -%=================================================================== - -\magnification = \magstep1 - -\advance\vsize by 3truecm - -\input mssymb % for some math symbols only! This is the new - % symbol font for some standard and non-standard - % mathematical symbols. It is only used here for - % blackboard bold letters. If you dont have it, - % just define \def\Bbb{} etc. - -\input aplstyle - -\choosett{apl} - -\font\sans = amss10 -\font\sltt = amsltt10 - -\def\header{{\sans Sample problems 9.\ 10.\ 1987}} -% some of them come from Sims' ``Abstract Algebra, A Computational Approach'' -\def\APL{{\sltt APL}} - -\nopagenumbers -\tolerance = 300 -\noindent -\header - -\vskip 2cm - -\item{1.} Let $N>1$ be an integer. Show that each of the following - matrices represents a binary operation on - $S(N)$ (we set locally \BX@IO_0@.) Which of them are - associative, which commutative? - \medskip - - \itemitem{a)} @(@\IO@N)@\SO@.@\CE\IO@N@ - - \itemitem{b)} \AB@(@\IO@N)@\SO@.-@\IO@N@ - - \itemitem{c)} @N@\AB@(@\IO@N)@\SO@.+@\IO@N@ - - \itemitem{d)} @N@\AB@(@\IO@N)@\SO@.#@\IO@N@ - - \medskip -\item{} Here @x@\CE@y@ is $\max(x,y)$, @x@\AB@y@ is - $y\bmod x$ and \AB@x@ is the absolute value of $x$. - -\bigskip - -\item{2.} Write an \APL\ function @GPOWER@ that computes for a group - @G@ (global variable) the $n$-th power of a given element $x$. - (If $S(M)$ is a representation vector of @G@, then - @GPOWER@ is a map $S(M)\times \Bbb Z\to S(M)$. Simply - use iteration.) - -\bigskip - -\item{3.} (Continuing problem 2.) A faster algorithm is obtained by - decomposing $x^n$ into its 2--base form - $x^n = x^{i_0}\times x^{2i_1}\times - x^{4i_2}\times ... \times x^{{2^k}i_k}$, where $i_j\in\{0,1\}$. Show - that the complexity of this algorithm is $O(\log_2(n))$. - (Show that the number of necessary multiplications does - not exceed $2\log_2(n)$). How would you write the corresponding - function in \APL? (Note that the binary representation of $n$ - can be obtained by applying iteratively the procedure $n\bmod 2$.) - -\bigskip - -\item{4.} Write an \APL\ function @GTSGP@ that computes for a given group @G@ - (global variable) the subgroup generated by a given subset $A$. The - function @GTSGP@ has one argument (the vector @A@) and returns - a subset of the set $S(N)$ (as a vector). (Extend the set @A@ - by the group operation until @A@ becomes closed with respect - to the operation.) - -\bigskip - -\item{5.} Write an \APL\ function @INV@ that returns for a group @G@ - the vector of inverse elements as a vector $S(N)\to S(N)$ so - that the index of the inverse of $x_i$ is @(INV G)[I]@. - -\bigskip - -\item{6.} Let $(G,\theta)$ be a group and let $A$ be a subset of $G$. Program - the following algorithm in \APL\ to find the subgroup @H@ - generated by @A@. Compare the perfomance of this algorithm - with the algorithm in Problem 4. - \medskip - - \itemitem{a)} put $H$ and $Y$ equal to $\{e\}$. - - \itemitem{b)} let $Y$ be $YA\smallsetminus H$. - - \itemitem{c)} if $Y=\emptyset$, stop. - - \itemitem{d)} put $H$ equal to $H\cup Y$ and - go to (b). - - \medskip -\item{} ($e$ is the neutral element and $YA\smallsetminus H$ - is the set--theoretical difference of $YA$ and $H$. - The product $YA$ is the set $\{y\theta a: y\in Y, a\in A\}$.) - -\bigskip - -\item{7.} Write an \APL\ function @PROD@ that returns for given groups - $(G_1,\theta_1)$ ja $(G_2,\theta_2)$ the {\sl direct product} - $(G_1\times G_2,\theta_1\times\theta_2)$ as a group table. - (The binary operation in the product is $(x,y)\theta_1\times\theta_2 - (z,w) = (x\theta_1 z,y\theta_2 w)$). - -\bigskip - -\vfill\eject - -%========================================================================== -% Solutions to above sample exercises -%========================================================================== - -%\advance\vsize by 3truecm - -\choosett{apl} - -\noindent -\header%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\vskip 1cm - -\noindent -As the index of the neutral element we use the index origin \BX@IO@ which -usually has the value @0@. Then $S(N)= -\{0,\dots,N-1\}$, given by the vector \IO@N@. -An example on groups are the cyclic groups $({\bf Z}_n,+)$ -the group tables of which are generated by the \APL\ function @ZNPLUS@: - -\hskip\parskip\vbox{\hsize=15truecm -\begintt - @DL Z_ZNPLUS N;@BXIO -[1] @BXIO_0 -[2] Z_N@AB(@ION)@SO.+@ION - @DL -\endtt -}\smallskip - -\item{1.} The matrices represent binary operations of $S(N)$, - since they are $N\times N$-matrices with elements from - $S(N)$. They are all associative and also commutative except for - the case (b). This can be seen by the function @TEST@: - -\hskip\parskip\vbox{\hsize=15truecm -\begintt - @DL Z_TEST B -[1] " B IS A BINARY OPERATION. THE FUNCTION RETURNS A BOOLEAN 2-VECTOR -[2] " (B ASSOCIATIVE, B COMMUTATIVE) -[3] Z_(&/&/&/B[B;]=B[;B]),&/&/B=@TRB - @DL -\endtt -}\smallskip - -\item{2.} - -\hskip\parskip\vbox{\hsize=15truecm -\begintt - @DL P_X GPOWER N;I -[1] " G GLOBAL -[2] P_@BXIO @DM I_0 -[3] TEST:@GO(NJ_J+1)/CORE -[6] @GO(N>I_I+1)/JLOOP - @DL -\endtt -} - -Example: - -\hskip\parskip\vbox{\hsize=15truecm -\begintt - (ZNPLUS 2) PROD ZNPLUS 10 - 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 - 1 2 3 4 5 6 7 8 9 0 11 12 13 14 15 16 17 18 19 10 - 2 3 4 5 6 7 8 9 0 1 12 13 14 15 16 17 18 19 10 11 - 3 4 5 6 7 8 9 0 1 2 13 14 15 16 17 18 19 10 11 12 - 4 5 6 7 8 9 0 1 2 3 14 15 16 17 18 19 10 11 12 13 - 5 6 7 8 9 0 1 2 3 4 15 16 17 18 19 10 11 12 13 14 - 6 7 8 9 0 1 2 3 4 5 16 17 18 19 10 11 12 13 14 15 - 7 8 9 0 1 2 3 4 5 6 17 18 19 10 11 12 13 14 15 16 - 8 9 0 1 2 3 4 5 6 7 18 19 10 11 12 13 14 15 16 17 - 9 0 1 2 3 4 5 6 7 8 19 10 11 12 13 14 15 16 17 18 -10 11 12 13 14 15 16 17 18 19 0 1 2 3 4 5 6 7 8 9 -11 12 13 14 15 16 17 18 19 10 1 2 3 4 5 6 7 8 9 0 -12 13 14 15 16 17 18 19 10 11 2 3 4 5 6 7 8 9 0 1 -13 14 15 16 17 18 19 10 11 12 3 4 5 6 7 8 9 0 1 2 -14 15 16 17 18 19 10 11 12 13 4 5 6 7 8 9 0 1 2 3 -15 16 17 18 19 10 11 12 13 14 5 6 7 8 9 0 1 2 3 4 -16 17 18 19 10 11 12 13 14 15 6 7 8 9 0 1 2 3 4 5 -17 18 19 10 11 12 13 14 15 16 7 8 9 0 1 2 3 4 5 6 -18 19 10 11 12 13 14 15 16 17 8 9 0 1 2 3 4 5 6 7 -19 10 11 12 13 14 15 16 17 18 9 0 1 2 3 4 5 6 7 8 -\endtt -} - -\end diff --git a/Master/texmf-dist/doc/latex/apl/sample.tex b/Master/texmf-dist/doc/latex/apl/sample.tex deleted file mode 100644 index 85481d7c943..00000000000 --- a/Master/texmf-dist/doc/latex/apl/sample.tex +++ /dev/null @@ -1,124 +0,0 @@ - -%============================================================================ -% S A M P L E . T E X -%============================================================================ - -%=================================================================== -% Sample problems; solutions give examples on using APL style in TeX -% Taken from the course ``Mathematics on the Computer'', Fall 87 -%=================================================================== - -\magnification = \magstep1 - -\advance\vsize by 3truecm - -\input mssymb % for some math symbols only! This is the new - % symbol font for some standard and non-standard - % mathematical symbols. It is only used here for - % blackboard bold letters. If you dont have it, - % just define \def\Bbb{} etc. - -\input aplstyle - -\choosett{apl} - -\font\sans = amss10 -\font\sltt = amsltt10 - -\def\header{{\sans Sample problems 9.\ 10.\ 1987}} -% some of them come from Sims' ``Abstract Algebra, A Computational Approach'' -\def\APL{{\sltt APL}} - -\nopagenumbers -\tolerance = 300 -\noindent -\header - -\vskip 2cm - -\item{1.} Let $N>1$ be an integer. Show that each of the following - matrices represents a binary operation on - $S(N)$ (we set locally \BX@IO_0@.) Which of them are - associative, which commutative? - \medskip - - \itemitem{a)} @(@\IO@N)@\SO@.@\CE\IO@N@ - - \itemitem{b)} \AB@(@\IO@N)@\SO@.-@\IO@N@ - - \itemitem{c)} @N@\AB@(@\IO@N)@\SO@.+@\IO@N@ - - \itemitem{d)} @N@\AB@(@\IO@N)@\SO@.#@\IO@N@ - - \medskip -\item{} Here @x@\CE@y@ is $\max(x,y)$, @x@\AB@y@ is - $y\bmod x$ and \AB@x@ is the absolute value of $x$. - -\bigskip - -\item{2.} Write an \APL\ function @GPOWER@ that computes for a group - @G@ (global variable) the $n$-th power of a given element $x$. - (If $S(M)$ is a representation vector of @G@, then - @GPOWER@ is a map $S(M)\times \Bbb Z\to S(M)$. Simply - use iteration.) - -\bigskip - -\item{3.} (Continuing problem 2.) A faster algorithm is obtained by - decomposing $x^n$ into its 2--base form - $x^n = x^{i_0}\times x^{2i_1}\times - x^{4i_2}\times ... \times x^{{2^k}i_k}$, where $i_j\in\{0,1\}$. Show - that the complexity of this algorithm is $O(\log_2(n))$. - (Show that the number of necessary multiplications does - not exceed $2\log_2(n)$). How would you write the corresponding - function in \APL? (Note that the binary representation of $n$ - can be obtained by applying iteratively the procedure $n\bmod 2$.) - -\bigskip - -\item{4.} Write an \APL\ function @GTSGP@ that computes for a given group @G@ - (global variable) the subgroup generated by a given subset $A$. The - function @GTSGP@ has one argument (the vector @A@) and returns - a subset of the set $S(N)$ (as a vector). (Extend the set @A@ - by the group operation until @A@ becomes closed with respect - to the operation.) - -\bigskip - -\item{5.} Write an \APL\ function @INV@ that returns for a group @G@ - the vector of inverse elements as a vector $S(N)\to S(N)$ so - that the index of the inverse of $x_i$ is @(INV G)[I]@. - -\bigskip - -\item{6.} Let $(G,\theta)$ be a group and let $A$ be a subset of $G$. Program - the following algorithm in \APL\ to find the subgroup @H@ - generated by @A@. Compare the perfomance of this algorithm - with the algorithm in Problem 4. - \medskip - - \itemitem{a)} put $H$ and $Y$ equal to $\{e\}$. - - \itemitem{b)} let $Y$ be $YA\smallsetminus H$. - - \itemitem{c)} if $Y=\emptyset$, stop. - - \itemitem{d)} put $H$ equal to $H\cup Y$ and - go to (b). - - \medskip -\item{} ($e$ is the neutral element and $YA\smallsetminus H$ - is the set--theoretical difference of $YA$ and $H$. - The product $YA$ is the set $\{y\theta a: y\in Y, a\in A\}$.) - -\bigskip - -\item{7.} Write an \APL\ function @PROD@ that returns for given groups - $(G_1,\theta_1)$ ja $(G_2,\theta_2)$ the {\sl direct product} - $(G_1\times G_2,\theta_1\times\theta_2)$ as a group table. - (The binary operation in the product is $(x,y)\theta_1\times\theta_2 - (z,w) = (x\theta_1 z,y\theta_2 w)$). - -\bigskip - -\vfill\eject diff --git a/Master/texmf-dist/doc/latex/apl/solutions.tex b/Master/texmf-dist/doc/latex/apl/solutions.tex deleted file mode 100644 index 85e37305451..00000000000 --- a/Master/texmf-dist/doc/latex/apl/solutions.tex +++ /dev/null @@ -1,198 +0,0 @@ - -%========================================================================== -% Solutions to above sample exercises -%========================================================================== - -%\advance\vsize by 3truecm - -\choosett{apl} - -\noindent -\header%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\vskip 1cm - -\noindent -As the index of the neutral element we use the index origin \BX@IO@ which -usually has the value @0@. Then $S(N)= -\{0,\dots,N-1\}$, given by the vector \IO@N@. -An example on groups are the cyclic groups $({\bf Z}_n,+)$ -the group tables of which are generated by the \APL\ function @ZNPLUS@: - -\hskip\parskip\vbox{\hsize=15truecm -\begintt - @DL Z_ZNPLUS N;@BXIO -[1] @BXIO_0 -[2] Z_N@AB(@ION)@SO.+@ION - @DL -\endtt -}\smallskip - -\item{1.} The matrices represent binary operations of $S(N)$, - since they are $N\times N$-matrices with elements from - $S(N)$. They are all associative and also commutative except for - the case (b). This can be seen by the function @TEST@: - -\hskip\parskip\vbox{\hsize=15truecm -\begintt - @DL Z_TEST B -[1] " B IS A BINARY OPERATION. THE FUNCTION RETURNS A BOOLEAN 2-VECTOR -[2] " (B ASSOCIATIVE, B COMMUTATIVE) -[3] Z_(&/&/&/B[B;]=B[;B]),&/&/B=@TRB - @DL -\endtt -}\smallskip - -\item{2.} - -\hskip\parskip\vbox{\hsize=15truecm -\begintt - @DL P_X GPOWER N;I -[1] " G GLOBAL -[2] P_@BXIO @DM I_0 -[3] TEST:@GO(NJ_J+1)/CORE -[6] @GO(N>I_I+1)/JLOOP - @DL -\endtt -} - -Example: - -\hskip\parskip\vbox{\hsize=15truecm -\begintt - (ZNPLUS 2) PROD ZNPLUS 10 - 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 - 1 2 3 4 5 6 7 8 9 0 11 12 13 14 15 16 17 18 19 10 - 2 3 4 5 6 7 8 9 0 1 12 13 14 15 16 17 18 19 10 11 - 3 4 5 6 7 8 9 0 1 2 13 14 15 16 17 18 19 10 11 12 - 4 5 6 7 8 9 0 1 2 3 14 15 16 17 18 19 10 11 12 13 - 5 6 7 8 9 0 1 2 3 4 15 16 17 18 19 10 11 12 13 14 - 6 7 8 9 0 1 2 3 4 5 16 17 18 19 10 11 12 13 14 15 - 7 8 9 0 1 2 3 4 5 6 17 18 19 10 11 12 13 14 15 16 - 8 9 0 1 2 3 4 5 6 7 18 19 10 11 12 13 14 15 16 17 - 9 0 1 2 3 4 5 6 7 8 19 10 11 12 13 14 15 16 17 18 -10 11 12 13 14 15 16 17 18 19 0 1 2 3 4 5 6 7 8 9 -11 12 13 14 15 16 17 18 19 10 1 2 3 4 5 6 7 8 9 0 -12 13 14 15 16 17 18 19 10 11 2 3 4 5 6 7 8 9 0 1 -13 14 15 16 17 18 19 10 11 12 3 4 5 6 7 8 9 0 1 2 -14 15 16 17 18 19 10 11 12 13 4 5 6 7 8 9 0 1 2 3 -15 16 17 18 19 10 11 12 13 14 5 6 7 8 9 0 1 2 3 4 -16 17 18 19 10 11 12 13 14 15 6 7 8 9 0 1 2 3 4 5 -17 18 19 10 11 12 13 14 15 16 7 8 9 0 1 2 3 4 5 6 -18 19 10 11 12 13 14 15 16 17 8 9 0 1 2 3 4 5 6 7 -19 10 11 12 13 14 15 16 17 18 9 0 1 2 3 4 5 6 7 8 -\endtt -} - -\end - - diff --git a/Master/texmf-dist/doc/latex/apl/tugboat.tex b/Master/texmf-dist/doc/latex/apl/tugboat.tex deleted file mode 100644 index 87b1461a1cc..00000000000 --- a/Master/texmf-dist/doc/latex/apl/tugboat.tex +++ /dev/null @@ -1,530 +0,0 @@ - -%============================================================================= -% T U G B O A T . T E X -%============================================================================= -%======================================================================== -% A TeX file for the paper on APL-TeX (new version, not published) -% -% A.Hohti/O.Kanerva (University of Helsinki) April 1987 -%======================================================================== -% -% -% Version of August 26, 1987 at 15:00 -% -% -%======================================================================== -\input aplstyle % the file containing the APL definitions -%======================================================================== -% -% -\magnification=\magstep1 % for weak eyes! -% -% -%======================================================================== -\font\bigbf=ambx10 % for titles -\font\sltt=amsltt10 % for file contents inside text -\font\manual=manfnt at 10pt % for major METAFONT logo -\font\minual=manfnt at 9pt % for minor METAFONT logo -\input ninesize % abstract, references -%======================================================================== -% -\def\METAFONT{{\manual META}\-{\manual FONT}} -\def\metafont{{\minual META}\-{\minual FONT}} -% -%======================================================================== -% stylistic definitions -\def\section#1{\vskip0pt plus .1\vsize - \penalty-250\vskip0pt plus-.1\vsize\bigskip - \noindent{\bf #1.\ }\nobreak\message{#1}} -\def\abstract#1{\bigskip\centerline{\hbox{ - \vbox{\hsize=4.75truein{\ninepoint \noindent ABSTRACT.\enspace#1}}}}} -\def\APL{{\sl APL}} -% this definition is from the TeXbook, Ex. 21.3 : -\def\boxit#1{\vbox{\hrule \hbox{\vrule \kern2pt - \vbox{\kern2pt#1\kern2pt}\kern2pt\vrule}\hrule}} -% A macro for making references and blocks. -% -\newdimen\refindent\newdimen\plusindent -\newdimen\refskip\newdimen\tempindent -\newdimen\extraindent -\newcount\refcount -% -% \refskip has to be set by the user! Otherwise \parindent is -% used, in accordance with \item. -% -\refcount=0 -\def\ref#1:#2.-#3\par{\ninepoint % switch to nine point fonts -\advance\refcount by 1 -\setbox0=\hbox{[\number\refcount]}\refindent=\wd0 -\plusindent=\refskip\extraindent=\refskip -\advance\plusindent by -\refindent\tempindent=\parindent % -\parindent=0pt\par\hangindent\extraindent % - [\number\refcount]\hskip\plusindent #1:{\sl#2},#3 -\parindent=\tempindent} -% -\refskip=\parindent -% -%======================================================================== - % HEADER -\null -\vskip2truecm -% - \centerline{\bigbf GENERATING AN \APL\ FONT} -% -\vskip.75truecm -% - \centerline{\sl Aarno Hohti and Okko Kanerva} -% -\vskip.5truecm -% - \centerline{\sl University of Helsinki} -\vskip.5truecm -\abstract{The \APL\ language is well known for its peculiar - symbols which have inhibited the use of this language - in many programming environments. Making \APL\ - documents of good quality has been difficult and - expensive. We describe here a simple way how to - use \metafont\ to generate an \APL\ font for \TeX\ - by using existing font definitions as far as possible.} -\vskip.5truecm -%======================================================================== -% -\section{Introduction} -This note describes an interesting exercise in using -\METAFONT\ to produce new typefaces by combining letters -from standard fonts. As we know, the \APL\ language [6] of -Kenneth Iverson has never gained the popularity it deserves -which is largely due to its strange symbol set. Indeed, -true \APL\ users require a special keyboard to support -the nonstandard but powerful operator symbols. Moreover, -putting \APL\ into print has always been a problem, and -modern low cost computerized typesetting programs do -not usually support \APL\ style. \TeX\ can be used to -produce high quality printouts for technical text, -and it would be desirable to have a possibility to -mix in \APL\ code. The companion program of -\TeX ---\METAFONT ---provides a full means for a simple generation -of an \APL\ font for \TeX, and the purpose of this -note is to inform other people about the result we -have obtained at the University of Helsinki. Let us note -that there are at least three other \APL\ fonts available -for small computer environments. Indeed, the newsletter -\APL\ {\it Quote Quad\/}\footnote{*}{{\ninepoint Newsletter of SIGAPL, -the Special Interest Group for \APL. {\it Quote Quad\/} has the same -status in the world of \APL\ as TUGboat in \TeX{nical} world.}} -is produced by using TROFF, and there -exists a Postscript \APL\ font for the Apple Laserwriter [5] and -another font for the TEXT typesetting system [2]. - -Consider the following usual kind of function definition in \APL: -\choosett{apl} -\begintt - @DLS_SUMSQ N;I - [1] S_I_0 - [2] @GO(N@@ROI)/LOOP - @endsym - } - $$\boxit{\boxit{\box0}}$$ - \centerline{\sevenrm An APL function for polynomial multiplication} -\endtt -% -gives the output -% -\choosett{apl} -\setbox0=\vbox{\hsize=5.7truein -\begintt - [0] Z_A1 PROD A2;A;I;V - [1] "RETURNS THE PRODUCT OF THE POLYNOMIALS A1 AND A2 - [2] "THE ARGUMENTS ARE GIVEN AS COEFFICIENT ARRAYS - [3] I_@ROA1 - [4] Z_A1@SO.#A2 - [5] LOOP:V_@ROZ @DM V[(@ROI)+1]_V[1] - [6] V_@ROZ_Z,[(@ROI)+1]V@RO0 - [7] A_(1+-@IOV[1])@SO.#((@NT(@IO@ROV)@EP(1,(@ROI)+1))/V)@RO1 - [8] Z_+/[1]A@RV[(@ROI)+1]Z - [9] ((@RO@ROZ)>@ROI)/LOOP -\endtt - } -$$\boxit{\boxit{\box0}}$$ -\centerline{\sevenrm An APL function for polynomial multiplication} -% -\section{User extension} -A modern user of a computerized typesetting facility will probably -ask if it is possible to extend or modify fonts coming with the -system. As with [5], where the font has an {\it analytic\/} and a -{\it bitmapped\/} variant, we can distinguish between the need of modifying -{\it cmapl10\/} via \METAFONT\ and modification of the pixel files. -\APL\ symbols of various ``blackness'' or ``thickness'' may be desirable. -Indeed, in [3] the user input is written with boldface \APL\ symbols -and the answers from the interpreter with thin ones. Furthermore, -certain screen previewers use specific small size pixel files, and -do not support the \APL\ font. - -The modification of the font by changing the values of some global -variables in the preamble of the \METAFONT\ file is easy and can be -done by following how it is done in standard fonts such as -{\it cmbx10\/} etc. This is the recommended way, too. However, if -\METAFONT\ is not available, then one must attack the pixel files. -For direct hand editing, we use a program that converts a pixel -file into a (bitmapped) text file acceptable to any standard screen -editor, and another program reading the edited file back into -a \TeX\ pixel file. Scaling fonts down to a desired size can be -done in a similar (but automatic) manner; this facility is needed -by a previewer (written by the first author) not using runtime -scaling. - - -\section{References} -\bigskip -{ -\ref Digital Equipment Corporation: VAX-11 \APL\ Reference Manual.- - 1983. - -\ref Feldberg, Ian: TEXT: Publication-Quality Characters Come - to \APL\ Graphics.- Proceedings of the 1986 \APL\ Conference, - SIGAPL, pp.\ 306--313. - -\ref Gilman, Leonard, and Allen J.\ Rose: \APL, An Interactive - Approach.- John Wiley \& Sons, Inc., 1984. - -\ref Grenander, Ulf: Mathematical Experiments on the Computer.- - Academic Press, 1982. - -\ref Howland, John E.: Typesetting \APL\ Using a Macintosh.- - Proceedings of the 1986 \APL\ Conference, SIGAPL, pp.\ 301--305. - -\ref Iverson, Kenneth: A Programming Language.- Wiley, New York, 1962. - - - } - -\bigskip -\section{The address} -\bigskip -{\ninepoint\obeylines -\hskip\refskip University of Helsinki -\hskip\refskip Department of Mathematics -\hskip\refskip Hallituskatu 15 -\hskip\refskip SF--00100 HELSINKI -\hskip\refskip FINLAND -} - -\end - diff --git a/Master/texmf-dist/doc/latex/apl/tugboat2.tex b/Master/texmf-dist/doc/latex/apl/tugboat2.tex deleted file mode 100644 index 05a6398b724..00000000000 --- a/Master/texmf-dist/doc/latex/apl/tugboat2.tex +++ /dev/null @@ -1,534 +0,0 @@ - -%============================================================================= -% T U G B O A T . T E X -%============================================================================= -%======================================================================== -% A TeX file for the paper on APL-TeX (new version, not published) -% -% A.Hohti/O.Kanerva (University of Helsinki) April 1987 -%======================================================================== -% -% -% Version of August 26, 1987 at 15:00 -% -% -%======================================================================== -\input aplstyle % the file containing the APL definitions -%======================================================================== -% -% -\magnification=\magstep1 % for weak eyes! -% -% -%======================================================================== -\font\bigbf=ambx10 % for titles -\font\sltt=amsltt10 % for file contents inside text -\font\manual=manfnt at 10pt % for major METAFONT logo -\font\minual=manfnt at 9pt % for minor METAFONT logo -\input ninesize % abstract, references -%======================================================================== -% -\def\METAFONT{{\manual META}\-{\manual FONT}} -\def\metafont{{\minual META}\-{\minual FONT}} -% -%======================================================================== -% stylistic definitions -\def\section#1{\vskip0pt plus .1\vsize - \penalty-250\vskip0pt plus-.1\vsize\bigskip - \noindent{\bf #1.\ }\nobreak\message{#1}} -\def\abstract#1{\bigskip\centerline{\hbox{ - \vbox{\hsize=4.75truein{\ninepoint \noindent ABSTRACT.\enspace#1}}}}} -\def\APL{{\sl APL}} -% this definition is from the TeXbook, Ex. 21.3 : -\def\boxit#1{\vbox{\hrule \hbox{\vrule \kern2pt - \vbox{\kern2pt#1\kern2pt}\kern2pt\vrule}\hrule}} -% A macro for making references and blocks. -% -\newdimen\refindent\newdimen\plusindent -\newdimen\refskip\newdimen\tempindent -\newdimen\extraindent -\newcount\refcount -% -% \refskip has to be set by the user! Otherwise \parindent is -% used, in accordance with \item. -% -\refcount=0 -\def\ref#1:#2.-#3\par{\ninepoint % switch to nine point fonts -\advance\refcount by 1 -\setbox0=\hbox{[\number\refcount]}\refindent=\wd0 -\plusindent=\refskip\extraindent=\refskip -\advance\plusindent by -\refindent\tempindent=\parindent % -\parindent=0pt\par\hangindent\extraindent % - [\number\refcount]\hskip\plusindent #1:{\sl#2},#3 -\parindent=\tempindent} -% -\refskip=\parindent -% -%======================================================================== - % HEADER -\null -\vskip2truecm -% - \centerline{\bigbf GENERATING AN \APL\ FONT} -% -\vskip.75truecm -% - \centerline{\sl Aarno Hohti and Okko Kanerva} -% -\vskip.5truecm -% - \centerline{\sl University of Helsinki} -\vskip.5truecm -\abstract{The \APL\ language is well known for its peculiar - symbols which have inhibited the use of this language - in many programming environments. Making \APL\ - documents of good quality has been difficult and - expensive. We describe here a simple way how to - use \metafont\ to generate an \APL\ font for \TeX\ - by using existing font definitions as far as possible.} -\vskip.5truecm -%======================================================================== -% -\section{Introduction} -This note describes an interesting exercise in using -\METAFONT\ to produce new typefaces by combining letters -from standard fonts. As we know, the \APL\ language [6] of -Kenneth Iverson has never gained the popularity it deserves -which is largely due to its strange symbol set. Indeed, -true \APL\ users require a special keyboard to support -the nonstandard but powerful operator symbols. Moreover, -putting \APL\ into print has always been a problem, and -modern low cost computerized typesetting programs do -not usually support \APL\ style. \TeX\ can be used to -produce high quality printouts for technical text, -and it would be desirable to have a possibility to -mix in \APL\ code. The companion program of -\TeX ---\METAFONT ---provides a full means for a simple generation -of an \APL\ font for \TeX, and the purpose of this -note is to inform other people about the result we -have obtained at the University of Helsinki. Let us note -that there are at least three other \APL\ fonts available -for small computer environments. Indeed, the newsletter -\APL\ {\it Quote Quad\/}\footnote{*}{{\ninepoint Newsletter of SIGAPL, -the Special Interest Group for \APL. {\it Quote Quad\/} has the same -status in the world of \APL\ as TUGboat in \TeX{nical} world.}} -is produced by using TROFF, and there -exists a Postscript \APL\ font for the Apple Laserwriter [5] and -another font for the TEXT typesetting system [2]. - -Consider the following usual kind of function definition in \APL: -\choosett{apl} -\begintt - @DLS_SUMSQ N;I - [1] S_I_0 - [2] @GO(N@@ROI)/LOOP - @endsym - } - $$\boxit{\boxit{\box0}}$$ - \centerline{\sevenrm An APL function for polynomial multiplication} -\endtt -% -gives the output -% -\choosett{apl} -\setbox0=\vbox{\hsize=5.7truein -\begintt - [0] Z_A1 PROD A2;A;I;V - [1] "RETURNS THE PRODUCT OF THE POLYNOMIALS A1 AND A2 - [2] "THE ARGUMENTS ARE GIVEN AS COEFFICIENT ARRAYS - [3] I_@ROA1 - [4] Z_A1@SO.#A2 - [5] LOOP:V_@ROZ @DM V[(@ROI)+1]-1 - [6] V_@ROZ_Z,[(@ROI)+1]V@RO0 - [7] A_(1+-@IOV[1])@SO.#((@NT(@IO@ROV)@EP(1,(@ROI)+1))/V)@RO1 - [8] Z_+/[1]A@RV[(@ROI)+1]Z - [9] ((@RO@ROZ)>@ROI)/LOOP -\endtt - } -$$\boxit{\boxit{\box0}}$$ -\centerline{\sevenrm An APL function for polynomial multiplication} -% -\section{User extension} -A modern user of a computerized typesetting facility will probably -ask if it is possible to extend or modify fonts coming with the -system. As with [5], where the font has an {\it analytic\/} and a -{\it bitmapped\/} variant, we can distinguish between the need of modifying -{\it cmapl10\/} via \METAFONT\ and modification of the pixel files. -\APL\ symbols of various ``blackness'' or ``thickness'' may be desirable. -Indeed, in [3] the user input is written with boldface \APL\ symbols -and the answers from the interpreter with thin ones. Furthermore, -certain screen previewers use specific small size pixel files, and -do not support the \APL\ font. - -The modification of the font by changing the values of some global -variables in the preamble of the \METAFONT\ file is easy and can be -done by following how it is done in standard fonts such as -{\it cmbx10\/} etc. This is the recommended way, too. However, if -\METAFONT\ is not available, then one must attack the pixel files. -For direct hand editing, we use a program that converts a pixel -file into a (bitmapped) text file acceptable to any standard screen -editor, and another program reading the edited file back into -a \TeX\ pixel file. Scaling fonts down to a desired size can be -done in a similar (but automatic) manner; this facility is needed -by a previewer (written by the first author) not using runtime -scaling. - - -\section{References} -\bigskip -{ -\ref Digital Equipment Corporation: VAX-11 \APL\ Reference Manual.- - 1983. - -\ref Feldberg, Ian: TEXT: Publication-Quality Characters Come - to \APL\ Graphics.- Proceedings of the 1986 \APL\ Conference, - SIGAPL, pp.\ 306--313. - -\ref Gilman, Leonard, and Allen J.\ Rose: \APL, An Interactive - Approach.- John Wiley \& Sons, Inc., 1984. - -\ref Grenander, Ulf: Mathematical Experiments on the Computer.- - Academic Press, 1982. - -\ref Howland, John E.: Typesetting \APL\ Using a Macintosh.- - Proceedings of the 1986 \APL\ Conference, SIGAPL, pp.\ 301--305. - -\ref Iverson, Kenneth: A Programming Language.- Wiley, New York, 1962. - - - } - -\bigskip -\section{The address} -\bigskip -{\ninepoint\obeylines -\hskip\refskip University of Helsinki -\hskip\refskip Department of Mathematics -\hskip\refskip Hallituskatu 15 -\hskip\refskip SF--00100 HELSINKI -\hskip\refskip FINLAND -} - -\end - - -%============================================================================ -% -%============================================================================ diff --git a/Master/texmf-dist/doc/latex/apl/versatim.tex b/Master/texmf-dist/doc/latex/apl/versatim.tex deleted file mode 100644 index c2ff320a7e5..00000000000 --- a/Master/texmf-dist/doc/latex/apl/versatim.tex +++ /dev/null @@ -1,66 +0,0 @@ - -%============================================================================= -% V E R S A T I M . T E X -%============================================================================= -% -% -\newskip\verbatimindent \verbatimindent=0cm -\newskip\ttglue{\tt \global\ttglue=.5em plus.25em minus.15em} -\def\@{\char'100 } -% -\outer\def\begindisplay{\obeylines\startdisplay} -{\obeylines\gdef\startdisplay#1 - {\catcode`\^^M=5$$#1\halign\bgroup&\hskip\verbatimindent##\hfil\cr}} -\outer\def\enddisplay{\crcr\egroup$$} -% -\chardef\other=12 -\def\ttverbatim{\begingroup \catcode`\\=\other \catcode`\{=\other - \catcode`\}=\other \catcode`\$=\other \catcode`\&=\other - \catcode`\#=\other \catcode`\%=\other \catcode`\~=\other - \catcode`\_=\other \catcode`\^=\other\catcode`\*=\other\catcode`\==\other -% -\ifapl -\catcode`\A=12 -\catcode`\B=12 -\catcode`\C=12 -\catcode`\D=12 -\catcode`\E=12 -\catcode`\F=12 -\catcode`\G=12 -\catcode`\H=12 -\catcode`\I=12 -\catcode`\J=12 -\catcode`\K=12 -\catcode`\L=12 -\catcode`\M=12 -\catcode`\N=12 -\catcode`\O=12 -\catcode`\P=12 -\catcode`\Q=12 -\catcode`\R=12 -\catcode`\S=12 -\catcode`\T=12 -\catcode`\U=12 -\catcode`\V=12 -\catcode`\W=12 -\catcode`\X=12 -\catcode`\Y=12 -\catcode`\Z=12 -\fi -% - \obeyspaces \obeylines \tt} -{\obeyspaces\gdef {\ }} -% -\def\begintt{$$\let\par=\endgraf \ttverbatim \parskip=0pt - \catcode`\@=0 \parindent=\verbatimindent \rightskip=-5pc \ttfinish} -{\catcode`\@=0 @catcode`@\=\other % @ is temporary escape character - @obeylines % end of line is active - @gdef@ttfinish#1^^M#2\endtt{#1@vbox{#2}@endgroup$$}} -% -\catcode`\@=\active -{\obeylines\gdef@{\ttverbatim\spaceskip=\ttglue\let^^M=\ \let@=\endgroup}} - - -\def\beginlines{\par\begingroup\nobreak\medskip\parindent=0pt - \kern1pt\nobreak \obeylines \everypar{\strut}} -\def\endlines{\kern1pt\endgroup\medbreak\noindent} diff --git a/Master/texmf-dist/source/fonts/apl/apldef.tex b/Master/texmf-dist/source/fonts/apl/apldef.tex new file mode 100644 index 00000000000..66451a7dbce --- /dev/null +++ b/Master/texmf-dist/source/fonts/apl/apldef.tex @@ -0,0 +1,106 @@ +% apldef.tex +% +% Aarno Hohti/Okko Kanerva +% University of Helsinki +% Department of Mathematics +% Hallituskatu 15 +% SF--00100 Helsinki +% Finland +% +% Bitnet: HOHTI@FINFUN +% +%=============================================================== +% This file contains the definitions of the 2-letter control +% sequences for using cmapl10. +% cmapl10 was described in TUGboat 8 #3, November 1987. +%=============================================================== +% +\def\RO{{\apl\char'014}} % rho +\def\IO{{\apl\char'015}} % iota +\def\BX{\lower.1ex\hbox{\apl\char'001}} % quad box (window etc.) +\def\CE{{\apl\char'035}} % ceiling +\def\FL{{\apl\char'034}} % floor +\def\DE{{\apl\char'031}} % decode +\def\EN{{\apl\char'030}} % encode +\def\DL{{\apl\char'002}} % del +\def\LD{{\apl\char'003}} % delta +\def\NT{{\apl\char'026}} % not +\def\LO{{\apl\char'017}} % circle +\def\GO{{\apl\char'036}} % arrow right +\def\OR{{\apl\char'010}} % logical or +\def\DM{{\apl\char'011}} % diamond +\def\LE{{\apl\char'012}} % less than or equal +\def\GE{{\apl\char'013}} % greater than or equal +\def\AB{{\apl\char'174}} % stile +\def\LB{{\apl\char'173}} % left brace +\def\RB{{\apl\char'175}} % right brace +\def\DA{{\apl\char'037}} % arrow down +\def\UA{{\apl\char'136}} % arrow up +\def\EP{{\apl\char'006}} % epsilon +\def\NE{{\apl\char'027}} % not equal +\def\BL{{\apl\char'134}} % backslash +\def\RU{{\apl\char'022}} % right U +\def\LU{{\apl\char'023}} % left U +\def\DU{{\apl\char'021}} % down U +\def\UU{{\apl\char'020}} % up U +\def\LK{{\apl\char'033}} % left tack +\def\RK{{\apl\char'032}} % right tack +\def\US{{\apl\char'024}} % underscore +\def\NG{{\apl\char'025}} % high minus +\def\DD{{\apl\char'007}} % dieresis +\def\AM{{\apl\char'004}} % alpha +\def\OM{{\apl\char'005}} % omega +\def\SO{\raise.3ex\hbox{{\apl\char'016}}} % small circle +% +% This macro is used for overstriking two characters +\newskip\charwidth +\def\overstrike#1#2{\setbox1=\hbox{#1}\charwidth=\wd1 + #1\hskip-\charwidth#2} +% +\def\TR{\overstrike{\LO}{\BL}} % transpose +\def\RV{\overstrike{\LO}{\AB}} % reverse +\def\CR{\overstrike{\LO}{-}} % column reverse +\def\GD{\overstrike{\DL}{\AB}} % grade down +\def\GU{\overstrike{\LD}{\AB}} % grade up +\def\FM{\overstrike{\raise.1ex\hbox{{\apl\char'016}}}{\EN}} % format +\def\XQ{\overstrike{\raise.1ex\hbox{{\apl\char'016}}}{\DE}} % execute +\def\SS{\overstrike{\RU}{\US}} % subset +\def\CO{\overstrike{\LU}{\US}} % contains +\def\CB{\overstrike{\BL}{-}} % column backslash +\def\CS{\overstrike{/}{-}} % column slash +\def\IB{\overstrike{\EN}{\DE}} % I-beam +\def\DQ{\overstrike{{\apl\char'045}}{\BX}} % divide quad +\def\QQ{\overstrike{{\apl '}}{\BX}} % quote quad +\def\PD{\overstrike{\DL}{\NT}} % protected del +\def\NR{\overstrike{\OR}{\NT}} % nor +\def\NN{\overstrike{{\apl\char'046}}{\NT}} % nand +\def\LG{\overstrike{{\apl *}}{\LO}} % logarithm +% underscored letters +\def\ZA{\overstrike{{\apl A}}{\US}} +\def\ZB{\overstrike{{\apl B}}{\US}} +\def\ZC{\overstrike{{\apl C}}{\US}} +\def\ZD{\overstrike{{\apl D}}{\US}} +\def\ZE{\overstrike{{\apl E}}{\US}} +\def\ZF{\overstrike{{\apl F}}{\US}} +\def\ZG{\overstrike{{\apl G}}{\US}} +\def\ZH{\overstrike{{\apl H}}{\US}} +\def\ZI{\overstrike{{\apl I}}{\US}} +\def\ZJ{\overstrike{{\apl J}}{\US}} +\def\ZK{\overstrike{{\apl K}}{\US}} +\def\ZL{\overstrike{{\apl L}}{\US}} +\def\ZM{\overstrike{{\apl M}}{\US}} +\def\ZN{\overstrike{{\apl N}}{\US}} +\def\ZO{\overstrike{{\apl O}}{\US}} +\def\ZP{\overstrike{{\apl P}}{\US}} +\def\ZQ{\overstrike{{\apl Q}}{\US}} +\def\ZR{\overstrike{{\apl R}}{\US}} +\def\ZS{\overstrike{{\apl S}}{\US}} +\def\ZT{\overstrike{{\apl T}}{\US}} +\def\ZU{\overstrike{{\apl U}}{\US}} +\def\ZV{\overstrike{{\apl V}}{\US}} +\def\ZX{\overstrike{{\apl X}}{\US}} +\def\ZY{\overstrike{{\apl Y}}{\US}} +\def\ZW{\overstrike{{\apl W}}{\US}} +\def\ZZ{\overstrike{{\apl Z}}{\US}} + +\endinput diff --git a/Master/texmf-dist/source/fonts/apl/aplstyle.tex b/Master/texmf-dist/source/fonts/apl/aplstyle.tex new file mode 100644 index 00000000000..b732bded0c4 --- /dev/null +++ b/Master/texmf-dist/source/fonts/apl/aplstyle.tex @@ -0,0 +1,29 @@ +% aplstyle.tex +% +%=============================================================== +% A P L S T Y L E +%=============================================================== +% A.Hohti/O.Kanerva University of Helsinki April 6 1987 +% +% APL symbols are represented by the Digital (VAX) APL replacement +% symbols. The standard escape sequence is changed to "@" (at sign) +% in accordance with the usage in Digital APL. +% +\font\apl=cmapl10 % The APL font of typewriter type +% +% +% The following macro switches the typewriter-like font +% used within verbatim +\def\ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax} +\outer\def\choosett#1{\ifundefined{#1} + \message{Undefined font(?), replaced with cmtt10} + \let\tt=\tentt + \else + \def\tt{\expandafter\csname#1\endcsname}\fi} +% +\choosett{tentt} % default value +% +\input aplverb % definitions for verbatim +\input apldef % control sequences for the APL symbols + +\endinput diff --git a/Master/texmf-dist/source/fonts/apl/aplverb.tex b/Master/texmf-dist/source/fonts/apl/aplverb.tex new file mode 100644 index 00000000000..cac8e3acdbf --- /dev/null +++ b/Master/texmf-dist/source/fonts/apl/aplverb.tex @@ -0,0 +1,45 @@ +% aplverb.tex = verbatim.tex +% +% +% F|ljande macron anv{nds d} man vill f} ut \TeX-kommandon +% i klartext. @text@ ger text i fonten \tt med alla kontroll- +% tecken och dylika bevarade (\TeX\ f|rst}r sig endast p} kommandot +% @ i denna mode). Man kan ocks} utnyttja \begintt ... \endtt f|r +% att beskriva kommandon, d} {r ocks} \obeylines och \obeyspaces +% aktiva. Om man vill anv{nda vissa \TeX-kommandon men vill +% ocks} displaya n}got i en-kolumn-tabell-form kan man anv{nda +% \begindisplay ...\cr ...\cr \enddisplay +% Om du vill anv{nda \begintt...\endtt f|r text som inte +% ryms p} en sida, kan du ocks} anv{nda \beginlines...\endlines. +% Varje rad m}ste d} b|rjas och avslutas med kommandot @. +\newskip\verbatimindent \verbatimindent=0cm +\newskip\ttglue{\tt \global\ttglue=.5em plus.25em minus.15em} +\def\@{\char'100 } +% +\outer\def\begindisplay{\obeylines\startdisplay} +{\obeylines\gdef\startdisplay#1 + {\catcode`\^^M=5$$#1\halign\bgroup&\hskip\verbatimindent##\hfil\cr}} +\outer\def\enddisplay{\crcr\egroup$$} +% +\chardef\other=12 +\def\ttverbatim{\begingroup \catcode`\\=\other \catcode`\{=\other + \catcode`\}=\other \catcode`\$=\other \catcode`\&=\other + \catcode`\#=\other \catcode`\%=\other \catcode`\~=\other + \catcode`\_=\other \catcode`\^=\other\catcode`\*=\other\catcode`\==\other + \obeyspaces \obeylines \tt} +{\obeyspaces\gdef {\ }} +% +\def\begintt{$$\let\par=\endgraf \ttverbatim \parskip=0pt + \catcode`\@=0 \parindent=\verbatimindent \rightskip=-5pc \ttfinish} +{\catcode`\@=0 @catcode`@\=\other % @ is temporary escape character + @obeylines % end of line is active + @gdef@ttfinish#1^^M#2\endtt{#1@vbox{#2}@endgroup$$}} +% +\catcode`\@=\active +{\obeylines\gdef@{\ttverbatim\spaceskip=\ttglue\let^^M=\ \let@=\endgroup}} + +\def\beginlines{\par\begingroup\nobreak\medskip\parindent=0pt + \kern1pt\nobreak \obeylines \everypar{\strut}} +\def\endlines{\kern1pt\endgroup\medbreak\noindent} + +\endinput diff --git a/Master/texmf-dist/source/fonts/apl/clean.pas b/Master/texmf-dist/source/fonts/apl/clean.pas new file mode 100644 index 00000000000..611d434fe59 --- /dev/null +++ b/Master/texmf-dist/source/fonts/apl/clean.pas @@ -0,0 +1,226 @@ + +%============================================================================ +% C L E A N . P A S +%============================================================================ + +% A sample Turbo Pascal (3.0) program for truncating downloaded pixel files +% to the standard size assumed by some TeX-oriented programs (starting from +% a file of type: File of Array[0..511] of Byte. + +Program Clean_Up(Output,Input,Font_List_File); + +LABEL + +Report; + + +TYPE + +Name_Of_File =String[20]; +Name_Of_Font =String[20]; +Byte =0..255; +Byte_Block =Array[0..511] Of Byte; +Word =Array[0..3] Of Byte; + + + +VAR + +Font_List_File:Text; +Pxl_File:File of Byte_Block; +Block:Byte_Block; +Last_Blocks:Array[0..1023] Of Byte; +One_Word:Word; +File_Name,New_File_Name:Name_Of_File; +Font_Name:Name_Of_Font; +New_Pxl_File:File Of Word; +File_Id_Found,Bad_Pxl_File:Boolean; +End_Of_Block:Boolean; +IOR,Word_Pos:Integer; +Ch:Char; +Word_Value:Real; + + +PROCEDURE Banner; + + Begin + Writeln('!==================================================!'); + Writeln('! The files to be repaired are assumed consist of !'); + Writeln('! blocks 512 bytes long. The repaired files consist!'); + Writeln('! of words. The names of files are supposed to be !'); + Writeln('! found from a separate file. !'); + Writeln('!==================================================!'); + End; + + + +PROCEDURE Initialize; + + Begin + File_Id_Found:=False; + Word_Pos:=0; + End_Of_Block:=False; + Bad_Pxl_File:=False; + End; + + + + +PROCEDURE Check_File_Id; + +VAR + +A:Integer; + + Begin + If Abs(Word_Value)<2000.0 Then + Begin + A:=Round(Word_Value); + If (A=1001) Or (A=1002) Then File_Id_Found:=True; + End; + End; + + + +PROCEDURE READ_NEXT_WORD; + +VAR + +I:Integer; + + Begin + If Not End_Of_Block Then + Begin + For I:=0 To 3 Do One_Word[3-I]:=Last_Blocks[1023-((4*Word_Pos)+I)]; + Word_Pos:=Word_Pos+1; + If Word_Pos>255 Then End_Of_Block:=True; + End; + End; + + + + +PROCEDURE EVALUATE_NEXT_WORD; + + Begin + Read_Next_Word; + Word_Value:=One_Word[3]+256.0*(One_Word[2]+ + 256.0*(One_Word[1]+256.0*One_Word[0])); + + End; + + + +PROCEDURE Find_File_Id; + +Var + +K:Integer; + + Begin + While (Not File_Id_Found) And (Not End_Of_Block) Do + Begin + Evaluate_Next_Word; + Check_File_Id; + End; + If Not File_Id_Found Then + Begin + For K:=Length(Font_Name) To 30 Do Write('.'); + Writeln(' Bad Pxl File, File Not Repaired'); + Bad_Pxl_File:=True; + End; + End; + + + +PROCEDURE Rewrite_Pxl_File(Var Font_Name,File_Name:Name_Of_File); + +LABEL + +Report; + +VAR + +I,J,K,IOR:Integer; + + Begin + Assign(Pxl_File,Font_Name); + {$I-} Reset(Pxl_File) {$I+}; + IOR:=IOresult; + If IOR<>0 Then Goto Report; + Assign(New_Pxl_File,File_Name); + Rewrite(New_Pxl_File); + Seek(Pxl_File,0); + For I:=0 To Filesize(Pxl_File)-3 Do + Begin + Read(Pxl_File,Block); + For J:=0 To 127 Do + Begin + For K:=0 To 3 Do One_Word[K]:=Block[(4*J)+K]; + Write(New_Pxl_File,One_Word); + End; + End; + Read(Pxl_File,Block); + For I:=0 To 511 Do + Last_Blocks[I]:=Block[I]; + Read(Pxl_File,Block); + For I:=512 To 1023 Do + Last_Blocks[I]:=Block[I-512]; + Find_File_ID; + Word_Pos:=255-Word_Pos; + If Not Bad_Pxl_File Then + Begin + For I:=0 To Word_Pos+1 Do + Begin + For K:=0 To 3 Do One_Word[K]:=Last_Blocks[(4*I)+K]; + Write(New_Pxl_File,One_Word); + End; + Report:Begin + For I:=0 To 30-Length(Font_Name) Do Write('.'); + If IOR<>0 Then Writeln('File Not Found') Else + Begin + Writeln(New_File_Name); + Close(New_Pxl_File); + Close(Pxl_File); + End; + End; + End; + End; + + + + + (*** M A I N P R O G R A M ***) +BEGIN + + Banner; + Writeln; + Writeln('Give The Name Of File Containing The List Of Pxl Files: '); + Readln(File_Name); + Assign(Font_List_File,File_Name); + {$I-} Reset(Font_List_File) {$I+}; + IOR:=IOresult; + If IOR<>0 Then Goto Report; + While Not Eof(Font_List_File) Do + Begin + Initialize; + Font_Name:=''; + While Not Eoln(Font_List_File) Do + Begin + Read(Font_List_File,Ch); + Font_Name:=Font_Name+Ch; + End; + Readln(Font_List_File); + Write(Font_Name); + New_File_Name:=Copy(Font_Name,1,Pos('.',Font_Name)-1)+'.rxl'; + Rewrite_Pxl_File(Font_Name,New_File_Name); + End; + Writeln; + Report: Begin + If IOR<>0 Then Writeln('File Not Found!') Else + Begin + Writeln('............Done!...........'); + Close(Font_List_File); + End; + End; +END. diff --git a/Master/texmf-dist/source/fonts/apl/convert.pas b/Master/texmf-dist/source/fonts/apl/convert.pas new file mode 100644 index 00000000000..8a5b6195051 --- /dev/null +++ b/Master/texmf-dist/source/fonts/apl/convert.pas @@ -0,0 +1,117 @@ + +%============================================================================ +% C O N V E R T . P A S +%============================================================================ + +% This is a sample Turbo Pascal program for HeX-->Bin conversion useful +% for a safe download of pixel files (Turbo Pascal 3.0) + +PROGRAM ASC_TO_BIN(Input,Output,Font_List_File); + + TYPE + + Byte = 0..255; + Name_Of_File = String[20]; + + + VAR + + Newfile:File Of Byte; + Textfile,Font_List_File:Text; + First_Hex,Second_Hex,Ch:Char; + One_Byte:Byte; + I:Integer; + Font_Name,File_Name,New_File_Name:Name_Of_File; + + +PROCEDURE Banner; + + Begin + Writeln('!=================================================!'); + Writeln('! The text files to be converted must have been !'); + Writeln('! originally obtained as follows: each byte is !'); + Writeln('! replaced by two hexadecimals, the first of which!'); + Writeln('! is Byte Div 16 and the second Byte Mod 16. The !'); + Writeln('! names of files are supposed to be found in a !'); + Writeln('! separate list file. !'); + Writeln('!=================================================!'); + End; + + +FUNCTION Convert_Hex_To_Dec(X:Char):Integer; + + Begin + If X In ['0'..'9'] Then Convert_Hex_To_Dec:=Ord(X)-48 + Else Convert_Hex_To_Dec:=Ord(X)-55; + End; + + + + +PROCEDURE Convert_File(Var File_Name,New_File_Name:Name_Of_File); + +VAR + +A,B,I:Integer; + + + Begin + Assign(Textfile,File_Name); + {$I-} Reset(Textfile) {$I+}; + If IOresult=0 Then + Begin + Assign(Newfile,New_File_Name); + Rewrite(Newfile); + While Not Eof(Textfile) Do + Begin + While Not Eoln(Textfile) Do + Begin + Read(Textfile,First_Hex); + Read(Textfile,Second_Hex); + A:=Convert_Hex_To_Dec(First_Hex); + B:=Convert_Hex_To_Dec(Second_Hex); + One_Byte:=(16*A)+B; + If Eoln(Textfile) Then Readln(Textfile); + Write(Newfile,One_Byte); + End; + End; + For I:=0 To 30-Length(New_File_Name) Do Write('.'); + Writeln(New_File_Name,' written'); + Close(Textfile); + Close(Newfile); + End Else + Writeln('This File Not Found!'); + End; + + (*** M A I N P R O G R A M ***) +BEGIN + + Banner; + Writeln; + Writeln('Give The Name Of File Containing The List Of Pxl Files: '); + Readln(File_Name); + Assign(Font_List_File,File_Name); + {$I-} Reset(Font_List_File) {$I+}; + If IOresult=0 Then + Begin + Writeln; + Writeln('... started converting ...'); + Writeln; + While Not Eof(Font_List_File) Do + Begin + Font_Name:=''; + While Not Eoln(Font_List_File) Do + Begin + Read(Font_List_File,Ch); + Font_Name:=Font_Name+Ch; + End; + Write(Font_Name); + New_File_Name:=Copy(Font_Name,1,Pos('.',Font_Name)-1)+'.bxl'; + Readln(Font_List_File); + Convert_File(Font_Name,New_File_Name); + End; + Writeln; + Writeln('... conversion done ...'); + End Else + Writeln('File List Not Found!'); +END. diff --git a/Master/texmf-dist/source/fonts/apl/fontnotes b/Master/texmf-dist/source/fonts/apl/fontnotes new file mode 100644 index 00000000000..967c6f33db2 --- /dev/null +++ b/Master/texmf-dist/source/fonts/apl/fontnotes @@ -0,0 +1,97 @@ + + + These files contain the necessary material for producing +APL documents with TeX. It should be pointed out that as written +in an article published in TUGboat, the system as such can be +described as a straightforward solution to the problem of making +nice documents containing APL code. Instead of trying to achieve +a completed result, we tell the reader how to use existing MetaFont +character descriptions as far as possible to provide an APL font +of reasonably fine quality. Further development is left to the users. +Combined with suitable TeX macros using Digital's mnemonics -- chosen +because of the popularity of the interpreter among APL users +(it is really the only one used at our site) -- the font can be used +smoothly enough. Furthermore, if combined with an APL workspace +providing functions for an automatic conversion of APL workspaces +into TeX code, the system can be used to merge pre-existing +APL code into documents without the pain of re-writing the code +in Digital's 2-letter mnemonics. + To produce pixel files from the MetaFont file CMAPL10.MF, +you have to run MetaFont in your local machine. By typing METAFONT +you should get the prompt symbol '*'. It may be necessary to use +the form + + METAFONT\INPUT_DIRECTORY = XXXXXX + +where XXXXXX is the global name of the directory where the basic +CMMF definitions can be found. +The following discussion will then get MetaFont to produce a generic +font file CMAPL10.360GF: + + * \relax; + * \mode = imagen; + * \mag = 1.2; + * input cmapl10 + +Here \mode = imagen was used to get a pixel file for a laserprinter +with the resolution 200 times 200 pixels per square inch. It is +possible that the definition of 'imagen' is different at your local +site; in the case of error ask the person who installed your local +MetaFont. Notice that \mag = 1.2 is needed in case you want to get +magnified pixels. The final pixel (because of the resolution 200) +files will then be named CMAPL10.1800PXL (or whatever you choose +to call them). If you want to produce 'small' pixel files for example +for a screen previewer, use \mag = xxx with an appropriate constant xxx. +(You can check the form of characters obtained on a teletype terminal +by using the program GFTYPE.) Finally, you get a pixel file from +CMAPL10.xxxGF by running the program GF(TO)PXL.EXE, which should be +found together with MetaFont. + Some people want to use their pixel files on a PC (the +laserprinter is connected to a PC or for previewing purposes). In +that case the pixel files must be downloaded from the host. We never +use programs like Kermit for transferring the binary file but +first convert it to hex form, load the file down as a text file and +then convert it back. It is IMPORTANT to notice that pixel files in +VAXes (say) are composed of 512 byte blocks. The pixel file itself +is ended by the pixel_id, which is either 1001 (rasters are in word packed +form) or 1002 (rasters are in byte packed form). Many programs running +on PCs assume that the last 4 bytes of the pixel file really +represent the pixel_id. Hence, the pixel files downloaded from the host +should be CLEANed from garbage (the programs CONVERT and CLEAN are +given for convenience and to fix the definition of what they should do). + MetaFont also produces the file CMAPL10.TFM containing the +metric information of the characters in the font. These are needed +by TeX, and they can be downloaded as such (at least if you are +using Micro-TeX or PCTeX). + + In order to use the mnemonics, the macros in APLSTYLE are +needed. There are basically two ways of merging APL code. There are +standard macros called VERBATIM, which enable the user to produce +'typewriter-like' output. As APL is modelled on a typewriter style, +too, it has been reasonable to extend VERBATIM to accept different +typewriter-like fonts. The escape sequence \choosett enables you to +choose the font you want to use. Thus, \choosett{tentt} swithces +the standard font CMTT10 on, whereas \choosett{apl} chooses the font +APL, defined in APLSTYLE by '\font\apl = cmapl10'. First, you can +insert APL code into text lines. In this case you can call any +APL symbol either by its 2-letter mnemonic (for example \BX produces the +box symbol) if there is no symbol for it OR otherwise by its name +surrounded by two @'s. (The @ character swithces into the current +typewriter style.) Thus, @A_B@ produces 'A <-- B' in APL style, because +'_' is the name of '<--' in Digital's mnemonics. Secondly, you can +insert APL code in 'screenlike' mode. The code is to be delimited +by the pair \begintt - \endtt. Example: + +\begintt + @DL Z_ZNPLUS N;@BXIO % Here '@' replaces '\' as the escape +[1] @BXIO_0 % character +[2] Z_N@AB(@ION)@SO.+@ION + @DL +\endtt + +Please note that in this case the material between \begintt -- \endtt +is considered by TeX as a vertical box that cannot be divided between +pages. Thus, if you have a long APL function, it might produce +a message of underfull vbox. + + diff --git a/Master/texmf-dist/source/fonts/apl/ninesize.tex b/Master/texmf-dist/source/fonts/apl/ninesize.tex new file mode 100644 index 00000000000..a0260f07997 --- /dev/null +++ b/Master/texmf-dist/source/fonts/apl/ninesize.tex @@ -0,0 +1,34 @@ + +%============================================================================= +% N I N E S I Z E . T E X (for convenience only) +%============================================================================= +%=============================================================== +% This is a TeX macro for switching to nine point fonts. Taken +% from the TeXbook, pages 413 - 415. (For special cases only) +%=============================================================== +% +\font\ninerm=amr9 +\font\ninei=ammi9 +\font\ninesy=amsy9 +\font\ninebf=ambx9 +\font\ninett=amtt9 +\font\nineit=amti9 +\font\ninesl=amsl9 +% +\skewchar\ninei='177 +\skewchar\ninesy='60 +\skewchar\ninett=-1 +% +\newskip\tglue +\def\ninepoint{\def\rm{\fam0\ninerm} + \textfont0=\ninerm + \textfont1=\ninei + \textfont2=\ninesy + \textfont\itfam=\nineit \def\it{\fam\itfam\nineit}% + \textfont\slfam=\ninesl \def\sl{\fam\slfam\ninesl}% + \textfont\ttfam=\ninett \def\tt{\fam\ttfam\ninett}% + \textfont\bffam=\ninebf \def\bf{\fam\bffam\ninebf}% + \tt\tglue=.5em plus.25em minus .15em + \normalbaselineskip=11pt + \setbox\strutbox=\hbox{\vrule height8pt depth3pt width0pt}% + \let\sc=\sevenrm \let\big=\ninebig \normalbaselines\rm}% diff --git a/Master/texmf-dist/source/fonts/apl/problems.tex b/Master/texmf-dist/source/fonts/apl/problems.tex new file mode 100644 index 00000000000..3f47553ea37 --- /dev/null +++ b/Master/texmf-dist/source/fonts/apl/problems.tex @@ -0,0 +1,316 @@ + +%=================================================================== +% Sample problems; solutions give examples on using APL style in TeX +% Taken from the course ``Mathematics on the Computer'', Fall 87 +%=================================================================== + +\magnification = \magstep1 + +\advance\vsize by 3truecm + +\input mssymb % for some math symbols only! This is the new + % symbol font for some standard and non-standard + % mathematical symbols. It is only used here for + % blackboard bold letters. If you dont have it, + % just define \def\Bbb{} etc. + +\input aplstyle + +\choosett{apl} + +\font\sans = amss10 +\font\sltt = amsltt10 + +\def\header{{\sans Sample problems 9.\ 10.\ 1987}} +% some of them come from Sims' ``Abstract Algebra, A Computational Approach'' +\def\APL{{\sltt APL}} + +\nopagenumbers +\tolerance = 300 +\noindent +\header + +\vskip 2cm + +\item{1.} Let $N>1$ be an integer. Show that each of the following + matrices represents a binary operation on + $S(N)$ (we set locally \BX@IO_0@.) Which of them are + associative, which commutative? + \medskip + + \itemitem{a)} @(@\IO@N)@\SO@.@\CE\IO@N@ + + \itemitem{b)} \AB@(@\IO@N)@\SO@.-@\IO@N@ + + \itemitem{c)} @N@\AB@(@\IO@N)@\SO@.+@\IO@N@ + + \itemitem{d)} @N@\AB@(@\IO@N)@\SO@.#@\IO@N@ + + \medskip +\item{} Here @x@\CE@y@ is $\max(x,y)$, @x@\AB@y@ is + $y\bmod x$ and \AB@x@ is the absolute value of $x$. + +\bigskip + +\item{2.} Write an \APL\ function @GPOWER@ that computes for a group + @G@ (global variable) the $n$-th power of a given element $x$. + (If $S(M)$ is a representation vector of @G@, then + @GPOWER@ is a map $S(M)\times \Bbb Z\to S(M)$. Simply + use iteration.) + +\bigskip + +\item{3.} (Continuing problem 2.) A faster algorithm is obtained by + decomposing $x^n$ into its 2--base form + $x^n = x^{i_0}\times x^{2i_1}\times + x^{4i_2}\times ... \times x^{{2^k}i_k}$, where $i_j\in\{0,1\}$. Show + that the complexity of this algorithm is $O(\log_2(n))$. + (Show that the number of necessary multiplications does + not exceed $2\log_2(n)$). How would you write the corresponding + function in \APL? (Note that the binary representation of $n$ + can be obtained by applying iteratively the procedure $n\bmod 2$.) + +\bigskip + +\item{4.} Write an \APL\ function @GTSGP@ that computes for a given group @G@ + (global variable) the subgroup generated by a given subset $A$. The + function @GTSGP@ has one argument (the vector @A@) and returns + a subset of the set $S(N)$ (as a vector). (Extend the set @A@ + by the group operation until @A@ becomes closed with respect + to the operation.) + +\bigskip + +\item{5.} Write an \APL\ function @INV@ that returns for a group @G@ + the vector of inverse elements as a vector $S(N)\to S(N)$ so + that the index of the inverse of $x_i$ is @(INV G)[I]@. + +\bigskip + +\item{6.} Let $(G,\theta)$ be a group and let $A$ be a subset of $G$. Program + the following algorithm in \APL\ to find the subgroup @H@ + generated by @A@. Compare the perfomance of this algorithm + with the algorithm in Problem 4. + \medskip + + \itemitem{a)} put $H$ and $Y$ equal to $\{e\}$. + + \itemitem{b)} let $Y$ be $YA\smallsetminus H$. + + \itemitem{c)} if $Y=\emptyset$, stop. + + \itemitem{d)} put $H$ equal to $H\cup Y$ and + go to (b). + + \medskip +\item{} ($e$ is the neutral element and $YA\smallsetminus H$ + is the set--theoretical difference of $YA$ and $H$. + The product $YA$ is the set $\{y\theta a: y\in Y, a\in A\}$.) + +\bigskip + +\item{7.} Write an \APL\ function @PROD@ that returns for given groups + $(G_1,\theta_1)$ ja $(G_2,\theta_2)$ the {\sl direct product} + $(G_1\times G_2,\theta_1\times\theta_2)$ as a group table. + (The binary operation in the product is $(x,y)\theta_1\times\theta_2 + (z,w) = (x\theta_1 z,y\theta_2 w)$). + +\bigskip + +\vfill\eject + +%========================================================================== +% Solutions to above sample exercises +%========================================================================== + +%\advance\vsize by 3truecm + +\choosett{apl} + +\noindent +\header%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\vskip 1cm + +\noindent +As the index of the neutral element we use the index origin \BX@IO@ which +usually has the value @0@. Then $S(N)= +\{0,\dots,N-1\}$, given by the vector \IO@N@. +An example on groups are the cyclic groups $({\bf Z}_n,+)$ +the group tables of which are generated by the \APL\ function @ZNPLUS@: + +\hskip\parskip\vbox{\hsize=15truecm +\begintt + @DL Z_ZNPLUS N;@BXIO +[1] @BXIO_0 +[2] Z_N@AB(@ION)@SO.+@ION + @DL +\endtt +}\smallskip + +\item{1.} The matrices represent binary operations of $S(N)$, + since they are $N\times N$-matrices with elements from + $S(N)$. They are all associative and also commutative except for + the case (b). This can be seen by the function @TEST@: + +\hskip\parskip\vbox{\hsize=15truecm +\begintt + @DL Z_TEST B +[1] " B IS A BINARY OPERATION. THE FUNCTION RETURNS A BOOLEAN 2-VECTOR +[2] " (B ASSOCIATIVE, B COMMUTATIVE) +[3] Z_(&/&/&/B[B;]=B[;B]),&/&/B=@TRB + @DL +\endtt +}\smallskip + +\item{2.} + +\hskip\parskip\vbox{\hsize=15truecm +\begintt + @DL P_X GPOWER N;I +[1] " G GLOBAL +[2] P_@BXIO @DM I_0 +[3] TEST:@GO(NJ_J+1)/CORE +[6] @GO(N>I_I+1)/JLOOP + @DL +\endtt +} + +Example: + +\hskip\parskip\vbox{\hsize=15truecm +\begintt + (ZNPLUS 2) PROD ZNPLUS 10 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 + 1 2 3 4 5 6 7 8 9 0 11 12 13 14 15 16 17 18 19 10 + 2 3 4 5 6 7 8 9 0 1 12 13 14 15 16 17 18 19 10 11 + 3 4 5 6 7 8 9 0 1 2 13 14 15 16 17 18 19 10 11 12 + 4 5 6 7 8 9 0 1 2 3 14 15 16 17 18 19 10 11 12 13 + 5 6 7 8 9 0 1 2 3 4 15 16 17 18 19 10 11 12 13 14 + 6 7 8 9 0 1 2 3 4 5 16 17 18 19 10 11 12 13 14 15 + 7 8 9 0 1 2 3 4 5 6 17 18 19 10 11 12 13 14 15 16 + 8 9 0 1 2 3 4 5 6 7 18 19 10 11 12 13 14 15 16 17 + 9 0 1 2 3 4 5 6 7 8 19 10 11 12 13 14 15 16 17 18 +10 11 12 13 14 15 16 17 18 19 0 1 2 3 4 5 6 7 8 9 +11 12 13 14 15 16 17 18 19 10 1 2 3 4 5 6 7 8 9 0 +12 13 14 15 16 17 18 19 10 11 2 3 4 5 6 7 8 9 0 1 +13 14 15 16 17 18 19 10 11 12 3 4 5 6 7 8 9 0 1 2 +14 15 16 17 18 19 10 11 12 13 4 5 6 7 8 9 0 1 2 3 +15 16 17 18 19 10 11 12 13 14 5 6 7 8 9 0 1 2 3 4 +16 17 18 19 10 11 12 13 14 15 6 7 8 9 0 1 2 3 4 5 +17 18 19 10 11 12 13 14 15 16 7 8 9 0 1 2 3 4 5 6 +18 19 10 11 12 13 14 15 16 17 8 9 0 1 2 3 4 5 6 7 +19 10 11 12 13 14 15 16 17 18 9 0 1 2 3 4 5 6 7 8 +\endtt +} + +\end diff --git a/Master/texmf-dist/source/fonts/apl/readme b/Master/texmf-dist/source/fonts/apl/readme new file mode 100644 index 00000000000..4e429b26a5d --- /dev/null +++ b/Master/texmf-dist/source/fonts/apl/readme @@ -0,0 +1,28 @@ +Thank you for your letter of 27 February. The original purpose +of our APL font and macros was to solve the immediate problem +of writing documents with APL code. Therefore, they are free for +anyone who finds them useful. Some people have requested the font +and we have sent them the files appended below (with CMAPL10 and +two conversion programs for downloading pixel files, not given here). +Further, we have nothing against giving our net address to the +users because it would be useful to hear about extensions made +to the system. + +The files APLDEF.TEX and TUGBOAT.TEX are identical with the second +versions sent to you (via BITNET) except for minimal changes (there +are some corrections and extensions in APLDEF.TEX, and in +TUGBOAT.TEX one APL line was corrected.) We think the files are +in a "final" form (at least we are not planning any changes). + +Our original purpose was to publish the second version, but the only +difference was really the removal of the tilde space character (this +resulted in more complex 1-character macros, but the user cannot +see any difference; moreover, TeX runs only about 14% slower). Thus, +we feel that there is no reason to publish a list of errata in +TUGboat, because any user would inevitably have to use the new +version (the old one has not been released). + +We are adding a file containing sample examples on the use of the +APL mnemonics. + +Aarno Hohti diff --git a/Master/texmf-dist/source/fonts/apl/readme.txt b/Master/texmf-dist/source/fonts/apl/readme.txt new file mode 100644 index 00000000000..4d939552a3d --- /dev/null +++ b/Master/texmf-dist/source/fonts/apl/readme.txt @@ -0,0 +1,129 @@ +Thank you for your letter of 27 February. The original purpose +of our APL font and macros was to solve the immediate problem +of writing documents with APL code. Therefore, they are free for +anyone who finds them useful. Some people have requested the font +and we have sent them the files appended below (with CMAPL10 and +two conversion programs for downloading pixel files, not given here). +Further, we have nothing against giving our net address to the +users because it would be useful to hear about extensions made +to the system. + +The files APLDEF.TEX and TUGBOAT.TEX are identical with the second +versions sent to you (via BITNET) except for minimal changes (there +are some corrections and extensions in APLDEF.TEX, and in +TUGBOAT.TEX one APL line was corrected.) We think the files are +in a "final" form (at least we are not planning any changes). + +Our original purpose was to publish the second version, but the only +difference was really the removal of the tilde space character (this +resulted in more complex 1-character macros, but the user cannot +see any difference; moreover, TeX runs only about 14% slower). Thus, +we feel that there is no reason to publish a list of errata in +TUGboat, because any user would inevitably have to use the new +version (the old one has not been released). + +We are adding a file containing sample examples on the use of the +APL mnemonics. + +Aarno Hohti + + + +%================================================================= +% R E A D M E . T X T +%================================================================= + + These files contain the necessary material for producing +APL documents with TeX. It should be pointed out that as written +in an article published in TUGboat, the system as such can be +described as a straightforward solution to the problem of making +nice documents containing APL code. Instead of trying to achieve +a completed result, we tell the reader how to use existing MetaFont +character descriptions as far as possible to provide an APL font +of reasonably fine quality. Further development is left to the users. +Combined with suitable TeX macros using Digital's mnemonics -- chosen +because of the popularity of the interpreter among APL users +(it is really the only one used at our site) -- the font can be used +smoothly enough. Furthermore, if combined with an APL workspace +providing functions for an automatic conversion of APL workspaces +into TeX code, the system can be used to merge pre-existing +APL code into documents without the pain of re-writing the code +in Digital's 2-letter mnemonics. + To produce pixel files from the MetaFont file CMAPL10.MF, +you have to run MetaFont in your local machine. By typing METAFONT +you should get the prompt symbol '*'. It may be necessary to use +the form + + METAFONT\INPUT_DIRECTORY = XXXXXX + +where XXXXXX is the global name of the directory where the basic +CMMF definitions can be found. +The following discussion will then get MetaFont to produce a generic +font file CMAPL10.360GF: + + * \relax; + * \mode = imagen; + * \mag = 1.2; + * input cmapl10 + +Here \mode = imagen was used to get a pixel file for a laserprinter +with the resolution 200 times 200 pixels per square inch. It is +possible that the definition of 'imagen' is different at your local +site; in the case of error ask the person who installed your local +MetaFont. Notice that \mag = 1.2 is needed in case you want to get +magnified pixels. The final pixel (because of the resolution 200) +files will then be named CMAPL10.1800PXL (or whatever you choose +to call them). If you want to produce 'small' pixel files for example +for a screen previewer, use \mag = xxx with an appropriate constant xxx. +(You can check the form of characters obtained on a teletype terminal +by using the program GFTYPE.) Finally, you get a pixel file from +CMAPL10.xxxGF by running the program GF(TO)PXL.EXE, which should be +found together with MetaFont. + Some people want to use their pixel files on a PC (the +laserprinter is connected to a PC or for previewing purposes). In +that case the pixel files must be downloaded from the host. We never +use programs like Kermit for transferring the binary file but +first convert it to hex form, load the file down as a text file and +then convert it back. It is IMPORTANT to notice that pixel files in +VAXes (say) are composed of 512 byte blocks. The pixel file itself +is ended by the pixel_id, which is either 1001 (rasters are in word packed +form) or 1002 (rasters are in byte packed form). Some programs running +on PCs assume that the last 4 bytes of the pixel file really +represent the pixel_id. Hence, the pixel files downloaded from the host +should be CLEANed from garbage (the programs CONVERT and CLEAN are +given for convenience and to fix the definition of what they should do). + MetaFont also produces the file CMAPL10.TFM containing the +metric information of the characters in the font. These are needed +by TeX, and they can be downloaded as such (at least if you are +using Micro-TeX or PCTeX). + + In order to use the mnemonics, the macros in APLSTYLE are +needed. There are basically two ways of merging APL code. There are +standard macros called VERBATIM, which enable the user to produce +'typewriter-like' output. As APL is modelled on a typewriter style, +too, it has been reasonable to extend VERBATIM to accept different +typewriter-like fonts. The escape sequence \choosett enables you to +choose the font you want to use. Thus, \choosett{tentt} swithces +the standard font CMTT10 on, whereas \choosett{apl} chooses the font +APL, defined in APLSTYLE by '\font\apl = cmapl10'. First, you can +insert APL code into text lines. In this case you can call any +APL symbol either by its 2-letter mnemonic (for example \BX produces the +box symbol) if there is no symbol for it OR otherwise by its name +surrounded by two @'s. (The @ character swithces into the current +typewriter style.) Thus, @A_B@ produces 'A <-- B' in APL style, because +'_' is the name of '<--' in Digital's mnemonics. Secondly, you can +insert APL code in 'screenlike' mode. The code is to be delimited +by the pair \begintt - \endtt. Example: + +\begintt + @DL Z_ZNPLUS N;@BXIO % Here '@' replaces '\' as the escape +[1] @BXIO_0 % character +[2] Z_N@AB(@ION)@SO.+@ION + @DL +\endtt + +Please note that in this case the material between \begintt -- \endtt +is considered by TeX as a vertical box that cannot be divided between +pages. Thus, if you have a long APL function, it might produce +a message of underfull vbox. + diff --git a/Master/texmf-dist/source/fonts/apl/sample.tex b/Master/texmf-dist/source/fonts/apl/sample.tex new file mode 100644 index 00000000000..85481d7c943 --- /dev/null +++ b/Master/texmf-dist/source/fonts/apl/sample.tex @@ -0,0 +1,124 @@ + +%============================================================================ +% S A M P L E . T E X +%============================================================================ + +%=================================================================== +% Sample problems; solutions give examples on using APL style in TeX +% Taken from the course ``Mathematics on the Computer'', Fall 87 +%=================================================================== + +\magnification = \magstep1 + +\advance\vsize by 3truecm + +\input mssymb % for some math symbols only! This is the new + % symbol font for some standard and non-standard + % mathematical symbols. It is only used here for + % blackboard bold letters. If you dont have it, + % just define \def\Bbb{} etc. + +\input aplstyle + +\choosett{apl} + +\font\sans = amss10 +\font\sltt = amsltt10 + +\def\header{{\sans Sample problems 9.\ 10.\ 1987}} +% some of them come from Sims' ``Abstract Algebra, A Computational Approach'' +\def\APL{{\sltt APL}} + +\nopagenumbers +\tolerance = 300 +\noindent +\header + +\vskip 2cm + +\item{1.} Let $N>1$ be an integer. Show that each of the following + matrices represents a binary operation on + $S(N)$ (we set locally \BX@IO_0@.) Which of them are + associative, which commutative? + \medskip + + \itemitem{a)} @(@\IO@N)@\SO@.@\CE\IO@N@ + + \itemitem{b)} \AB@(@\IO@N)@\SO@.-@\IO@N@ + + \itemitem{c)} @N@\AB@(@\IO@N)@\SO@.+@\IO@N@ + + \itemitem{d)} @N@\AB@(@\IO@N)@\SO@.#@\IO@N@ + + \medskip +\item{} Here @x@\CE@y@ is $\max(x,y)$, @x@\AB@y@ is + $y\bmod x$ and \AB@x@ is the absolute value of $x$. + +\bigskip + +\item{2.} Write an \APL\ function @GPOWER@ that computes for a group + @G@ (global variable) the $n$-th power of a given element $x$. + (If $S(M)$ is a representation vector of @G@, then + @GPOWER@ is a map $S(M)\times \Bbb Z\to S(M)$. Simply + use iteration.) + +\bigskip + +\item{3.} (Continuing problem 2.) A faster algorithm is obtained by + decomposing $x^n$ into its 2--base form + $x^n = x^{i_0}\times x^{2i_1}\times + x^{4i_2}\times ... \times x^{{2^k}i_k}$, where $i_j\in\{0,1\}$. Show + that the complexity of this algorithm is $O(\log_2(n))$. + (Show that the number of necessary multiplications does + not exceed $2\log_2(n)$). How would you write the corresponding + function in \APL? (Note that the binary representation of $n$ + can be obtained by applying iteratively the procedure $n\bmod 2$.) + +\bigskip + +\item{4.} Write an \APL\ function @GTSGP@ that computes for a given group @G@ + (global variable) the subgroup generated by a given subset $A$. The + function @GTSGP@ has one argument (the vector @A@) and returns + a subset of the set $S(N)$ (as a vector). (Extend the set @A@ + by the group operation until @A@ becomes closed with respect + to the operation.) + +\bigskip + +\item{5.} Write an \APL\ function @INV@ that returns for a group @G@ + the vector of inverse elements as a vector $S(N)\to S(N)$ so + that the index of the inverse of $x_i$ is @(INV G)[I]@. + +\bigskip + +\item{6.} Let $(G,\theta)$ be a group and let $A$ be a subset of $G$. Program + the following algorithm in \APL\ to find the subgroup @H@ + generated by @A@. Compare the perfomance of this algorithm + with the algorithm in Problem 4. + \medskip + + \itemitem{a)} put $H$ and $Y$ equal to $\{e\}$. + + \itemitem{b)} let $Y$ be $YA\smallsetminus H$. + + \itemitem{c)} if $Y=\emptyset$, stop. + + \itemitem{d)} put $H$ equal to $H\cup Y$ and + go to (b). + + \medskip +\item{} ($e$ is the neutral element and $YA\smallsetminus H$ + is the set--theoretical difference of $YA$ and $H$. + The product $YA$ is the set $\{y\theta a: y\in Y, a\in A\}$.) + +\bigskip + +\item{7.} Write an \APL\ function @PROD@ that returns for given groups + $(G_1,\theta_1)$ ja $(G_2,\theta_2)$ the {\sl direct product} + $(G_1\times G_2,\theta_1\times\theta_2)$ as a group table. + (The binary operation in the product is $(x,y)\theta_1\times\theta_2 + (z,w) = (x\theta_1 z,y\theta_2 w)$). + +\bigskip + +\vfill\eject diff --git a/Master/texmf-dist/source/fonts/apl/solutions.tex b/Master/texmf-dist/source/fonts/apl/solutions.tex new file mode 100644 index 00000000000..85e37305451 --- /dev/null +++ b/Master/texmf-dist/source/fonts/apl/solutions.tex @@ -0,0 +1,198 @@ + +%========================================================================== +% Solutions to above sample exercises +%========================================================================== + +%\advance\vsize by 3truecm + +\choosett{apl} + +\noindent +\header%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\vskip 1cm + +\noindent +As the index of the neutral element we use the index origin \BX@IO@ which +usually has the value @0@. Then $S(N)= +\{0,\dots,N-1\}$, given by the vector \IO@N@. +An example on groups are the cyclic groups $({\bf Z}_n,+)$ +the group tables of which are generated by the \APL\ function @ZNPLUS@: + +\hskip\parskip\vbox{\hsize=15truecm +\begintt + @DL Z_ZNPLUS N;@BXIO +[1] @BXIO_0 +[2] Z_N@AB(@ION)@SO.+@ION + @DL +\endtt +}\smallskip + +\item{1.} The matrices represent binary operations of $S(N)$, + since they are $N\times N$-matrices with elements from + $S(N)$. They are all associative and also commutative except for + the case (b). This can be seen by the function @TEST@: + +\hskip\parskip\vbox{\hsize=15truecm +\begintt + @DL Z_TEST B +[1] " B IS A BINARY OPERATION. THE FUNCTION RETURNS A BOOLEAN 2-VECTOR +[2] " (B ASSOCIATIVE, B COMMUTATIVE) +[3] Z_(&/&/&/B[B;]=B[;B]),&/&/B=@TRB + @DL +\endtt +}\smallskip + +\item{2.} + +\hskip\parskip\vbox{\hsize=15truecm +\begintt + @DL P_X GPOWER N;I +[1] " G GLOBAL +[2] P_@BXIO @DM I_0 +[3] TEST:@GO(NJ_J+1)/CORE +[6] @GO(N>I_I+1)/JLOOP + @DL +\endtt +} + +Example: + +\hskip\parskip\vbox{\hsize=15truecm +\begintt + (ZNPLUS 2) PROD ZNPLUS 10 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 + 1 2 3 4 5 6 7 8 9 0 11 12 13 14 15 16 17 18 19 10 + 2 3 4 5 6 7 8 9 0 1 12 13 14 15 16 17 18 19 10 11 + 3 4 5 6 7 8 9 0 1 2 13 14 15 16 17 18 19 10 11 12 + 4 5 6 7 8 9 0 1 2 3 14 15 16 17 18 19 10 11 12 13 + 5 6 7 8 9 0 1 2 3 4 15 16 17 18 19 10 11 12 13 14 + 6 7 8 9 0 1 2 3 4 5 16 17 18 19 10 11 12 13 14 15 + 7 8 9 0 1 2 3 4 5 6 17 18 19 10 11 12 13 14 15 16 + 8 9 0 1 2 3 4 5 6 7 18 19 10 11 12 13 14 15 16 17 + 9 0 1 2 3 4 5 6 7 8 19 10 11 12 13 14 15 16 17 18 +10 11 12 13 14 15 16 17 18 19 0 1 2 3 4 5 6 7 8 9 +11 12 13 14 15 16 17 18 19 10 1 2 3 4 5 6 7 8 9 0 +12 13 14 15 16 17 18 19 10 11 2 3 4 5 6 7 8 9 0 1 +13 14 15 16 17 18 19 10 11 12 3 4 5 6 7 8 9 0 1 2 +14 15 16 17 18 19 10 11 12 13 4 5 6 7 8 9 0 1 2 3 +15 16 17 18 19 10 11 12 13 14 5 6 7 8 9 0 1 2 3 4 +16 17 18 19 10 11 12 13 14 15 6 7 8 9 0 1 2 3 4 5 +17 18 19 10 11 12 13 14 15 16 7 8 9 0 1 2 3 4 5 6 +18 19 10 11 12 13 14 15 16 17 8 9 0 1 2 3 4 5 6 7 +19 10 11 12 13 14 15 16 17 18 9 0 1 2 3 4 5 6 7 8 +\endtt +} + +\end + + diff --git a/Master/texmf-dist/source/fonts/apl/tugboat.tex b/Master/texmf-dist/source/fonts/apl/tugboat.tex new file mode 100644 index 00000000000..87b1461a1cc --- /dev/null +++ b/Master/texmf-dist/source/fonts/apl/tugboat.tex @@ -0,0 +1,530 @@ + +%============================================================================= +% T U G B O A T . T E X +%============================================================================= +%======================================================================== +% A TeX file for the paper on APL-TeX (new version, not published) +% +% A.Hohti/O.Kanerva (University of Helsinki) April 1987 +%======================================================================== +% +% +% Version of August 26, 1987 at 15:00 +% +% +%======================================================================== +\input aplstyle % the file containing the APL definitions +%======================================================================== +% +% +\magnification=\magstep1 % for weak eyes! +% +% +%======================================================================== +\font\bigbf=ambx10 % for titles +\font\sltt=amsltt10 % for file contents inside text +\font\manual=manfnt at 10pt % for major METAFONT logo +\font\minual=manfnt at 9pt % for minor METAFONT logo +\input ninesize % abstract, references +%======================================================================== +% +\def\METAFONT{{\manual META}\-{\manual FONT}} +\def\metafont{{\minual META}\-{\minual FONT}} +% +%======================================================================== +% stylistic definitions +\def\section#1{\vskip0pt plus .1\vsize + \penalty-250\vskip0pt plus-.1\vsize\bigskip + \noindent{\bf #1.\ }\nobreak\message{#1}} +\def\abstract#1{\bigskip\centerline{\hbox{ + \vbox{\hsize=4.75truein{\ninepoint \noindent ABSTRACT.\enspace#1}}}}} +\def\APL{{\sl APL}} +% this definition is from the TeXbook, Ex. 21.3 : +\def\boxit#1{\vbox{\hrule \hbox{\vrule \kern2pt + \vbox{\kern2pt#1\kern2pt}\kern2pt\vrule}\hrule}} +% A macro for making references and blocks. +% +\newdimen\refindent\newdimen\plusindent +\newdimen\refskip\newdimen\tempindent +\newdimen\extraindent +\newcount\refcount +% +% \refskip has to be set by the user! Otherwise \parindent is +% used, in accordance with \item. +% +\refcount=0 +\def\ref#1:#2.-#3\par{\ninepoint % switch to nine point fonts +\advance\refcount by 1 +\setbox0=\hbox{[\number\refcount]}\refindent=\wd0 +\plusindent=\refskip\extraindent=\refskip +\advance\plusindent by -\refindent\tempindent=\parindent % +\parindent=0pt\par\hangindent\extraindent % + [\number\refcount]\hskip\plusindent #1:{\sl#2},#3 +\parindent=\tempindent} +% +\refskip=\parindent +% +%======================================================================== + % HEADER +\null +\vskip2truecm +% + \centerline{\bigbf GENERATING AN \APL\ FONT} +% +\vskip.75truecm +% + \centerline{\sl Aarno Hohti and Okko Kanerva} +% +\vskip.5truecm +% + \centerline{\sl University of Helsinki} +\vskip.5truecm +\abstract{The \APL\ language is well known for its peculiar + symbols which have inhibited the use of this language + in many programming environments. Making \APL\ + documents of good quality has been difficult and + expensive. We describe here a simple way how to + use \metafont\ to generate an \APL\ font for \TeX\ + by using existing font definitions as far as possible.} +\vskip.5truecm +%======================================================================== +% +\section{Introduction} +This note describes an interesting exercise in using +\METAFONT\ to produce new typefaces by combining letters +from standard fonts. As we know, the \APL\ language [6] of +Kenneth Iverson has never gained the popularity it deserves +which is largely due to its strange symbol set. Indeed, +true \APL\ users require a special keyboard to support +the nonstandard but powerful operator symbols. Moreover, +putting \APL\ into print has always been a problem, and +modern low cost computerized typesetting programs do +not usually support \APL\ style. \TeX\ can be used to +produce high quality printouts for technical text, +and it would be desirable to have a possibility to +mix in \APL\ code. The companion program of +\TeX ---\METAFONT ---provides a full means for a simple generation +of an \APL\ font for \TeX, and the purpose of this +note is to inform other people about the result we +have obtained at the University of Helsinki. Let us note +that there are at least three other \APL\ fonts available +for small computer environments. Indeed, the newsletter +\APL\ {\it Quote Quad\/}\footnote{*}{{\ninepoint Newsletter of SIGAPL, +the Special Interest Group for \APL. {\it Quote Quad\/} has the same +status in the world of \APL\ as TUGboat in \TeX{nical} world.}} +is produced by using TROFF, and there +exists a Postscript \APL\ font for the Apple Laserwriter [5] and +another font for the TEXT typesetting system [2]. + +Consider the following usual kind of function definition in \APL: +\choosett{apl} +\begintt + @DLS_SUMSQ N;I + [1] S_I_0 + [2] @GO(N@@ROI)/LOOP + @endsym + } + $$\boxit{\boxit{\box0}}$$ + \centerline{\sevenrm An APL function for polynomial multiplication} +\endtt +% +gives the output +% +\choosett{apl} +\setbox0=\vbox{\hsize=5.7truein +\begintt + [0] Z_A1 PROD A2;A;I;V + [1] "RETURNS THE PRODUCT OF THE POLYNOMIALS A1 AND A2 + [2] "THE ARGUMENTS ARE GIVEN AS COEFFICIENT ARRAYS + [3] I_@ROA1 + [4] Z_A1@SO.#A2 + [5] LOOP:V_@ROZ @DM V[(@ROI)+1]_V[1] + [6] V_@ROZ_Z,[(@ROI)+1]V@RO0 + [7] A_(1+-@IOV[1])@SO.#((@NT(@IO@ROV)@EP(1,(@ROI)+1))/V)@RO1 + [8] Z_+/[1]A@RV[(@ROI)+1]Z + [9] ((@RO@ROZ)>@ROI)/LOOP +\endtt + } +$$\boxit{\boxit{\box0}}$$ +\centerline{\sevenrm An APL function for polynomial multiplication} +% +\section{User extension} +A modern user of a computerized typesetting facility will probably +ask if it is possible to extend or modify fonts coming with the +system. As with [5], where the font has an {\it analytic\/} and a +{\it bitmapped\/} variant, we can distinguish between the need of modifying +{\it cmapl10\/} via \METAFONT\ and modification of the pixel files. +\APL\ symbols of various ``blackness'' or ``thickness'' may be desirable. +Indeed, in [3] the user input is written with boldface \APL\ symbols +and the answers from the interpreter with thin ones. Furthermore, +certain screen previewers use specific small size pixel files, and +do not support the \APL\ font. + +The modification of the font by changing the values of some global +variables in the preamble of the \METAFONT\ file is easy and can be +done by following how it is done in standard fonts such as +{\it cmbx10\/} etc. This is the recommended way, too. However, if +\METAFONT\ is not available, then one must attack the pixel files. +For direct hand editing, we use a program that converts a pixel +file into a (bitmapped) text file acceptable to any standard screen +editor, and another program reading the edited file back into +a \TeX\ pixel file. Scaling fonts down to a desired size can be +done in a similar (but automatic) manner; this facility is needed +by a previewer (written by the first author) not using runtime +scaling. + + +\section{References} +\bigskip +{ +\ref Digital Equipment Corporation: VAX-11 \APL\ Reference Manual.- + 1983. + +\ref Feldberg, Ian: TEXT: Publication-Quality Characters Come + to \APL\ Graphics.- Proceedings of the 1986 \APL\ Conference, + SIGAPL, pp.\ 306--313. + +\ref Gilman, Leonard, and Allen J.\ Rose: \APL, An Interactive + Approach.- John Wiley \& Sons, Inc., 1984. + +\ref Grenander, Ulf: Mathematical Experiments on the Computer.- + Academic Press, 1982. + +\ref Howland, John E.: Typesetting \APL\ Using a Macintosh.- + Proceedings of the 1986 \APL\ Conference, SIGAPL, pp.\ 301--305. + +\ref Iverson, Kenneth: A Programming Language.- Wiley, New York, 1962. + + + } + +\bigskip +\section{The address} +\bigskip +{\ninepoint\obeylines +\hskip\refskip University of Helsinki +\hskip\refskip Department of Mathematics +\hskip\refskip Hallituskatu 15 +\hskip\refskip SF--00100 HELSINKI +\hskip\refskip FINLAND +} + +\end + diff --git a/Master/texmf-dist/source/fonts/apl/tugboat2.tex b/Master/texmf-dist/source/fonts/apl/tugboat2.tex new file mode 100644 index 00000000000..05a6398b724 --- /dev/null +++ b/Master/texmf-dist/source/fonts/apl/tugboat2.tex @@ -0,0 +1,534 @@ + +%============================================================================= +% T U G B O A T . T E X +%============================================================================= +%======================================================================== +% A TeX file for the paper on APL-TeX (new version, not published) +% +% A.Hohti/O.Kanerva (University of Helsinki) April 1987 +%======================================================================== +% +% +% Version of August 26, 1987 at 15:00 +% +% +%======================================================================== +\input aplstyle % the file containing the APL definitions +%======================================================================== +% +% +\magnification=\magstep1 % for weak eyes! +% +% +%======================================================================== +\font\bigbf=ambx10 % for titles +\font\sltt=amsltt10 % for file contents inside text +\font\manual=manfnt at 10pt % for major METAFONT logo +\font\minual=manfnt at 9pt % for minor METAFONT logo +\input ninesize % abstract, references +%======================================================================== +% +\def\METAFONT{{\manual META}\-{\manual FONT}} +\def\metafont{{\minual META}\-{\minual FONT}} +% +%======================================================================== +% stylistic definitions +\def\section#1{\vskip0pt plus .1\vsize + \penalty-250\vskip0pt plus-.1\vsize\bigskip + \noindent{\bf #1.\ }\nobreak\message{#1}} +\def\abstract#1{\bigskip\centerline{\hbox{ + \vbox{\hsize=4.75truein{\ninepoint \noindent ABSTRACT.\enspace#1}}}}} +\def\APL{{\sl APL}} +% this definition is from the TeXbook, Ex. 21.3 : +\def\boxit#1{\vbox{\hrule \hbox{\vrule \kern2pt + \vbox{\kern2pt#1\kern2pt}\kern2pt\vrule}\hrule}} +% A macro for making references and blocks. +% +\newdimen\refindent\newdimen\plusindent +\newdimen\refskip\newdimen\tempindent +\newdimen\extraindent +\newcount\refcount +% +% \refskip has to be set by the user! Otherwise \parindent is +% used, in accordance with \item. +% +\refcount=0 +\def\ref#1:#2.-#3\par{\ninepoint % switch to nine point fonts +\advance\refcount by 1 +\setbox0=\hbox{[\number\refcount]}\refindent=\wd0 +\plusindent=\refskip\extraindent=\refskip +\advance\plusindent by -\refindent\tempindent=\parindent % +\parindent=0pt\par\hangindent\extraindent % + [\number\refcount]\hskip\plusindent #1:{\sl#2},#3 +\parindent=\tempindent} +% +\refskip=\parindent +% +%======================================================================== + % HEADER +\null +\vskip2truecm +% + \centerline{\bigbf GENERATING AN \APL\ FONT} +% +\vskip.75truecm +% + \centerline{\sl Aarno Hohti and Okko Kanerva} +% +\vskip.5truecm +% + \centerline{\sl University of Helsinki} +\vskip.5truecm +\abstract{The \APL\ language is well known for its peculiar + symbols which have inhibited the use of this language + in many programming environments. Making \APL\ + documents of good quality has been difficult and + expensive. We describe here a simple way how to + use \metafont\ to generate an \APL\ font for \TeX\ + by using existing font definitions as far as possible.} +\vskip.5truecm +%======================================================================== +% +\section{Introduction} +This note describes an interesting exercise in using +\METAFONT\ to produce new typefaces by combining letters +from standard fonts. As we know, the \APL\ language [6] of +Kenneth Iverson has never gained the popularity it deserves +which is largely due to its strange symbol set. Indeed, +true \APL\ users require a special keyboard to support +the nonstandard but powerful operator symbols. Moreover, +putting \APL\ into print has always been a problem, and +modern low cost computerized typesetting programs do +not usually support \APL\ style. \TeX\ can be used to +produce high quality printouts for technical text, +and it would be desirable to have a possibility to +mix in \APL\ code. The companion program of +\TeX ---\METAFONT ---provides a full means for a simple generation +of an \APL\ font for \TeX, and the purpose of this +note is to inform other people about the result we +have obtained at the University of Helsinki. Let us note +that there are at least three other \APL\ fonts available +for small computer environments. Indeed, the newsletter +\APL\ {\it Quote Quad\/}\footnote{*}{{\ninepoint Newsletter of SIGAPL, +the Special Interest Group for \APL. {\it Quote Quad\/} has the same +status in the world of \APL\ as TUGboat in \TeX{nical} world.}} +is produced by using TROFF, and there +exists a Postscript \APL\ font for the Apple Laserwriter [5] and +another font for the TEXT typesetting system [2]. + +Consider the following usual kind of function definition in \APL: +\choosett{apl} +\begintt + @DLS_SUMSQ N;I + [1] S_I_0 + [2] @GO(N@@ROI)/LOOP + @endsym + } + $$\boxit{\boxit{\box0}}$$ + \centerline{\sevenrm An APL function for polynomial multiplication} +\endtt +% +gives the output +% +\choosett{apl} +\setbox0=\vbox{\hsize=5.7truein +\begintt + [0] Z_A1 PROD A2;A;I;V + [1] "RETURNS THE PRODUCT OF THE POLYNOMIALS A1 AND A2 + [2] "THE ARGUMENTS ARE GIVEN AS COEFFICIENT ARRAYS + [3] I_@ROA1 + [4] Z_A1@SO.#A2 + [5] LOOP:V_@ROZ @DM V[(@ROI)+1]-1 + [6] V_@ROZ_Z,[(@ROI)+1]V@RO0 + [7] A_(1+-@IOV[1])@SO.#((@NT(@IO@ROV)@EP(1,(@ROI)+1))/V)@RO1 + [8] Z_+/[1]A@RV[(@ROI)+1]Z + [9] ((@RO@ROZ)>@ROI)/LOOP +\endtt + } +$$\boxit{\boxit{\box0}}$$ +\centerline{\sevenrm An APL function for polynomial multiplication} +% +\section{User extension} +A modern user of a computerized typesetting facility will probably +ask if it is possible to extend or modify fonts coming with the +system. As with [5], where the font has an {\it analytic\/} and a +{\it bitmapped\/} variant, we can distinguish between the need of modifying +{\it cmapl10\/} via \METAFONT\ and modification of the pixel files. +\APL\ symbols of various ``blackness'' or ``thickness'' may be desirable. +Indeed, in [3] the user input is written with boldface \APL\ symbols +and the answers from the interpreter with thin ones. Furthermore, +certain screen previewers use specific small size pixel files, and +do not support the \APL\ font. + +The modification of the font by changing the values of some global +variables in the preamble of the \METAFONT\ file is easy and can be +done by following how it is done in standard fonts such as +{\it cmbx10\/} etc. This is the recommended way, too. However, if +\METAFONT\ is not available, then one must attack the pixel files. +For direct hand editing, we use a program that converts a pixel +file into a (bitmapped) text file acceptable to any standard screen +editor, and another program reading the edited file back into +a \TeX\ pixel file. Scaling fonts down to a desired size can be +done in a similar (but automatic) manner; this facility is needed +by a previewer (written by the first author) not using runtime +scaling. + + +\section{References} +\bigskip +{ +\ref Digital Equipment Corporation: VAX-11 \APL\ Reference Manual.- + 1983. + +\ref Feldberg, Ian: TEXT: Publication-Quality Characters Come + to \APL\ Graphics.- Proceedings of the 1986 \APL\ Conference, + SIGAPL, pp.\ 306--313. + +\ref Gilman, Leonard, and Allen J.\ Rose: \APL, An Interactive + Approach.- John Wiley \& Sons, Inc., 1984. + +\ref Grenander, Ulf: Mathematical Experiments on the Computer.- + Academic Press, 1982. + +\ref Howland, John E.: Typesetting \APL\ Using a Macintosh.- + Proceedings of the 1986 \APL\ Conference, SIGAPL, pp.\ 301--305. + +\ref Iverson, Kenneth: A Programming Language.- Wiley, New York, 1962. + + + } + +\bigskip +\section{The address} +\bigskip +{\ninepoint\obeylines +\hskip\refskip University of Helsinki +\hskip\refskip Department of Mathematics +\hskip\refskip Hallituskatu 15 +\hskip\refskip SF--00100 HELSINKI +\hskip\refskip FINLAND +} + +\end + + +%============================================================================ +% +%============================================================================ diff --git a/Master/texmf-dist/source/fonts/apl/versatim.tex b/Master/texmf-dist/source/fonts/apl/versatim.tex new file mode 100644 index 00000000000..c2ff320a7e5 --- /dev/null +++ b/Master/texmf-dist/source/fonts/apl/versatim.tex @@ -0,0 +1,66 @@ + +%============================================================================= +% V E R S A T I M . T E X +%============================================================================= +% +% +\newskip\verbatimindent \verbatimindent=0cm +\newskip\ttglue{\tt \global\ttglue=.5em plus.25em minus.15em} +\def\@{\char'100 } +% +\outer\def\begindisplay{\obeylines\startdisplay} +{\obeylines\gdef\startdisplay#1 + {\catcode`\^^M=5$$#1\halign\bgroup&\hskip\verbatimindent##\hfil\cr}} +\outer\def\enddisplay{\crcr\egroup$$} +% +\chardef\other=12 +\def\ttverbatim{\begingroup \catcode`\\=\other \catcode`\{=\other + \catcode`\}=\other \catcode`\$=\other \catcode`\&=\other + \catcode`\#=\other \catcode`\%=\other \catcode`\~=\other + \catcode`\_=\other \catcode`\^=\other\catcode`\*=\other\catcode`\==\other +% +\ifapl +\catcode`\A=12 +\catcode`\B=12 +\catcode`\C=12 +\catcode`\D=12 +\catcode`\E=12 +\catcode`\F=12 +\catcode`\G=12 +\catcode`\H=12 +\catcode`\I=12 +\catcode`\J=12 +\catcode`\K=12 +\catcode`\L=12 +\catcode`\M=12 +\catcode`\N=12 +\catcode`\O=12 +\catcode`\P=12 +\catcode`\Q=12 +\catcode`\R=12 +\catcode`\S=12 +\catcode`\T=12 +\catcode`\U=12 +\catcode`\V=12 +\catcode`\W=12 +\catcode`\X=12 +\catcode`\Y=12 +\catcode`\Z=12 +\fi +% + \obeyspaces \obeylines \tt} +{\obeyspaces\gdef {\ }} +% +\def\begintt{$$\let\par=\endgraf \ttverbatim \parskip=0pt + \catcode`\@=0 \parindent=\verbatimindent \rightskip=-5pc \ttfinish} +{\catcode`\@=0 @catcode`@\=\other % @ is temporary escape character + @obeylines % end of line is active + @gdef@ttfinish#1^^M#2\endtt{#1@vbox{#2}@endgroup$$}} +% +\catcode`\@=\active +{\obeylines\gdef@{\ttverbatim\spaceskip=\ttglue\let^^M=\ \let@=\endgroup}} + + +\def\beginlines{\par\begingroup\nobreak\medskip\parindent=0pt + \kern1pt\nobreak \obeylines \everypar{\strut}} +\def\endlines{\kern1pt\endgroup\medbreak\noindent} diff --git a/Master/texmf-dist/source/latex/apl/clean.pas b/Master/texmf-dist/source/latex/apl/clean.pas deleted file mode 100644 index 611d434fe59..00000000000 --- a/Master/texmf-dist/source/latex/apl/clean.pas +++ /dev/null @@ -1,226 +0,0 @@ - -%============================================================================ -% C L E A N . P A S -%============================================================================ - -% A sample Turbo Pascal (3.0) program for truncating downloaded pixel files -% to the standard size assumed by some TeX-oriented programs (starting from -% a file of type: File of Array[0..511] of Byte. - -Program Clean_Up(Output,Input,Font_List_File); - -LABEL - -Report; - - -TYPE - -Name_Of_File =String[20]; -Name_Of_Font =String[20]; -Byte =0..255; -Byte_Block =Array[0..511] Of Byte; -Word =Array[0..3] Of Byte; - - - -VAR - -Font_List_File:Text; -Pxl_File:File of Byte_Block; -Block:Byte_Block; -Last_Blocks:Array[0..1023] Of Byte; -One_Word:Word; -File_Name,New_File_Name:Name_Of_File; -Font_Name:Name_Of_Font; -New_Pxl_File:File Of Word; -File_Id_Found,Bad_Pxl_File:Boolean; -End_Of_Block:Boolean; -IOR,Word_Pos:Integer; -Ch:Char; -Word_Value:Real; - - -PROCEDURE Banner; - - Begin - Writeln('!==================================================!'); - Writeln('! The files to be repaired are assumed consist of !'); - Writeln('! blocks 512 bytes long. The repaired files consist!'); - Writeln('! of words. The names of files are supposed to be !'); - Writeln('! found from a separate file. !'); - Writeln('!==================================================!'); - End; - - - -PROCEDURE Initialize; - - Begin - File_Id_Found:=False; - Word_Pos:=0; - End_Of_Block:=False; - Bad_Pxl_File:=False; - End; - - - - -PROCEDURE Check_File_Id; - -VAR - -A:Integer; - - Begin - If Abs(Word_Value)<2000.0 Then - Begin - A:=Round(Word_Value); - If (A=1001) Or (A=1002) Then File_Id_Found:=True; - End; - End; - - - -PROCEDURE READ_NEXT_WORD; - -VAR - -I:Integer; - - Begin - If Not End_Of_Block Then - Begin - For I:=0 To 3 Do One_Word[3-I]:=Last_Blocks[1023-((4*Word_Pos)+I)]; - Word_Pos:=Word_Pos+1; - If Word_Pos>255 Then End_Of_Block:=True; - End; - End; - - - - -PROCEDURE EVALUATE_NEXT_WORD; - - Begin - Read_Next_Word; - Word_Value:=One_Word[3]+256.0*(One_Word[2]+ - 256.0*(One_Word[1]+256.0*One_Word[0])); - - End; - - - -PROCEDURE Find_File_Id; - -Var - -K:Integer; - - Begin - While (Not File_Id_Found) And (Not End_Of_Block) Do - Begin - Evaluate_Next_Word; - Check_File_Id; - End; - If Not File_Id_Found Then - Begin - For K:=Length(Font_Name) To 30 Do Write('.'); - Writeln(' Bad Pxl File, File Not Repaired'); - Bad_Pxl_File:=True; - End; - End; - - - -PROCEDURE Rewrite_Pxl_File(Var Font_Name,File_Name:Name_Of_File); - -LABEL - -Report; - -VAR - -I,J,K,IOR:Integer; - - Begin - Assign(Pxl_File,Font_Name); - {$I-} Reset(Pxl_File) {$I+}; - IOR:=IOresult; - If IOR<>0 Then Goto Report; - Assign(New_Pxl_File,File_Name); - Rewrite(New_Pxl_File); - Seek(Pxl_File,0); - For I:=0 To Filesize(Pxl_File)-3 Do - Begin - Read(Pxl_File,Block); - For J:=0 To 127 Do - Begin - For K:=0 To 3 Do One_Word[K]:=Block[(4*J)+K]; - Write(New_Pxl_File,One_Word); - End; - End; - Read(Pxl_File,Block); - For I:=0 To 511 Do - Last_Blocks[I]:=Block[I]; - Read(Pxl_File,Block); - For I:=512 To 1023 Do - Last_Blocks[I]:=Block[I-512]; - Find_File_ID; - Word_Pos:=255-Word_Pos; - If Not Bad_Pxl_File Then - Begin - For I:=0 To Word_Pos+1 Do - Begin - For K:=0 To 3 Do One_Word[K]:=Last_Blocks[(4*I)+K]; - Write(New_Pxl_File,One_Word); - End; - Report:Begin - For I:=0 To 30-Length(Font_Name) Do Write('.'); - If IOR<>0 Then Writeln('File Not Found') Else - Begin - Writeln(New_File_Name); - Close(New_Pxl_File); - Close(Pxl_File); - End; - End; - End; - End; - - - - - (*** M A I N P R O G R A M ***) -BEGIN - - Banner; - Writeln; - Writeln('Give The Name Of File Containing The List Of Pxl Files: '); - Readln(File_Name); - Assign(Font_List_File,File_Name); - {$I-} Reset(Font_List_File) {$I+}; - IOR:=IOresult; - If IOR<>0 Then Goto Report; - While Not Eof(Font_List_File) Do - Begin - Initialize; - Font_Name:=''; - While Not Eoln(Font_List_File) Do - Begin - Read(Font_List_File,Ch); - Font_Name:=Font_Name+Ch; - End; - Readln(Font_List_File); - Write(Font_Name); - New_File_Name:=Copy(Font_Name,1,Pos('.',Font_Name)-1)+'.rxl'; - Rewrite_Pxl_File(Font_Name,New_File_Name); - End; - Writeln; - Report: Begin - If IOR<>0 Then Writeln('File Not Found!') Else - Begin - Writeln('............Done!...........'); - Close(Font_List_File); - End; - End; -END. diff --git a/Master/texmf-dist/source/latex/apl/convert.pas b/Master/texmf-dist/source/latex/apl/convert.pas deleted file mode 100644 index 8a5b6195051..00000000000 --- a/Master/texmf-dist/source/latex/apl/convert.pas +++ /dev/null @@ -1,117 +0,0 @@ - -%============================================================================ -% C O N V E R T . P A S -%============================================================================ - -% This is a sample Turbo Pascal program for HeX-->Bin conversion useful -% for a safe download of pixel files (Turbo Pascal 3.0) - -PROGRAM ASC_TO_BIN(Input,Output,Font_List_File); - - TYPE - - Byte = 0..255; - Name_Of_File = String[20]; - - - VAR - - Newfile:File Of Byte; - Textfile,Font_List_File:Text; - First_Hex,Second_Hex,Ch:Char; - One_Byte:Byte; - I:Integer; - Font_Name,File_Name,New_File_Name:Name_Of_File; - - -PROCEDURE Banner; - - Begin - Writeln('!=================================================!'); - Writeln('! The text files to be converted must have been !'); - Writeln('! originally obtained as follows: each byte is !'); - Writeln('! replaced by two hexadecimals, the first of which!'); - Writeln('! is Byte Div 16 and the second Byte Mod 16. The !'); - Writeln('! names of files are supposed to be found in a !'); - Writeln('! separate list file. !'); - Writeln('!=================================================!'); - End; - - -FUNCTION Convert_Hex_To_Dec(X:Char):Integer; - - Begin - If X In ['0'..'9'] Then Convert_Hex_To_Dec:=Ord(X)-48 - Else Convert_Hex_To_Dec:=Ord(X)-55; - End; - - - - -PROCEDURE Convert_File(Var File_Name,New_File_Name:Name_Of_File); - -VAR - -A,B,I:Integer; - - - Begin - Assign(Textfile,File_Name); - {$I-} Reset(Textfile) {$I+}; - If IOresult=0 Then - Begin - Assign(Newfile,New_File_Name); - Rewrite(Newfile); - While Not Eof(Textfile) Do - Begin - While Not Eoln(Textfile) Do - Begin - Read(Textfile,First_Hex); - Read(Textfile,Second_Hex); - A:=Convert_Hex_To_Dec(First_Hex); - B:=Convert_Hex_To_Dec(Second_Hex); - One_Byte:=(16*A)+B; - If Eoln(Textfile) Then Readln(Textfile); - Write(Newfile,One_Byte); - End; - End; - For I:=0 To 30-Length(New_File_Name) Do Write('.'); - Writeln(New_File_Name,' written'); - Close(Textfile); - Close(Newfile); - End Else - Writeln('This File Not Found!'); - End; - - (*** M A I N P R O G R A M ***) -BEGIN - - Banner; - Writeln; - Writeln('Give The Name Of File Containing The List Of Pxl Files: '); - Readln(File_Name); - Assign(Font_List_File,File_Name); - {$I-} Reset(Font_List_File) {$I+}; - If IOresult=0 Then - Begin - Writeln; - Writeln('... started converting ...'); - Writeln; - While Not Eof(Font_List_File) Do - Begin - Font_Name:=''; - While Not Eoln(Font_List_File) Do - Begin - Read(Font_List_File,Ch); - Font_Name:=Font_Name+Ch; - End; - Write(Font_Name); - New_File_Name:=Copy(Font_Name,1,Pos('.',Font_Name)-1)+'.bxl'; - Readln(Font_List_File); - Convert_File(Font_Name,New_File_Name); - End; - Writeln; - Writeln('... conversion done ...'); - End Else - Writeln('File List Not Found!'); -END. diff --git a/Master/texmf-dist/source/latex/apl/fontnotes b/Master/texmf-dist/source/latex/apl/fontnotes deleted file mode 100644 index 967c6f33db2..00000000000 --- a/Master/texmf-dist/source/latex/apl/fontnotes +++ /dev/null @@ -1,97 +0,0 @@ - - - These files contain the necessary material for producing -APL documents with TeX. It should be pointed out that as written -in an article published in TUGboat, the system as such can be -described as a straightforward solution to the problem of making -nice documents containing APL code. Instead of trying to achieve -a completed result, we tell the reader how to use existing MetaFont -character descriptions as far as possible to provide an APL font -of reasonably fine quality. Further development is left to the users. -Combined with suitable TeX macros using Digital's mnemonics -- chosen -because of the popularity of the interpreter among APL users -(it is really the only one used at our site) -- the font can be used -smoothly enough. Furthermore, if combined with an APL workspace -providing functions for an automatic conversion of APL workspaces -into TeX code, the system can be used to merge pre-existing -APL code into documents without the pain of re-writing the code -in Digital's 2-letter mnemonics. - To produce pixel files from the MetaFont file CMAPL10.MF, -you have to run MetaFont in your local machine. By typing METAFONT -you should get the prompt symbol '*'. It may be necessary to use -the form - - METAFONT\INPUT_DIRECTORY = XXXXXX - -where XXXXXX is the global name of the directory where the basic -CMMF definitions can be found. -The following discussion will then get MetaFont to produce a generic -font file CMAPL10.360GF: - - * \relax; - * \mode = imagen; - * \mag = 1.2; - * input cmapl10 - -Here \mode = imagen was used to get a pixel file for a laserprinter -with the resolution 200 times 200 pixels per square inch. It is -possible that the definition of 'imagen' is different at your local -site; in the case of error ask the person who installed your local -MetaFont. Notice that \mag = 1.2 is needed in case you want to get -magnified pixels. The final pixel (because of the resolution 200) -files will then be named CMAPL10.1800PXL (or whatever you choose -to call them). If you want to produce 'small' pixel files for example -for a screen previewer, use \mag = xxx with an appropriate constant xxx. -(You can check the form of characters obtained on a teletype terminal -by using the program GFTYPE.) Finally, you get a pixel file from -CMAPL10.xxxGF by running the program GF(TO)PXL.EXE, which should be -found together with MetaFont. - Some people want to use their pixel files on a PC (the -laserprinter is connected to a PC or for previewing purposes). In -that case the pixel files must be downloaded from the host. We never -use programs like Kermit for transferring the binary file but -first convert it to hex form, load the file down as a text file and -then convert it back. It is IMPORTANT to notice that pixel files in -VAXes (say) are composed of 512 byte blocks. The pixel file itself -is ended by the pixel_id, which is either 1001 (rasters are in word packed -form) or 1002 (rasters are in byte packed form). Many programs running -on PCs assume that the last 4 bytes of the pixel file really -represent the pixel_id. Hence, the pixel files downloaded from the host -should be CLEANed from garbage (the programs CONVERT and CLEAN are -given for convenience and to fix the definition of what they should do). - MetaFont also produces the file CMAPL10.TFM containing the -metric information of the characters in the font. These are needed -by TeX, and they can be downloaded as such (at least if you are -using Micro-TeX or PCTeX). - - In order to use the mnemonics, the macros in APLSTYLE are -needed. There are basically two ways of merging APL code. There are -standard macros called VERBATIM, which enable the user to produce -'typewriter-like' output. As APL is modelled on a typewriter style, -too, it has been reasonable to extend VERBATIM to accept different -typewriter-like fonts. The escape sequence \choosett enables you to -choose the font you want to use. Thus, \choosett{tentt} swithces -the standard font CMTT10 on, whereas \choosett{apl} chooses the font -APL, defined in APLSTYLE by '\font\apl = cmapl10'. First, you can -insert APL code into text lines. In this case you can call any -APL symbol either by its 2-letter mnemonic (for example \BX produces the -box symbol) if there is no symbol for it OR otherwise by its name -surrounded by two @'s. (The @ character swithces into the current -typewriter style.) Thus, @A_B@ produces 'A <-- B' in APL style, because -'_' is the name of '<--' in Digital's mnemonics. Secondly, you can -insert APL code in 'screenlike' mode. The code is to be delimited -by the pair \begintt - \endtt. Example: - -\begintt - @DL Z_ZNPLUS N;@BXIO % Here '@' replaces '\' as the escape -[1] @BXIO_0 % character -[2] Z_N@AB(@ION)@SO.+@ION - @DL -\endtt - -Please note that in this case the material between \begintt -- \endtt -is considered by TeX as a vertical box that cannot be divided between -pages. Thus, if you have a long APL function, it might produce -a message of underfull vbox. - - diff --git a/Master/texmf-dist/source/latex/apl/readme b/Master/texmf-dist/source/latex/apl/readme deleted file mode 100644 index 4e429b26a5d..00000000000 --- a/Master/texmf-dist/source/latex/apl/readme +++ /dev/null @@ -1,28 +0,0 @@ -Thank you for your letter of 27 February. The original purpose -of our APL font and macros was to solve the immediate problem -of writing documents with APL code. Therefore, they are free for -anyone who finds them useful. Some people have requested the font -and we have sent them the files appended below (with CMAPL10 and -two conversion programs for downloading pixel files, not given here). -Further, we have nothing against giving our net address to the -users because it would be useful to hear about extensions made -to the system. - -The files APLDEF.TEX and TUGBOAT.TEX are identical with the second -versions sent to you (via BITNET) except for minimal changes (there -are some corrections and extensions in APLDEF.TEX, and in -TUGBOAT.TEX one APL line was corrected.) We think the files are -in a "final" form (at least we are not planning any changes). - -Our original purpose was to publish the second version, but the only -difference was really the removal of the tilde space character (this -resulted in more complex 1-character macros, but the user cannot -see any difference; moreover, TeX runs only about 14% slower). Thus, -we feel that there is no reason to publish a list of errata in -TUGboat, because any user would inevitably have to use the new -version (the old one has not been released). - -We are adding a file containing sample examples on the use of the -APL mnemonics. - -Aarno Hohti diff --git a/Master/texmf-dist/source/latex/apl/readme.txt b/Master/texmf-dist/source/latex/apl/readme.txt deleted file mode 100644 index 4d939552a3d..00000000000 --- a/Master/texmf-dist/source/latex/apl/readme.txt +++ /dev/null @@ -1,129 +0,0 @@ -Thank you for your letter of 27 February. The original purpose -of our APL font and macros was to solve the immediate problem -of writing documents with APL code. Therefore, they are free for -anyone who finds them useful. Some people have requested the font -and we have sent them the files appended below (with CMAPL10 and -two conversion programs for downloading pixel files, not given here). -Further, we have nothing against giving our net address to the -users because it would be useful to hear about extensions made -to the system. - -The files APLDEF.TEX and TUGBOAT.TEX are identical with the second -versions sent to you (via BITNET) except for minimal changes (there -are some corrections and extensions in APLDEF.TEX, and in -TUGBOAT.TEX one APL line was corrected.) We think the files are -in a "final" form (at least we are not planning any changes). - -Our original purpose was to publish the second version, but the only -difference was really the removal of the tilde space character (this -resulted in more complex 1-character macros, but the user cannot -see any difference; moreover, TeX runs only about 14% slower). Thus, -we feel that there is no reason to publish a list of errata in -TUGboat, because any user would inevitably have to use the new -version (the old one has not been released). - -We are adding a file containing sample examples on the use of the -APL mnemonics. - -Aarno Hohti - - - -%================================================================= -% R E A D M E . T X T -%================================================================= - - These files contain the necessary material for producing -APL documents with TeX. It should be pointed out that as written -in an article published in TUGboat, the system as such can be -described as a straightforward solution to the problem of making -nice documents containing APL code. Instead of trying to achieve -a completed result, we tell the reader how to use existing MetaFont -character descriptions as far as possible to provide an APL font -of reasonably fine quality. Further development is left to the users. -Combined with suitable TeX macros using Digital's mnemonics -- chosen -because of the popularity of the interpreter among APL users -(it is really the only one used at our site) -- the font can be used -smoothly enough. Furthermore, if combined with an APL workspace -providing functions for an automatic conversion of APL workspaces -into TeX code, the system can be used to merge pre-existing -APL code into documents without the pain of re-writing the code -in Digital's 2-letter mnemonics. - To produce pixel files from the MetaFont file CMAPL10.MF, -you have to run MetaFont in your local machine. By typing METAFONT -you should get the prompt symbol '*'. It may be necessary to use -the form - - METAFONT\INPUT_DIRECTORY = XXXXXX - -where XXXXXX is the global name of the directory where the basic -CMMF definitions can be found. -The following discussion will then get MetaFont to produce a generic -font file CMAPL10.360GF: - - * \relax; - * \mode = imagen; - * \mag = 1.2; - * input cmapl10 - -Here \mode = imagen was used to get a pixel file for a laserprinter -with the resolution 200 times 200 pixels per square inch. It is -possible that the definition of 'imagen' is different at your local -site; in the case of error ask the person who installed your local -MetaFont. Notice that \mag = 1.2 is needed in case you want to get -magnified pixels. The final pixel (because of the resolution 200) -files will then be named CMAPL10.1800PXL (or whatever you choose -to call them). If you want to produce 'small' pixel files for example -for a screen previewer, use \mag = xxx with an appropriate constant xxx. -(You can check the form of characters obtained on a teletype terminal -by using the program GFTYPE.) Finally, you get a pixel file from -CMAPL10.xxxGF by running the program GF(TO)PXL.EXE, which should be -found together with MetaFont. - Some people want to use their pixel files on a PC (the -laserprinter is connected to a PC or for previewing purposes). In -that case the pixel files must be downloaded from the host. We never -use programs like Kermit for transferring the binary file but -first convert it to hex form, load the file down as a text file and -then convert it back. It is IMPORTANT to notice that pixel files in -VAXes (say) are composed of 512 byte blocks. The pixel file itself -is ended by the pixel_id, which is either 1001 (rasters are in word packed -form) or 1002 (rasters are in byte packed form). Some programs running -on PCs assume that the last 4 bytes of the pixel file really -represent the pixel_id. Hence, the pixel files downloaded from the host -should be CLEANed from garbage (the programs CONVERT and CLEAN are -given for convenience and to fix the definition of what they should do). - MetaFont also produces the file CMAPL10.TFM containing the -metric information of the characters in the font. These are needed -by TeX, and they can be downloaded as such (at least if you are -using Micro-TeX or PCTeX). - - In order to use the mnemonics, the macros in APLSTYLE are -needed. There are basically two ways of merging APL code. There are -standard macros called VERBATIM, which enable the user to produce -'typewriter-like' output. As APL is modelled on a typewriter style, -too, it has been reasonable to extend VERBATIM to accept different -typewriter-like fonts. The escape sequence \choosett enables you to -choose the font you want to use. Thus, \choosett{tentt} swithces -the standard font CMTT10 on, whereas \choosett{apl} chooses the font -APL, defined in APLSTYLE by '\font\apl = cmapl10'. First, you can -insert APL code into text lines. In this case you can call any -APL symbol either by its 2-letter mnemonic (for example \BX produces the -box symbol) if there is no symbol for it OR otherwise by its name -surrounded by two @'s. (The @ character swithces into the current -typewriter style.) Thus, @A_B@ produces 'A <-- B' in APL style, because -'_' is the name of '<--' in Digital's mnemonics. Secondly, you can -insert APL code in 'screenlike' mode. The code is to be delimited -by the pair \begintt - \endtt. Example: - -\begintt - @DL Z_ZNPLUS N;@BXIO % Here '@' replaces '\' as the escape -[1] @BXIO_0 % character -[2] Z_N@AB(@ION)@SO.+@ION - @DL -\endtt - -Please note that in this case the material between \begintt -- \endtt -is considered by TeX as a vertical box that cannot be divided between -pages. Thus, if you have a long APL function, it might produce -a message of underfull vbox. - -- cgit v1.2.3