EZ on Athena (AC-46)


Table of Contents || Revision history || Copyright information

Introduction

This document describes EZ, a multi-media editor, and its associated programs. EZ offers the following:

In this document, you will learn how to:


Other Andrew Programs

The Andrew Toolkit, in which EZ is written, is a graphical user interface and application development environment developed independently of the X toolkit at Carnegie Mellon University. In addition to EZ, there are other fully-supported Andrew programs on Athena; to run them, simply type the appropriate command at the athena% prompt:
  -----------------------------------------------------------
  Command     Used to...
  -----------------------------------------------------------
  ahelp       get help about Andrew software
  bush        browse file directories
  datacat     concatenate several EZ documents into one large
              EZ document
  ez          edit and format text
  ezprint     print Andrew-generated files
  eq          format equations
  table       create tables and spreadsheets
  raster      edit screen images
  ez2ps       convert files created with EZ to PostScript
  ez2ascii    convert files created with EZ to plain text for
              display on character terminals
  -----------------------------------------------------------
There are also unsupported Andrew programs available such as chart (a chart generator), fad (a frame animation drawing tool), and zip (a line-drawing editor).

For more information on any Andrew program, type ahelp program-name at your athena% prompt.



Getting Started


Starting Up EZ

To start EZ, Andrew's document editor, type:

  athena% ez
After a few seconds, the outline of the EZ window appears as a flickering rectangle. Move the mouse so the window is where you want it, and click the LEFT mouse button. The EZ window then appears.

Normally, when you start up an EZ window, EZ functions as a simple text editor with no formatting capabilities (i.e., no special fonts, no bold text, etc.) and the text appears in a fixed-width, typewriter font. If you supply the initial ez command line with a filename that ends in a certain extension, you can automatically enable special formatting of text. EZ supports the following special filename extensions:

  --------------------------------------------------------------
  Extension     Related Window Type
  --------------------------------------------------------------
  .ez, .txt     text window with basic styles/formatting enabled
  .c            special window for C program text
  .eq           eq window for formatting equations 
  .raster       raster window for digitized pictures
  .table        table window for tables and spreadsheets
  --------------------------------------------------------------
For most of your needs, you should use the .ez extension. For example, to start an EZ window with complete text formatting capabilities and with a nearly WYSIWYG interface, type:

  ez filename.ez
If you start an EZ window without the proper filename extension and you want to have formatting capablilities for the file you are editing, you can use the Enable Basic Styles command from the Special menu within the EZ window; the same editing menus will then be available to you as if you had used the .ez extension.

The difference between EZ and true WYSIWYG is that, instead of showing exactly where words will appear on the printed page, EZ displays legible text on the screen by formatting paragraphs to fit whatever size or shape of window you choose. You can see how the text will be formatted for printed output by using a separate EZ preview window.


Parts of the EZ Window

The EZ window has 4 parts:



Basic Editing

You can make simple editing changes (e.g., entering text, correcting typos, deleting and changing words) by just typing in new text or using the delete key. You can also move the text caret (where new text will be inserted) by clicking the LEFT mouse button when the mouse pointer is where you want the caret to go, or by using certain key combinations (see the appendix on EZ Key Bindings) or the arrow keys.

For anything more extensive, you need to select text and use the EZ menu options.


Selecting Text

To cut, paste, change fonts, or format text, you must first select that text. You can select text in any of several ways:

Highlighted text appears in reverse video. If text is selected and you bring up the menu, the basic menu set expands to contain additional menu cards with commands that can act on the selected region.

To de-select text, click the LEFT mouse button anywhere in the main editing region of your EZ window.


Using the Menus

The EZ menus are available in two modes:

With either the menu bar or popup menus, only a basic set of menu options are available if you have no text selected; these options are mostly general functions that act on the whole file (e.g., options for printing, quitting, etc.) A more extensive set of menus is available if you have text selected. For a complete list of all the menu commands and their meanings, see the Appendix of EZ Menu Options.

If you want to hide the Motif-style menubar by default, add the following line to a file named ~/.preferences in your home directory (you may need to create this file):

  *.Menubar: no

Cutting, Pasting and Copying Text

