summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-11 23:50:56 +0000
committerKarl Berry <karl@freefriends.org>2006-01-11 23:50:56 +0000
commitd066e15c87ec6f4a0b87d286f9943118bdf59049 (patch)
treecacac3f980d937f3de97c72666c9984b84f65a12
parentb7778e2a15711068f92f630f83111bacb0f70e4b (diff)
trunk/Master/texmf-dist/source/latex/apl
git-svn-id: svn://tug.org/texlive/trunk@143 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/source/latex/apl/clean.pas226
-rw-r--r--Master/texmf-dist/source/latex/apl/convert.pas117
-rw-r--r--Master/texmf-dist/source/latex/apl/fontnotes97
-rw-r--r--Master/texmf-dist/source/latex/apl/readme28
-rw-r--r--Master/texmf-dist/source/latex/apl/readme.txt129
5 files changed, 597 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/apl/clean.pas b/Master/texmf-dist/source/latex/apl/clean.pas
new file mode 100644
index 00000000000..611d434fe59
--- /dev/null
+++ b/Master/texmf-dist/source/latex/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/latex/apl/convert.pas b/Master/texmf-dist/source/latex/apl/convert.pas
new file mode 100644
index 00000000000..8a5b6195051
--- /dev/null
+++ b/Master/texmf-dist/source/latex/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/latex/apl/fontnotes b/Master/texmf-dist/source/latex/apl/fontnotes
new file mode 100644
index 00000000000..967c6f33db2
--- /dev/null
+++ b/Master/texmf-dist/source/latex/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/latex/apl/readme b/Master/texmf-dist/source/latex/apl/readme
new file mode 100644
index 00000000000..4e429b26a5d
--- /dev/null
+++ b/Master/texmf-dist/source/latex/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/latex/apl/readme.txt b/Master/texmf-dist/source/latex/apl/readme.txt
new file mode 100644
index 00000000000..4d939552a3d
--- /dev/null
+++ b/Master/texmf-dist/source/latex/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.
+