Euler - documentation

About Euler...
News
Screenshots
Documentation
Reference
Examples
Download
Message board
Links
Contact
|  | # Documentation ### The user interface EULER uses two windows : a text window and a graphics window. The text window contains the menu and is designed for user input and output of EULER. It is a scrollable window. You can use the scrollbar to scroll through available text or the page up and down keys. All user input is preceded by a prompt (>). Furthermore, there are output and comments (preceded by %). The size of the window is saved at exit so that the window will have the same size the next time you run EULER. (see below for preferences) The graphics window is used, whenever EULER draws output. Unless the graphics screen has been cleared, EULER will redraw the screen automatically. The size of the graphics window is saved at exit so that you will get the same size the next time you run EULER (see below for preferences). You can switch between both screens with the tabulator key while editing input. ### Using Notebooks (.en files) The interface works as a terminal, allowing command editing, and then interpret the commands by an `return` key stroke. The cursor is shifted to the next command line. The line, on which the cursor is, is the active command line : this is the line that is interpreted by Euler when the `return` key is stroken. This version of EULER uses notebooks. i.e., old commands can be edited and changed, than interpreted again. Comments may be added to commands to explain them. This is a smooth and flexible interface. Note : The most important fact about notebooks is that EULER still uses the sequence of commands as they are executed. So if you change the value of a variable and go to previous command, the changed value is used. You may also change a previous command and execute it again. Its output is then replaced with the new output and EULER proceeds to the next command. Furthermore, the list of command inputs, outputs and comments can be saved as notebook files (they are saved as text files) so that they can be given to other people or can be kept as documented computations. These files can be loaded with the `Open` menu command or, just by dragging the file from an XDND protocol compatible file manager (Rox, Nautilus). For now, I have a problem with Konqueror (??) - to be fixed. The directory where the notebook file is located is the working directory. Euler module file in the same directory can be loaded with the `load` command Notebook files are different from Euler module files (*.e files), which are collections of functions programmed euler language , and which may be loaded with the `load` command. You may not only change previous commands, but also delete them or insert new commands. Use the edit menu to do this and to learn about the keyboard shortcuts. ### The line editor Text can be entered after the prompt (`>`) using the keyboard. If a letter is wrong, it can be canceled with the `backspace` key or the `delete` key. The cursor `left` and `right` keys position the cursor back and forth in the line. The line editor is always in insert mode, so any character is inserted at the cursor position. The `home` key positions the cursor to the beginning of the line, and the `end` key to the end of the line. `Escape` clears all input. `Shift cursor left` or `right` position the cursor one word to the right or left. You can also select with the mouse, copy, cut and paste text through the X clipboard. Finally, the input is entered by pressing `return`. Then EULER will start to interpret the command. The cursor can be at any position of the input line, when Return is pressed. Euler records the previous executed commands in an history. Previous input can be recalled in the current line with `shift cursor-up` and `shift cursor-down`. Pressing the `insert` key extends incomplete commands. Pressing this key again gives another extension, if there is one. The search goes through the command history, the implemented functions, the user defined functions and the built-in commands in that order. There are some other special keys. The `tabulator` key switches to the graphics screen and from there any key switches back. The `escape` key stops any running EULER program and some internal functions, like the 3-dimensional plots, the linear equation solver and the polynomial root finder. `Cursor-up` and `cursor-down` position the input line to the next or previous input. If you execute this line, its output will be replaced by the new output. `Page-up` and `page-down` go several pages back or forth, but do not change the cursor position. If you want to set the cursor to a command, you can click at the correct position with your mouse. You may add comments to a command. This comment will be printed before the command. Each line of the comment will start with `%`. EULER input can spread over several lines by the use of "..". The two dots are allowed at any place, where a space is acceptable. E.g.
    >3+ .. some comment
    >4
    	7
    >3+4
    	7
Comments can follow the ".." and are skipped. ### Editing user defined functions when the `function` keyword is encountered at the beginning of a line, the editor is sent in a user defined editor mode which allows function body editing.
    >function f(x)
    $  return x^2-1;
    $endfunction
    >
By the way, the notebook interface uses the `escape` key to end a function definition, which is entered directly into the line editor. I.e., it will clear the input line and print `$endfunction`. Pressing `return` will end the function definition. For more information about the euler functions, read the euler reference. ### Menus Most menu items are self explaining. However, here is a short description of the less obvious things. The File menu contains commands to load and save notebooks, and to create new notebooks. This should not be mixed up with the loading of EULER files (*.e), which contain commands to be executed, whereas notebooks contain complete sessions with output and comments. More over, this command lets you save the graphics to Postscript. the size of the postscript picture depends on the graphics window size (just try and see). As mentioned, each notebook command may have a comment, which you can edit with the Edit menu command. It will appear in green. Paragraphs are marked by empty lines. You may cut and paste in this window with the usual commands (`Ctrl-X`, `Ctrl-V`, `Ctrl-C`). All outputs can be deleted. Finally, you may insert or delete the current command (including comments and output) or insert a new command here. The Misc menu gives access to the preference dialog and to the Demo sub menu. This submenu allows you to load quickly the demo notebook files provided with euler. The program scans the default install directory (INSTALL_DIR/share/euler/progs/) and watch for notebook files. So, if you copy a notebook in this directory, it will appear in the demo menu the next time euler is run. The Help menu lets you view the documentation. There is also the traditionnal about box. ### The preference dialog The Option menu lets you set the preferences up. By default, the preferences will be saved at EULER exit so these settings will affect the next session of EULER as well. You can set the stack size and the size of the internal graphics storage here. Changes will be effective at the next start of EULER. On the next page, you can choose the number of lines per screen for the graphics font. The higher this number, the smaller the font. Next, you can adjust the 16 colours of EULER. These colours are used for the text editor, the plot command, the 3D plots etc. E.g., color(n) will set the colour for the next plot. Other commands are wirecolor, fillcolor. You may want to put these commands into euler.cfg, which is loaded at program start. Note that the density plots and shaded 3D plots use a different colour scheme, which is only affected by the color nb 1. Finally, You can set a flag to let Euler save preferences at exit (the default). You may choose another browser than the one suggested (netscape by default). And You can also reset the preferences to the default values. ### The resource and config files Euler uses a resource file and a config file. Both are saved in the .euler/ directory in the user's home. You don't have to worry about these files since they are created by euler itself if they don't exist. The preferences are saved in the resource file named `eulerrc`. You may change the values with the preference dialog or by editing the file with any text editor. The config file `euler.cfg` contains euler commands to be executed at start up, like defining default path for euler files, loading default packages ... The first time you run euler, a default config file is created, but you may edit it to meet your needs. Any valid euler command will be executed.