<!–Converted with LaTeX2HTML 2022 (Released January 1, 2022) –> <HTML lang="en"> <HEAD> <TITLE>Contents of Typesetting Objects</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> <META NAME="viewport" CONTENT="width=device-width, initial-scale=1.0"> <META NAME="Generator" CONTENT="LaTeX2HTML v2022">
<LINK REL="STYLESHEET" HREF="apl_tug.css">
<LINK REL="next" HREF="node9_mn.html"> <LINK REL="previous" HREF="node3_mn.html"> <LINK REL="up" HREF="apl_tug_mn.html"> <LINK REL="next" HREF="node5_mn.html"> </HEAD>
<BODY bgcolor="#ffffff" text="#000000" link="#9944EE" vlink="#0000ff" alink="#00ff00">
<H1><A ID="SECTION00040000000000000000"> Typesetting <IMG STYLE="height: 39.24ex; vertical-align: 139.30ex; " SRC="img1.png" ALT="APL"> Objects</A> </H1>
<P> Typing the name of an occasional <I>APL</I> symbol within a normal text is not a real nuisance to the author of <I>APL</I> texts. But typesetting a larger piece of <I>APL</I> code certainly is. Imagine a function named , which implements a recursive tree traversal algorithm:
<P>
<BR>
<IMG
STYLE="" SRC="img4.png"
ALT="
">
<BR>
<P> In order to print just the beginning of the header of the function, you would have to type:
<P> <PRE> </PRE>
<P> Obtaining the familiar function layout used in <I>APL</I> textbooks would require additional code. What is more, besides being awkward the whole process is error-prone: Almost certainly it will result in a printout different from the <I>APL</I> code.
<P> Therefore we strongly recommend automatic translation of <I>APL</I> code. We provide an <I>APL</I> front end which transforms <I>APL</I> objects into logical document elements which can be <code> =</code> into L<SUP><SMALL>A</SMALL></SUP>T<SMALL>E</SMALL>X documents. This guarantees consonance between the original <I>APL</I> code and its listing and is also more convenient.
<P> For all <I>APL</I> language elements we have defined <I>APL</I> functions and corresponding L<SUP><SMALL>A</SMALL></SUP>T<SMALL>E</SMALL>X environments. Our system supports the typesetting of:
<UL> <LI>an array displayed by the interpreter, </LI> <LI>an array in boxed representation, </LI> <LI>a function or operator displayed by the built in <I>APL</I> del-editor (–editor), </LI> <LI>a function or operator displayed by <I>APL</I>'s canonical representation function , </LI> <LI>a direct definition of a function or operator, </LI> <LI>an <I>APL</I> expression input by the user. </LI> </UL> Apart from minor modifications we have used traditional layout conventions for all language elements. For example, the convention that user input is six spaces indented can be traced back to the very first implementation of <I>APL</I>. An other traditional convention states that if a line of <I>APL</I> code does not fit on a single line of the display, the rest of the code is wrapped around and continues on the next line. In some functions this rule may lead to line breaks in the middle of names. Since <I>APL</I> identifiers can be up to 255 characters long line breaking within names cannot be avoided in general.
<P> As you can see, arrays and functions can be typeset in various ways. For example, the above listing of the <I>APL</I> function was printed by the following <I>APL</I> expression:
<P>
<BR>
<IMG
STYLE="height: 54.20ex; vertical-align: 124.19ex; " SRC="img5.png"
ALT="
">
<BR>
<P>
The <I>APL</I> function produces the file <TT>tree.tex</TT> as output.
The <I>APL</I> front end not only maps each
character into the corresponding T<SMALL>E</SMALL>X macro but it also produces
the line numbers in brackets and the surrounding L<SUP><SMALL>A</SMALL></SUP>T<SMALL>E</SMALL>X environments
in order to guarantee uniform display of functions throughout the document.
<P> In the following we present examples for each of the cases mentioned above. At the same time, the examples give us the opportunity to demonstrate variations of type style and size.
<P> <BR><HR> <!–Table of Child-Links–> <A ID="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
<UL> <LI><A NAME="tex2html19" HREF="node5_ct.html" TARGET="contents"><SMALL>Typesetting <IMG STYLE="height: 39.24ex; vertical-align: 139.30ex; " SRC="img1.png" ALT="APL"> Arrays</SMALL></A> <LI><A NAME="tex2html20" HREF="node6_mn.html" TARGET="main"><SMALL>Typesetting <IMG STYLE="height: 39.24ex; vertical-align: 139.30ex; " SRC="img1.png" ALT="APL"> Functions</SMALL></A> <LI><A NAME="tex2html21" HREF="node7_mn.html" TARGET="main"><SMALL>Typesetting <IMG STYLE="height: 39.24ex; vertical-align: 139.30ex; " SRC="img1.png" ALT="APL"> Expressions</SMALL></A> <LI><A NAME="tex2html22" HREF="node8_mn.html" TARGET="main"><SMALL>Typesetting User Dialogues and Workspaces</SMALL></A> </UL> <!–End of Table of Child-Links–>
<HR>
</BODY> </HTML>;''