Z E D M A N U A L V. R. Pratt 11/14/79 Revised at Stanford 10/16/80 Third Revision 5/25/85 ================ TABLE OF CONTENTS ================== 1. INTRODUCTION 3 2. EQUIPMENT 4 Keyboard Bell Use of Keys Screen 3. ASPECTS OF ZED 6 Starting and Stopping ZED Files Modes - Insert and Alter Inserting Status Line Questions 4. ZED COMMANDS 10 Golfball commands Sentences - Verb-Adjectives-Noun Imperatives Printing Terminals 5. FORMATTING 16 Invocation of ZEDFOR The Specs Area Conventions - super/subscripts, Greek, italics, boldface, script Special Symbols Pagination Fonts Map Alignment of tables ======== 1. INTRODUCTION ======== ZED is a high-level editing and formatting system. It allows you to read, create, modify, format, and print documents. It is particularly suited to the production of technical documents. ZED is high-level in that it uses principles that appear to be effective in natural language communication. The main principle used is that of being able to form many sentences from a few words. Thus you can Erase 3 Characters, or Erase 3 Words, or Erase 3 Paragraphs, or Erase 3 Lines, etc. Similarly you can Erase 3 Paragraphs, or Dump 3 Paragraphs, or Justify 3 Paragraphs, or Kase 3 Paragraphs, etc. (Note that you do not have to type whole English sentences, instead you type only the first letter of each word, e.g. E3W for Erase 3 Words.) ZED is also high-level in that it performs automatically those functions that the user should not be concerned with. For example, saving the file you are working on in your directory is handled entirely automatically; in fact there is only one file-oriented command you need use on a regular basis, the Visit command, that allows you to visit any of your files and to create new files. This manual is organized by topic, but this does not mean you have to read it in that order, particularly not on your first reading. Just skim each topic to begin with to get a feeling for the sorts of things being talked about. Then sit down at a terminal and try out some of the things described. To help you in this there is a file called TEACH-ZED that you can Visit to experiment on. ======== 2. EQUIPMENT ======== Your terminal has a keyboard and a screen. Everything you feed into ZED, whether text typed in as part of a document, or commands to tell ZED to make changes etc., is entered through the keyboard. The part of the document you are working on appears in the upper 80% of the screen, the commands you give appear in the bottom 20% of the screen. Between these two parts of the screen appears a single line called the status line. This is treated in its own section later. Keyboard On the keyboard you should be able to find the letters A-Z, the numbers 0-9, and all of the following except possibly ~ (tilde) and ` (backquote). ! @ # $ % ^ & * ( ) - _ = + ~ [ ] \ | ; : ' " { } , < . > / ? In addition you should be able to find the following keys. These are written here enclosed in <...>. All but the key will usually be clearly labelled. may be labelled on some terminals. There will often be other keys besides the ones mentioned so far, but you should not find it necessary to know about them. The Bell Your terminal is equipped with a "bell," so-called, which may be an actual bell, or more likely a buzzer or just a means to flash the screen. You can hear or see it in action by typing a few times while using ZED. It exists to alert you to various conditions that you should pay attention to. The commonest of these conditions are: entering alter mode, failing a search using the Text command, or receiving a message from another computer user or another program. Use of Keys Keys are used for three things: ordinary typing, giving commands to ZED, and modifying other keys. The only keys in the last category are , , and . works as on an ordinary typewriter, making lower case alphabetic (letter) keys into upper case, making / into ? and so on. is like except that it only affects alphabetic (A-Z) keys; also it stays down till you press it (or on some keyboards) again. is like in that it modifies the meaning of another key typed while is held down. Wherever you see something like Q or A in this manual it means type the Q or the A while holding down the key, just as Q means type the Q while holding down the key. Almost all other keys are used for both ordinary typing and giving commands to ZED. The choice depends on what mode ZED is in; Insert mode is used for the former, Alter mode for the latter. Modes are discussed in more detail later. When giving commands it is generally the case that either upper case or lower case may be used with the same effect. In the manual we will show all commands being typed in upper case. This is done to make commands stand out in the text of the manual. However in practice you will probably find lower case more convenient to type than upper case. Screen The text on your screen is laid out in lines made up of characters. Even the spaces are considered characters. In addition, between lines but not visible on the screen is a character, which you should be aware of when moving around in the document and when deleting characters. (Actually there are two characters, , but ZED deals with them for the most part as though they formed a single character.) Most characters take up the same amount of space on the screen, about a tenth of an inch. The exceptions to this are , , , and control characters, which will be discussed later. takes up from 1 to 8 characters, depending on where it is. The amount of space it takes is arranged so that the right hand end of the space is a multiple of 8 characters from the start of the line. takes up no space, but is used to indicate the end of the present line and the start of a new line. should not normally appear in a file, though it is occasionally useful for overstriking characters. It will print on your screen as either ^H or by actually backspacing. On the screen you will see a flashing object, the cursor. It shows you where you are in your document. It will be under (or on) a character, but you may find it more helpful to visualize it as being between that character and the preceding character. When it is at the right end of the line it will be under a non-existent character - think of it as being between the last character of the line and the separating that line from the next line. Similarly when it is at the beginning of a line think of it as between the preceding that line and first character of the line. ======== 3. ASPECTS OF ZED ======== Starting and Stopping ZED Log in (ask someone for help here). Then start up ZED by typing ZED (Recall that means you are to type the carriage-return key, and that commands work just as well in lower case, e.g. zed.) If you want to work on a particular file called say ACCTS, type ZED ACCTS To leave ZED either temporarily or permanently, type ^Z. This takes you to the program you were talking to just before you said "ZED." When leaving ZED in this way there is no need to worry about "saving your file," this is taken care of automatically, as you will see in the next section. Files Documents are stored in the computer as files. As a computer user you have access to a directory in which those files are kept. The directory will either be your own or be shared with a few other people. To work on a particular file in your directory, you visit it by typing V then the name of the file (say ACCTS) and then , as in VACCTS. If the file does not yet exist, ZED automatically creates it for you. Thus to start work on a new file just think up a name for it and visit it. The file name can consist of any characters except characters, ;:{}|~ and non-printing characters such as , , and . Also > and < may not be used as file names on their own - they have special meanings that are not important to know about here. If the file you are working on is empty (has no characters in it at all, not even a ), ZED deletes it from your directory automatically. Thus to delete a file, visit it and erase it by saying EF for Erase File. (E and F are discussed in more detail later.) A special file called DIR contains a list of all the files in your directory; just visit it to see what you presently own. Here is a small directory called on a TOPS-20 system. PS: File Name Size Created Last Referenced -THIS-.-DIR-.1 2 4-Jun-84 23:43:00 3-Mar-85 11:26:20 RUNCIBLE.SPN.6 1 13-Jul-84 07:16:36 25-May-85 03:33:37 LOGIN.CMD.37 1 9-Apr-85 06:19:36 25-May-85 10:47:03 AKTAVITE..2 2 21-Mar-81 19:49:01 25-May-85 09:03:53 UNCLE.EXE.1 9 19-Mar-85 09:09:35 2-Apr-85 13:01:21 ZED automatically saves a copy of the file you are editing periodically in your directory while you are working on it, every 5 minutes (if it has changed since the last save or you are in Insert mode) or every 300 characters typed, whichever happens first. Modes ZED has two basic modes, Insert mode and Alter mode. In insert mode you can think of your terminal as a typewriter - everything you type is inserted into the document at the place where the cursor is. In alter mode what you type is treated as commands to ZED. To enter insert mode, type I, to enter alter mode, type . It is also possible to give commands while in insert mode, by holding down the key while typing the command. (This works perfectly only on AI terminals. On other terminals it works only for commands using just the letters A-Z and the characters ] ^ \, not for numbers or other characters. You are best off not using this facility on non-AI terminals.) It is also possible to insert one character while in alter mode, by preceding it with Q (for Quote); thus Qy would insert the character y. Inserting In Insert mode almost every character you type is inserted into the file, at the place where the cursor is. See below for a list of exceptions. Carriage return is automatic. When you reach the end of the line ZED starts on a fresh line, without breaking up any words. See below for more details on how this works. The characters treated specially while inserting are: This deletes the character to the left of the cursor. If you have been inserting text, the deleted character will be the last character you inserted. If you type several times you will delete several of the characters to the left of the cursor. This takes you out of insert mode and back into alter mode. In doing so it rings the bell to notify you that you are in alter mode, so that you know not to go on typing text. If the key is held down, alphabetic characters (A-Z) will be treated as ZED commands. If you want the character itself to be inserted instead of being treated as a command, first type Q to quote the character. Normally is treated as you would expect, inserting a character into the file. However, when it is typed further than 78 characters to the right, it is treated as . The effect is to enable you to type in many lines without ever typing , which is put in automatically for you at the end of each line. If the space is typed when the last word on the line would make the line too long, that word is removed and placed at the beginning of the next line. Status Line Recall that the status line is the line on the screen about five or six lines up from the bottom. Here is a typical status line. ALTER MODE VISITING accts DEFAULT=Bet--13%-- The line shows that we are in alter mode, that we are visiting the file ACCTS, that if we type by itself as an answer to any question then we really mean Bet, and the cursor is about 13% of the way through the file (with --0%-- and --100%-- being expressed as --TOP-- and --BOT-- respectively). Questions In connection with Visiting and certain other commands, ZED will sometimes want you to type in a whole string of characters, e.g. the name of the file you want to visit. ZED signals that it is asking for such a string by typing : and then waiting for you to type the string. The rules for typing the string are: End the string with . (If your reflexes prompt you to type instead, you must delete the with two 's.) To get , , or Q into the string, precede it with Q (for Quote). rubs out the last character you typed, and so on back to the beginning of the string as you type more s. If you type more s than there are characters, the command responsible for the question (e.g. the Visit) is itself cancelled. You can get the effect of this without typing any s by typing G once; this is handy when the string is quite long. If you type no string but type right away, the default string is assumed to be meant. This is the string that appears on the Status Line (qv, above), between DEFAULT= and --33%-- (or --89%-- or whatever). Thus if you are looking for the text "Cow" and the Status Line has DEFAULT=Cow--45%-- then you can just type T and get the same effect as if you had typed TCow. The only exception to this is with the second string that you type to the Make command (qv, below); if is the first thing in that string, the string is taken to have no characters in it at all. Once you have completed the string with , the string becomes the new default string in the Status Line (in addition to whatever other purpose typing in the string served). ======== 4. ZED COMMANDS ======== ZED has three main types of commands that can be given in alter mode: "Golfball" commands, "Sentence" commands, and "Imperative" commands. The golfball commands consist of a few primitive but easy-to-use commands for moving the cursor around near where you are working. The sentence commands form the richest part of ZED's vocabulary, permitting thousands of useful commands that are built up from "verbs," "adjectives," and "nouns." The imperatives are commands that do not fit into the other two categories. Golfball Commands The simplest commands for moving around in a file are the following, called the golfball commands as they serve about the same function as the keys on an IBM typewriter for moving the golfball around. All of them work only in alter mode. All but do nothing but move the cursor. Move one character to the right Move one character to the left Move 8 characters to the right { Move 8 characters to the left Move to the left of the present line : or \ Move to the left of the preceding line Move to the left of the following line , Move to the left of the line 8 above the present one . Move to the left of the line 8 below the present one / Move to an earlier position (this remembers the last 16 positions you were at when you gave SENTENCE commands, so it can take you a fair way back in "history") Delete the character to the left of the cursor Sentence Commands Most of the commands in ZED are built up in the form Verb-Adjective-Noun. For example you might type EB3W, which means Erase Back 3 Words, which would erase the 3 words preceding the cursor. Erase is a verb, Back and 3 are adjectives, and Words is a noun. If you leave out the verb, as in Back 3 Words, this means go Back 3 Words, while 3W would mean go forward 3 Words. W by itself would mean go forward 1 Word while BW would mean go Back 1 Word. If you are part of the way through giving a sentence command and you decide not to complete it (e.g. if you made a mistake typing) then type to cancel the command. ( will also cancel it, but it is easier to make mistakes using for this purpose. For example if you are not in the middle of a command even though you thought you were, then will erase a character in the file, in its role as golfball command.) Here is the vocabulary you are permitted for sentence commands. Verbs Adjectives Nouns Erase 0,1,2,3,...,* Character Dump Back (or -) Word Justify Right-end-of Line Kase wHole Paragraph Next File Text: cow Object = These can be combined in a variety of ways, but always in the order verb, then adjectives, then nouns. At most one verb is permitted (exception: Dump Erase, described later). Any number and order of adjectives is permitted. Exactly one noun, no more, no less, must always be used. Nouns. The nouns are used to indicate the level of structural complexity of the command - whether it works in terms of characters, words, lines, paragraphs, etc. The following explains their meanings. A character is the basic unit of text. The characters include letters (upper and lower case), numbers, punctuation marks, , , and . A word is any sequence of letters, numbers, and the symbols - (hyphen), _ (underscore), and ' (apostrophe). Thus "Tinker-Bell's" would count as one word. A line is any sequence of characters displayed as a line on your screen. Lines too long to fit on your screen are broken up on the screen into two or more lines, with "!" at the right end of each broken part except the last; such broken lines are still treated by ZED as a single line. A paragraph is a piece of text preceded and followed by an empty line (a line with no characters in it, not even ). The file is the whole file you are working on. The command File gets you to the end of the file, Back File to the start. 2 Files has the same effect as File. Text is used to search for a particular piece of text. If you want to track down say the word "cow" in a file, type Tcow. The search is conducted from where you are, forwards. If you want to search backwards instead, type BTcow (for Back Text). To find the third occurrence of "cow" say 3Tcow. Note that Text distinguishes between upper and lower case - thus TCow will find a different piece of text from Tcow. If the sought-for occurrence is not found the bell will sound. Certain "wild-card" characters are allowed in the string used with Text. X will match any character. Na will match anything but an a (and similarly for Nb etc.). If you want to find either "cat" or "dog," use O, as in TcatOdog. To search for N itself you must quote it, which is done by typing two Q characters before it, as in TQQN. The Object noun works like the English pronoun "it," and refers to the last piece of text you worked on. For example if you have just moved the cursor then the object will be the piece of text between the old and new cursor positions. (This does not apply to motion brought about using golfball commands.) Thus if the last thing you typed was 3 Words, then the object is the piece of text that the cursor moved over while obeying your command, and will contain 3 words (or part thereof if you started from the middle of a word). A use for Object is when you are not entirely sure of what you want to Erase or Dump or whatever. Suppose you think you want to Erase 3 Words but you are not sure if that is exactly what you want. Type 3W (3 Words) and then type O (Object) a few times. You will see the cursor going back and forth between the two ends of the object. You may now Erase Object if that is what you wanted. Erase 3 Words and 3 Words Erase Object are entirely equivalent in their effect on ZED. The Object is also used with Make (see below) to restrict the scope of that command. It is sometimes useful to be able to set the two ends of the Object independently. To do this, go to one end and type [ then go to the other and type ]. It is important that the [ is typed before the ] but it does not matter which end of the Object you visit first - you end up defining the same object either way. Note that arbitrarily many commands may be given between the [ and the ], so long as you don't give another [ command. If you give several ] commands the effect is just to redefine the end of the Object corresponding to the ] - the [ end remains fixed. The noun = is for parenthesized strings. It is particularly useful when you have occasion to use lots of parentheses, as in writing LISP programs. Saying = causes the cursor to move to the right of the next parenthesized expression. (This is non-standard ZED - it should move to the left of an expression. This will be changed eventually.) Adjectives Adjectives modify nouns, specifying distance (1,2,3,...), direction (forwards or backwards), boundary (left or right), and whether part or whole items are desired. Numbers. 0,1,2,3,...,* indicate how far the command is to go, with * meaning "infinity" or "forever" (or at least to the end of the file). Thus 3 Paragraphs will move forwards 3 paragraphs. * Words will move to the end of the file. The main use for * is with Make (see section on Imperatives). Back. Normally commands move forwards, but if you type Back or "-" then they move backwards, as in B3W or -3W. Next is the opposite of Back, as in Next 3 Words, but it is usually redundant and you will not need it under normal conditions. Right-end-of. Normally commands move to the left boundary of whatever item is named by the command; thus 3W results in the cursor moving right until it has bumped into three left-boundaries of words. To make the command refer to the right boundary, use Right-end-of. wHole. Normally commands start from the present position of the cursor; to make them start from the beginning of the current word, line or whatever noun is used in the command, type H for wHole. Thus Erase wHole Line will erase the whole line the cursor is in, whether or not the cursor is at the beginning of the line. When the cursor is in the middle of the line, Erase Line (without the wHole) will only erase from the cursor to the beginning of the next line. Note that wHole = refers to the smallest parenthesized expression containing the cursor - if none the bell will ring. Verbs When a verb is included as part of a command, as in Erase 2 Words, two things happen. First the command is executed as though the verb were not there. This defines an Object, as described above for nouns, namely the piece of text jumped over by the cursor. Then the verb is performed on this object. So with Erase 2 Words, the cursor moves along two words, and then everything that the cursor swept through is erased. Erase. The object is erased. Dump. The object is dumped into a "safe place," from where it can later be retrieved by Get (see Imperatives, below). Note that the object itself remains unchanged; what is dumped is actually a copy of the object. There are actually 100 such places, numbered 0,1,2,...,99. If you say 3DL (3 Dump Line), the line is dumped into place number 3. To dump 4 lines in this way, say 3D4L (3 Dump 4 Lines). To retrieve the text at place number 3, say 3G (3 Get). If you omit the number of the place, ZED assumes you mean 1. If you want to dump and erase the object at the same time, use DE for Dump Erase, as in DE3W. To swap two consecutive items (whether characters, words, lines, or paragraphs), say DEW W G (in the case of Words). This will both Dump and Erase the Word, then move the cursor past the next Word, then Get what you dumped. DEP P G will do the same for Paragraphs, etc. Justifill. This adjusts the line lengths of every line in the object to be as long as possible without exceeding 79 characters and without breaking a word. If a different limit is desired for a file, say 83 characters, put WIDTH=83 on the last line of the file and then visit that file again (in order to make the command take effect). To get "right justification" precede J by the "hat" character ^ (6 on most terminals); then additional spaces are put between some words to make every line exactly 79 characters long, so that the right ends of the lines are all aligned. Kase. This converts all upper case letters in the object to lower case. If K is preceded by the character ^ then instead all lower case letters are converted to upper case. Imperatives The imperatives are Visit, Insert, Quote, Get, Make, Undo, eXit, and Zap. Visit. This command has already been discussed under the topic of Files. To work on file ABC, type VABC. Insert. This command has already been discussed under Inserting. To enter insert mode from alter mode, type I, to leave insert mode and return to alter mode, type . Quote. Inserts into the file the next letter typed. Thus Qy would insert the letter y. Get. Gets the piece of text most recently Dumped (see the verb Dump, above). When preceded by a number, as in 47G, Gets the text most recently Dumped using that number, as in 47D3W. Make. Makes a specified string into another. For example, to make the next occurrence of "cat" into "dog" type Mcatdog (Make cat into dog). To do it to the next 3 occurrences, precede the M with 3, as in 3Mcatdog. To make the previous occurrence of cat into dog, use Back, as in BMcatdog. To make all occurrences from the present cursor position onwards, use * instead of a number, as in *Mcatdog. To confine the changes to the present Object, use wHole, as in H*Mcatdog, which will make all occurrences of cat into dog within the present Object. So to make all occurrences of cat into dog in the present paragraph, say HP (for wHole Paragraph, to make this paragraph the Object) and then H*Mcatdog (to make the changes). Note that the second string can be empty. Thus you can delete the next cow by typing Mcow. This is the only exception to the rule that when typing a string if is the first thing in the string then the DEFAULT is taken from the Status Line (see section on Questions, above). Also note that after the Make command the default string is the first string given to the make, not the second, this being found to be generally more useful. Undo. This undoes the effect of the most recent change to the file brought about by a verb or an imperative other than Visit. Thus EW U has no effect on the file since the U (Undo) undoes the EW (Erase Word). Since Undo is an imperative, it even undoes itself, so typing Undo twice has the same effect as typing it four times. eXit. This is used for invoking a variety of infrequently used commands. To use it, type X followed by one of the following, followed by , e.g. XDDT. When appropriate, eXit will save your file before eXiting. At present there are only two commands available, TECO (for wizards only) and FORMAT (a presently unsupported text formatting system). Hence you may safely ignore the eXit command. If you give it by accident, just type to cancel it. Zap. This is used to Zap (delete) old versions of files. To get rid of all but the most recent version of say HW8, visit your directory, move the cursor to a line mentioning HW8, and type Z. Miscellaneous There are a few unclassifiable commands, which for convenience will be grouped with the Imperatives. ! Clear the screen and redisplay. Useful if your screen becomes messed up for any reason. Note that ZED will often redisplay automatically as soon as you type a character, mainly when the screen has been messed up by receipt of a message. # Center the line the cursor is on. This command is a useful adjunct to Justifill. & Use this to type one TECO command. When you type & ZED will type CMND: at the bottom, and you then type the command followed by two altmodes as usual. Caution: any changes you make to the file in this way are not noticed by ZED, so to ensure correct operation of the automatic-save machinery go into and back out of insert mode after making changes from TECO. This will be fixed some day. Printing Terminals ZED can be used from printing terminals such as the TI Silent 700. In this mode ZED redisplays the 20 characters on either side of the cursor, after each sentence command. Redisplay happens a couple of lines below the previous display. If the line the cursor is in is: The number of seas has been conatively estimated at fifty and the cursor is at the left end of "conatively" then the display would appear as follows. conatively estimated The number of seas has been ######################## with the print head where the ####'s appear. You should imagine that another copy of "conatively estimated" is under the print head, even though it is not. If you now type 3 spaces (to move the print head to the right) you will see conatively estimated The number of seas has been con######################## So it looks as though "conatively estimated" is below the print head. But now if you type I (for Insert) and then "serv", then , then two more spaces, you will see: conatively estimated The number of seas has been conservat######################## That is , the "atively estimated" appears to have been pushed to the right as a result of inserting "serv". The trick of course is that the characters appearing from under the print head are not actually typed until just before they appear. The following two commands are for redisplay on printing terminals. ~ Redisplays the 20 characters on either side of the cursor. (Same display effect as after a sentence command.) | Like ~ but redisplays the whole line. ======== 5. FORMATTING ======== ZED offers a built-in formatting capability called ZEDFOR. While not comparable to the most sophisticated formatters, it should be found adequate for ordinary use. Other formatters offer more capability, but will be found less convenient to use than ZEDFOR for those tasks within ZEDFOR's capabilities. (Note: this is not currently supported under TOPS-20; the documentation in this section is included for interest and in case it is revived later. Please send expressions of interest in its revival to pratt@su-navajo.arpa.) ZEDFOR supplies enough capability for producing documents of a quality comparable to what a good typist can produce with several symbol balls and a variable spacing typewriter, while retaining the convenience of computer-based preparation and editing of manuscripts. It does not cater for footnotes or graphics, nor is it suited to the production of book-quality documents, for which TEX is more appropriate. ZEDFOR caters for table layout, super- and subscripts (even a stack of them), italics, boldface, SCRIPT, Greek, a large range of mathematical and other special symbols, automatic page breaks (avoiding "widows," that is, last-line-of-paragraph at top of page, section heading at foot of page, etc.), automatic page numbering, mapping user-defined special characters to strings of characters, mapping underlining to italics or other fonts, and optional dating at the top of each page. In addition, ZED itself provides for automatic filling of text, and can keep bibliographic reference numbers in order. Invocation of ZEDFOR If you intend to use ZEDFOR then do the following three things. (i) adhere to the conventions described below for the features catered for by ZEDFOR (italics, subscripts, tables, etc.); (ii) put -- std at the bottom of your file to tell ZED you are using the ZEDFOR conventions The line preceding the -- must be completely empty, that is, you must have the sequence -- or ZED will not notice the --. Additional dashes are permitted, so you may put -------- std (iii) When you are ready to have the file printed, say XFORMAT (eXit to the formatter). ZED will then start running without any further typing on your part, for a number of seconds, while it produces a version of your file suitable for output to a printer. It then saves this version in your directory, with an appropriate version name, puts this version on the queue of files to be printed, and then displays on your screen what files are on the queue so you can see where you are in the queue. When the printer prints your file it will send you a message telling you that printing of your file has started. After it has printed it, it deletes the temporary file containing the formatted version unless you specify otherwise (see "del 0" below). (You might do this if you wanted to print another copy later without having to wait for reformatting.) The Specs Area The "std" at the end of the file defines ZEDFOR's Specs (specifications) area. Everything in this area, including the -- defining its beginning, does not appear in the formatted hardcopy. Its purpose is to specify properties of the file that ZEDFOR needs to know about. Generally you should not need to put anything but std in this area. Here is an example where many things appear in this area. ------------- std pag -3 dat del 0 lft 150 t&b 260 vsp 32 fsp 35 Under these specifications page numbering starts at -3, the time and date (of when the XFORMAT order was given) appears on each page, the temporary file is not deleted after printing, the left margin is set to 150/192 inches (0.78 inches or 20 mm.), top and bottom margins are set to 260/192 of an inch (1.35 inches, or 34 mm.), the spacing from the bottom of one line to the top of the next is 32/192 (corresponding to double spacing), and the font spacing (distance from top to bottom of a line) is 35/192 inches (chosen to match the main font, see section on fonts below). The usual top and bottom margins are 128, while the usual left margin is 200. The usual page numbering starts from 1 (see the section below on pagination). Normally the date is not printed. The VSP is normally 6 (single spacing). The FSP is normally taken to be the appropriate value for the font ZED normally uses; you must change it if you use different fonts. The top and bottom margins can be set independently if necessary using TOP and BOT instead of T&B. Conventions Here is an example of the use of the ZEDFOR conventions. We show `only that for j &> k, a_(j+i) &< a_k, as proved by @N. @Berlitz. For let $D be the class of solutions and $E its closure; then $D$E is of degree 2^(2^(2^i)), with residue &r(%an^(1+log_23)). Each word preceded by ` (backquote) will be printed in italics. For boldface use @ instead. To print several words in a row in italics precede each of them with ` and similarly for boldface. Subscripts are obtained using _ and superscripts using ^. Only the letter following the _ or ^ is affected, unless that letter is left parenthesis, in which case everything from that parenthesis to the matching right parenthesis is affected, the parentheses themselves being removed. Greek and script letters are obtained using % and $ respectively. The rules for which characters are affected are as for super- and subscripts rather than as for italics and boldface. Thus to get whole Greek words type %(kata piotin). Of course, %k%a%t%a %p%i%o%t%i%n will also work. Special Symbols About 95 special symbols may be invoked using &. For example, to get less-or-equal, type &<. The complete list is as follows. (This table is now out of date.) _ &L G &( [ &[ i &C t &1 p &5 _ &R J &) ] &] j &c v &2 z &6 ^ &U & &^ y &i [ &p k &F s &3 T &7 ^ &D V &v U &u ] &q l &f u &4 T &8 ~ &W < &< I &{ &J &J &j &j &l &l Q &w > &> L &} &K &K &k &k &g &g q &9 O &0 B &e Y &\ A &A E &E V &V & && U &G y &S n &n ' &= e &~ = &# + &+ 6 &* N &N Z &Z Q &Q R &Y C &X X &x 9 &. o &o ) &r &I a &a # &z d &d m &| . &: . &; ; &O --- &- : &P ! &@ L &$ @ &% In addition & is (useful for 's not to be replaced by 's, i.e. dummy ). &B, &H, &T, &b, &h, and &t overstrike the following character, with respectively bar, hat, or tilde, either above (upper case) or below (lower case). Thus for example we have a &Ba a &Ha a &Ta a &ba a &ha a &ta Similarly &/ overstrikes the following character with a slash. Thus &/< would appear as <. The characters @ # $ % ^ & \ and ~, which are normally used to invoke other fonts as described above, can be made to stand for themselves instead by preceding them with #. Thus #%a will appear as %a rather than as a and #$B will appear as $B rather than as B. Pagination Unless you specify otherwise ZED will number your pages starting from page 1. The numbers appear at the top in the center. Put PAG 3 (case is unimportant) at the end of the file (after the std) to start with page 3, PAG -3 if from -3. For example: ------ std pag -3 Page numbers less than 2 are not printed, following the usual convention. (If you start from less than 1, don't forget to count 0 as one of the page numbers. Starting from -3 will leave 5 pages without page numbers, -3,-2,-1,0,1. Negative page numbers are useful when you have title and abstract pages that you don't want counted in the numbering.) To suppress all page numbers use PAG -100. To force a new page put L at the start of the new page. When inserting L remember to type Q first if you are in Insert mode, or Q if you are in Alter mode. You may find it convenient to have the time and date printed at the top of each page when you are only having a temporary version of your file printed. To accomplish this put DAT at the end of the file (after the std). Fonts You may specify which fonts you want to use. Here are the fonts ZEDFOR normally works with. XFONT;TIMES 12SAIL, FONTS;S30GRK, XFONT;TIMES 12ITAL, FONTS2;12SCRP, FONTS;35VRB, FONTS2;SYMBOL The first of these is the main font. The second is Greek, the next italic, the next script, the next boldface, and the last special symbols. When you wish to change fonts you must name all the fonts you plan to use. You may use ZEDFOR's conventions (% for the second font, \ for the third, etc.) or you may use the Map facility to specify your own conventions. Map You may specify the meaning of individual characters to ZEDFOR using the MAP facility. On a separate line in the Specs Area, if you say MAP %:Cow, $:Horse, then every occurrence of % in the file will appear as Cow in the formatted version, and similarly $ will be mapped to Horse. Commas followed by or define the end of strings, so commas within strings may not be followed by or . Any character, even a letter, may be defined in this way. Consider now the example MAP %:AB-!-CD. This will map %1 to AB1CD. The character following the % replaces the -!- in the string. To use MAP to specify font-change symbols consider the following, which is how ZEDFOR defines %. MAP %:AA-!-A@, The AA part is a command for a particular printer saying "change to the second font," normally Greek. Then the character following % is inserted in place of the -!-, and the rest says "change to the main font." Remember that to type characters into a file you must first type Q. Alignment of Tables Often one wants to lay out several columns of data to form a table. Doing so is complicated by ZEDFOR's use of variable-width fonts, and by variations due to the conventions for superscripts, italics, etc. To lay out tables conveniently using ZEDFOR, follow these rules exactly. 1. Lay out the table so that it is aligned on your screen. Use at least one tab between adjacent columns. Do not leave any column completely empty on any line of the table - at least put a in that column if you want it blank. Do not worry about whether the columns are where you want them in terms of lateral (sideways) position, this will be taken care of by rule 3 below. Whether or not you put tabs before the first column is immaterial. 2. Put | at the right end of each line of the table. (This tells ZEDFOR that this is a line of a table.) | is also permitted, in fact use however many tabs it takes to make all the |'s line up (but at least one tab); this makes it easier to see at a glance that you have a table, and also makes it obvious when you have accidentally omitted a |. 3. On a line before the table, type a line like the following: < . . . . > This is the column-setting line; it shows where each column is to start when it is printed on the page. The first column starts where the < goes, the second where the next dot goes, and so on. If there are 5 columns there should be 4 dots. The last > is not used to indicate column position but to indicate that this line is for column-setting. The > must have exactly three spaces between it and the preceding dot, and must be the last character of the line. The correspondence between where the < and dots appear on your screen and where the columns appear on the printed page is that each character position counts for 1/16-th of an inch (1.6 mm). Thus if you have three spaces before the <, the first column will start 3/16-th of an inch (4.8 mm) from the left margin of the printed page. The column-setting line does not itself appear on the printed page; it and its associated are deleted from the printed version (but of course remain in the version you are editing). Here is what a typical table will look like on your screen. (If you are reading this at a terminal instead of hard copy you'll have to guess at the intended picture.) < . . > `Name `Age `Weight | J. Abrams 25 172 | R. Sills 26 132 | P. Winter 24 182 | And here is how it will appear on the printer. Name Age Weight J. Abrams 25 172 R. Sills 26 132 P. Winter 24 182 Note how the column-setting setting has moved the columns further apart, as well as away from the left margin. The word Name has been moved to the right with two 's. ZEDFOR does not distinguish column headings from other parts of the table; it is up to you to draw any distinctions, e.g. using italics as in the example. If you have several tables all with the same column settings, you only need to use one column-setting line, which may appear anywhere before the first table. Avoid the use of lines ending in . > (exactly three spaces between the . and the >), or ending in | for any use other than tables. These are sufficiently unlikely combinations that this should not impose any hardship.