Euler can be reset by holding control+alt while Euler starts. This may be necessary, if you experience problems with any advanced settings you did. Resetting will also clear the recent file list and any other settings you did.
Euler shows at least a text window, and an optional window for the graphics. Both windows can be resized and remember their positions and sizes.
With the Options menu, the graphics can be shown inside the text window. In this case, graphics should be included into the notebook as described below. The tabulator key then switches between the graphics and the text view.
The width of the text is fixed be default. If you like, you can release it with a switch in the options menu.
The text window of Euler contains
The window title shows the name of the current notebook, if the notebook has been saved to a file or loaded from a file. For the menu, see the section below.
The text area can contain the following elements.
The basic element is the command line. Each command line can have one of each of the other elements attached to it. The comment will appear in front of the command line, the other elements go below the command line.
The sizes and positions of the text and the graphics window are both saved. By default, Euler uses the registry to save its settings. For portable installations, Euler uses a file instead.
To get help on a specific item, mark the item in the notebook, and press F1. The index in the full reference will open positioned at the item. You can mark a command (or a number or sequence of symbols) with a double click. If no item is marked, the last item from the status line will be displayed.
The status line displays the available Maxima or Euler commands, that start with the string at the current cursor position. To insert a command, press the insert key. After the opening bracket of a command, the status line will display the parameters of the command. Pressing F1 now opens the reference in the index for this command.
The documentation provides linked web pages with a thorough introduction to Euler.
The cursor can only be positioned in Euler command lines. To edit comments, use the F5 key.
To move the cursor, or mark text, use the usual keys (see the keyboard list below). The ctrl-key in combination with left and right positions the cursor after the next blank in the current line. The home and end keys go to the line ends. Of course, the cursor can also be positioned with the mouse. The command line is always in insert mode. New letters are inserted at the cursor position.
When you press return, the command in the current command line will be executed by Euler. It does not matter, where the cursor is in this line. Euler will produce its output below the command line, and position the cursor in the next command line, or create a new one.
If a command line ends with three dots "...", the line and the following line belong together. The two lines belong to the same group of lines. Pressing return in either line executes the complete group. If a line with a function command ends with "...", the complete function definition will be read by pressing the return key in that line. More on this feature here.
The following keys can be used.
F1 | Open help in browser for the marked term, or the term in the status line. |
Left, right | Moves the cursor one character |
Ctrl and left, right | Move the cursor one word |
Home, End | Moves to the line ends |
Up, down | To the previous and next command |
page up, down | Position the text in the notebook |
Ctrl end, start | Go to the last or first command in the notebook. |
Ctrl up, down | Recall previous command, or next command in command history |
Return | Start the command |
Escape | Stop the current computation or output of a long matrix |
Ctrl-return | Split the line into a multi-line command |
Tab | Show the graphics screen |
Shift + arrow keys | Mark text |
Ctrl-C Ctrl-X Ctrl-V | Copy text or an image and paste text or commands. |
Ctrl-Alt-F | Copy the notebook commands formatted |
Ctrl-Alt-C | Copy the commands only |
Ctrl-Alt-V | Paste the clipboard lines as commands |
Ctrl-Backspace | Empty the current line |
Ins | Auto complete the current string to an Euler or Maxima command |
F5 | Edit the comment of the current command line |
F9 | Start the internal editor to edit the command line, a file, or a function definition. |
F10 | Start the external editor |
Alt-Backspace | Delete the line. |
Alt-u | Insert all deleted lines |
Alt-Ins | Insert a new line. |
F7 | Insert the degree symbol |
F8 | Insert the +- symbol |
Shift Fx | Insert a macro text set with "setkey(n,text)" (F7 and F8 are pre-assigned) |
Ctrl-n | Restart Euler |
Ctrl-o | Open a notebook |
Ctrl-s | Save the current notebook |
Shift-Ctrl-S | Save the notebook somewhere else |
Ctrl-e | Save the notebook, and export the notebook to HTML |
Alt-F4 | Exit Euler |
Ctrl-z | Restore the current line |
Ctrl-r | Run all commands till the end of the notebook, an error, or an empty line. |
Shift-Return | Run the commands, and return to the current position. |
Ctrl-f | Search text in the notebook |
F3 | Search the next occurrence |
Ctrl-d | Insert a function definition and start the internal editor |
Ctrl-i | Insert "insimg" |
Ctrl-m | Toggle to Maxima mode |
Shift-ctrl-m | Toggle to direct Maxima mode |
To add or edit a comment to a command line, position the cursor in the command line, and press F5. A dialog will appear, where you can enter or edit the comment. Note that the comment is marked completely, when the dialog opens. To edit the comment at some place, use the cursor keys, the home or end keys, or the mouse. To finish editing, press the tabulator key and return, or press the OK button with the mouse.
Comment is oriented in sections. To start a new section, press return. Sections wrap around the end of the line automatically. Note that the line length might be different in the Euler text window, so that the section might look different from the appearance in the comment editor. To separate sections visually, use an empty line.
A comment line starting with a start "*" and a blank will become a header line. In the notebook, this is indicated by underlining the comment. In HTML export a h1.comment style is used for this.
A line with "image: filename" generates the display of an image. The image must be in the current folder, i.e., the folder where the notebook is stored. The file name must include the extension. PNG and JPG are acceptable image formats. An example would be
image: imagefile.png
You can add a maximal size for the image in screen lines.
image: (25) imagefile.png
A line with "latex: formula" generates the display of a formula. The formula must be encoded in Latex, and the Latex system must be installed to generate the image. An example for a valid line would be
latex: \sum_{k=0}^\infty x^k = \frac{1}{x}
If you have a formula in Maxima, you can let Maxima do the Latex formatting. This is not perfect, but works easily for many formulas.
maxima: diff(x^x,x) maxima: 'integrate(x^2,x) = integrate(x^2,x)+c
You need the following Latex commands and packages. If you install MikTeX in the small version, those packages and commands should be included.
You can copy images from Euler notebooks by marking them with a double click and pressing ctrl-c.
The internal editor starts with F9. It can edit
depending on the content of the line, where the editor was started.
If the line contains a load command for an Euler file, such as
>load myfunctions
the internal editor will open that file. The editor and the load command assume that the default file extension is "*.e". The file will be in the same directory as the notebook. The notebook should be saved, before the editor is started, or it should be loaded from a file. The editor is modal, and Euler cannot be used, while the editor is active. To end the editor, press OK with the mouse, or the tabulator key and then the return key. To enter a tabulator position in the editor, use ctrl-tab.
If the line is empty, the editor will open a temporary file in the user directory. Once, the editing finishes, Euler will write a load command for the temporary file into the command line. Of course, this is only useful for testing.
If the line starts a function definition, such as
>function test (x) ... $ if x<0 then return x^2 $ else return x^3 $ endif $endfunction
the editor will edit this function definition. To start a new function, type "function" into an empty line, and press F9. In case of multi-line functions, the editor will append "..." to the fist line. Thus the function can be compiled with a single stroke of the enter key. To format the function definition, you can use two spaces as indent.
If the line the editor is started in is the first line of a group of lines, the editor will edit the group at once. A group of lines is a sequence of lines ending with "..." (besides the last line). The group can be executed by pressing return in any of its lines.
If the line contains any other content, the editor can be used to edit this content. If the result contains more than one line, those lines will be inserted into the text window.
The external editor can only be used to edit Euler files. It starts with the F10 key.
The best way to use this editor is to start it in a line containing a load command. In this case, the external editor will work like the internal editor (see above). The external editor is not modal, and Euler can be used, while the editor is running. To load the file, place the cursor into the line with the load command, and press return.
To start a new file, place a load command into a command line, and press F10. The editor will probably complain about a missing file. Save the file under the desired name.
The external editor starts in the current directory, and most probably will save the file there. The current directory is set by loading or saving a notebook.
The external editor can be any text editor. Office programs like Word cannot be used for Euler files. Euler comes with a Java editor written by the same author as Euler. This editor has a syntax highlighting mode for Euler files. But it is possible to use any other editor. To configure the external editor, open the setup program from the Extras menu. You need to provide the path to the executable file of the editor and optional command line parameters. Use a full path to the executable, unless it is in a directory from the windows default path. An example would be "notepad.exe".
The status line shows help for the current command. While you are typing the command name, it shows a list of all available commands. For Euler commands, this includes your functions. Press the insert key to auto complete the name of the command. Press it several times to get other choices. If the cursor is immediately behind the opening bracket of the command, the status line will display the help for the function. For Euler functions this is the first line of the help section (lines starting with ##). For built-in functions the line is derived from the file "help.txt". This text file is the one that it also available in the reference.
The second window of Euler is the graphics window. It will minimize together with the text window. To switch to the graphics window, click into it with the mouse, or press the tabulator key in the text window. To switch back, press the tabulator key in the graphics window.
The graphics window will be visible, if there was graphics output, but only until text output occurs. To hold the graphics window on top, the plot3d and plot2d functions can use the user=1 flag. Alternatively, any plot command can use a wait command to wait for keystroke.
The graphics window can be resized. The graphics will resize to fit into the graphics window. By default, Euler uses only a square area in the window. In the menu, this can be turned off. Then the aspect ratio will change with the graphics window. If you need a specific aspect ratio for the export, you can also use the aspect function of Euler.
There is a special mode, where the graphics appear inside the text window. In this case, the tabulator key switches between text and graphics. The graphics will appear with the commands wait, mouse and shg. The >user flag in plot2d and plot3d will show the graphics.
Moreover, it is possible to use a specific aspect ratio for the plot without changing the graphics window. Use the aspect command for this. It is also possible to partition the plot window with the window command.
It is possible to anti-alias the graphics window. This will slow down the graphics, but yield nicer graphics in most cases. Use a menu option to enable this. The effect is the same smooth effect you see on the downscaled images on this web page. It is also possible to anti-alias graphic exports and embedded graphics. See below for more information.
The content of the graphics window can be exported in various formats. Use the File menu to export the graphics, or the commands savepng, savesvg, saveps.
The most important format is PNG (portable network graphics), which is a bitmap format. In the export dialog, set the size of the bitmap in pixels. For small web pages like this page you should use a width of 400-600 pixels. Press the aspect ratio button to get a correct height. For printed texts with graphics in full page width (12cm), use 1000-2000 pixels. Bitmaps for screen display should be anti-aliased, which smoothens edges. For print, this is not necessary.
The SVG (scalable vector graphics) format is a format preferred by sites, which render this format into several bitmap resolutions. Note, that this is only possible within certain limits. Too small or too large copies of the file do not look good. Fonts and other graphics elements will not fit with the rest of the page. The default look of the Euler graphics is made for screen display or for prints with a similar size. Smaller prints may require to set a larger font (see below).
The export will scale the line thickness for larger pixel sizes by default. Otherwise the plot would look too thin. In the Option menu there is a flag to switch that off.
Bitmap graphics can be cropped to a part of the graphics window. Use the menu entry for this, and set the upper left corner of the crop with the left mouse button, and the bottom right corner with the right mouse button. Press return to set the crop. The cropped off region will be indicated in gray. Note, that the export size still refers to the full size of the window. The advantage of cropping is that the usual font size and plot layout is used.
The current content of the graphics window can be inserted into the text window with the insimg command. The graphics will be rescaled to fit into 25 text lines, by default. But the insimg command can accept a parameter with any other number of lines. The image can be anti-aliased, which smoothens edges and looks better than a small redraw of the graphics. The anti-aliasing can be omitted with the parameter antialias=0 in the insimg command. Note that the graphic window itself can be anti-aliased. But this has no effect on the anti-aliasing of embedded graphics. The graphics is always redrawn from scratch.
Images in the text window are exported each image in a single file, when the notebook is saved or exported to HTML (see below). The image files can either go to the same directory as the notebook, or the HTML file, or to a sub-directory images, depending on the settings in the Options menu.
Since it tedious to delete a notebook along with all its images, the "Save as ..." dialog offers to delete the notebook at the previous name or position. This will also delete all images belonging to that notebook (see below).
Euler can also load an image into to the text window with loadimg. This Euler function assumes an image in the current directory (the directory of the current notebook). There is a menu item to save a bitmap on the clipboard to a file and insert it via the loadimg command. The filenames are chosen automatically in this case, and depend on the notebook name.
Restart Euler will delete the current notebook and the graphics, start with a new notebook, clear all variables and functions, load the pre-defined Euler functions, stop and start Maxima, and reset all graphics settings to their default values. If Euler is in permanent Maxima mode, it will start in that mode. Do not delete the first line indicating that mode!
If you open a notebook, Euler does a restart by default. This can be switched off in the Options menu. Opening a notebook in the user home directory will redirect the file dialog to the sub-directory "Euler Files" of the user home directory. For portable Euler installations (see here), it will open in the sub-directory "Euler Files" of the Euler home directory.
If you save the Notebook under another file name, Euler offers to delete the previous notebook. This will delete all images belonging to the notebook too. Images embedded in the text window are either saved in PNG files along with the notebook, or in a sub-directory "images", depending on a setting in the Options menu.
HTML Export: Euler notebooks can be exported to HTML. These exports can be viewed with any web browser.
Euler will use imbedded CSS styles for the export. However, it is also possible to use a pattern file. See this example for such a pattern file. The necessary CSS styles can be found here. The first line of comment is used as the header. Other lines in the comment can be made to sub-headers by starting them with a "* ...". For convenience, there is a menu entry, which saves the file and exports at the same time.
If you intend to print the HTML page, you should use a browser that does not break images across pages. Moreover, you may wish to switch on "Keep large images for HTML export" in the settings of the graphics. This takes a more space and a longer time for saving, but the graphics are nicer. For Latex formulas, there is a similar switch, which is on by default.
You can create a ZIP archive with the following files: name.en, name*.e, name*.dat, name*.html, name*.png, images\name*.png. This is just a convenience to send the notebook with all files by mail. The archive cannot be opened by Euler. The command only updates the files, and does not delete any other files in the archive. The archive is generated in the notebook directory.
Loading an Euler file can be done with the "load" command. But there is also a menu entry for that, which will insert a load command into the notebook.
There is a menu entry to convert an Euler file to HTML. This is mainly for documentation. The HTML file can be linked form a comment using a line "See: filename.e". The Euler file can provide comments. For examples, have a look a the Euler files in the util folder of the installation.
Graphics export was explained in more detail here. The clipboard can be used too. The clipboard can receive either a bitmap format, or a WMF (windows metafile) format. Both can be inserted into Word documents, e.g.
Exit the program with the menu entry, by closing the window, or with the command "quit". The quit command, however, will not ask for confirmation. The confirmation can be switched off completely in the Options menu.
To print a notebook, export the notebook to HTML, and print from a browser. The "Print" entry in the File menu prints only the graphics on one of the system printers. You can add a text below the graphics.
This menu contains the names of the recently opened notebooks. The directories of these notebooks are stored, but not displayed in this menu. The list is saved in the Windows registry, or, for portable installations, in the Euler home directory. There is an option to clear the list.
If a line has been modified, it can be restored. This works only for one previous state of the line. Euler does not have a complete undo at this time. However, you have access to the history of previous commands with ctrl-cursor up. Moreover, lines deleted with alt-backspace can be restored with alt-u (see below).
There is a option to run commands automatically. This will stop at each error, and at each empty line. With the second menu entry or with shift-return you can run the subsequent commands, and return to the current cursor line afterwards. This updates the rest of the Euler file for a change in one of its lines.
This menu contains some cut, copy and paste commands. To mark a portion of the Euler notebook, hold down the shift key and use the cursor keys. Then you can copy the content in three formats: ctrl-c is the internal format, shift-ctrl-f is a format for printing, and shift-ctrl-c copies the commands only. To insert from the internal format, use ctrl-v as usual. To insert the text as commands, use shift-control-v. This is useful, if you have an Euler file with commands, and want to insert them into a notebook. Note, that lines of a function definition must start with a $.
You can also copy images to the clipboard. Double click the image to mark it. Then press ctrl-c. Pasting images into Euler notebooks does not work. You can load images into comments with a like "image: filename", or into the command out with the loadimg(filename) command.
It is possible to search in an Euler notebook. Use the dialog for the first search, and F3 to search for more places. Note that the cursor is not moved to the search results. Use the mouse to position the cursor there. F3 will start over after the last occurrence.
Output of commands is removed automatically, if the command is executed anew. But it is possible to remove selected or all output.
There is a sub-menu for commands, which change the command line. A command line can be split into a group of two lines with ctrl-return. To insert a new empty command line use alt-insert, and to delete a command line use alt-backspace. Deleted command lines can be inserted back using alt-u at any other place. To clear a command line, use ctrl-backspace.
Another sub-menu contains commands for the command history. This history contains the recent commands. To recall a command use ctrl-up, to go the next command, use ctrl-down. To reset the history pointer to the current command, use escape.
Comments have been discussed here.
The internal or external editor can be started in this menu. These editors have been discussed in more detail here and here.
This menu contains some shortcuts to insert commands into the text window. Use it to insert a function definition, and start the internal editor immediately, as described here. There is an option to insert the insimg command, described here. The option to insert graphics from the clipboard works well with the snipping tool of windows. The file will be saved and a "loadimg" command will be inserted into the current notebook line.
Maxima mode means, that all commands are sent to Maxima, instead of to Euler. You can toggle Maxima mode with the maximamode command, or with the entries in this menu. There are two forms of this mode, direct and compatible. Use the maximamode command again to toggle the mode off. An option in the Options menu allows to start Euler in Maxima mode at each restart.
The first option here is to resize the graphics window, so that the 2D plots appear square, if the coordinate space is square. This will change the height of the graphics window.
The sub-menu with program settings contains switches for confirmations, for the automatic restart of Euler, when a notebook is loaded, and to use the status line or not.
Memory Sizes: Moreover, there is a settings dialog for the memory sizes, which Euler uses. Simply use the defaults. The memory is limited to 512 MB and the graphics memory to 128 MB, until a Windows 64 version of Euler is available. Higher values cause instability of Euler in Windows 32.
Browser Command: The browser command for the options menu can be set with this menu entry. The "Default" button clears this strings. In this case, Euler determines the default browser from the registry. If this does not work, or if you want to use another browser, you can set the path to the browser here.
You can also select your Euler documentation here, or use "http://www.euler-math-toolbox.de" to use the web sites of Euler. You need to point the browser to the documentation directory with the sub-directories reference, documentation etc.
The graphics sub-menu contains switches to scale the line thickness in large bitmap exports (see here), to prevent saving images of notebooks at all, to save the images in a sub-directory or in the notebook directory, and to save a bb-file along with PNG images. A bb (boundary box) file is a small file necessary for Latex and the graphics package, which describes the image size. If you do not know, what this means, you probably do not need a bb file.
The Euler text window should be fixed to 80 columns to provide compatibility between notebooks. However, this can be released. You need to restart Euler. Note that the HTML export of your notebooks will have the same format as your Euler text window. Usually, broad HTML pages will look bad, and be unreadable.
Colors: There is a sub-menu to set colors and fonts. You probably should not change the 16 default colors of Euler, since you can use any color in your drawings with the rgb command.
Fonts: You might want to change the font for the text and graphics window. Note that Euler uses a relative size for graphics fonts, but an absolute size for text fonts. You can select a font and its size, but for the graphics font the font size will be recomputed in relation to the current height of the graphics window. Leave the printer font at its default. A changed font makes necessary a change of the layout of the graphics window. To initiate that change, restart Euler or at least type
>reset;
Euler installs the nice Souce Code Pro fonts by Adobe. If you want to use these, enable the fonts with the switch in the Options menu. These fonts make it easy to tell 0 and 0, or 1 and l, apart. I prefer the fonts to the default "Courier New CE". You can only used fonts with fixed character width for Euler notebooks.
The Maxima sub-menu contains a switch to start Euler in Maxima mode. If this switch is on, Euler will be set to Maxima mode, whenever it starts or is restarted. All commands are sent to Maxima, either directly or in compatibility mode. To send a command to Euler in this mode, start the command with "euler". Notebooks saved in this mode must contain a special text in the first line. So, do not delete this text. Otherwise the file will not load in Maxima mode. The switch to use the direct mode refers to this automatic Maxima mode, and also to the maximamode command without parameters.
Maxima inserts output labels. These labels do not make sense in a notebook environment, since they change, when the command is executed again. So they are removed by default.
Of course, Euler needs to find Maxima, to start this sub-system. If you want to use your own Maxima version, you have to adapt the Maxima command. This is only recommended for experts. You have to insert the full path to the maxima.exe file in your Maxima installation. The Maxima directory is the directory containing the info and share folders.
Maxima can either be started at each restart automatically, or if needed. Then, the first command for Maxima will take a bit longer. By default, the direct mode for Maxima is disabled, since I want to discourage starters to use this mode, and moreover, it introduces the chance of errors.
Yacas is disabled by default, since I consider it obsolete. Yacas can also be started automatically, or on demand.
The sub-menu with switches for the strict mode tries to balance downward compatibility with security. Euler used to be more flexible. But a more strict syntax is far better to keep the control. Some of these restrictions do not affect Euler commands inside functions, only in the command line, and others can be relaxed for all functions contained in an Euler file. Use the relax command for this. Change the following switches only, if you really need.
These Menus contain commands that can be inserted into the command line at the cursor position. The commands contain placeholders, marked with a question mark. If the user starts typing at a placeholder, the placeholder will be removed. To go the next placeholder, press the cursor left key.
This menu works like the Maxima and Euler command menu. The commands "addmenu" and "submenu" add command items to this menu. Some Euler files in the example section contain a list of menu items to assist the user. Try "load geometry" for an example. Here is an example for Yacas:
submenu Yacas addmenu yacasmode on addmenu yacasmode off addmenu D(?var) ?expression addmenu Integrate(?var) ?expression ...
The menu is cleared at each restart of Euler.
The help in the browser requires an installed browser, of course. This should not be a problem. Euler opens the documentation, even on a portable Euler system. The default browser will be used. But you can configure any browser in the options menu.
Open introductions and examples is a special file selector, which always starts in the correct directory. The default file selector remembers the previous position.
There are some direct links to browser pages. You can find these pages also from the start of the help.
The version information has a button to open a browser, and go the web page of Euler. You will see the recent version changes. Compare the current version number with your version number, as printed in the version dialog.
The command "euler.exe" can accept the following parameters.
Euler tries to keep downward compatibility as much as possible. There have been some changes in the command syntax, but most of them are restrictions which can be released, if needed. The file syntax has also been extended over the years, but old files should read into recent Euler versions.
The following two Euler files could be interesting for users.
These formats are explained in the Format Reference.
Euler Homepage