The Cut, Paste and Copy commands are used for moving large regions of text to other parts of your file (or to and from other EZ windows, xterms, or Emacs buffers):

  1. Select the text you want to cut or copy.

  2. Choose the menu option Cut or Copy from the ez menu (this is the first popup menu). If you choose Cut, your highlighted region of text will disappear. (Don't panic when your text disappears -- the most recently cut text is always stored in memory so that you can reinsert it elsewhere in your file.) If you choose Copy, the selected text doesn't disappear (but has been copied into the deletion buffer).

  3. Move the text caret to where you want to insert the cut (or copied) text.

  4. Choose the menu option Paste from the ez (first) menu. The cut (or copied) text reappears where your text caret was located. This text is now selected and the text caret is moved to the end of this region (click anywhere in the window to de-select the region and place the text caret elsewhere).


Making Style Changes in the Text (e.g., italic, bold, etc.)

All style changes (changes to font face and size, bulleted and enumerated lists, etc.) involve three steps:

  1. Select the text you want to change.

  2. Choose a menu option you want to use to modify the text. (Notice that each option takes effect as soon as you release the mouse button over that menu option.) You can repeat this to add other style changes to the same text region. (Styles accumulate rather than replace each other.)

  3. De-select the text when you are done making style changes.

For example, to make a word italic, you would select the word, choose the menu option Italic from the Font menu, then de-select the word by clicking the LEFT mouse button.

To make a word both bold and italic, you would select the word, choose the menu option Italic, bring up the Font menu again and choose the menu option Bold, and only then de-select the word.


Styles Used for Inserted Text

Once you start using styles in a document, any text you later insert will "inherit" the style of a surrounding area, according to the following rules:

The above rules determine how the active insertion style is applied. You can also alter the active insertion style in several ways (with each of these methods, the new insertion style is indicated on the message line):


Removing Styles from Text

Changing the style of a word or text is like viewing that text through a series of colored lenses, with each style corresponding to a different lens. When you remove a style from the text, it is simply as if you had removed one of the colored lenses. How lenses are removed, and in what order, is discussed here.

It is particularly important to remove old styles from a text when you want to change to new styles. If you do not remove the old styles first, you may get strange results when you add the new styles. Later styles do not simply override earlier styles -- they have a compound effect, and some styles do not work together. (For example, giving a piece of text both Center and Flush Left styles has been reported to make the text vanish from the screen!)

To remove the style from text, first select that portion of text and then choose the menu option Plainer or Plainest from the ez menu.

Removing multiple styles from the same piece of text can be complicated since there are several choices of styles to remove. You can remove all the styles using the Plainest command and start over, or you can remove the styles one at a time using the Plainer command. In the latter case, you will need to know in what order the styles will be removed.

To find out what styles are applied to the text and in what order, select the portion of text that has multiple styles and then enter Meta-s (i.e., hold down the Meta key -- the key labeled Compose Character or Alt just to the left of the spacebar -- and type the letter "s") A message appears in the message box at the bottom of the EZ window indicating what styles have been applied to the text. For example, if you selected text that had been italicized, then made bigger, Meta-s would produce the following message:

  Styles: **bigger** <- italic
The words bigger and italic refer to the styles that have been applied to the specified text. The asterisks indicate which of the two styles will be removed if you were to use the Plainer command (in this case, the bigger style would be removed first).

You can change which style will be removed by Plainer by typing Meta-s again. Each time you type Meta-s the asterisks will move to surround the next style in the sequence of styles listed in your message box (the highlighted area may also change to indicate the scope of the style specified by the asterisks).



Saving Your Work


Saving Files

What you see in the EZ window is a copy of your file, therefore any editorial changes you make in the EZ window lasts only as long as the EZ session, unless you take steps to save your work. To save your edited work back into the actual file on disk, choose the Save option from the ez (first) menu. Your mouse pointer changes into a small clock for a few moments, then a message appears in your message box that looks something like this:

  Wrote file '/mit/joeuser/mypaper.ez'. 
This indicates that the latest revision to your file has been saved.

To save all the files you are currently editing, choose the Save All option from the File menu. The mouse pointer changes into a small clock each time it writes out an editing buffer to the disk file it corresponds to.

To save your work under a different filename (e.g., to save work done in your scratch buffer to a distinct filename), choose the Save As menu option from the File menu. You are prompted in the message box to enter the new filename you are saving to.

To save your file in a plain text format (i.e., with no EZ formatting commands in the file at all), choose the Save Plainest As option from the File menu. This option strips out any hidden EZ formatting commands so that the text in the resulting file looks just as it would if you selected the whole region in EZ and chose the Plainest option from the ez menu (and Save Plainest As also removes additional EZ-related commands that are not eliminated by Plainest).


Working with Checkpoint Files

After you have made changes to a file once, EZ begins to save your work automatically in a "checkpoint" file (a temporary file with the suffix .CKP), as a safeguard against loss of work. Checkpointed files are not stored in the same directory as the files being edited; instead they are stored in the local directory /usr/tmp on the workstation you are currently using.

(Even though EZ checkpoints the file, you should save your work frequently anyway using the various Save menu options noted before. Saving your file periodically avoids any possible loss of work in the event of some accident or problems with the system.)

If EZ fails in the middle of your editing session, you may need to recover your work by recovering the checkpoint file. To do this, you must be logged on the same machine that you were on when you last edited your file (and you must do it fairly soon -- these files are deleted in a few days). Once on that machine, you should cd to /usr/tmp (the directory that contains all checkpointed files):

  athena% cd /usr/tmp
  athena% ls
Checkpoint filenames are of the form #<userid><path>#.CKP where userid is the person's user identification number and the path is the full pathname of the file with "@" substituted for "/" in the pathname.

For example, if the user jrandom had a file called paper.ez in her home directory, the checkpoint file would be called:

  #1306@afs@athena.mit.edu@user@j@r@jrandom@paper.ez#.CKP
In this example, the user jrandom has the userid 1306. To find out your userid, type:

  hesinfo your_username passwd
which returns something like this:

  jrandom:*:1306:101:Jane Random,,,,50974:/mit/jrandom:/bin/csh
The number between the second and third colons is the userid.

Once you know your userid, you can identify your checkpoint files. Then use the cp command to retore the file to your home directory:

  cp  #userid@path#.CKP  /mit/username/filename
For example, the user jrandom would type the following (this would all be on one line, i.e., with no carriage returns):

  athena% cp #1306@afs@athena.mit.edu@user@j@r@jrandom@paper.ez#.CKP /mit/jrandom/paper.ez
You should compare the checkpoint file with the old version of your file before you replace the old version of your file with the checkpointed one. This ensures that you recover the most recent version of your document.

You can find out more about checkpointing by typing ahelp ez at the athena% prompt.



Previewing Your Document

The EZ editor comes with a built-in previewer for viewing your formatted file (i.e., it lets you see on screen how your file will look printed out). This is helpful for finding formatting mistakes so that you can correct them before you send your file to be printed. You should use the previewer rather than printing out intermediate drafts of your document. This will save paper and print quota and reduce the workload of Athena printers.

To preview your file, choose the Preview option from the File menu. The mouse pointer changes into a little clock and the following message appears in the message box:

  Processing preview request.
After a few moments, the mouse pointer returns to normal and a new message appears in the message box that looks like this:

  Preview window should appear soon.
After a few seconds, the outline of the previewer window appears as a flickering rectangle. Move the mouse so the window is where you want it, and click the left mouse button. The previewer window then appears.

The preview window has its own set of menus from which you can select options to move from page to page, print specific pages, and scale the text displayed on the previewer. Keep in mind that files are loaded into the previewer page by page and therefore later pages of your document are not immediately ready for previewing when the previewer first appears. (The first menu of the previewer also has a Quit option: this Quit closes the previewer window only, not the original EZ window.)



Printing Your Document

There are two ways to send the final draft of your document to a printer:

Each method is explained here.


Printing from Within EZ Using Menu Options

Before you use a menu option to print a file, you need to tell the EZ window what printer to use during this EZ session by choosing the menu option Printer Setup from the File menu. The following message appears in the message box at the bottom of the window:

  Creating Dialog Box. Please Wait.
Printer Setup then pops up a dialog box where you can identify the printer you want to send files to and specify parameters for your printed document (e.g., whether or not to include a table of contents). The current printer name and parameters are shown. You should fill in (or erase and fill in) the printer name and click on the check boxes, then on the box labelled Done (or on Cancel if you change your mind and do not want any of your changes to take effect).

Note that these settings apply only to the current EZ window -- if you create a new EZ window, you must repeat these steps.

Now, to actually send the current version of your document to a printer, choose the Print menu option from the File menu. Several messages appear in the message box indicating that your print request has been processed and submitted to the printer you specified.

Warning: If you choose Print from the File menu and haven't specified a printer during your EZ session (e.g., using Printer Setup), EZ will erroneously respond in the message box with "Processing print request", but nothing will happen.


Printing from the Athena System Prompt

You can print EZ documents without opening an EZ window by typing a command of the following form at the athena% prompt:

  ezprint -P printername filename
This displays a brief startup message, then returns you to the athena% prompt once your file has been sent to the printer. For example,

  athena% ezprint -P ajax mypaper.ez
  Starting ezprint (Version 7.0, ATK 5.1.1); please wait...
  athena%
You can leave out the -P printername clause if you define the environment variable PRINTER to be the name of a default printer for your login session:

  setenv PRINTER printername 
(You need to execute this command once in each xterm window from which you will send files to the printer.) Now to send an EZ file to the printer, you can just type:

  ezprint filename 
The ezprint command accepts other options in addition to -P. For more information, type ahelp ezprint at the athena% prompt.



Advanced Editing

If the styles available on menu cards in EZ do not meet your formatting needs, you can probably obtain the effect you want through a combination of the following advanced EZ techniques:

If none of these powerful techniques can handle your formatting need, you can also consider using troff formatting commands in the body of your document to achieve the effect you want.

EZ also has special modes for editing program code (e.g., C, FORTRAN, or Lisp source code files).

All of these techniques are described here.


Using Header and Footers

When you print out your document, EZ by default places a page number at the top center of your pages (after the first page), and includes no footer at the bottom of any pages. You can override this default behavior, specifying your own values to be printed in any of six locations on the top and bottom of the page, by inserting HeaderText objects into your document and entering your values.

To insert a HeaderText into an EZ document, choose the Insert header/footer option from the Special menu. This inserts a box in your document.

By clicking in the box at the upper left, you toggle between using the HeaderText object as a header or a footer. (You cannot set both the header and footer in a single HeaderText object, so if you want both headers and footers in your document, you need to insert two HeaderText objects and set one to be a header and the other to be a footer).

Typically, you will want to put a HeaderText object at the very beginning of your document, before any other text. But you can also change headers and footers in the middle of your document by inserting HeaderText objects into the document where you want to make the changes. Note that a new header takes effect on the next page after it is defined, while a new footer takes effect at the bottom of the same page on which it is defined (this is why no headers are printed on page 1, although footers are.)

Headers and footers have three parts, a left part , a right part, and a center part. You can set any, all, or none of these by typing into the line with the corresponding Left, Center, or Right label. (Do not enter formatted text into these fields; although the HeaderText object will not stop you from inserting formatted text, the formatting will not print correctly).

If you don't type anything for a particular component, you inherit whatever was in effect before the current HeaderText was inserted (i.e., you inherit the settings supplied in a previous HeaderText object, or in the document default if there are no previous HeaderText objects). To make sure that a component is empty, use the variable $blank in the appropriate component in the HeaderText object.

HeaderText recognizes other variables as well, including the following:

  -----------------------------------------------------------------
  Variable       Result                    Example Result
  -----------------------------------------------------------------
  $day          day of week as word        Thursday
  $month        current month as word      July
  $shortyear    last two digits of year    91
  $year         all four digits of year    1991

  $24hourtime   time in 24 hour format     17:59
  $timeofday    time in AM/PM format       5:59 PM

  $date         date as Month Day, Year    July 11, 1991
  $Edate        date as Day Month Year     11 July 1991
  $time         date/time (Unix style)     Thu Jul 11 17:59:14 1991

  $page         current page number        12

  $blank        nothing (suppresses
                display of any value
                for this component)

  $$            dollar sign                $
  -----------------------------------------------------------------
For more information about HeaderText objects, type the following command at your athena% prompt:

  ahelp headers

Changing Style Attributes with LookZ

With LookZ, you can change the attributes of the styles used to format text in a document. Among other changes, LookZ can help you:

For example, the Section style (on the Title menu) has the attributes bold, left flush, and a font size that is two points larger (+2) than the bodyfont of the document. With LookZ, you could change these attributes and your changes will apply to all text in the document which has the Section style.

To start LookZ, move the insertion cursor to the beginning of the document, then enter M-TAB and answer the insertion prompt with lookz. This inserts a LookZ object at the beginning of your document.

The LookZ object has three boxes in the top row:

The following table summarizes the attribute boxes and what aspect of style they affect:
  ----------------------------------------------------------------
  Attribute Box      Style Attribute(s) Affected
  ----------------------------------------------------------------
  font               font family used for style

  enable, disable    style of text (bold, italic, and fixed width);
                     whether text is passed through unstylized;
                     whether tabs should be represented by spaces
                     or by distance in printed output

  justify            justification of text within a style:
                     Center, Left flush, Right flush, Justified
                     (left and right justification), or Left-right
                     (first line left justification, subsequent
                     lines right justification)

  baseline           amount to raise or lower text from normal
                     baseline for a style (e.g., superscripts
                     and subscripts)

  font size          size of text for style

  color              color in which to display text of a style

  line spacing       number of extra points left between lines *

  paragraph spacing  number of extra points left between
                     paragraphs *

  relative margins   margins and indentations for the text within
   and paragraph     a style (in inches, centimeters, or points) *
   indent

  tab stops -        location of all tab stops for a style (in
   relative to       inches, centimeters, or points); default:
   left margin       tab stops every 1/2" across page
  ----------------------------------------------------------------
  * A "point" is a typographical unit of measurement equal to
    1/72 of an inch.
You can change the attributes of a style when they are displayed in the bottom three rows of boxes. To add an attribute, click on an undarkened attribute (this darkens the attribute and associates it with the specified style); to remove an attribute, click on a darkened attribute (this undarkens the attribute, so that it no longer applies to the specified style).

To show the effects of changed styles, choose Update Document from the menus for LookZ, or otherwise redisplay the document. Once you have changed the LookZ object, you should be sure to save the file again (due to a limitation with LookZ, a change to the style alone is not sufficient to cause the editor to consider the file as having been modified, so it is important to actively save the file).

The changes you make with LookZ remain in effect each time you edit the same document. If you want style changes in other documents, you have to use LookZ for each of those documents. In this way, you can store a customized set of styles for each document that you write.

You can also use LookZ to modify the menu location of an existing style, or to create new styles and add them to the selected-region menus in the document you are editing (use the Add Style option from the LookZ menus). In addition, you can use LookZ to create and edit templates, which can be used to establish styles and style changes for a whole series of documents (type ahelp templates at your athena% prompt for more information about style templates).

For more information on how to use lookz, type the following command at your athena% prompt:

  ahelp lookz

Composing Foreign, Accented and Special Characters

You can create any of a wide variety of foreign characters (Greek letters, Spanish punctuation, mathematical symbols, etc.) in your EZ documents. You enter individual characters or symbols in either of two ways:

For example, if you type C-x x, then "a" (without the quotes), EZ displays the following line summarizing each possible special character followed by the keyboard character you would type to generate the special character:

  ~-p, f-E, f-e, e-o, d-:, c-~, b-^, a-a, `-g
If you now enter another "a", you get the following character at that point in your EZ document:

  a
As noted, you can see the list of all available special characters by just entering:

  C-x v ?
For more information about foreign characters in EZ documents, type the following command at your athena% prompt:

  ahelp compchar

Using troff

If neither the styles available on the EZ menu nor the other advanced techniques available in EZ meet your formatting needs, you may want to use commands from troff, the UNIX "typeset runoff" formatting package.

When you print or preview a document, EZ converts it into troff format so that it can be interpreted for output. You can "embed" your own troff commands in an EZ document in such a way that they will not be converted but will be passed to troff directly as formatting commands. You embed the command by using the FormatNote option from the Region menu card (the region will be marked with a slash through it to help you distinguish it from normal text).

For more information on how to use troff commands within EZ documents, type the following command at your athena% prompt:

  ahelp ez-troff

Language Modes - Editing Program Text in EZ

Often the work you do with a text editor like EZ may not be a text file but a program in a computer language like FORTRAN or C. EZ offers special features when you edit program files. These features are available automatically when you edit a file that has a suffix indicating source code (.c, .f, etc.)

When EZ displays programs, the text is displayed with automatic formatting for easier reading. EZ uses the following rules for formatting the program text:

The formatting is not a part of the program text -- if you were to view the program in simple ASCII (e.g., using Emacs), no formatting commands would appear, only the program text as it was originally written.

Another feature of language modes is that if you select the Table of Contents option from the Page menu while editing program code, EZ displays a window listing the program identifiers. If you then click on an identifier in the identifier window, EZ scrolls the source window to that identifier and positions the cursor there.

There are other features of language modes as well. The following table summarizes the various language modes available, and where to find out more about each mode:

  ----------------------------------------
  Mode           Extensions    More Info
  ----------------------------------------
  C Mode         .c, .h        ahelp ctext
  Lisp Mode      .lsp, .lisp   ahelp ltext
  Pascal Mode    .p, .pas      ahelp ptext
  Modula2 Mode   .m, .mod      ahelp mtext
  ----------------------------------------


Reporting EZ Bugs

If you run into a problem with EZ that you think might be a bug, please report it! To send a bug report about EZ, use the sendbug program:

  athena% sendbug
sendbug prompts you for the name of the software with which you are having problems, and starts up an Emacs window with a bug report form for you to fill out. Please remember to include in your bug report a detailed description of:

Don't be afraid to provide too much information. We'd rather fix an over-described problem than have to delay fixing one while asking for clarification.

When you are finished, save your report by typing Ctrl-x Ctrl-s, then exit the Emacs editor by typing Ctrl-x Ctrl-c. sendbug prompts you with:

  What now?
Enter send and press Return. The sendbug command sends your report as a mail message to bugs@athena.mit.edu.



Finding Out More


Andrew Help

The best source of documentation on Andrew applications is the Andrew Help system, ahelp. ahelp contains overviews and well-written on-line documentation about Andrew software, and is separate and distinct from the Athena help system. You can run it in either of two ways:

Either way you start up Andrew help, ahelp creates a separate help window for you to view text on selected topics. Once in Andrew help, you can:

Andrew Help was developed at Carnegie Mellon University and therefore contains some terminology that does not apply at MIT. Gradually, the differences are being removed, but be aware of the following: when CMU documentation says typescript, Athena documentation says xterm; when CMU documentation says files are in /usr/andrew, at Athena they may be in /usr/andrew, but they might instead be in the andrew locker in a location that depends on the currently active version of Andrew and the type of machine you are logged into: /mit/andrew/version/$hosttype. For example: /mit/andrew/5.1/vax.


Other Sources of Information

Athena offers a minicourse which covers basic editing and formatting in EZ. Consult the Athena Minicourse Schedule for dates and times.

There is an on-line consulting (olc) topic, EZ, where you can ask questions. Just type olc at your athena% prompt and you will be connected with the first available consultant on the system.

There are two public Andrew mailing lists: andrew-news (for essential Andrew news and system status) and andrew-users (for user comments, questions, and suggestions). To add yourself to one or both of these lists, type mailmaint at the athena% prompt, and follow the menus from there.

The discuss meeting Andrew_Toolkit (atk for short) provides an in-depth discussion of issues related to EZ and other Andrew Toolkit applications.

If you are interested in being a "friendly tester" of new Andrew software, send electronic mail to wdc@athena.mit.edu.



Appendix A: EZ Menu Options


Overview

This section describes the menus and the specific menu options available in the EZ editing window. EZ provides two distinct sets of menus:

Remember that you can access EZ menu options in either of two ways:

This section describes only those menus and menu options available in the standard EZ set (i.e., the "Basic Styles" available when your file has the extension .ez rather than one of the other special extensions listed earlier in this document; see also the ahelp document ez-extensions). The menus available in files with special extensions may differ slightly.

(Because Andrew is being tailored for use at MIT, what appears on the menus in EZ may undergo changes to accommodate users as more needs become apparent. Menu changes are announced via the andrew-news mailing list.)

Note that there are keyboard equivalents for many of the menu options listed here, and also keyboard commands that are even more powerful than the menu commands. See the section on EZ Key Bindings.


Main menus

The ez ("Front"), Search/Spell, Special, Page and File menus are available at all times, whether you have selected a region or not.

ez ("Front") Menu

The Paste option is available only when there is no selected region. When you select a region of text, the Cut, Copy and Plainest options become available and the Paste option becomes inaccessible.

The worm hole ["deck of card" menus only]: If you use the pop-up menus and have already used one of the menu options, EZ displays a small dot in the top left corner of the front menu card the next time you pop up the menus. If you now move the cursor onto this dot, the cursor jumps so that it is highlighting the menu option you most recently chose. This is useful if you have to perform the same menu action over and over.

Paste [available only if a text region is not selected]: Inserts cut or copied text into a document at the text caret. You must have previously cut or copied something for Paste to work.

Cut [available only if a text region is selected]: Deletes the selected text and stores it in the cutbuffer. You can put the text you cut most recently back into any window by choosing Paste.

Copy [available only if a text region is selected]: Copies the selected text into the cutbuffer, without deleting the text from its current location. You can put the text you copied most recently back into any window by choosing Paste.

Save: Saves all changes in the file that you are editing. After your file has been saved, the message "Wrote file" appears in the message window, followed by the pathname of the file that was saved.

Switch file: Replaces the current file in the buffer with a new file that you specify. A dialog box appears, prompting you to save any changes before it switches to the new file. (To learn what buffers are, and how they work in EZ, see ahelp ez-buffers.)

Visit file: Creates a new buffer (in the same window) with a new file that you specify.

Plainer: If a region is selected, removes the "outermost" style from the selected region; if no region is selected, removes the "outermost" style from set of styles to be applied to the next character typed at the text caret. (See ahelp ez-styles for details.)

Plainest [available only if a text region is selected]: If a region is selected, removes all styles from the selected region; if no region is selected, removes all styles from set of styles to be applied to the next character typed at the text caret (i.e., next character will be plain text).

Delete Window: Deletes the window you are in. If this is the last EZ window, choosing this option prompts you with a dialog box asking whether or not you really want to delete the window. If you confirm, then Delete Window behaves like the Quit option.

Help: Runs the ahelp program on the topic name that is the same as the name of the application you used to start EZ (e.g., ez, table, raster).

Quit: Quits all windows and buffers associated with the current EZ process. If you try to quit without saving changes you have made to the text, a dialog box appears asking you to confirm quitting the current EZ session. The dialog box prompts you to confirm quitting for each unsaved buffer in which you have done editing work during your EZ session. (See also ahelp ez-buffers for more information on working with multiple files in a single EZ session.)

Search/Spell Menu

While using any of the options on this menu card, if [, ], *, ., or \ are in the search string, precede them with a backslash (\).

For more information about the four searching options listed below or about the use of regular expression searching in EZ, see ahelp searching.

Forward: Searches forward from the position of the text caret for the set of characters you specify. After you choose this option, EZ puts the "Find:" prompt in the message region. Type the word or phrase that you want to search for and press the Enter key.

Backward: Searches backward from the text caret for the character string that you specify.

Search Again: Repeats the previous search.

Query Replace: Finds the character string that you specify and replaces it with a second character string that you specify. Prompts you to confirm replacement for each occurrence of the specified character string. (See also ahelp query-replace.)

Check Spelling: Checks your spelling throughout the document. (See also ahelp spellcheck.)

Special Menu

Fill Paragraph: Used when importing documents from other text editors into EZ. Removes hard newlines so that the paragraph will automatically fill as a formatted EZ paragraph.

Insert Bullets: Puts a bullet at the beginning of each paragraph at the outermost indent level in the selected region. If no region is selected, puts a bullet at the beginning of the current paragraph. (NOTE: Bullets are not styles. Doing Plainer or Plainest will merely strip off the symbol style that lets a 7 print as a bullet. To remove a bullet, use Remove Bullets.)

Remove Bullets: Removes a bullet from the beginning of each paragraph at the outermost indent level in the selected region. If no region is selected, removes the bullet (if any) at the beginning of the current paragraph.

Enumerate: Puts number in sequence at the beginning of each paragraph at the outermost indent level in the selected region. If no region is selected, puts a number at the beginning of the current paragraph. The number sequence is as follows: If the paragraph (at the same indent level) immediately preceding the paragraph to be enumerated has a number, the number in sequence is that number plus one. If the paragraph (at the same indent level) immediately preceding has no number, start at one. (NOTE: Enumerations are not styles. They are defined as the character sequence, number followed by a single space followed by a period (for example: "1 ."). If you put this character sequence at the beginning of a paragraph in your document, Enumerate will consider it an enumeration. Doing Plainer or Plainest will have no effect on the enumeration. To remove an enumeration, use Denumerate.)

Denumerate: Remove the number from the beginning of each paragraph at the outermost indent level in the region. If no region is selected, remove the number at the beginning of the current paragraph.

Insert equation: Inserts an eq inset (with a newline before and after) at the position of the caret in the document. (To put this inset within a line of text, delete the newlines, or use the long form ESC-TAB eq.)

Insert raster: Inserts a raster inset (with a newline before and after) at the position of the caret in the document. (To put this inset within a line of text, delete the newlines, or use the long form ESC-TAB raster.)

Insert table: Inserts a table inset (with a newline before and after) at the position of the caret in the document. (To put this inset within a line of text, delete the newlines, or use the long form ESC-TAB table.)

Insert PostScript: Inserts a PostScript inset (with a newline before and after) at the position of the caret in the document. The inset takes up the whole width of the page. Scaling and offsetting are available only by explicit commands in the PostScript code. PostScript insets can also be inserted using the long form ESC-TAB ps. (See also ahelp psinset.)

Insert time-stamp: Inserts a time-stamp (also known as writestamp) inset at the position of the caret in the document. This inset is used to insert a date into an EZ file that is always the same as the date of the last time the file was written. This is particularly useful for documents that change a lot. A writestamp inset can also be inserted using the long form ESC-TAB writestamp. (See also ahelp writestamp.)

Insert header/footer: Inserts a header/footer (also known as header) inset (with a newline before and after) at the position of the caret in the document. This inset enables you to set a three part header or footer for your document. You can set multiple headers and footers along the document by inserting multiple header insets. To put this inset within a line of text, delete the newlines, or use the long form ESC-TAB header. (See also ahelp header.)

Enable Basic Styles: Enables EZ formatting in a document that doesn't already have it enabled (e.g. a document you created without using one of the magic filename extensions, mentioned earlier in this document, that give you formatting by default).

Page Menu

Insert Pagebreak: Places a pagebreak inset at the position of the text caret.

Next Page: Moves the text caret to the next pagebreak inset and scrolls the document to that point.

Previous Page: Moves the text caret to the last page break inset and scrolls the document to that point.

Insert Footnote: Places an opened footnote inset at the position of the text caret. (See also ahelp ez-footnotes.)

Open Footnotes: Opens every footnote inset in the current document. (See also ahelp ez-footnotes.)

Close Footnotes: Closes every footnote inset in the current document. (See also ahelp ez-footnotes.)

Table of Contents: Opens a Table of Contents window for the current document. (See also ahelp ez-contents.)

Insert Note: Places an opened annotation note inset at the position of the text caret.

Open Notes: Opens every annotation note inset in the current document.

Close Notes: Closes every annotation note inset in the current document.

File Menu

Save As: Saves the current contents of the EZ buffer under a new name. When the "Write to file:" prompt appears, it contains the pathname of the current file. To save the file under a new name, backspace over the old name, type in the new name, and press Enter.

Save All: Saves the changes to all of the files that are contained in buffers. (For more on buffers, see ahelp ez-buffers.) It also saves newly-created buffers into files if you have named them; buffers that do not have names will not be saved.

Save Plainest As: Prompts you for a filename and saves the current buffer under the new filename, with all the EZ formatting stripped out of the file. You can use this command, for example, when you have somehow gotten formatting into a file that should be only plain text (e.g., a configuration file). For instance, if you paste from OLH into your plain text file, there is currently a bug which formats the file without telling you; the Save Plainest As option allows you to restore the file to an unformatted.

Insert file: Prompts you for the name of a file to be inserted at the text caret position. The file can be either text, formatted text or in a supported Andrew non-text format (e.g., table, raster, eq).

Visit Raw File: Allows you to edit a formatted EZ file as if it were a plain-text file, so that you can directly edit the special format instructions in the file. This is useful, for example, if you have applied styles to a document in such a way that it so confuses EZ that you cannot make sense of the formatting. (Note that this option first checks whether there is already a buffer containing the named file and, if so, it simply switches to that buffer; if you have already read in the file in regular mode, EZ does not read the file in again. In this case, to get EZ to read in the uninterpreted "raw" version of the file, you need to either start another EZ, or use C-x k to kill EZ's internal copy of the regular mode file then use the Visit Raw File option again to read in the raw version.)

Printer Setup: Pops up a window that allows you to fill in the name of the printer you want to send files to for printing during this EZ session. It also allows you to specify parameters for your printed document (e.g., whether or not to print a table of contents). The current printer name and parameters are shown.

Preview: Starts the Preview program on the current buffer to show what the document will look like when printed. (See also ahelp preview.)

Print: Sends the contents of the current buffer to the specified printer (see Printer Setup above) to be printed.

Add Template: Prompts you for the name of a document style template that will be added to the document. (See also ahelp templates.)


Selected Region Menus

The following menus and menu options appear only when you have selected a region of text in an EZ window. When you choose one of the options listed here, it affects the selected text.

Font Menu

Bold: Makes the selected text appear in boldface.

Italic: Makes the selected text appear in italics.

Bigger: Increases the size of the selected text by 2 points (a point equals 1/72 of an inch). The text may not appear to change on the screen if there is no screen font that is 2 points larger than the current one. However, when you print the document, the text will be printed out with the larger font. You can use Bigger cumulatively on selected text to continue increasing its size.

Smaller: Decreases the size of the selected text by 2 points. The text may not appear to change on the screen if there is no screen font that is 2 points smaller than the current one. However, when you print the document, the text will be printed out with the smaller font. You can use Smaller cumulatively on selected text to continue decreasing its size.

Superscript: Decreases the size of the selected [text] by 2 points and prints the text above the default baseline.

Subscript: Decreases the size of the selected text by 2 points, and prints the text below the default baseline.

Typewriter: Prints the selected text in a fixed-width font.

Underline: Prints the selected text underlined.

Sans Serif: Prints the selected text in a sans-serif font.

Justify Menu

Note that the default behavior in EZ is full justification.

Center: Centers the selected text.

FlushLeft: Justifies the selected text to the prevailing left margin only. FlushRight: Justifies the selected text to the right margin only.

Title Menu

Note that "headings" are not enumerated in the table of contents, whereas chapters, sections, and subsections are.

Major Heading: Makes a heading that is centered and larger than the surrounding text.

Heading: Makes a bold heading and moves it to the left of the default left margin.

Subheading: Makes a bold heading flush with the left margin.

Chapter: Makes a bold heading flush with the left margin and increases its size by 4 points.

Section: Makes a bold heading flush with the left margin and increases its size by 2 points.

Subsection: Makes a bold heading flush with the left margin.

Paragraph: Makes an italic heading flush with the left margin.

Caption: Makes a heading that is centered and bold for use as a caption of a figure.

Region Menu

Quotation: Indents the left and right margins of the selected text and makes the text italic.

Description: Creates a "hanging indent" or "outdented" paragraph by indenting the left margin of all but the first line of text.

Example: Indents the left margin of the selected text and displays it in a fixed-width font.

ProgramExample: Indents the left margin of the selected text and displays it in a fixed-width font. (Currently looks identical to example, but included in case document authors wish to create a semantic distinction between example sections and program examples.)

Display: Indents equally both the left and right margins of the selected text. The text at the right margin is ragged (not justified).

Verbatim: Displays the selected text in a fixed-width font. (Included in case document authors wish to create an internal semantic distinction between the fixed-width facecode, and regions that are representing text to be considered space-for-space verbatim characters.)

Indent: Indents equally both the left and right margins of the selected text. Both margins are justified.

Left Indent: Indents the left margin of the selected text.

Format Note: Used to identify commands that should be passed uninterpreted to the troff formatter that handles EZ documents (this lets you produce formatting effects not available as EZ menu items). When the formatting part of the output program sees a FormatNote, the command contained within the note is executed, rather than printed. (See also ahelp ez-troff.)



Appendix B: EZ Key Bindings (with Comparison to GNU Emacs)

Many of the menu commands in EZ have keyboard equivalents. There are also a number of commands in EZ that are only executable as key commands. All of the commands that you can execute in EZ from the keyboard are listed here, with their corresponding GNU Emacs equivalents. M- means Meta- (i.e., press Alt or Compose Character while pressing the following key) and C- means Control- (i.e., press Ctrl while pressing the following key). Note that at Athena, most (but not all) key commands are the same in EZ as in GNU Emacs.

The lines in this card are organized as follows:

  Emacs key     EZ key             Command Description
In some cases, useful descriptive text follows the key summaries.

If there is a command conflict, the other system's command name is in angle brackets. If one system has no equivalent, the key string <none> appears.


Starting the Editor

  emacs &       ez                 start editor
Note: You do not need to use & when starting up EZ. EZ automatically puts itself in background.


Exiting the Editor

  C-x C-c       C-x C-c            exit 
  M-C-c         C-c                exit-recursive-edit

Getting Help

  C-h           <see note>         help
  C-h k         M-?                describe key binding
EZ considers C-h the same as a backspace deletion command. You must choose the Help option from the Front menu card while in an EZ window or run ahelp from the shell to get help in EZ.


Recovering from Errors

  C-g           C-g                abort
  C-x u         <none>             undo
EZ has no undo.


Moving the Cursor

  C-b           C-b                move backward one character
  C-f           C-f                move forward one character
  
  M-b           M-b                move backward one word
  M-f           M-f                move forward one word
  
  C-p           C-p                move to previous line
  C-n           C-n                move to next line
Note that the arrow keys also work for character and line cursor movement in both GNU Emacs and EZ.
  C-a           C-a                move to beginning of current line
  C-e           C-e                move to end of current line
Due to onscreen wordwrap, EZ moves to the end of onscreen line, not to the logical line as in GNU Emacs.
  M-[           M-[                beginning of current paragraph
  M-]           M-]                end of current paragraph

  C-x [                            beginning of current/prev page
                <Previous Page>    beginning of previous page
  C-x ]         <Next Page>        beginning of next page
Note that the page motion commands move between page breaks in both EZ and GNU Emacs. In EZ, page breaks can be inserted with the Insert Pagebreak command on the Page menucard. In GNU Emacs, a pagebreak is normally represented by a ^L (Control-L) character at the beginning of a line.

With motion commands, when the cursor reaches the bottom or top of the screen, GNU Emacs scrolls the text to the middle of the screen/window to keep the text cursor in view; EZ scrolls one line to keep the caret in view.


Scrolling

  M-v           M-v                scroll to show previous screenful
  C-v           C-v                scroll to show next screenful
A numerical argument to M-v or C-v is interpreted differently by GNU Emacs and EZ. GNU Emacs takes the argument as the number of lines to scroll, whereas EZ interprets it as the number of screensful to scroll.
  <none>        M-z                scroll to show previous line
  <none>        C-z                scroll to show next line
If a screen motion command causes the cursor to be scrolled off the screen, GNU Emacs re-positions the text cursor to be at a position visible onscreen; EZ repositions the text cursor only for cursor motion commands, not for screen motion commands, even if this means the text cursor ends up not visible on the current screen.


Typing in the Message Line / Minibuffer

  TAB           TAB or SPACE       complete all
  SPC           <none>             complete token
  RET           RET                execute
  ?             ?                  show completions

Working with Regions

  M-=           <none>             count lines in region
  <none>        M-n                go to paragraph
  <none>        M-N                identify paragraph number
In EZ a paragraph is either a double newline in text mode, or a single newline in ctext, ltext, and other programming language modes. The paragraph commands can therefore act as very nice "what line" and "goto line" commands when editing C, lisp and other language texts.


Marking Text

  C-@           C-@                set mark
  C-SPC         C-SPC              set mark
  C-x C-x       C-x C-x            exchange cursor/mark positions
  <none>        C-M-@              select region
EZ operates on a region between mark and point only after the region has been selected (typically by using mouse actions, but possibly by using the select region command, C-M-@).


Killing and Deleting Text

  DEL           DEL or C-h         delete previous character
  C-d                              delete current character
                C-d                delete next character
  
  M-DEL         M-DEL              kill to beginning of word
  M-d           M-d                kill to end of word
  
  C-k           C-k                kill to end of line
  M-k           <kill whitespace>  kill to end of sentence
  
  C-y           C-y                yank back last kill
  M-y           M-y                replace last yank with previous
For a line with only whitespace, ending with a newline, C-k in GNU Emacs removes the whitespace and the newline, whereas C-k in EZ erases only the whitespace, requiring another C-k to remove the newline.

EZ has an 8 element kill ring. GNU Emacs has about a 40 element kill ring. When using commands to cycle through the kill ring (i.e., M-y), GNU Emacs will skip any kill ring element which is empty (thus, if four non-empty elements are on the 40-element ring and you are at, say, element "A", only four cycles in the same direction are necessary to return to element "A"). EZ always cycles through empty elements, however, so if there are four non-empty elements and you are at element "B", EZ will require eight cycles to return to element "B".


Searching

  C-s           C-s                forward incremental search
  C-r           C-r                reverse incremental search
When a search is in progress, the following key bindings are in effect:
  DEL           DEL                undo effect of last character
  ESC           ESC                exit search
  C-g           C-g                abort search
  C-y                              next line to search string
                C-y                cut buffer to search string
  C-w                              next word to search string
                C-w                selection to search string
GNU Emacs does regular-expression searching only when explicitly requested by the user. EZ performs regular-expression searching by default; the following characters are treated specially: \ . ] [ and *. If you need to use any of these characters in an EZ search, simply precede them with a backslash \.

With the C-y and C-w commands (used to append text to the end of the search string), EZ uses the cut buffer and the selection, whereas GNU Emacs uses the text appearing after point in the text buffer.

With both systems, typing any Ctrl or Meta character will also exit the search.


Query Replace

  M-%           M-%                query replace
When a query-replace is in progress, the following key bindings are in effect:
  SPC or y      SPC                replace current, go to next
  ,             <none>             replace current, do not move
  n or DEL      n                  do not replace, go to next
  !             !                  replace all remaining
  q or ESC      q                  exit query-replace
EZ treats all search strings as regular expressions.


Regular Expressions

  \             \                  quote regexp special
  .             .                  match any single character
  *             *                  match 0 or more of previous
  [...]         [...]              any char in set
You use the quote regexp special character (a backslash for both Emacs and EZ) in a regular expression to "hide" the special meaning of one of the other regexp characters ., *, [, ], and \. This means that you can use "\*" to refer to a literal "*" character, instead of getting the special meaning (match 0 or more of previous).


Changing Case

  M-u           M-u                make word uppercase
  M-l           M-l                make word lowercase
  M-c           M-c                capitalize word
  C-x C-u       <see note>         make region uppercase
  C-x C-l       <see note>         make region lowercase
  <none>        C-^                toggle case of next character
When changing the case of words, GNU Emacs finds the first word on or after the cursor, looking past spaces, tabs, and newlines when necessary, operates on that word, and moves the cursor immediately past the word. EZ operates on a word only if it is on it or immediately after it, and does not move the cursor. EZ will take the word-case change commands to refer to a region if there is a region selected.


Transposing Text

  C-t           C-t                transpose characters
  M-t           <none>             transpose words
  C-x t         <recursive edit>   transpose lines
GNU Emacs drags the character before the cursor past the character on the cursor and moves the cursor to the right. EZ toggles the position of the character before the cursor and the character before that one. The cursor does not move.


Checking Spelling

  M-$           M-$                check spelling
GNU Emacs checks the spelling of the current word. EZ checks the spelling of all words from the current position to the end of the file. In EZ, the following key bindings are in effect during the spell check:
                <number>           replace word with numbered choice
                SPC                replace word this time only
                r                  replace word to end of document
                a                  accept word as is
                i                  insert word in private dictionary
                q                  exit query-replace

Working with Files

  C-x C-f       C-x C-f            find (visit) file
  C-x C-f       C-M-v              find (visit) raw file
  C-x C-s       C-x C-s            save file
  C-x C-i       C-x C-i            insert file
  C-x C-v       C-x C-v            switch file
  C-x C-w       C-x C-w            write to named file

Working with Buffers

  C-x b         C-x b              go to other buffer
  C-x C-b       C-x C-b            list buffers
  C-x k         C-x k              kill a buffer
  M-~           M-~                mark buffer unmodified

Creating and Deleting Multiple Windows

  C-x 2         C-x 2              create new window
  C-x 0         C-x d              delete this window
Both EZ and Emacs create new "windows" to display different buffers, but what this term means is different: Emacs makes new "windows" by dividing up its X window into sections (i.e., Emacs does not create a new X window); EZ makes a new "window" by actually generating a new X window with EZ editing capabilities.


Using Tags

  M-.           M-.                go to next tag

Executing Shell Commands

  M-!           <none>             execute shell command

Using Keyboard Macros

  C-x (         C-x (              start keyboard macro
  C-x )         C-x )              end keyboard macro
  C-x e         C-x e              execute keyboard macro
  C-u C-x (     <none>             append to keyboard macro

Formatting Text

  TAB           TAB                indent line
  C-o           C-o                insert newline after point
  <none>        C-x C-p            make selection plainest
  C-j           C-j                newline and indent <see note>
  <none>        M-s                show styles
  <none>        C-M-x              toggle expose styles
For C-j, GNU Emacs inserts a newline after the cursor; EZ currently inserts the newline at the end of the current line.

EZ allows formatting with keystroke commands in addition to menu commands. Each of these commands works as follows: if there is no selection region, the command starts you typing in the designated style; if there is a selection region, the command makes the selected text the designated style.

  <none>        M-' M-i            italic
  <none>        M-' M-b            bold
  <none>        M-' M-^            superscript
  <none>        M-' M-!            subscript
  <none>        M-' M-_            underline
  <none>        M-' M-t            typewriter

  <none>        M-' M-+            bigger
  <none>        M-' M--            smaller

  <none>        M-' M-=            center
  <none>        M-' M-<            flushleft
  <none>        M-' M->            flushright
  <none>        M-' M-<tab>        leftindent

  <none>        M-' M-l            prompts for style to use
                                   (completion is available)

  <none>        M-' M-p            plainer
  <none>        M-' M-P            plainest
EZ has the notion of the "current" style which controls what style will be in effect with the next character you type. Here are commands to manipulate the current style:
  <none>        M-'<uparrow>       moves you out of the innermost
             or M-' M-u            style

  <none>        M-'<downarrow>     moves you down into a style
             or M-' M-d            (typically used when you are at
                                   the beginning of a style and
                                   want to type inside that style)

  <none>        M-'<leftarrow>     moves you to the next style in
                                   the left direction (used only
                                   when you are between two styles)

  <none>        M-'<rightarrow>    moves you to the next style in
                                   the right direction (used only
                                   when you are between two styles)

Composing Foreign, Accented and Special Characters

  <none>        C-x v              verbose compose
  <none>        C-x x              quick compose

Language Modes

Common to all language modes:
  C-j           C-j                newline and indent
  <none>        M-r                redo styles
See the note in the Formatting Text section for differences between newline-and-indent in EZ and Emacs.

Available only in C language mode (in EZ):

  <none>        M-Q                rename identifier
  <none>        */                 complete comment


MIT Information Systems Comments and feedback to olh-suggest@mit.edu