Typing a simple text

1.Typing your first text with TeXmacs

1.After starting up

Assume that you have started up TeXmacs, so that you have a window like below on your screen:

Figure 1. Window which appears when starting TeXmacs up.

Before you start typing a new text, we recommend you to perform the following steps:

2.Giving your document a name

We recommend you to give your document a name before you start to edit it, by saving it under a new name. This is achieved by selecting the Save buffer as item in the icon menu or the Save as item in the File menu: press the left mouse button on , move your cursor to Save buffer as while maintaining the left mouse button pressed, and release the left mouse button.

Figure 2. Giving your document a name by saving it under a new name.

Notice that you could have achieved the same thing by simultaneously pressing the shift and the F3 keys, as suggested by the help balloon. This help balloon automatically shows up when leaving the mouse pointer on the Save buffer as for a while. After you released the left mouse button, a new window of the following form pops up:

Figure 3. The file-chooser can be used to browse your directory tree.

This window is also called a file browser, because you can interactively choose a file name and a directory where to save your file, by using the keyboard or the mouse. In the example, .., images, phonetic and test are the parent directory and subdirectories of the current directory. The file demo.tm is an already existing TeXmacs file in the current directory. The buttons Home and Texts can be used to return to your home directory or a special directory for TeXmacs documents.

In order to finish the action of giving our text a name, we just type test.tm in the File: field and press on Ok:

Figure 4. Entering the name test.tm and clicking on the Ok button.

We notice that you should always let your file name end by the .tm suffix, so that anyone can recognize that your file is a TeXmacs document. After giving your text a name, your main window should look like

Figure 5. Your document has been saved under the name test.tm.

First of all, you may notice the change of the title of your window. Furthermore, a message on the footer confirms the name change.

3.Writing a simple text

Once you have given your document a name, you may start to type your text. Later on, we will explain how to type special characters, which are necessary for writing texts in foreign languages. The following is a sample text, which you may try to type as an exercise:

Figure 6. Typing a simple text using TeXmacs.

When you are done with typing, we recommend you to first save your document, using the save buffer item in the icon menu, or by pressing the F3 key. A message on the footer should confirm the success of this operation:

Figure 7. We just save the simple text for security.

For your safety, TeXmacs actually autosaves your document every two minutes. If you forgot to save your document before closing TeXmacs, or if your computer is unpowered for some reason, then you will be prompted whether you want to retrieve the last unsaved changes in your document as soon as you try to load it. Again, a message on the footer confirms autosaving:

Figure 8. TeXmacs automatically autosaves your document every two minutes.

When you are done with typing, you usually want to print your document out. This can be done by selecting the Print all item in the icon menu, or by pressing the F4 key. Before printing, it might be that you want to setup your printer using FilePage setup. You may specify a printing command (like lpr), the paper type of your printer (like a4 in Europe or letter in the U.S.A.) and the printer's precision in dots per inch (600 is default).

In order to retrieve your text after closing TeXmacs, you first have to push the Load buffer item in the icon menu or hit the F2 key. Next, you may select your file using the file browser. In our example, the file test.tm indeed appears in the file browser and we may retrieve it by rapidly clicking twice on it.

Figure 9. Retrieving the simple text from the disk.