% tb19apl.tex %======================================================================== % A TeX file for the paper announcing our work on an APL font % % A.Hohti/O.Kanerva (University of Helsinki) April 1987 %======================================================================== % VERSION AT 21.40 ON 11.5 87 % % This paper was published in TUGboat 8#3, November 1987. % Some modifications made for this purpose by the editor are so marked: % % added or changed by bb \font\sltt=cmsltt10 % for file contents inside text \begingroup % isolate special definitions % % added by bb %======================================================================== \input aplstyle % the file containing the APL definitions % note: this inputs verbatim.tex and apldef.tex %======================================================================== %\magnification=\magstep1 % for weak eyes! %======================================================================== %\font\bigbf=ambx10 % scaled \magstep1 % 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 % removed by bb, definition of \ninepoint nearly identical to TUGboat %======================================================================== % changed by bb to \MF in text %\def\METAFONT{{\manual METAFONT}} %\def\metafont{{\minual METAFONT}} %======================================================================== % stylistic definitions % replaced in text by \beginsection; bb %\def\section#1{\vskip0pt plus .1\vsize % \penalty-250\vskip0pt plus-.1\vsize\bigskip % \noindent{\bf #1.\ }\nobreak\message{#1}} % redefined by bb to conform to TUGboat page dimensions %\def\abstract#1{\bigskip\centerline{\hbox{ % \vbox{\hsize=4.75truein{\ninepoint \noindent ABSTRACT.\enspace#1}}}}} \def\abstract#1{{\leftskip=\parindent \rightskip=\leftskip \interlinepenalty=10000 \ninepoint \noindent ABSTRACT.\enspace#1\endgraf}} \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\endgraf \parindent=\tempindent} % \refskip=\parindent % %======================================================================== % HEADER \title Generating an \APL\ Font \\Aarno Hohti and Okko Kanerva\cr University of Helsinki \endx \pagexref{hohti} \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 \MF\ to generate an \APL\ font for \TeX\ by using existing font definitions as far as possible.} %\vskip.5truecm %======================================================================== \beginsection Introduction This note describes an interesting exercise in using \MF\ 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 largely because of 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\Dash \MF\Dash 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 {\sl APL Quote Quad}\footnote{*}{{\ninepoint Newsletter of SIGAPL, the Special Interest Group for \APL\null. Quote Quad has the same status in the world of \APL\ as \TUB\ 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 @DL~S_SUMSQ N;I [1] S_I_0 [2] @GO(N@@RO~I)/LOOP @endsym } $$\boxit{\boxit{\box0}}$$ \centerline{\sevenrm An APL function for polynomial multiplication} \endtt gives the output \smallskip \choosett{apl} \setbox0=\vbox{\hsize=5.5truein \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_@RO~A1 [4] Z_A1@SO.#A2 [5] LOOP:V_@RO~Z @DM V[(@RO~I)+1]-1 [6] V_@RO~Z_Z,[(@RO~I)+1]V@RO0 [7] A_(1+-@IO~V[1])@SO.#((@NT(@IO@RO~V)@EP(1,(@RO~I)+1))/V)@RO1 [8] Z_+/[1]A@RV[(@RO~I)+1]Z [9] ((@RO@RO~Z)>@RO~I)/LOOP \endtt } $$\boxit{\boxit{\box0}}$$ \centerline{\sevenrm An APL function for polynomial multiplication} \endgroup % end isolation of this article \newpage \twocol \endinput